// Code generated by smithy-go-codegen DO NOT EDIT. package route53recoverycontrolconfig import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a routing control. You can only update the name of the routing control. // To get or update the routing control state, see the Recovery Cluster (data // plane) API actions for Amazon Route 53 Application Recovery Controller. func (c *Client) UpdateRoutingControl(ctx context.Context, params *UpdateRoutingControlInput, optFns ...func(*Options)) (*UpdateRoutingControlOutput, error) { if params == nil { params = &UpdateRoutingControlInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRoutingControl", params, optFns, c.addOperationUpdateRoutingControlMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRoutingControlOutput) out.ResultMetadata = metadata return out, nil } // The details of the routing control that you're updating. type UpdateRoutingControlInput struct { // The Amazon Resource Name (ARN) of the routing control. // // This member is required. RoutingControlArn *string // The name of the routing control. // // This member is required. RoutingControlName *string noSmithyDocumentSerde } type UpdateRoutingControlOutput struct { // The routing control that was updated. RoutingControl *types.RoutingControl // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRoutingControlMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRoutingControl{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRoutingControl{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRoutingControlValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRoutingControl(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRoutingControl(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "route53-recovery-control-config", OperationName: "UpdateRoutingControl", } }