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