// Code generated by smithy-go-codegen DO NOT EDIT. package vpclattice 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/vpclattice/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the specified service network. func (c *Client) UpdateServiceNetwork(ctx context.Context, params *UpdateServiceNetworkInput, optFns ...func(*Options)) (*UpdateServiceNetworkOutput, error) { if params == nil { params = &UpdateServiceNetworkInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateServiceNetwork", params, optFns, c.addOperationUpdateServiceNetworkMiddlewares) if err != nil { return nil, err } out := result.(*UpdateServiceNetworkOutput) out.ResultMetadata = metadata return out, nil } type UpdateServiceNetworkInput struct { // The type of IAM policy. // - NONE : The resource does not use an IAM policy. This is the default. // - AWS_IAM : The resource uses an IAM policy. When this type is used, auth is // enabled and an auth policy is required. // // This member is required. AuthType types.AuthType // The ID or Amazon Resource Name (ARN) of the service network. // // This member is required. ServiceNetworkIdentifier *string noSmithyDocumentSerde } type UpdateServiceNetworkOutput struct { // The Amazon Resource Name (ARN) of the service network. Arn *string // The type of IAM policy. AuthType types.AuthType // The ID of the service network. Id *string // The name of the service network. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateServiceNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateServiceNetwork{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateServiceNetwork{}, 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 = addOpUpdateServiceNetworkValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceNetwork(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_opUpdateServiceNetwork(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "vpc-lattice", OperationName: "UpdateServiceNetwork", } }