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// Updates the properties of a domain, including creating or selecting a dead 16// letter queue or an encryption key. After a domain is created, the name can’t be 17// changed. 18func (c *Client) UpdateDomain(ctx context.Context, params *UpdateDomainInput, optFns ...func(*Options)) (*UpdateDomainOutput, error) { 19 if params == nil { 20 params = &UpdateDomainInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "UpdateDomain", params, optFns, addOperationUpdateDomainMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*UpdateDomainOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31} 32 33type UpdateDomainInput struct { 34 35 // The unique name of the domain. 36 // 37 // This member is required. 38 DomainName *string 39 40 // The URL of the SQS dead letter queue, which is used for reporting errors 41 // associated with ingesting data from third party applications. If specified as an 42 // empty string, it will clear any existing value. You must set up a policy on the 43 // DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer 44 // Profiles to send messages to the DeadLetterQueue. 45 DeadLetterQueueUrl *string 46 47 // The default encryption key, which is an AWS managed key, is used when no 48 // specific type of encryption key is specified. It is used to encrypt all data 49 // before it is placed in permanent or semi-permanent storage. If specified as an 50 // empty string, it will clear any existing value. 51 DefaultEncryptionKey *string 52 53 // The default number of days until the data within the domain expires. 54 DefaultExpirationDays *int32 55 56 // The process of matching duplicate profiles. This process runs every Saturday at 57 // 12AM. 58 Matching *types.MatchingRequest 59 60 // The tags used to organize, track, or control access for this resource. 61 Tags map[string]string 62} 63 64type UpdateDomainOutput struct { 65 66 // The timestamp of when the domain was created. 67 // 68 // This member is required. 69 CreatedAt *time.Time 70 71 // The unique name of the domain. 72 // 73 // This member is required. 74 DomainName *string 75 76 // The timestamp of when the domain was most recently edited. 77 // 78 // This member is required. 79 LastUpdatedAt *time.Time 80 81 // The URL of the SQS dead letter queue, which is used for reporting errors 82 // associated with ingesting data from third party applications. 83 DeadLetterQueueUrl *string 84 85 // The default encryption key, which is an AWS managed key, is used when no 86 // specific type of encryption key is specified. It is used to encrypt all data 87 // before it is placed in permanent or semi-permanent storage. 88 DefaultEncryptionKey *string 89 90 // The default number of days until the data within the domain expires. 91 DefaultExpirationDays *int32 92 93 // The process of matching duplicate profiles. This process runs every Saturday at 94 // 12AM. 95 Matching *types.MatchingResponse 96 97 // The tags used to organize, track, or control access for this resource. 98 Tags map[string]string 99 100 // Metadata pertaining to the operation's result. 101 ResultMetadata middleware.Metadata 102} 103 104func addOperationUpdateDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { 105 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDomain{}, middleware.After) 106 if err != nil { 107 return err 108 } 109 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDomain{}, middleware.After) 110 if err != nil { 111 return err 112 } 113 if err = addSetLoggerMiddleware(stack, options); err != nil { 114 return err 115 } 116 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 117 return err 118 } 119 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 120 return err 121 } 122 if err = addResolveEndpointMiddleware(stack, options); err != nil { 123 return err 124 } 125 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 126 return err 127 } 128 if err = addRetryMiddlewares(stack, options); err != nil { 129 return err 130 } 131 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 132 return err 133 } 134 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 135 return err 136 } 137 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 138 return err 139 } 140 if err = addClientUserAgent(stack); err != nil { 141 return err 142 } 143 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 144 return err 145 } 146 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 147 return err 148 } 149 if err = addOpUpdateDomainValidationMiddleware(stack); err != nil { 150 return err 151 } 152 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDomain(options.Region), middleware.Before); err != nil { 153 return err 154 } 155 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 156 return err 157 } 158 if err = addResponseErrorMiddleware(stack); err != nil { 159 return err 160 } 161 if err = addRequestResponseLogging(stack, options); err != nil { 162 return err 163 } 164 return nil 165} 166 167func newServiceMetadataMiddleware_opUpdateDomain(region string) *awsmiddleware.RegisterServiceMetadata { 168 return &awsmiddleware.RegisterServiceMetadata{ 169 Region: region, 170 ServiceID: ServiceID, 171 SigningName: "profile", 172 OperationName: "UpdateDomain", 173 } 174} 175