1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package customerprofiles 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/aws-sdk-go-v2/service/customerprofiles/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Adds an integration between the service and a third-party service, which 16// includes Amazon AppFlow and Amazon Connect. An integration can belong to only 17// one domain. 18func (c *Client) PutIntegration(ctx context.Context, params *PutIntegrationInput, optFns ...func(*Options)) (*PutIntegrationOutput, error) { 19 if params == nil { 20 params = &PutIntegrationInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "PutIntegration", params, optFns, addOperationPutIntegrationMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*PutIntegrationOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31} 32 33type PutIntegrationInput struct { 34 35 // The unique name of the domain. 36 // 37 // This member is required. 38 DomainName *string 39 40 // The name of the profile object type. 41 // 42 // This member is required. 43 ObjectTypeName *string 44 45 // The configuration that controls how Customer Profiles retrieves data from the 46 // source. 47 FlowDefinition *types.FlowDefinition 48 49 // The tags used to organize, track, or control access for this resource. 50 Tags map[string]string 51 52 // The URI of the S3 bucket or any other type of data source. 53 Uri *string 54} 55 56type PutIntegrationOutput struct { 57 58 // The timestamp of when the domain was created. 59 // 60 // This member is required. 61 CreatedAt *time.Time 62 63 // The unique name of the domain. 64 // 65 // This member is required. 66 DomainName *string 67 68 // The timestamp of when the domain was most recently edited. 69 // 70 // This member is required. 71 LastUpdatedAt *time.Time 72 73 // The name of the profile object type. 74 // 75 // This member is required. 76 ObjectTypeName *string 77 78 // The URI of the S3 bucket or any other type of data source. 79 // 80 // This member is required. 81 Uri *string 82 83 // The tags used to organize, track, or control access for this resource. 84 Tags map[string]string 85 86 // Metadata pertaining to the operation's result. 87 ResultMetadata middleware.Metadata 88} 89 90func addOperationPutIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { 91 err = stack.Serialize.Add(&awsRestjson1_serializeOpPutIntegration{}, middleware.After) 92 if err != nil { 93 return err 94 } 95 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutIntegration{}, middleware.After) 96 if err != nil { 97 return err 98 } 99 if err = addSetLoggerMiddleware(stack, options); err != nil { 100 return err 101 } 102 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 103 return err 104 } 105 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 106 return err 107 } 108 if err = addResolveEndpointMiddleware(stack, options); err != nil { 109 return err 110 } 111 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 112 return err 113 } 114 if err = addRetryMiddlewares(stack, options); err != nil { 115 return err 116 } 117 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 118 return err 119 } 120 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 121 return err 122 } 123 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 124 return err 125 } 126 if err = addClientUserAgent(stack); err != nil { 127 return err 128 } 129 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 130 return err 131 } 132 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 133 return err 134 } 135 if err = addOpPutIntegrationValidationMiddleware(stack); err != nil { 136 return err 137 } 138 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutIntegration(options.Region), middleware.Before); err != nil { 139 return err 140 } 141 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 142 return err 143 } 144 if err = addResponseErrorMiddleware(stack); err != nil { 145 return err 146 } 147 if err = addRequestResponseLogging(stack, options); err != nil { 148 return err 149 } 150 return nil 151} 152 153func newServiceMetadataMiddleware_opPutIntegration(region string) *awsmiddleware.RegisterServiceMetadata { 154 return &awsmiddleware.RegisterServiceMetadata{ 155 Region: region, 156 ServiceID: ServiceID, 157 SigningName: "profile", 158 OperationName: "PutIntegration", 159 } 160} 161