1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package quicksight 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/quicksight/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates a theme. 15func (c *Client) UpdateTheme(ctx context.Context, params *UpdateThemeInput, optFns ...func(*Options)) (*UpdateThemeOutput, error) { 16 if params == nil { 17 params = &UpdateThemeInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "UpdateTheme", params, optFns, c.addOperationUpdateThemeMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*UpdateThemeOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30type UpdateThemeInput struct { 31 32 // The ID of the Amazon Web Services account that contains the theme that you're 33 // updating. 34 // 35 // This member is required. 36 AwsAccountId *string 37 38 // The theme ID, defined by Amazon QuickSight, that a custom theme inherits from. 39 // All themes initially inherit from a default Amazon QuickSight theme. 40 // 41 // This member is required. 42 BaseThemeId *string 43 44 // The ID for the theme. 45 // 46 // This member is required. 47 ThemeId *string 48 49 // The theme configuration, which contains the theme display properties. 50 Configuration *types.ThemeConfiguration 51 52 // The name for the theme. 53 Name *string 54 55 // A description of the theme version that you're updating Every time that you call 56 // UpdateTheme, you create a new version of the theme. Each version of the theme 57 // maintains a description of the version in VersionDescription. 58 VersionDescription *string 59 60 noSmithyDocumentSerde 61} 62 63type UpdateThemeOutput struct { 64 65 // The Amazon Resource Name (ARN) for the theme. 66 Arn *string 67 68 // The creation status of the theme. 69 CreationStatus types.ResourceStatus 70 71 // The Amazon Web Services request ID for this operation. 72 RequestId *string 73 74 // The HTTP status of the request. 75 Status int32 76 77 // The ID for the theme. 78 ThemeId *string 79 80 // The Amazon Resource Name (ARN) for the new version of the theme. 81 VersionArn *string 82 83 // Metadata pertaining to the operation's result. 84 ResultMetadata middleware.Metadata 85 86 noSmithyDocumentSerde 87} 88 89func (c *Client) addOperationUpdateThemeMiddlewares(stack *middleware.Stack, options Options) (err error) { 90 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateTheme{}, middleware.After) 91 if err != nil { 92 return err 93 } 94 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateTheme{}, middleware.After) 95 if err != nil { 96 return err 97 } 98 if err = addSetLoggerMiddleware(stack, options); err != nil { 99 return err 100 } 101 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 102 return err 103 } 104 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 105 return err 106 } 107 if err = addResolveEndpointMiddleware(stack, options); err != nil { 108 return err 109 } 110 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 111 return err 112 } 113 if err = addRetryMiddlewares(stack, options); err != nil { 114 return err 115 } 116 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 117 return err 118 } 119 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 120 return err 121 } 122 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 123 return err 124 } 125 if err = addClientUserAgent(stack); err != nil { 126 return err 127 } 128 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 129 return err 130 } 131 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 132 return err 133 } 134 if err = addOpUpdateThemeValidationMiddleware(stack); err != nil { 135 return err 136 } 137 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTheme(options.Region), middleware.Before); err != nil { 138 return err 139 } 140 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 141 return err 142 } 143 if err = addResponseErrorMiddleware(stack); err != nil { 144 return err 145 } 146 if err = addRequestResponseLogging(stack, options); err != nil { 147 return err 148 } 149 return nil 150} 151 152func newServiceMetadataMiddleware_opUpdateTheme(region string) *awsmiddleware.RegisterServiceMetadata { 153 return &awsmiddleware.RegisterServiceMetadata{ 154 Region: region, 155 ServiceID: ServiceID, 156 SigningName: "quicksight", 157 OperationName: "UpdateTheme", 158 } 159} 160