1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package dataexchange 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/smithy-go/middleware" 10 smithyhttp "github.com/aws/smithy-go/transport/http" 11 "time" 12) 13 14// This operation returns information about a revision. 15func (c *Client) GetRevision(ctx context.Context, params *GetRevisionInput, optFns ...func(*Options)) (*GetRevisionOutput, error) { 16 if params == nil { 17 params = &GetRevisionInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "GetRevision", params, optFns, addOperationGetRevisionMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*GetRevisionOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30type GetRevisionInput struct { 31 32 // The unique identifier for a data set. 33 // 34 // This member is required. 35 DataSetId *string 36 37 // The unique identifier for a revision. 38 // 39 // This member is required. 40 RevisionId *string 41} 42 43type GetRevisionOutput struct { 44 45 // The ARN for the revision 46 Arn *string 47 48 // An optional comment about the revision. 49 Comment *string 50 51 // The date and time that the revision was created, in ISO 8601 format. 52 CreatedAt *time.Time 53 54 // The unique identifier for the data set associated with this revision. 55 DataSetId *string 56 57 // To publish a revision to a data set in a product, the revision must first be 58 // finalized. Finalizing a revision tells AWS Data Exchange that your changes to 59 // the assets in the revision are complete. After it's in this read-only state, you 60 // can publish the revision to your products. Finalized revisions can be published 61 // through the AWS Data Exchange console or the AWS Marketplace Catalog API, using 62 // the StartChangeSet AWS Marketplace Catalog API action. When using the API, 63 // revisions are uniquely identified by their ARN. 64 Finalized bool 65 66 // The unique identifier for the revision. 67 Id *string 68 69 // The revision ID of the owned revision corresponding to the entitled revision 70 // being viewed. This parameter is returned when a revision owner is viewing the 71 // entitled copy of its owned revision. 72 SourceId *string 73 74 // The tags for the revision. 75 Tags map[string]string 76 77 // The date and time that the revision was last updated, in ISO 8601 format. 78 UpdatedAt *time.Time 79 80 // Metadata pertaining to the operation's result. 81 ResultMetadata middleware.Metadata 82} 83 84func addOperationGetRevisionMiddlewares(stack *middleware.Stack, options Options) (err error) { 85 err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRevision{}, middleware.After) 86 if err != nil { 87 return err 88 } 89 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRevision{}, middleware.After) 90 if err != nil { 91 return err 92 } 93 if err = addSetLoggerMiddleware(stack, options); err != nil { 94 return err 95 } 96 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 97 return err 98 } 99 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 100 return err 101 } 102 if err = addResolveEndpointMiddleware(stack, options); err != nil { 103 return err 104 } 105 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 106 return err 107 } 108 if err = addRetryMiddlewares(stack, options); err != nil { 109 return err 110 } 111 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 112 return err 113 } 114 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 115 return err 116 } 117 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 118 return err 119 } 120 if err = addClientUserAgent(stack); err != nil { 121 return err 122 } 123 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 124 return err 125 } 126 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 127 return err 128 } 129 if err = addOpGetRevisionValidationMiddleware(stack); err != nil { 130 return err 131 } 132 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRevision(options.Region), middleware.Before); err != nil { 133 return err 134 } 135 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 136 return err 137 } 138 if err = addResponseErrorMiddleware(stack); err != nil { 139 return err 140 } 141 if err = addRequestResponseLogging(stack, options); err != nil { 142 return err 143 } 144 return nil 145} 146 147func newServiceMetadataMiddleware_opGetRevision(region string) *awsmiddleware.RegisterServiceMetadata { 148 return &awsmiddleware.RegisterServiceMetadata{ 149 Region: region, 150 ServiceID: ServiceID, 151 SigningName: "dataexchange", 152 OperationName: "GetRevision", 153 } 154} 155