repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Advertises an IPv4 address range that is provisioned for use with your Amazon // Web Services resources through bring your own IP addresses (BYOIP). It can take // a few minutes before traffic to the specified addresses starts routing to Amazon // Web Services because of propagation delays. To stop advertising the BYOIP // address range, use WithdrawByoipCidr (https://docs.aws.amazon.com/global-accelerator/latest/api/WithdrawByoipCidr.html) // . For more information, see Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. func (c *Client) AdvertiseByoipCidr(ctx context.Context, params *AdvertiseByoipCidrInput, optFns ...func(*Options)) (*AdvertiseByoipCidrOutput, error) { if params == nil { params = &AdvertiseByoipCidrInput{} } result, metadata, err := c.invokeOperation(ctx, "AdvertiseByoipCidr", params, optFns, c.addOperationAdvertiseByoipCidrMiddlewares) if err != nil { return nil, err } out := result.(*AdvertiseByoipCidrOutput) out.ResultMetadata = metadata return out, nil } type AdvertiseByoipCidrInput struct { // The address range, in CIDR notation. This must be the exact range that you // provisioned. You can't advertise only a portion of the provisioned range. // // This member is required. Cidr *string noSmithyDocumentSerde } type AdvertiseByoipCidrOutput struct { // Information about the address range. ByoipCidr *types.ByoipCidr // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAdvertiseByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAdvertiseByoipCidr{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAdvertiseByoipCidr{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpAdvertiseByoipCidrValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAdvertiseByoipCidr(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_opAdvertiseByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "AdvertiseByoipCidr", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Specify the Amazon EC2 instance (destination) IP addresses and ports for a VPC // subnet endpoint that can receive traffic for a custom routing accelerator. You // can allow traffic to all destinations in the subnet endpoint, or allow traffic // to a specified list of destination IP addresses and ports in the subnet. Note // that you cannot specify IP addresses or ports outside of the range that you // configured for the endpoint group. After you make changes, you can verify that // the updates are complete by checking the status of your accelerator: the status // changes from IN_PROGRESS to DEPLOYED. func (c *Client) AllowCustomRoutingTraffic(ctx context.Context, params *AllowCustomRoutingTrafficInput, optFns ...func(*Options)) (*AllowCustomRoutingTrafficOutput, error) { if params == nil { params = &AllowCustomRoutingTrafficInput{} } result, metadata, err := c.invokeOperation(ctx, "AllowCustomRoutingTraffic", params, optFns, c.addOperationAllowCustomRoutingTrafficMiddlewares) if err != nil { return nil, err } out := result.(*AllowCustomRoutingTrafficOutput) out.ResultMetadata = metadata return out, nil } type AllowCustomRoutingTrafficInput struct { // The Amazon Resource Name (ARN) of the endpoint group. // // This member is required. EndpointGroupArn *string // An ID for the endpoint. For custom routing accelerators, this is the virtual // private cloud (VPC) subnet ID. // // This member is required. EndpointId *string // Indicates whether all destination IP addresses and ports for a specified VPC // subnet endpoint can receive traffic from a custom routing accelerator. The value // is TRUE or FALSE. When set to TRUE, all destinations in the custom routing VPC // subnet can receive traffic. Note that you cannot specify destination IP // addresses and ports when the value is set to TRUE. When set to FALSE (or not // specified), you must specify a list of destination IP addresses that are allowed // to receive traffic. A list of ports is optional. If you don't specify a list of // ports, the ports that can accept traffic is the same as the ports configured for // the endpoint group. The default value is FALSE. AllowAllTrafficToEndpoint *bool // A list of specific Amazon EC2 instance IP addresses (destination addresses) in // a subnet that you want to allow to receive traffic. The IP addresses must be a // subset of the IP addresses that you specified for the endpoint group. // DestinationAddresses is required if AllowAllTrafficToEndpoint is FALSE or is // not specified. DestinationAddresses []string // A list of specific Amazon EC2 instance ports (destination ports) that you want // to allow to receive traffic. DestinationPorts []int32 noSmithyDocumentSerde } type AllowCustomRoutingTrafficOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAllowCustomRoutingTrafficMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAllowCustomRoutingTraffic{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAllowCustomRoutingTraffic{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpAllowCustomRoutingTrafficValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllowCustomRoutingTraffic(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_opAllowCustomRoutingTraffic(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "AllowCustomRoutingTraffic", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create an accelerator. An accelerator includes one or more listeners that // process inbound connections and direct traffic to one or more endpoint groups, // each of which includes endpoints, such as Network Load Balancers. Global // Accelerator is a global service that supports endpoints in multiple Amazon Web // Services Regions but you must specify the US West (Oregon) Region to create, // update, or otherwise work with accelerators. That is, for example, specify // --region us-west-2 on AWS CLI commands. func (c *Client) CreateAccelerator(ctx context.Context, params *CreateAcceleratorInput, optFns ...func(*Options)) (*CreateAcceleratorOutput, error) { if params == nil { params = &CreateAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateAccelerator", params, optFns, c.addOperationCreateAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*CreateAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type CreateAcceleratorInput struct { // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of an accelerator. // // This member is required. IdempotencyToken *string // The name of the accelerator. The name can have a maximum of 64 characters, must // contain only alphanumeric characters, periods (.), or hyphens (-), and must not // begin or end with a hyphen or period. // // This member is required. Name *string // Indicates whether an accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, an accelerator cannot be // deleted. If set to false, the accelerator can be deleted. Enabled *bool // The IP address type that an accelerator supports. For a standard accelerator, // the value can be IPV4 or DUAL_STACK. IpAddressType types.IpAddressType // Optionally, if you've added your own IP address pool to Global Accelerator // (BYOIP), you can choose an IPv4 address from your own pool to use for the // accelerator's static IPv4 address when you create an accelerator. After you // bring an address range to Amazon Web Services, it appears in your account as an // address pool. When you create an accelerator, you can assign one IPv4 address // from your range to it. Global Accelerator assigns you a second static IPv4 // address from an Amazon IP address range. If you bring two IPv4 address ranges to // Amazon Web Services, you can assign one IPv4 address from each range to your // accelerator. This restriction is because Global Accelerator assigns each address // range to a different network zone, for high availability. You can specify one or // two addresses, separated by a space. Do not include the /32 suffix. Note that // you can't update IP addresses for an existing accelerator. To change them, you // must create a new accelerator with the new addresses. For more information, see // Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. IpAddresses []string // Create tags for an accelerator. For more information, see Tagging in Global // Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) // in the Global Accelerator Developer Guide. Tags []types.Tag noSmithyDocumentSerde } type CreateAcceleratorOutput struct { // The accelerator that is created by specifying a listener and the supported IP // address types. Accelerator *types.Accelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateAcceleratorMiddleware(stack, options); err != nil { return err } if err = addOpCreateAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccelerator(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 } type idempotencyToken_initializeOpCreateAccelerator struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateAccelerator) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAcceleratorInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateAcceleratorMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAccelerator{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateAccelerator", } }
208
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create a custom routing accelerator. A custom routing accelerator directs // traffic to one of possibly thousands of Amazon EC2 instance destinations running // in a single or multiple virtual private clouds (VPC) subnet endpoints. Be aware // that, by default, all destination EC2 instances in a VPC subnet endpoint cannot // receive traffic. To enable all destinations to receive traffic, or to specify // individual port mappings that can receive traffic, see the // AllowCustomRoutingTraffic (https://docs.aws.amazon.com/global-accelerator/latest/api/API_AllowCustomRoutingTraffic.html) // operation. Global Accelerator is a global service that supports endpoints in // multiple Amazon Web Services Regions but you must specify the US West (Oregon) // Region to create, update, or otherwise work with accelerators. That is, for // example, specify --region us-west-2 on AWS CLI commands. func (c *Client) CreateCustomRoutingAccelerator(ctx context.Context, params *CreateCustomRoutingAcceleratorInput, optFns ...func(*Options)) (*CreateCustomRoutingAcceleratorOutput, error) { if params == nil { params = &CreateCustomRoutingAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCustomRoutingAccelerator", params, optFns, c.addOperationCreateCustomRoutingAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*CreateCustomRoutingAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type CreateCustomRoutingAcceleratorInput struct { // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of the request. // // This member is required. IdempotencyToken *string // The name of a custom routing accelerator. The name can have a maximum of 64 // characters, must contain only alphanumeric characters or hyphens (-), and must // not begin or end with a hyphen. // // This member is required. Name *string // Indicates whether an accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, an accelerator cannot be // deleted. If set to false, the accelerator can be deleted. Enabled *bool // The IP address type that an accelerator supports. For a custom routing // accelerator, the value must be IPV4. IpAddressType types.IpAddressType // Optionally, if you've added your own IP address pool to Global Accelerator // (BYOIP), you can choose an IPv4 address from your own pool to use for the // accelerator's static IPv4 address when you create an accelerator. After you // bring an address range to Amazon Web Services, it appears in your account as an // address pool. When you create an accelerator, you can assign one IPv4 address // from your range to it. Global Accelerator assigns you a second static IPv4 // address from an Amazon IP address range. If you bring two IPv4 address ranges to // Amazon Web Services, you can assign one IPv4 address from each range to your // accelerator. This restriction is because Global Accelerator assigns each address // range to a different network zone, for high availability. You can specify one or // two addresses, separated by a space. Do not include the /32 suffix. Note that // you can't update IP addresses for an existing accelerator. To change them, you // must create a new accelerator with the new addresses. For more information, see // Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. IpAddresses []string // Create tags for an accelerator. For more information, see Tagging in Global // Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) // in the Global Accelerator Developer Guide. Tags []types.Tag noSmithyDocumentSerde } type CreateCustomRoutingAcceleratorOutput struct { // The accelerator that is created. Accelerator *types.CustomRoutingAccelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCustomRoutingAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCustomRoutingAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCustomRoutingAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateCustomRoutingAcceleratorMiddleware(stack, options); err != nil { return err } if err = addOpCreateCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomRoutingAccelerator(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 } type idempotencyToken_initializeOpCreateCustomRoutingAccelerator struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateCustomRoutingAccelerator) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateCustomRoutingAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateCustomRoutingAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCustomRoutingAcceleratorInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateCustomRoutingAcceleratorMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCustomRoutingAccelerator{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateCustomRoutingAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateCustomRoutingAccelerator", } }
211
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create an endpoint group for the specified listener for a custom routing // accelerator. An endpoint group is a collection of endpoints in one Amazon Web // Services Region. func (c *Client) CreateCustomRoutingEndpointGroup(ctx context.Context, params *CreateCustomRoutingEndpointGroupInput, optFns ...func(*Options)) (*CreateCustomRoutingEndpointGroupOutput, error) { if params == nil { params = &CreateCustomRoutingEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCustomRoutingEndpointGroup", params, optFns, c.addOperationCreateCustomRoutingEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateCustomRoutingEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateCustomRoutingEndpointGroupInput struct { // Sets the port range and protocol for all endpoints (virtual private cloud // subnets) in a custom routing endpoint group to accept client traffic on. // // This member is required. DestinationConfigurations []types.CustomRoutingDestinationConfiguration // The Amazon Web Services Region where the endpoint group is located. A listener // can have only one endpoint group in a specific Region. // // This member is required. EndpointGroupRegion *string // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of the request. // // This member is required. IdempotencyToken *string // The Amazon Resource Name (ARN) of the listener for a custom routing endpoint. // // This member is required. ListenerArn *string noSmithyDocumentSerde } type CreateCustomRoutingEndpointGroupOutput struct { // The information about the endpoint group created for a custom routing // accelerator. EndpointGroup *types.CustomRoutingEndpointGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCustomRoutingEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCustomRoutingEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCustomRoutingEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateCustomRoutingEndpointGroupMiddleware(stack, options); err != nil { return err } if err = addOpCreateCustomRoutingEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomRoutingEndpointGroup(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 } type idempotencyToken_initializeOpCreateCustomRoutingEndpointGroup struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateCustomRoutingEndpointGroup) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateCustomRoutingEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateCustomRoutingEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCustomRoutingEndpointGroupInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateCustomRoutingEndpointGroupMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCustomRoutingEndpointGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateCustomRoutingEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateCustomRoutingEndpointGroup", } }
183
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create a listener to process inbound connections from clients to a custom // routing accelerator. Connections arrive to assigned static IP addresses on the // port range that you specify. func (c *Client) CreateCustomRoutingListener(ctx context.Context, params *CreateCustomRoutingListenerInput, optFns ...func(*Options)) (*CreateCustomRoutingListenerOutput, error) { if params == nil { params = &CreateCustomRoutingListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCustomRoutingListener", params, optFns, c.addOperationCreateCustomRoutingListenerMiddlewares) if err != nil { return nil, err } out := result.(*CreateCustomRoutingListenerOutput) out.ResultMetadata = metadata return out, nil } type CreateCustomRoutingListenerInput struct { // The Amazon Resource Name (ARN) of the accelerator for a custom routing listener. // // This member is required. AcceleratorArn *string // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of the request. // // This member is required. IdempotencyToken *string // The port range to support for connections from clients to your accelerator. // Separately, you set port ranges for endpoints. For more information, see About // endpoints for custom routing accelerators (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html) // . // // This member is required. PortRanges []types.PortRange noSmithyDocumentSerde } type CreateCustomRoutingListenerOutput struct { // The listener that you've created for a custom routing accelerator. Listener *types.CustomRoutingListener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCustomRoutingListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCustomRoutingListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCustomRoutingListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateCustomRoutingListenerMiddleware(stack, options); err != nil { return err } if err = addOpCreateCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomRoutingListener(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 } type idempotencyToken_initializeOpCreateCustomRoutingListener struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateCustomRoutingListener) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateCustomRoutingListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateCustomRoutingListenerInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCustomRoutingListenerInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateCustomRoutingListenerMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCustomRoutingListener{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateCustomRoutingListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateCustomRoutingListener", } }
178
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create an endpoint group for the specified listener. An endpoint group is a // collection of endpoints in one Amazon Web Services Region. A resource must be // valid and active when you add it as an endpoint. func (c *Client) CreateEndpointGroup(ctx context.Context, params *CreateEndpointGroupInput, optFns ...func(*Options)) (*CreateEndpointGroupOutput, error) { if params == nil { params = &CreateEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateEndpointGroup", params, optFns, c.addOperationCreateEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateEndpointGroupInput struct { // The Amazon Web Services Region where the endpoint group is located. A listener // can have only one endpoint group in a specific Region. // // This member is required. EndpointGroupRegion *string // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of the request. // // This member is required. IdempotencyToken *string // The Amazon Resource Name (ARN) of the listener. // // This member is required. ListenerArn *string // The list of endpoint objects. EndpointConfigurations []types.EndpointConfiguration // The time—10 seconds or 30 seconds—between each health check for an endpoint. // The default value is 30. HealthCheckIntervalSeconds *int32 // If the protocol is HTTP/S, then this specifies the path that is the destination // for health check targets. The default value is slash (/). HealthCheckPath *string // The port that Global Accelerator uses to check the health of endpoints that are // part of this endpoint group. The default port is the listener port that this // endpoint group is associated with. If listener port is a list of ports, Global // Accelerator uses the first port in the list. HealthCheckPort *int32 // The protocol that Global Accelerator uses to check the health of endpoints that // are part of this endpoint group. The default value is TCP. HealthCheckProtocol types.HealthCheckProtocol // Override specific listener ports used to route traffic to endpoints that are // part of this endpoint group. For example, you can create a port override in // which the listener receives user traffic on ports 80 and 443, but your // accelerator routes that traffic to ports 1080 and 1443, respectively, on the // endpoints. For more information, see Overriding listener ports (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html) // in the Global Accelerator Developer Guide. PortOverrides []types.PortOverride // The number of consecutive health checks required to set the state of a healthy // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default // value is 3. ThresholdCount *int32 // The percentage of traffic to send to an Amazon Web Services Region. Additional // traffic is distributed to other endpoint groups for this listener. Use this // action to increase (dial up) or decrease (dial down) traffic to a specific // Region. The percentage is applied to the traffic that would otherwise have been // routed to the Region based on optimal routing. The default value is 100. TrafficDialPercentage *float32 noSmithyDocumentSerde } type CreateEndpointGroupOutput struct { // The information about the endpoint group that was created. EndpointGroup *types.EndpointGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateEndpointGroupMiddleware(stack, options); err != nil { return err } if err = addOpCreateEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEndpointGroup(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 } type idempotencyToken_initializeOpCreateEndpointGroup struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateEndpointGroup) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEndpointGroupInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateEndpointGroupMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEndpointGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateEndpointGroup", } }
217
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Create a listener to process inbound connections from clients to an // accelerator. Connections arrive to assigned static IP addresses on a port, port // range, or list of port ranges that you specify. func (c *Client) CreateListener(ctx context.Context, params *CreateListenerInput, optFns ...func(*Options)) (*CreateListenerOutput, error) { if params == nil { params = &CreateListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateListener", params, optFns, c.addOperationCreateListenerMiddlewares) if err != nil { return nil, err } out := result.(*CreateListenerOutput) out.ResultMetadata = metadata return out, nil } type CreateListenerInput struct { // The Amazon Resource Name (ARN) of your accelerator. // // This member is required. AcceleratorArn *string // A unique, case-sensitive identifier that you provide to ensure the // idempotency—that is, the uniqueness—of the request. // // This member is required. IdempotencyToken *string // The list of port ranges to support for connections from clients to your // accelerator. // // This member is required. PortRanges []types.PortRange // The protocol for connections from clients to your accelerator. // // This member is required. Protocol types.Protocol // Client affinity lets you direct all requests from a user to the same endpoint, // if you have stateful applications, regardless of the port and protocol of the // client request. Client affinity gives you control over whether to always route // each client to the same specific endpoint. Global Accelerator uses a // consistent-flow hashing algorithm to choose the optimal endpoint for a // connection. If client affinity is NONE , Global Accelerator uses the // "five-tuple" (5-tuple) properties—source IP address, source port, destination IP // address, destination port, and protocol—to select the hash value, and then // chooses the best endpoint. However, with this setting, if someone uses different // ports to connect to Global Accelerator, their connections might not be always // routed to the same endpoint because the hash value changes. If you want a given // client to always be routed to the same endpoint, set client affinity to // SOURCE_IP instead. When you use the SOURCE_IP setting, Global Accelerator uses // the "two-tuple" (2-tuple) properties— source (client) IP address and destination // IP address—to select the hash value. The default value is NONE . ClientAffinity types.ClientAffinity noSmithyDocumentSerde } type CreateListenerOutput struct { // The listener that you've created. Listener *types.Listener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateListenerMiddleware(stack, options); err != nil { return err } if err = addOpCreateListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateListener(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 } type idempotencyToken_initializeOpCreateListener struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateListener) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateListenerInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateListenerInput ") } if input.IdempotencyToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.IdempotencyToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateListenerMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateListener{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "CreateListener", } }
198
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete an accelerator. Before you can delete an accelerator, you must disable // it and remove all dependent resources (listeners and endpoint groups). To // disable the accelerator, update the accelerator to set Enabled to false. When // you create an accelerator, by default, Global Accelerator provides you with a // set of two static IP addresses. Alternatively, you can bring your own IP address // ranges to Global Accelerator and assign IP addresses from those ranges. The IP // addresses are assigned to your accelerator for as long as it exists, even if you // disable the accelerator and it no longer accepts or routes traffic. However, // when you delete an accelerator, you lose the static IP addresses that are // assigned to the accelerator, so you can no longer route traffic by using them. // As a best practice, ensure that you have permissions in place to avoid // inadvertently deleting accelerators. You can use IAM policies with Global // Accelerator to limit the users who have permissions to delete an accelerator. // For more information, see Identity and access management (https://docs.aws.amazon.com/global-accelerator/latest/dg/auth-and-access-control.html) // in the Global Accelerator Developer Guide. func (c *Client) DeleteAccelerator(ctx context.Context, params *DeleteAcceleratorInput, optFns ...func(*Options)) (*DeleteAcceleratorOutput, error) { if params == nil { params = &DeleteAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteAccelerator", params, optFns, c.addOperationDeleteAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*DeleteAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type DeleteAcceleratorInput struct { // The Amazon Resource Name (ARN) of an accelerator. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DeleteAcceleratorOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccelerator(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_opDeleteAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteAccelerator", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a custom routing accelerator. Before you can delete an accelerator, you // must disable it and remove all dependent resources (listeners and endpoint // groups). To disable the accelerator, update the accelerator to set Enabled to // false. When you create a custom routing accelerator, by default, Global // Accelerator provides you with a set of two static IP addresses. The IP addresses // are assigned to your accelerator for as long as it exists, even if you disable // the accelerator and it no longer accepts or routes traffic. However, when you // delete an accelerator, you lose the static IP addresses that are assigned to the // accelerator, so you can no longer route traffic by using them. As a best // practice, ensure that you have permissions in place to avoid inadvertently // deleting accelerators. You can use IAM policies with Global Accelerator to limit // the users who have permissions to delete an accelerator. For more information, // see Identity and access management (https://docs.aws.amazon.com/global-accelerator/latest/dg/auth-and-access-control.html) // in the Global Accelerator Developer Guide. func (c *Client) DeleteCustomRoutingAccelerator(ctx context.Context, params *DeleteCustomRoutingAcceleratorInput, optFns ...func(*Options)) (*DeleteCustomRoutingAcceleratorOutput, error) { if params == nil { params = &DeleteCustomRoutingAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteCustomRoutingAccelerator", params, optFns, c.addOperationDeleteCustomRoutingAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*DeleteCustomRoutingAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type DeleteCustomRoutingAcceleratorInput struct { // The Amazon Resource Name (ARN) of the custom routing accelerator to delete. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DeleteCustomRoutingAcceleratorOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteCustomRoutingAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteCustomRoutingAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteCustomRoutingAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomRoutingAccelerator(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_opDeleteCustomRoutingAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteCustomRoutingAccelerator", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete an endpoint group from a listener for a custom routing accelerator. func (c *Client) DeleteCustomRoutingEndpointGroup(ctx context.Context, params *DeleteCustomRoutingEndpointGroupInput, optFns ...func(*Options)) (*DeleteCustomRoutingEndpointGroupOutput, error) { if params == nil { params = &DeleteCustomRoutingEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteCustomRoutingEndpointGroup", params, optFns, c.addOperationDeleteCustomRoutingEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteCustomRoutingEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteCustomRoutingEndpointGroupInput struct { // The Amazon Resource Name (ARN) of the endpoint group to delete. // // This member is required. EndpointGroupArn *string noSmithyDocumentSerde } type DeleteCustomRoutingEndpointGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteCustomRoutingEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteCustomRoutingEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteCustomRoutingEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteCustomRoutingEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomRoutingEndpointGroup(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_opDeleteCustomRoutingEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteCustomRoutingEndpointGroup", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a listener for a custom routing accelerator. func (c *Client) DeleteCustomRoutingListener(ctx context.Context, params *DeleteCustomRoutingListenerInput, optFns ...func(*Options)) (*DeleteCustomRoutingListenerOutput, error) { if params == nil { params = &DeleteCustomRoutingListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteCustomRoutingListener", params, optFns, c.addOperationDeleteCustomRoutingListenerMiddlewares) if err != nil { return nil, err } out := result.(*DeleteCustomRoutingListenerOutput) out.ResultMetadata = metadata return out, nil } type DeleteCustomRoutingListenerInput struct { // The Amazon Resource Name (ARN) of the listener to delete. // // This member is required. ListenerArn *string noSmithyDocumentSerde } type DeleteCustomRoutingListenerOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteCustomRoutingListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteCustomRoutingListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteCustomRoutingListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomRoutingListener(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_opDeleteCustomRoutingListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteCustomRoutingListener", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete an endpoint group from a listener. func (c *Client) DeleteEndpointGroup(ctx context.Context, params *DeleteEndpointGroupInput, optFns ...func(*Options)) (*DeleteEndpointGroupOutput, error) { if params == nil { params = &DeleteEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteEndpointGroup", params, optFns, c.addOperationDeleteEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteEndpointGroupInput struct { // The Amazon Resource Name (ARN) of the endpoint group to delete. // // This member is required. EndpointGroupArn *string noSmithyDocumentSerde } type DeleteEndpointGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEndpointGroup(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_opDeleteEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteEndpointGroup", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a listener from an accelerator. func (c *Client) DeleteListener(ctx context.Context, params *DeleteListenerInput, optFns ...func(*Options)) (*DeleteListenerOutput, error) { if params == nil { params = &DeleteListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteListener", params, optFns, c.addOperationDeleteListenerMiddlewares) if err != nil { return nil, err } out := result.(*DeleteListenerOutput) out.ResultMetadata = metadata return out, nil } type DeleteListenerInput struct { // The Amazon Resource Name (ARN) of the listener. // // This member is required. ListenerArn *string noSmithyDocumentSerde } type DeleteListenerOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteListener(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_opDeleteListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeleteListener", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Specify the Amazon EC2 instance (destination) IP addresses and ports for a VPC // subnet endpoint that cannot receive traffic for a custom routing accelerator. // You can deny traffic to all destinations in the VPC endpoint, or deny traffic to // a specified list of destination IP addresses and ports. Note that you cannot // specify IP addresses or ports outside of the range that you configured for the // endpoint group. After you make changes, you can verify that the updates are // complete by checking the status of your accelerator: the status changes from // IN_PROGRESS to DEPLOYED. func (c *Client) DenyCustomRoutingTraffic(ctx context.Context, params *DenyCustomRoutingTrafficInput, optFns ...func(*Options)) (*DenyCustomRoutingTrafficOutput, error) { if params == nil { params = &DenyCustomRoutingTrafficInput{} } result, metadata, err := c.invokeOperation(ctx, "DenyCustomRoutingTraffic", params, optFns, c.addOperationDenyCustomRoutingTrafficMiddlewares) if err != nil { return nil, err } out := result.(*DenyCustomRoutingTrafficOutput) out.ResultMetadata = metadata return out, nil } type DenyCustomRoutingTrafficInput struct { // The Amazon Resource Name (ARN) of the endpoint group. // // This member is required. EndpointGroupArn *string // An ID for the endpoint. For custom routing accelerators, this is the virtual // private cloud (VPC) subnet ID. // // This member is required. EndpointId *string // Indicates whether all destination IP addresses and ports for a specified VPC // subnet endpoint cannot receive traffic from a custom routing accelerator. The // value is TRUE or FALSE. When set to TRUE, no destinations in the custom routing // VPC subnet can receive traffic. Note that you cannot specify destination IP // addresses and ports when the value is set to TRUE. When set to FALSE (or not // specified), you must specify a list of destination IP addresses that cannot // receive traffic. A list of ports is optional. If you don't specify a list of // ports, the ports that can accept traffic is the same as the ports configured for // the endpoint group. The default value is FALSE. DenyAllTrafficToEndpoint *bool // A list of specific Amazon EC2 instance IP addresses (destination addresses) in // a subnet that you want to prevent from receiving traffic. The IP addresses must // be a subset of the IP addresses allowed for the VPC subnet associated with the // endpoint group. DestinationAddresses []string // A list of specific Amazon EC2 instance ports (destination ports) in a subnet // endpoint that you want to prevent from receiving traffic. DestinationPorts []int32 noSmithyDocumentSerde } type DenyCustomRoutingTrafficOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDenyCustomRoutingTrafficMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDenyCustomRoutingTraffic{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDenyCustomRoutingTraffic{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDenyCustomRoutingTrafficValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDenyCustomRoutingTraffic(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_opDenyCustomRoutingTraffic(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DenyCustomRoutingTraffic", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Releases the specified address range that you provisioned to use with your // Amazon Web Services resources through bring your own IP addresses (BYOIP) and // deletes the corresponding address pool. Before you can release an address range, // you must stop advertising it by using WithdrawByoipCidr (https://docs.aws.amazon.com/global-accelerator/latest/api/WithdrawByoipCidr.html) // and you must not have any accelerators that are using static IP addresses // allocated from its address range. For more information, see Bring your own IP // addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. func (c *Client) DeprovisionByoipCidr(ctx context.Context, params *DeprovisionByoipCidrInput, optFns ...func(*Options)) (*DeprovisionByoipCidrOutput, error) { if params == nil { params = &DeprovisionByoipCidrInput{} } result, metadata, err := c.invokeOperation(ctx, "DeprovisionByoipCidr", params, optFns, c.addOperationDeprovisionByoipCidrMiddlewares) if err != nil { return nil, err } out := result.(*DeprovisionByoipCidrOutput) out.ResultMetadata = metadata return out, nil } type DeprovisionByoipCidrInput struct { // The address range, in CIDR notation. The prefix must be the same prefix that // you specified when you provisioned the address range. // // This member is required. Cidr *string noSmithyDocumentSerde } type DeprovisionByoipCidrOutput struct { // Information about the address range. ByoipCidr *types.ByoipCidr // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeprovisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeprovisionByoipCidr{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeprovisionByoipCidr{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeprovisionByoipCidrValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionByoipCidr(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_opDeprovisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DeprovisionByoipCidr", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe an accelerator. func (c *Client) DescribeAccelerator(ctx context.Context, params *DescribeAcceleratorInput, optFns ...func(*Options)) (*DescribeAcceleratorOutput, error) { if params == nil { params = &DescribeAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeAccelerator", params, optFns, c.addOperationDescribeAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*DescribeAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type DescribeAcceleratorInput struct { // The Amazon Resource Name (ARN) of the accelerator to describe. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DescribeAcceleratorOutput struct { // The description of the accelerator. Accelerator *types.Accelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccelerator(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_opDescribeAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeAccelerator", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe the attributes of an accelerator. func (c *Client) DescribeAcceleratorAttributes(ctx context.Context, params *DescribeAcceleratorAttributesInput, optFns ...func(*Options)) (*DescribeAcceleratorAttributesOutput, error) { if params == nil { params = &DescribeAcceleratorAttributesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeAcceleratorAttributes", params, optFns, c.addOperationDescribeAcceleratorAttributesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeAcceleratorAttributesOutput) out.ResultMetadata = metadata return out, nil } type DescribeAcceleratorAttributesInput struct { // The Amazon Resource Name (ARN) of the accelerator with the attributes that you // want to describe. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DescribeAcceleratorAttributesOutput struct { // The attributes of the accelerator. AcceleratorAttributes *types.AcceleratorAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeAcceleratorAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAcceleratorAttributes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAcceleratorAttributes{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAcceleratorAttributes(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_opDescribeAcceleratorAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeAcceleratorAttributes", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe a custom routing accelerator. func (c *Client) DescribeCustomRoutingAccelerator(ctx context.Context, params *DescribeCustomRoutingAcceleratorInput, optFns ...func(*Options)) (*DescribeCustomRoutingAcceleratorOutput, error) { if params == nil { params = &DescribeCustomRoutingAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeCustomRoutingAccelerator", params, optFns, c.addOperationDescribeCustomRoutingAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*DescribeCustomRoutingAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type DescribeCustomRoutingAcceleratorInput struct { // The Amazon Resource Name (ARN) of the accelerator to describe. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DescribeCustomRoutingAcceleratorOutput struct { // The description of the custom routing accelerator. Accelerator *types.CustomRoutingAccelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeCustomRoutingAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCustomRoutingAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCustomRoutingAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomRoutingAccelerator(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_opDescribeCustomRoutingAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeCustomRoutingAccelerator", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe the attributes of a custom routing accelerator. func (c *Client) DescribeCustomRoutingAcceleratorAttributes(ctx context.Context, params *DescribeCustomRoutingAcceleratorAttributesInput, optFns ...func(*Options)) (*DescribeCustomRoutingAcceleratorAttributesOutput, error) { if params == nil { params = &DescribeCustomRoutingAcceleratorAttributesInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeCustomRoutingAcceleratorAttributes", params, optFns, c.addOperationDescribeCustomRoutingAcceleratorAttributesMiddlewares) if err != nil { return nil, err } out := result.(*DescribeCustomRoutingAcceleratorAttributesOutput) out.ResultMetadata = metadata return out, nil } type DescribeCustomRoutingAcceleratorAttributesInput struct { // The Amazon Resource Name (ARN) of the custom routing accelerator to describe // the attributes for. // // This member is required. AcceleratorArn *string noSmithyDocumentSerde } type DescribeCustomRoutingAcceleratorAttributesOutput struct { // The attributes of the custom routing accelerator. AcceleratorAttributes *types.CustomRoutingAcceleratorAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeCustomRoutingAcceleratorAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCustomRoutingAcceleratorAttributes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCustomRoutingAcceleratorAttributes{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeCustomRoutingAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomRoutingAcceleratorAttributes(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_opDescribeCustomRoutingAcceleratorAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeCustomRoutingAcceleratorAttributes", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe an endpoint group for a custom routing accelerator. func (c *Client) DescribeCustomRoutingEndpointGroup(ctx context.Context, params *DescribeCustomRoutingEndpointGroupInput, optFns ...func(*Options)) (*DescribeCustomRoutingEndpointGroupOutput, error) { if params == nil { params = &DescribeCustomRoutingEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeCustomRoutingEndpointGroup", params, optFns, c.addOperationDescribeCustomRoutingEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribeCustomRoutingEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribeCustomRoutingEndpointGroupInput struct { // The Amazon Resource Name (ARN) of the endpoint group to describe. // // This member is required. EndpointGroupArn *string noSmithyDocumentSerde } type DescribeCustomRoutingEndpointGroupOutput struct { // The description of an endpoint group for a custom routing accelerator. EndpointGroup *types.CustomRoutingEndpointGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeCustomRoutingEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCustomRoutingEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCustomRoutingEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeCustomRoutingEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomRoutingEndpointGroup(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_opDescribeCustomRoutingEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeCustomRoutingEndpointGroup", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // The description of a listener for a custom routing accelerator. func (c *Client) DescribeCustomRoutingListener(ctx context.Context, params *DescribeCustomRoutingListenerInput, optFns ...func(*Options)) (*DescribeCustomRoutingListenerOutput, error) { if params == nil { params = &DescribeCustomRoutingListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeCustomRoutingListener", params, optFns, c.addOperationDescribeCustomRoutingListenerMiddlewares) if err != nil { return nil, err } out := result.(*DescribeCustomRoutingListenerOutput) out.ResultMetadata = metadata return out, nil } type DescribeCustomRoutingListenerInput struct { // The Amazon Resource Name (ARN) of the listener to describe. // // This member is required. ListenerArn *string noSmithyDocumentSerde } type DescribeCustomRoutingListenerOutput struct { // The description of a listener for a custom routing accelerator. Listener *types.CustomRoutingListener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeCustomRoutingListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCustomRoutingListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCustomRoutingListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomRoutingListener(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_opDescribeCustomRoutingListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeCustomRoutingListener", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe an endpoint group. func (c *Client) DescribeEndpointGroup(ctx context.Context, params *DescribeEndpointGroupInput, optFns ...func(*Options)) (*DescribeEndpointGroupOutput, error) { if params == nil { params = &DescribeEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeEndpointGroup", params, optFns, c.addOperationDescribeEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribeEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribeEndpointGroupInput struct { // The Amazon Resource Name (ARN) of the endpoint group to describe. // // This member is required. EndpointGroupArn *string noSmithyDocumentSerde } type DescribeEndpointGroupOutput struct { // The description of an endpoint group. EndpointGroup *types.EndpointGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpointGroup(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_opDescribeEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeEndpointGroup", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describe a listener. func (c *Client) DescribeListener(ctx context.Context, params *DescribeListenerInput, optFns ...func(*Options)) (*DescribeListenerOutput, error) { if params == nil { params = &DescribeListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeListener", params, optFns, c.addOperationDescribeListenerMiddlewares) if err != nil { return nil, err } out := result.(*DescribeListenerOutput) out.ResultMetadata = metadata return out, nil } type DescribeListenerInput struct { // The Amazon Resource Name (ARN) of the listener to describe. // // This member is required. ListenerArn *string noSmithyDocumentSerde } type DescribeListenerOutput struct { // The description of a listener. Listener *types.Listener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeListener(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_opDescribeListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "DescribeListener", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the accelerators for an Amazon Web Services account. func (c *Client) ListAccelerators(ctx context.Context, params *ListAcceleratorsInput, optFns ...func(*Options)) (*ListAcceleratorsOutput, error) { if params == nil { params = &ListAcceleratorsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAccelerators", params, optFns, c.addOperationListAcceleratorsMiddlewares) if err != nil { return nil, err } out := result.(*ListAcceleratorsOutput) out.ResultMetadata = metadata return out, nil } type ListAcceleratorsInput struct { // The number of Global Accelerator objects that you want to return with this // call. The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListAcceleratorsOutput struct { // The list of accelerators for a customer account. Accelerators []types.Accelerator // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAcceleratorsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccelerators{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccelerators{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccelerators(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 } // ListAcceleratorsAPIClient is a client that implements the ListAccelerators // operation. type ListAcceleratorsAPIClient interface { ListAccelerators(context.Context, *ListAcceleratorsInput, ...func(*Options)) (*ListAcceleratorsOutput, error) } var _ ListAcceleratorsAPIClient = (*Client)(nil) // ListAcceleratorsPaginatorOptions is the paginator options for ListAccelerators type ListAcceleratorsPaginatorOptions struct { // The number of Global Accelerator objects that you want to return with this // call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListAcceleratorsPaginator is a paginator for ListAccelerators type ListAcceleratorsPaginator struct { options ListAcceleratorsPaginatorOptions client ListAcceleratorsAPIClient params *ListAcceleratorsInput nextToken *string firstPage bool } // NewListAcceleratorsPaginator returns a new ListAcceleratorsPaginator func NewListAcceleratorsPaginator(client ListAcceleratorsAPIClient, params *ListAcceleratorsInput, optFns ...func(*ListAcceleratorsPaginatorOptions)) *ListAcceleratorsPaginator { if params == nil { params = &ListAcceleratorsInput{} } options := ListAcceleratorsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListAcceleratorsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAcceleratorsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccelerators page. func (p *ListAcceleratorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAcceleratorsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListAccelerators(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListAccelerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListAccelerators", } }
221
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the IP address ranges that were specified in calls to ProvisionByoipCidr (https://docs.aws.amazon.com/global-accelerator/latest/api/ProvisionByoipCidr.html) // , including the current state and a history of state changes. func (c *Client) ListByoipCidrs(ctx context.Context, params *ListByoipCidrsInput, optFns ...func(*Options)) (*ListByoipCidrsOutput, error) { if params == nil { params = &ListByoipCidrsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListByoipCidrs", params, optFns, c.addOperationListByoipCidrsMiddlewares) if err != nil { return nil, err } out := result.(*ListByoipCidrsOutput) out.ResultMetadata = metadata return out, nil } type ListByoipCidrsInput struct { // The maximum number of results to return with a single call. To retrieve the // remaining results, make another call with the returned nextToken value. MaxResults *int32 // The token for the next page of results. NextToken *string noSmithyDocumentSerde } type ListByoipCidrsOutput struct { // Information about your address ranges. ByoipCidrs []types.ByoipCidr // The token for the next page of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListByoipCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListByoipCidrs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListByoipCidrs{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListByoipCidrs(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 } // ListByoipCidrsAPIClient is a client that implements the ListByoipCidrs // operation. type ListByoipCidrsAPIClient interface { ListByoipCidrs(context.Context, *ListByoipCidrsInput, ...func(*Options)) (*ListByoipCidrsOutput, error) } var _ ListByoipCidrsAPIClient = (*Client)(nil) // ListByoipCidrsPaginatorOptions is the paginator options for ListByoipCidrs type ListByoipCidrsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the // remaining results, make another call with the returned nextToken value. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListByoipCidrsPaginator is a paginator for ListByoipCidrs type ListByoipCidrsPaginator struct { options ListByoipCidrsPaginatorOptions client ListByoipCidrsAPIClient params *ListByoipCidrsInput nextToken *string firstPage bool } // NewListByoipCidrsPaginator returns a new ListByoipCidrsPaginator func NewListByoipCidrsPaginator(client ListByoipCidrsAPIClient, params *ListByoipCidrsInput, optFns ...func(*ListByoipCidrsPaginatorOptions)) *ListByoipCidrsPaginator { if params == nil { params = &ListByoipCidrsInput{} } options := ListByoipCidrsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListByoipCidrsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListByoipCidrsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListByoipCidrs page. func (p *ListByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListByoipCidrsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListByoipCidrs(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListByoipCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListByoipCidrs", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the custom routing accelerators for an Amazon Web Services account. func (c *Client) ListCustomRoutingAccelerators(ctx context.Context, params *ListCustomRoutingAcceleratorsInput, optFns ...func(*Options)) (*ListCustomRoutingAcceleratorsOutput, error) { if params == nil { params = &ListCustomRoutingAcceleratorsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListCustomRoutingAccelerators", params, optFns, c.addOperationListCustomRoutingAcceleratorsMiddlewares) if err != nil { return nil, err } out := result.(*ListCustomRoutingAcceleratorsOutput) out.ResultMetadata = metadata return out, nil } type ListCustomRoutingAcceleratorsInput struct { // The number of custom routing Global Accelerator objects that you want to return // with this call. The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListCustomRoutingAcceleratorsOutput struct { // The list of custom routing accelerators for a customer account. Accelerators []types.CustomRoutingAccelerator // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListCustomRoutingAcceleratorsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCustomRoutingAccelerators{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCustomRoutingAccelerators{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingAccelerators(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 } // ListCustomRoutingAcceleratorsAPIClient is a client that implements the // ListCustomRoutingAccelerators operation. type ListCustomRoutingAcceleratorsAPIClient interface { ListCustomRoutingAccelerators(context.Context, *ListCustomRoutingAcceleratorsInput, ...func(*Options)) (*ListCustomRoutingAcceleratorsOutput, error) } var _ ListCustomRoutingAcceleratorsAPIClient = (*Client)(nil) // ListCustomRoutingAcceleratorsPaginatorOptions is the paginator options for // ListCustomRoutingAccelerators type ListCustomRoutingAcceleratorsPaginatorOptions struct { // The number of custom routing Global Accelerator objects that you want to return // with this call. The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListCustomRoutingAcceleratorsPaginator is a paginator for // ListCustomRoutingAccelerators type ListCustomRoutingAcceleratorsPaginator struct { options ListCustomRoutingAcceleratorsPaginatorOptions client ListCustomRoutingAcceleratorsAPIClient params *ListCustomRoutingAcceleratorsInput nextToken *string firstPage bool } // NewListCustomRoutingAcceleratorsPaginator returns a new // ListCustomRoutingAcceleratorsPaginator func NewListCustomRoutingAcceleratorsPaginator(client ListCustomRoutingAcceleratorsAPIClient, params *ListCustomRoutingAcceleratorsInput, optFns ...func(*ListCustomRoutingAcceleratorsPaginatorOptions)) *ListCustomRoutingAcceleratorsPaginator { if params == nil { params = &ListCustomRoutingAcceleratorsInput{} } options := ListCustomRoutingAcceleratorsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListCustomRoutingAcceleratorsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingAcceleratorsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingAccelerators page. func (p *ListCustomRoutingAcceleratorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomRoutingAcceleratorsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListCustomRoutingAccelerators(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListCustomRoutingAccelerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListCustomRoutingAccelerators", } }
224
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the endpoint groups that are associated with a listener for a custom // routing accelerator. func (c *Client) ListCustomRoutingEndpointGroups(ctx context.Context, params *ListCustomRoutingEndpointGroupsInput, optFns ...func(*Options)) (*ListCustomRoutingEndpointGroupsOutput, error) { if params == nil { params = &ListCustomRoutingEndpointGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListCustomRoutingEndpointGroups", params, optFns, c.addOperationListCustomRoutingEndpointGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListCustomRoutingEndpointGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListCustomRoutingEndpointGroupsInput struct { // The Amazon Resource Name (ARN) of the listener to list endpoint groups for. // // This member is required. ListenerArn *string // The number of endpoint group objects that you want to return with this call. // The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListCustomRoutingEndpointGroupsOutput struct { // The list of the endpoint groups associated with a listener for a custom routing // accelerator. EndpointGroups []types.CustomRoutingEndpointGroup // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListCustomRoutingEndpointGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCustomRoutingEndpointGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCustomRoutingEndpointGroups{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListCustomRoutingEndpointGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingEndpointGroups(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 } // ListCustomRoutingEndpointGroupsAPIClient is a client that implements the // ListCustomRoutingEndpointGroups operation. type ListCustomRoutingEndpointGroupsAPIClient interface { ListCustomRoutingEndpointGroups(context.Context, *ListCustomRoutingEndpointGroupsInput, ...func(*Options)) (*ListCustomRoutingEndpointGroupsOutput, error) } var _ ListCustomRoutingEndpointGroupsAPIClient = (*Client)(nil) // ListCustomRoutingEndpointGroupsPaginatorOptions is the paginator options for // ListCustomRoutingEndpointGroups type ListCustomRoutingEndpointGroupsPaginatorOptions struct { // The number of endpoint group objects that you want to return with this call. // The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListCustomRoutingEndpointGroupsPaginator is a paginator for // ListCustomRoutingEndpointGroups type ListCustomRoutingEndpointGroupsPaginator struct { options ListCustomRoutingEndpointGroupsPaginatorOptions client ListCustomRoutingEndpointGroupsAPIClient params *ListCustomRoutingEndpointGroupsInput nextToken *string firstPage bool } // NewListCustomRoutingEndpointGroupsPaginator returns a new // ListCustomRoutingEndpointGroupsPaginator func NewListCustomRoutingEndpointGroupsPaginator(client ListCustomRoutingEndpointGroupsAPIClient, params *ListCustomRoutingEndpointGroupsInput, optFns ...func(*ListCustomRoutingEndpointGroupsPaginatorOptions)) *ListCustomRoutingEndpointGroupsPaginator { if params == nil { params = &ListCustomRoutingEndpointGroupsInput{} } options := ListCustomRoutingEndpointGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListCustomRoutingEndpointGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingEndpointGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingEndpointGroups page. func (p *ListCustomRoutingEndpointGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomRoutingEndpointGroupsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListCustomRoutingEndpointGroups(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListCustomRoutingEndpointGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListCustomRoutingEndpointGroups", } }
234
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the listeners for a custom routing accelerator. func (c *Client) ListCustomRoutingListeners(ctx context.Context, params *ListCustomRoutingListenersInput, optFns ...func(*Options)) (*ListCustomRoutingListenersOutput, error) { if params == nil { params = &ListCustomRoutingListenersInput{} } result, metadata, err := c.invokeOperation(ctx, "ListCustomRoutingListeners", params, optFns, c.addOperationListCustomRoutingListenersMiddlewares) if err != nil { return nil, err } out := result.(*ListCustomRoutingListenersOutput) out.ResultMetadata = metadata return out, nil } type ListCustomRoutingListenersInput struct { // The Amazon Resource Name (ARN) of the accelerator to list listeners for. // // This member is required. AcceleratorArn *string // The number of listener objects that you want to return with this call. The // default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListCustomRoutingListenersOutput struct { // The list of listeners for a custom routing accelerator. Listeners []types.CustomRoutingListener // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListCustomRoutingListenersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCustomRoutingListeners{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCustomRoutingListeners{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListCustomRoutingListenersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingListeners(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 } // ListCustomRoutingListenersAPIClient is a client that implements the // ListCustomRoutingListeners operation. type ListCustomRoutingListenersAPIClient interface { ListCustomRoutingListeners(context.Context, *ListCustomRoutingListenersInput, ...func(*Options)) (*ListCustomRoutingListenersOutput, error) } var _ ListCustomRoutingListenersAPIClient = (*Client)(nil) // ListCustomRoutingListenersPaginatorOptions is the paginator options for // ListCustomRoutingListeners type ListCustomRoutingListenersPaginatorOptions struct { // The number of listener objects that you want to return with this call. The // default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListCustomRoutingListenersPaginator is a paginator for // ListCustomRoutingListeners type ListCustomRoutingListenersPaginator struct { options ListCustomRoutingListenersPaginatorOptions client ListCustomRoutingListenersAPIClient params *ListCustomRoutingListenersInput nextToken *string firstPage bool } // NewListCustomRoutingListenersPaginator returns a new // ListCustomRoutingListenersPaginator func NewListCustomRoutingListenersPaginator(client ListCustomRoutingListenersAPIClient, params *ListCustomRoutingListenersInput, optFns ...func(*ListCustomRoutingListenersPaginatorOptions)) *ListCustomRoutingListenersPaginator { if params == nil { params = &ListCustomRoutingListenersInput{} } options := ListCustomRoutingListenersPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListCustomRoutingListenersPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingListenersPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingListeners page. func (p *ListCustomRoutingListenersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomRoutingListenersOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListCustomRoutingListeners(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListCustomRoutingListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListCustomRoutingListeners", } }
232
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Provides a complete mapping from the public accelerator IP address and port to // destination EC2 instance IP addresses and ports in the virtual public cloud // (VPC) subnet endpoint for a custom routing accelerator. For each subnet endpoint // that you add, Global Accelerator creates a new static port mapping for the // accelerator. The port mappings don't change after Global Accelerator generates // them, so you can retrieve and cache the full mapping on your servers. If you // remove a subnet from your accelerator, Global Accelerator removes (reclaims) the // port mappings. If you add a subnet to your accelerator, Global Accelerator // creates new port mappings (the existing ones don't change). If you add or remove // EC2 instances in your subnet, the port mappings don't change, because the // mappings are created when you add the subnet to Global Accelerator. The mappings // also include a flag for each destination denoting which destination IP addresses // and ports are allowed or denied traffic. func (c *Client) ListCustomRoutingPortMappings(ctx context.Context, params *ListCustomRoutingPortMappingsInput, optFns ...func(*Options)) (*ListCustomRoutingPortMappingsOutput, error) { if params == nil { params = &ListCustomRoutingPortMappingsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListCustomRoutingPortMappings", params, optFns, c.addOperationListCustomRoutingPortMappingsMiddlewares) if err != nil { return nil, err } out := result.(*ListCustomRoutingPortMappingsOutput) out.ResultMetadata = metadata return out, nil } type ListCustomRoutingPortMappingsInput struct { // The Amazon Resource Name (ARN) of the accelerator to list the custom routing // port mappings for. // // This member is required. AcceleratorArn *string // The Amazon Resource Name (ARN) of the endpoint group to list the custom routing // port mappings for. EndpointGroupArn *string // The number of destination port mappings that you want to return with this call. // The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListCustomRoutingPortMappingsOutput struct { // The token for the next set of results. You receive this token from a previous // call. NextToken *string // The port mappings for a custom routing accelerator. PortMappings []types.PortMapping // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListCustomRoutingPortMappingsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCustomRoutingPortMappings{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCustomRoutingPortMappings{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListCustomRoutingPortMappingsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingPortMappings(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 } // ListCustomRoutingPortMappingsAPIClient is a client that implements the // ListCustomRoutingPortMappings operation. type ListCustomRoutingPortMappingsAPIClient interface { ListCustomRoutingPortMappings(context.Context, *ListCustomRoutingPortMappingsInput, ...func(*Options)) (*ListCustomRoutingPortMappingsOutput, error) } var _ ListCustomRoutingPortMappingsAPIClient = (*Client)(nil) // ListCustomRoutingPortMappingsPaginatorOptions is the paginator options for // ListCustomRoutingPortMappings type ListCustomRoutingPortMappingsPaginatorOptions struct { // The number of destination port mappings that you want to return with this call. // The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListCustomRoutingPortMappingsPaginator is a paginator for // ListCustomRoutingPortMappings type ListCustomRoutingPortMappingsPaginator struct { options ListCustomRoutingPortMappingsPaginatorOptions client ListCustomRoutingPortMappingsAPIClient params *ListCustomRoutingPortMappingsInput nextToken *string firstPage bool } // NewListCustomRoutingPortMappingsPaginator returns a new // ListCustomRoutingPortMappingsPaginator func NewListCustomRoutingPortMappingsPaginator(client ListCustomRoutingPortMappingsAPIClient, params *ListCustomRoutingPortMappingsInput, optFns ...func(*ListCustomRoutingPortMappingsPaginatorOptions)) *ListCustomRoutingPortMappingsPaginator { if params == nil { params = &ListCustomRoutingPortMappingsInput{} } options := ListCustomRoutingPortMappingsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListCustomRoutingPortMappingsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingPortMappingsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingPortMappings page. func (p *ListCustomRoutingPortMappingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomRoutingPortMappingsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListCustomRoutingPortMappings(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListCustomRoutingPortMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListCustomRoutingPortMappings", } }
249
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the port mappings for a specific EC2 instance (destination) in a VPC // subnet endpoint. The response is the mappings for one destination IP address. // This is useful when your subnet endpoint has mappings that span multiple custom // routing accelerators in your account, or for scenarios where you only want to // list the port mappings for a specific destination instance. func (c *Client) ListCustomRoutingPortMappingsByDestination(ctx context.Context, params *ListCustomRoutingPortMappingsByDestinationInput, optFns ...func(*Options)) (*ListCustomRoutingPortMappingsByDestinationOutput, error) { if params == nil { params = &ListCustomRoutingPortMappingsByDestinationInput{} } result, metadata, err := c.invokeOperation(ctx, "ListCustomRoutingPortMappingsByDestination", params, optFns, c.addOperationListCustomRoutingPortMappingsByDestinationMiddlewares) if err != nil { return nil, err } out := result.(*ListCustomRoutingPortMappingsByDestinationOutput) out.ResultMetadata = metadata return out, nil } type ListCustomRoutingPortMappingsByDestinationInput struct { // The endpoint IP address in a virtual private cloud (VPC) subnet for which you // want to receive back port mappings. // // This member is required. DestinationAddress *string // The ID for the virtual private cloud (VPC) subnet. // // This member is required. EndpointId *string // The number of destination port mappings that you want to return with this call. // The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListCustomRoutingPortMappingsByDestinationOutput struct { // The port mappings for the endpoint IP address that you specified in the request. DestinationPortMappings []types.DestinationPortMapping // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListCustomRoutingPortMappingsByDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCustomRoutingPortMappingsByDestination{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCustomRoutingPortMappingsByDestination{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListCustomRoutingPortMappingsByDestinationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingPortMappingsByDestination(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 } // ListCustomRoutingPortMappingsByDestinationAPIClient is a client that implements // the ListCustomRoutingPortMappingsByDestination operation. type ListCustomRoutingPortMappingsByDestinationAPIClient interface { ListCustomRoutingPortMappingsByDestination(context.Context, *ListCustomRoutingPortMappingsByDestinationInput, ...func(*Options)) (*ListCustomRoutingPortMappingsByDestinationOutput, error) } var _ ListCustomRoutingPortMappingsByDestinationAPIClient = (*Client)(nil) // ListCustomRoutingPortMappingsByDestinationPaginatorOptions is the paginator // options for ListCustomRoutingPortMappingsByDestination type ListCustomRoutingPortMappingsByDestinationPaginatorOptions struct { // The number of destination port mappings that you want to return with this call. // The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListCustomRoutingPortMappingsByDestinationPaginator is a paginator for // ListCustomRoutingPortMappingsByDestination type ListCustomRoutingPortMappingsByDestinationPaginator struct { options ListCustomRoutingPortMappingsByDestinationPaginatorOptions client ListCustomRoutingPortMappingsByDestinationAPIClient params *ListCustomRoutingPortMappingsByDestinationInput nextToken *string firstPage bool } // NewListCustomRoutingPortMappingsByDestinationPaginator returns a new // ListCustomRoutingPortMappingsByDestinationPaginator func NewListCustomRoutingPortMappingsByDestinationPaginator(client ListCustomRoutingPortMappingsByDestinationAPIClient, params *ListCustomRoutingPortMappingsByDestinationInput, optFns ...func(*ListCustomRoutingPortMappingsByDestinationPaginatorOptions)) *ListCustomRoutingPortMappingsByDestinationPaginator { if params == nil { params = &ListCustomRoutingPortMappingsByDestinationInput{} } options := ListCustomRoutingPortMappingsByDestinationPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListCustomRoutingPortMappingsByDestinationPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingPortMappingsByDestinationPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingPortMappingsByDestination page. func (p *ListCustomRoutingPortMappingsByDestinationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomRoutingPortMappingsByDestinationOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListCustomRoutingPortMappingsByDestination(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListCustomRoutingPortMappingsByDestination(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListCustomRoutingPortMappingsByDestination", } }
242
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the endpoint groups that are associated with a listener. func (c *Client) ListEndpointGroups(ctx context.Context, params *ListEndpointGroupsInput, optFns ...func(*Options)) (*ListEndpointGroupsOutput, error) { if params == nil { params = &ListEndpointGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListEndpointGroups", params, optFns, c.addOperationListEndpointGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListEndpointGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListEndpointGroupsInput struct { // The Amazon Resource Name (ARN) of the listener. // // This member is required. ListenerArn *string // The number of endpoint group objects that you want to return with this call. // The default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListEndpointGroupsOutput struct { // The list of the endpoint groups associated with a listener. EndpointGroups []types.EndpointGroup // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListEndpointGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListEndpointGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListEndpointGroups{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListEndpointGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpointGroups(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 } // ListEndpointGroupsAPIClient is a client that implements the ListEndpointGroups // operation. type ListEndpointGroupsAPIClient interface { ListEndpointGroups(context.Context, *ListEndpointGroupsInput, ...func(*Options)) (*ListEndpointGroupsOutput, error) } var _ ListEndpointGroupsAPIClient = (*Client)(nil) // ListEndpointGroupsPaginatorOptions is the paginator options for // ListEndpointGroups type ListEndpointGroupsPaginatorOptions struct { // The number of endpoint group objects that you want to return with this call. // The default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListEndpointGroupsPaginator is a paginator for ListEndpointGroups type ListEndpointGroupsPaginator struct { options ListEndpointGroupsPaginatorOptions client ListEndpointGroupsAPIClient params *ListEndpointGroupsInput nextToken *string firstPage bool } // NewListEndpointGroupsPaginator returns a new ListEndpointGroupsPaginator func NewListEndpointGroupsPaginator(client ListEndpointGroupsAPIClient, params *ListEndpointGroupsInput, optFns ...func(*ListEndpointGroupsPaginatorOptions)) *ListEndpointGroupsPaginator { if params == nil { params = &ListEndpointGroupsInput{} } options := ListEndpointGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListEndpointGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpointGroups page. func (p *ListEndpointGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEndpointGroupsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListEndpointGroups(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListEndpointGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListEndpointGroups", } }
230
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the listeners for an accelerator. func (c *Client) ListListeners(ctx context.Context, params *ListListenersInput, optFns ...func(*Options)) (*ListListenersOutput, error) { if params == nil { params = &ListListenersInput{} } result, metadata, err := c.invokeOperation(ctx, "ListListeners", params, optFns, c.addOperationListListenersMiddlewares) if err != nil { return nil, err } out := result.(*ListListenersOutput) out.ResultMetadata = metadata return out, nil } type ListListenersInput struct { // The Amazon Resource Name (ARN) of the accelerator for which you want to list // listener objects. // // This member is required. AcceleratorArn *string // The number of listener objects that you want to return with this call. The // default value is 10. MaxResults *int32 // The token for the next set of results. You receive this token from a previous // call. NextToken *string noSmithyDocumentSerde } type ListListenersOutput struct { // The list of listeners for an accelerator. Listeners []types.Listener // The token for the next set of results. You receive this token from a previous // call. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListListenersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListListeners{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListListeners{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListListenersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListListeners(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 } // ListListenersAPIClient is a client that implements the ListListeners operation. type ListListenersAPIClient interface { ListListeners(context.Context, *ListListenersInput, ...func(*Options)) (*ListListenersOutput, error) } var _ ListListenersAPIClient = (*Client)(nil) // ListListenersPaginatorOptions is the paginator options for ListListeners type ListListenersPaginatorOptions struct { // The number of listener objects that you want to return with this call. The // default value is 10. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListListenersPaginator is a paginator for ListListeners type ListListenersPaginator struct { options ListListenersPaginatorOptions client ListListenersAPIClient params *ListListenersInput nextToken *string firstPage bool } // NewListListenersPaginator returns a new ListListenersPaginator func NewListListenersPaginator(client ListListenersAPIClient, params *ListListenersInput, optFns ...func(*ListListenersPaginatorOptions)) *ListListenersPaginator { if params == nil { params = &ListListenersInput{} } options := ListListenersPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListListenersPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListListenersPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListListeners page. func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListListenersOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListListeners(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListListeners", } }
229
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List all tags for an accelerator. For more information, see Tagging in Global // Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) // in the Global Accelerator Developer Guide. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the accelerator to list tags for. An ARN // uniquely identifies an accelerator. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // Root level tag for the Tags parameters. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ListTagsForResource", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Provisions an IP address range to use with your Amazon Web Services resources // through bring your own IP addresses (BYOIP) and creates a corresponding address // pool. After the address range is provisioned, it is ready to be advertised using // AdvertiseByoipCidr (https://docs.aws.amazon.com/global-accelerator/latest/api/AdvertiseByoipCidr.html) // . For more information, see Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. func (c *Client) ProvisionByoipCidr(ctx context.Context, params *ProvisionByoipCidrInput, optFns ...func(*Options)) (*ProvisionByoipCidrOutput, error) { if params == nil { params = &ProvisionByoipCidrInput{} } result, metadata, err := c.invokeOperation(ctx, "ProvisionByoipCidr", params, optFns, c.addOperationProvisionByoipCidrMiddlewares) if err != nil { return nil, err } out := result.(*ProvisionByoipCidrOutput) out.ResultMetadata = metadata return out, nil } type ProvisionByoipCidrInput struct { // The public IPv4 address range, in CIDR notation. The most specific IP prefix // that you can specify is /24. The address range cannot overlap with another // address range that you've brought to this or another Region. // // This member is required. Cidr *string // A signed document that proves that you are authorized to bring the specified IP // address range to Amazon using BYOIP. // // This member is required. CidrAuthorizationContext *types.CidrAuthorizationContext noSmithyDocumentSerde } type ProvisionByoipCidrOutput struct { // Information about the address range. ByoipCidr *types.ByoipCidr // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationProvisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpProvisionByoipCidr{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpProvisionByoipCidr{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpProvisionByoipCidrValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionByoipCidr(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_opProvisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "ProvisionByoipCidr", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Remove endpoints from a custom routing accelerator. func (c *Client) RemoveCustomRoutingEndpoints(ctx context.Context, params *RemoveCustomRoutingEndpointsInput, optFns ...func(*Options)) (*RemoveCustomRoutingEndpointsOutput, error) { if params == nil { params = &RemoveCustomRoutingEndpointsInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveCustomRoutingEndpoints", params, optFns, c.addOperationRemoveCustomRoutingEndpointsMiddlewares) if err != nil { return nil, err } out := result.(*RemoveCustomRoutingEndpointsOutput) out.ResultMetadata = metadata return out, nil } type RemoveCustomRoutingEndpointsInput struct { // The Amazon Resource Name (ARN) of the endpoint group to remove endpoints from. // // This member is required. EndpointGroupArn *string // The IDs for the endpoints. For custom routing accelerators, endpoint IDs are // the virtual private cloud (VPC) subnet IDs. // // This member is required. EndpointIds []string noSmithyDocumentSerde } type RemoveCustomRoutingEndpointsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveCustomRoutingEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveCustomRoutingEndpoints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveCustomRoutingEndpoints{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpRemoveCustomRoutingEndpointsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveCustomRoutingEndpoints(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_opRemoveCustomRoutingEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "RemoveCustomRoutingEndpoints", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Remove endpoints from an endpoint group. The RemoveEndpoints API operation is // the recommended option for removing endpoints. The alternative is to remove // endpoints by updating an endpoint group by using the UpdateEndpointGroup (https://docs.aws.amazon.com/global-accelerator/latest/api/API_UpdateEndpointGroup.html) // API operation. There are two advantages to using AddEndpoints to remove // endpoints instead: // - It's more convenient, because you only need to specify the endpoints that // you want to remove. With the UpdateEndpointGroup API operation, you must // specify all of the endpoints in the endpoint group except the ones that you want // to remove from the group. // - It's faster, because Global Accelerator doesn't need to resolve any // endpoints. With the UpdateEndpointGroup API operation, Global Accelerator must // resolve all of the endpoints that remain in the group. func (c *Client) RemoveEndpoints(ctx context.Context, params *RemoveEndpointsInput, optFns ...func(*Options)) (*RemoveEndpointsOutput, error) { if params == nil { params = &RemoveEndpointsInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveEndpoints", params, optFns, c.addOperationRemoveEndpointsMiddlewares) if err != nil { return nil, err } out := result.(*RemoveEndpointsOutput) out.ResultMetadata = metadata return out, nil } type RemoveEndpointsInput struct { // The Amazon Resource Name (ARN) of the endpoint group. // // This member is required. EndpointGroupArn *string // The identifiers of the endpoints that you want to remove. // // This member is required. EndpointIdentifiers []types.EndpointIdentifier noSmithyDocumentSerde } type RemoveEndpointsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveEndpoints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveEndpoints{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpRemoveEndpointsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveEndpoints(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_opRemoveEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "RemoveEndpoints", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Add tags to an accelerator resource. For more information, see Tagging in // Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) // in the Global Accelerator Developer Guide. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The Amazon Resource Name (ARN) of the Global Accelerator resource to add tags // to. An ARN uniquely identifies a resource. // // This member is required. ResourceArn *string // The tags to add to a resource. A tag consists of a key and a value that you // define. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "TagResource", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Remove tags from a Global Accelerator resource. When you specify a tag key, the // action removes both that key and its associated value. The operation succeeds // even if you attempt to remove tags from an accelerator that was already removed. // For more information, see Tagging in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) // in the Global Accelerator Developer Guide. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the Global Accelerator resource to remove // tags from. An ARN uniquely identifies a resource. // // This member is required. ResourceArn *string // The tag key pairs that you want to remove from the specified resources. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UntagResource", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update an accelerator. Global Accelerator is a global service that supports // endpoints in multiple Amazon Web Services Regions but you must specify the US // West (Oregon) Region to create, update, or otherwise work with accelerators. // That is, for example, specify --region us-west-2 on AWS CLI commands. func (c *Client) UpdateAccelerator(ctx context.Context, params *UpdateAcceleratorInput, optFns ...func(*Options)) (*UpdateAcceleratorOutput, error) { if params == nil { params = &UpdateAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateAccelerator", params, optFns, c.addOperationUpdateAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*UpdateAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type UpdateAcceleratorInput struct { // The Amazon Resource Name (ARN) of the accelerator to update. // // This member is required. AcceleratorArn *string // Indicates whether an accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, the accelerator cannot be // deleted. If set to false, the accelerator can be deleted. Enabled *bool // The IP address type that an accelerator supports. For a standard accelerator, // the value can be IPV4 or DUAL_STACK. IpAddressType types.IpAddressType // The name of the accelerator. The name can have a maximum of 64 characters, must // contain only alphanumeric characters, periods (.), or hyphens (-), and must not // begin or end with a hyphen or period. Name *string noSmithyDocumentSerde } type UpdateAcceleratorOutput struct { // Information about the updated accelerator. Accelerator *types.Accelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccelerator(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_opUpdateAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateAccelerator", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update the attributes for an accelerator. func (c *Client) UpdateAcceleratorAttributes(ctx context.Context, params *UpdateAcceleratorAttributesInput, optFns ...func(*Options)) (*UpdateAcceleratorAttributesOutput, error) { if params == nil { params = &UpdateAcceleratorAttributesInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateAcceleratorAttributes", params, optFns, c.addOperationUpdateAcceleratorAttributesMiddlewares) if err != nil { return nil, err } out := result.(*UpdateAcceleratorAttributesOutput) out.ResultMetadata = metadata return out, nil } type UpdateAcceleratorAttributesInput struct { // The Amazon Resource Name (ARN) of the accelerator that you want to update. // // This member is required. AcceleratorArn *string // Update whether flow logs are enabled. The default value is false. If the value // is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For more // information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) // in the Global Accelerator Developer Guide. FlowLogsEnabled *bool // The name of the Amazon S3 bucket for the flow logs. Attribute is required if // FlowLogsEnabled is true . The bucket must exist and have a bucket policy that // grants Global Accelerator permission to write to the bucket. FlowLogsS3Bucket *string // Update the prefix for the location in the Amazon S3 bucket for the flow logs. // Attribute is required if FlowLogsEnabled is true . If you specify slash (/) for // the S3 bucket prefix, the log file bucket folder structure will include a double // slash (//), like the following: s3-bucket_name//AWSLogs/aws_account_id FlowLogsS3Prefix *string noSmithyDocumentSerde } type UpdateAcceleratorAttributesOutput struct { // Updated attributes for the accelerator. AcceleratorAttributes *types.AcceleratorAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateAcceleratorAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAcceleratorAttributes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAcceleratorAttributes{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAcceleratorAttributes(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_opUpdateAcceleratorAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateAcceleratorAttributes", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update a custom routing accelerator. func (c *Client) UpdateCustomRoutingAccelerator(ctx context.Context, params *UpdateCustomRoutingAcceleratorInput, optFns ...func(*Options)) (*UpdateCustomRoutingAcceleratorOutput, error) { if params == nil { params = &UpdateCustomRoutingAcceleratorInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateCustomRoutingAccelerator", params, optFns, c.addOperationUpdateCustomRoutingAcceleratorMiddlewares) if err != nil { return nil, err } out := result.(*UpdateCustomRoutingAcceleratorOutput) out.ResultMetadata = metadata return out, nil } type UpdateCustomRoutingAcceleratorInput struct { // The Amazon Resource Name (ARN) of the accelerator to update. // // This member is required. AcceleratorArn *string // Indicates whether an accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, the accelerator cannot be // deleted. If set to false, the accelerator can be deleted. Enabled *bool // The IP address type that an accelerator supports. For a custom routing // accelerator, the value must be IPV4. IpAddressType types.IpAddressType // The name of the accelerator. The name can have a maximum of 64 characters, must // contain only alphanumeric characters, periods (.), or hyphens (-), and must not // begin or end with a hyphen or period. Name *string noSmithyDocumentSerde } type UpdateCustomRoutingAcceleratorOutput struct { // Information about the updated custom routing accelerator. Accelerator *types.CustomRoutingAccelerator // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateCustomRoutingAcceleratorMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateCustomRoutingAccelerator{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateCustomRoutingAccelerator{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomRoutingAccelerator(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_opUpdateCustomRoutingAccelerator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateCustomRoutingAccelerator", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update the attributes for a custom routing accelerator. func (c *Client) UpdateCustomRoutingAcceleratorAttributes(ctx context.Context, params *UpdateCustomRoutingAcceleratorAttributesInput, optFns ...func(*Options)) (*UpdateCustomRoutingAcceleratorAttributesOutput, error) { if params == nil { params = &UpdateCustomRoutingAcceleratorAttributesInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateCustomRoutingAcceleratorAttributes", params, optFns, c.addOperationUpdateCustomRoutingAcceleratorAttributesMiddlewares) if err != nil { return nil, err } out := result.(*UpdateCustomRoutingAcceleratorAttributesOutput) out.ResultMetadata = metadata return out, nil } type UpdateCustomRoutingAcceleratorAttributesInput struct { // The Amazon Resource Name (ARN) of the custom routing accelerator to update // attributes for. // // This member is required. AcceleratorArn *string // Update whether flow logs are enabled. The default value is false. If the value // is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For more // information, see Flow logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) // in the Global Accelerator Developer Guide. FlowLogsEnabled *bool // The name of the Amazon S3 bucket for the flow logs. Attribute is required if // FlowLogsEnabled is true . The bucket must exist and have a bucket policy that // grants Global Accelerator permission to write to the bucket. FlowLogsS3Bucket *string // Update the prefix for the location in the Amazon S3 bucket for the flow logs. // Attribute is required if FlowLogsEnabled is true . If you don’t specify a // prefix, the flow logs are stored in the root of the bucket. If you specify slash // (/) for the S3 bucket prefix, the log file bucket folder structure will include // a double slash (//), like the following: // DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id FlowLogsS3Prefix *string noSmithyDocumentSerde } type UpdateCustomRoutingAcceleratorAttributesOutput struct { // Updated custom routing accelerator. AcceleratorAttributes *types.CustomRoutingAcceleratorAttributes // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateCustomRoutingAcceleratorAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateCustomRoutingAcceleratorAttributes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateCustomRoutingAcceleratorAttributes{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateCustomRoutingAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomRoutingAcceleratorAttributes(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_opUpdateCustomRoutingAcceleratorAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateCustomRoutingAcceleratorAttributes", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update a listener for a custom routing accelerator. func (c *Client) UpdateCustomRoutingListener(ctx context.Context, params *UpdateCustomRoutingListenerInput, optFns ...func(*Options)) (*UpdateCustomRoutingListenerOutput, error) { if params == nil { params = &UpdateCustomRoutingListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateCustomRoutingListener", params, optFns, c.addOperationUpdateCustomRoutingListenerMiddlewares) if err != nil { return nil, err } out := result.(*UpdateCustomRoutingListenerOutput) out.ResultMetadata = metadata return out, nil } type UpdateCustomRoutingListenerInput struct { // The Amazon Resource Name (ARN) of the listener to update. // // This member is required. ListenerArn *string // The updated port range to support for connections from clients to your // accelerator. If you remove ports that are currently being used by a subnet // endpoint, the call fails. Separately, you set port ranges for endpoints. For // more information, see About endpoints for custom routing accelerators (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html) // . // // This member is required. PortRanges []types.PortRange noSmithyDocumentSerde } type UpdateCustomRoutingListenerOutput struct { // Information for the updated listener for a custom routing accelerator. Listener *types.CustomRoutingListener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateCustomRoutingListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateCustomRoutingListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateCustomRoutingListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomRoutingListener(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_opUpdateCustomRoutingListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateCustomRoutingListener", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update an endpoint group. A resource must be valid and active when you add it // as an endpoint. func (c *Client) UpdateEndpointGroup(ctx context.Context, params *UpdateEndpointGroupInput, optFns ...func(*Options)) (*UpdateEndpointGroupOutput, error) { if params == nil { params = &UpdateEndpointGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateEndpointGroup", params, optFns, c.addOperationUpdateEndpointGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateEndpointGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateEndpointGroupInput struct { // The Amazon Resource Name (ARN) of the endpoint group. // // This member is required. EndpointGroupArn *string // The list of endpoint objects. A resource must be valid and active when you add // it as an endpoint. EndpointConfigurations []types.EndpointConfiguration // The time—10 seconds or 30 seconds—between each health check for an endpoint. // The default value is 30. HealthCheckIntervalSeconds *int32 // If the protocol is HTTP/S, then this specifies the path that is the destination // for health check targets. The default value is slash (/). HealthCheckPath *string // The port that Global Accelerator uses to check the health of endpoints that are // part of this endpoint group. The default port is the listener port that this // endpoint group is associated with. If the listener port is a list of ports, // Global Accelerator uses the first port in the list. HealthCheckPort *int32 // The protocol that Global Accelerator uses to check the health of endpoints that // are part of this endpoint group. The default value is TCP. HealthCheckProtocol types.HealthCheckProtocol // Override specific listener ports used to route traffic to endpoints that are // part of this endpoint group. For example, you can create a port override in // which the listener receives user traffic on ports 80 and 443, but your // accelerator routes that traffic to ports 1080 and 1443, respectively, on the // endpoints. For more information, see Overriding listener ports (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html) // in the Global Accelerator Developer Guide. PortOverrides []types.PortOverride // The number of consecutive health checks required to set the state of a healthy // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default // value is 3. ThresholdCount *int32 // The percentage of traffic to send to an Amazon Web Services Region. Additional // traffic is distributed to other endpoint groups for this listener. Use this // action to increase (dial up) or decrease (dial down) traffic to a specific // Region. The percentage is applied to the traffic that would otherwise have been // routed to the Region based on optimal routing. The default value is 100. TrafficDialPercentage *float32 noSmithyDocumentSerde } type UpdateEndpointGroupOutput struct { // The information about the endpoint group that was updated. EndpointGroup *types.EndpointGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateEndpointGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateEndpointGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateEndpointGroup{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateEndpointGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEndpointGroup(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_opUpdateEndpointGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateEndpointGroup", } }
168
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update a listener. func (c *Client) UpdateListener(ctx context.Context, params *UpdateListenerInput, optFns ...func(*Options)) (*UpdateListenerOutput, error) { if params == nil { params = &UpdateListenerInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateListener", params, optFns, c.addOperationUpdateListenerMiddlewares) if err != nil { return nil, err } out := result.(*UpdateListenerOutput) out.ResultMetadata = metadata return out, nil } type UpdateListenerInput struct { // The Amazon Resource Name (ARN) of the listener to update. // // This member is required. ListenerArn *string // Client affinity lets you direct all requests from a user to the same endpoint, // if you have stateful applications, regardless of the port and protocol of the // client request. Client affinity gives you control over whether to always route // each client to the same specific endpoint. Global Accelerator uses a // consistent-flow hashing algorithm to choose the optimal endpoint for a // connection. If client affinity is NONE , Global Accelerator uses the // "five-tuple" (5-tuple) properties—source IP address, source port, destination IP // address, destination port, and protocol—to select the hash value, and then // chooses the best endpoint. However, with this setting, if someone uses different // ports to connect to Global Accelerator, their connections might not be always // routed to the same endpoint because the hash value changes. If you want a given // client to always be routed to the same endpoint, set client affinity to // SOURCE_IP instead. When you use the SOURCE_IP setting, Global Accelerator uses // the "two-tuple" (2-tuple) properties— source (client) IP address and destination // IP address—to select the hash value. The default value is NONE . ClientAffinity types.ClientAffinity // The updated list of port ranges for the connections from clients to the // accelerator. PortRanges []types.PortRange // The updated protocol for the connections from clients to the accelerator. Protocol types.Protocol noSmithyDocumentSerde } type UpdateListenerOutput struct { // Information for the updated listener. Listener *types.Listener // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateListenerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateListener{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateListener{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateListenerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateListener(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_opUpdateListener(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "UpdateListener", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator 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/globalaccelerator/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops advertising an address range that is provisioned as an address pool. You // can perform this operation at most once every 10 seconds, even if you specify // different address ranges each time. It can take a few minutes before traffic to // the specified addresses stops routing to Amazon Web Services because of // propagation delays. For more information, see Bring your own IP addresses // (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. func (c *Client) WithdrawByoipCidr(ctx context.Context, params *WithdrawByoipCidrInput, optFns ...func(*Options)) (*WithdrawByoipCidrOutput, error) { if params == nil { params = &WithdrawByoipCidrInput{} } result, metadata, err := c.invokeOperation(ctx, "WithdrawByoipCidr", params, optFns, c.addOperationWithdrawByoipCidrMiddlewares) if err != nil { return nil, err } out := result.(*WithdrawByoipCidrOutput) out.ResultMetadata = metadata return out, nil } type WithdrawByoipCidrInput struct { // The address range, in CIDR notation. // // This member is required. Cidr *string noSmithyDocumentSerde } type WithdrawByoipCidrOutput struct { // Information about the address pool. ByoipCidr *types.ByoipCidr // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationWithdrawByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpWithdrawByoipCidr{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpWithdrawByoipCidr{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpWithdrawByoipCidrValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opWithdrawByoipCidr(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_opWithdrawByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "globalaccelerator", OperationName: "WithdrawByoipCidr", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/globalaccelerator/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "math" "strings" ) type awsAwsjson11_deserializeOpAddCustomRoutingEndpoints struct { } func (*awsAwsjson11_deserializeOpAddCustomRoutingEndpoints) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddCustomRoutingEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddCustomRoutingEndpoints(response, &metadata) } output := &AddCustomRoutingEndpointsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddCustomRoutingEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddCustomRoutingEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("EndpointAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorEndpointAlreadyExistsException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddEndpoints struct { } func (*awsAwsjson11_deserializeOpAddEndpoints) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddEndpoints(response, &metadata) } output := &AddEndpointsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("TransactionInProgressException", errorCode): return awsAwsjson11_deserializeErrorTransactionInProgressException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAdvertiseByoipCidr struct { } func (*awsAwsjson11_deserializeOpAdvertiseByoipCidr) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAdvertiseByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAdvertiseByoipCidr(response, &metadata) } output := &AdvertiseByoipCidrOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAdvertiseByoipCidrOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAdvertiseByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ByoipCidrNotFoundException", errorCode): return awsAwsjson11_deserializeErrorByoipCidrNotFoundException(response, errorBody) case strings.EqualFold("IncorrectCidrStateException", errorCode): return awsAwsjson11_deserializeErrorIncorrectCidrStateException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAllowCustomRoutingTraffic struct { } func (*awsAwsjson11_deserializeOpAllowCustomRoutingTraffic) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAllowCustomRoutingTraffic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAllowCustomRoutingTraffic(response, &metadata) } output := &AllowCustomRoutingTrafficOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAllowCustomRoutingTraffic(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateAccelerator struct { } func (*awsAwsjson11_deserializeOpCreateAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateAccelerator(response, &metadata) } output := &CreateAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateCustomRoutingAccelerator struct { } func (*awsAwsjson11_deserializeOpCreateCustomRoutingAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateCustomRoutingAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateCustomRoutingAccelerator(response, &metadata) } output := &CreateCustomRoutingAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateCustomRoutingAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateCustomRoutingAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_deserializeOpCreateCustomRoutingEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateCustomRoutingEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateCustomRoutingEndpointGroup(response, &metadata) } output := &CreateCustomRoutingEndpointGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateCustomRoutingEndpointGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateCustomRoutingEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EndpointGroupAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupAlreadyExistsException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidPortRangeException", errorCode): return awsAwsjson11_deserializeErrorInvalidPortRangeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateCustomRoutingListener struct { } func (*awsAwsjson11_deserializeOpCreateCustomRoutingListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateCustomRoutingListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateCustomRoutingListener(response, &metadata) } output := &CreateCustomRoutingListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateCustomRoutingListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateCustomRoutingListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidPortRangeException", errorCode): return awsAwsjson11_deserializeErrorInvalidPortRangeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateEndpointGroup struct { } func (*awsAwsjson11_deserializeOpCreateEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateEndpointGroup(response, &metadata) } output := &CreateEndpointGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateEndpointGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EndpointGroupAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupAlreadyExistsException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateListener struct { } func (*awsAwsjson11_deserializeOpCreateListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateListener(response, &metadata) } output := &CreateListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidPortRangeException", errorCode): return awsAwsjson11_deserializeErrorInvalidPortRangeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteAccelerator struct { } func (*awsAwsjson11_deserializeOpDeleteAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAccelerator(response, &metadata) } output := &DeleteAcceleratorOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotDisabledException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotDisabledException(response, errorBody) case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AssociatedListenerFoundException", errorCode): return awsAwsjson11_deserializeErrorAssociatedListenerFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteCustomRoutingAccelerator struct { } func (*awsAwsjson11_deserializeOpDeleteCustomRoutingAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteCustomRoutingAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomRoutingAccelerator(response, &metadata) } output := &DeleteCustomRoutingAcceleratorOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteCustomRoutingAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotDisabledException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotDisabledException(response, errorBody) case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AssociatedListenerFoundException", errorCode): return awsAwsjson11_deserializeErrorAssociatedListenerFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_deserializeOpDeleteCustomRoutingEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteCustomRoutingEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomRoutingEndpointGroup(response, &metadata) } output := &DeleteCustomRoutingEndpointGroupOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteCustomRoutingEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteCustomRoutingListener struct { } func (*awsAwsjson11_deserializeOpDeleteCustomRoutingListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteCustomRoutingListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomRoutingListener(response, &metadata) } output := &DeleteCustomRoutingListenerOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteCustomRoutingListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AssociatedEndpointGroupFoundException", errorCode): return awsAwsjson11_deserializeErrorAssociatedEndpointGroupFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteEndpointGroup struct { } func (*awsAwsjson11_deserializeOpDeleteEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteEndpointGroup(response, &metadata) } output := &DeleteEndpointGroupOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteListener struct { } func (*awsAwsjson11_deserializeOpDeleteListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteListener(response, &metadata) } output := &DeleteListenerOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AssociatedEndpointGroupFoundException", errorCode): return awsAwsjson11_deserializeErrorAssociatedEndpointGroupFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDenyCustomRoutingTraffic struct { } func (*awsAwsjson11_deserializeOpDenyCustomRoutingTraffic) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDenyCustomRoutingTraffic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDenyCustomRoutingTraffic(response, &metadata) } output := &DenyCustomRoutingTrafficOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDenyCustomRoutingTraffic(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeprovisionByoipCidr struct { } func (*awsAwsjson11_deserializeOpDeprovisionByoipCidr) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeprovisionByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeprovisionByoipCidr(response, &metadata) } output := &DeprovisionByoipCidrOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeprovisionByoipCidrOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeprovisionByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ByoipCidrNotFoundException", errorCode): return awsAwsjson11_deserializeErrorByoipCidrNotFoundException(response, errorBody) case strings.EqualFold("IncorrectCidrStateException", errorCode): return awsAwsjson11_deserializeErrorIncorrectCidrStateException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeAccelerator struct { } func (*awsAwsjson11_deserializeOpDescribeAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAccelerator(response, &metadata) } output := &DescribeAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeAcceleratorAttributes struct { } func (*awsAwsjson11_deserializeOpDescribeAcceleratorAttributes) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeAcceleratorAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAcceleratorAttributes(response, &metadata) } output := &DescribeAcceleratorAttributesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeAcceleratorAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeAcceleratorAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeCustomRoutingAccelerator struct { } func (*awsAwsjson11_deserializeOpDescribeCustomRoutingAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeCustomRoutingAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCustomRoutingAccelerator(response, &metadata) } output := &DescribeCustomRoutingAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeCustomRoutingAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeCustomRoutingAcceleratorAttributes struct { } func (*awsAwsjson11_deserializeOpDescribeCustomRoutingAcceleratorAttributes) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeCustomRoutingAcceleratorAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCustomRoutingAcceleratorAttributes(response, &metadata) } output := &DescribeCustomRoutingAcceleratorAttributesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingAcceleratorAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeCustomRoutingAcceleratorAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_deserializeOpDescribeCustomRoutingEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeCustomRoutingEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCustomRoutingEndpointGroup(response, &metadata) } output := &DescribeCustomRoutingEndpointGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingEndpointGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeCustomRoutingEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeCustomRoutingListener struct { } func (*awsAwsjson11_deserializeOpDescribeCustomRoutingListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeCustomRoutingListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCustomRoutingListener(response, &metadata) } output := &DescribeCustomRoutingListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeCustomRoutingListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeEndpointGroup struct { } func (*awsAwsjson11_deserializeOpDescribeEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEndpointGroup(response, &metadata) } output := &DescribeEndpointGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeEndpointGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeListener struct { } func (*awsAwsjson11_deserializeOpDescribeListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeListener(response, &metadata) } output := &DescribeListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAccelerators struct { } func (*awsAwsjson11_deserializeOpListAccelerators) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAccelerators) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListAccelerators(response, &metadata) } output := &ListAcceleratorsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListAcceleratorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListAccelerators(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListByoipCidrs struct { } func (*awsAwsjson11_deserializeOpListByoipCidrs) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListByoipCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListByoipCidrs(response, &metadata) } output := &ListByoipCidrsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListByoipCidrsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListByoipCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListCustomRoutingAccelerators struct { } func (*awsAwsjson11_deserializeOpListCustomRoutingAccelerators) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListCustomRoutingAccelerators) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListCustomRoutingAccelerators(response, &metadata) } output := &ListCustomRoutingAcceleratorsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListCustomRoutingAcceleratorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListCustomRoutingAccelerators(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListCustomRoutingEndpointGroups struct { } func (*awsAwsjson11_deserializeOpListCustomRoutingEndpointGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListCustomRoutingEndpointGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListCustomRoutingEndpointGroups(response, &metadata) } output := &ListCustomRoutingEndpointGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListCustomRoutingEndpointGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListCustomRoutingEndpointGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListCustomRoutingListeners struct { } func (*awsAwsjson11_deserializeOpListCustomRoutingListeners) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListCustomRoutingListeners) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListCustomRoutingListeners(response, &metadata) } output := &ListCustomRoutingListenersOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListCustomRoutingListenersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListCustomRoutingListeners(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListCustomRoutingPortMappings struct { } func (*awsAwsjson11_deserializeOpListCustomRoutingPortMappings) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListCustomRoutingPortMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListCustomRoutingPortMappings(response, &metadata) } output := &ListCustomRoutingPortMappingsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListCustomRoutingPortMappingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListCustomRoutingPortMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListCustomRoutingPortMappingsByDestination struct { } func (*awsAwsjson11_deserializeOpListCustomRoutingPortMappingsByDestination) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListCustomRoutingPortMappingsByDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListCustomRoutingPortMappingsByDestination(response, &metadata) } output := &ListCustomRoutingPortMappingsByDestinationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListCustomRoutingPortMappingsByDestinationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListCustomRoutingPortMappingsByDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("EndpointNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListEndpointGroups struct { } func (*awsAwsjson11_deserializeOpListEndpointGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListEndpointGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListEndpointGroups(response, &metadata) } output := &ListEndpointGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListEndpointGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListEndpointGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListListeners struct { } func (*awsAwsjson11_deserializeOpListListeners) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListListeners) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListListeners(response, &metadata) } output := &ListListenersOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListListenersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListListeners(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListTagsForResource struct { } func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpProvisionByoipCidr struct { } func (*awsAwsjson11_deserializeOpProvisionByoipCidr) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorProvisionByoipCidr(response, &metadata) } output := &ProvisionByoipCidrOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentProvisionByoipCidrOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorProvisionByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("IncorrectCidrStateException", errorCode): return awsAwsjson11_deserializeErrorIncorrectCidrStateException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRemoveCustomRoutingEndpoints struct { } func (*awsAwsjson11_deserializeOpRemoveCustomRoutingEndpoints) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRemoveCustomRoutingEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorRemoveCustomRoutingEndpoints(response, &metadata) } output := &RemoveCustomRoutingEndpointsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRemoveCustomRoutingEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("EndpointNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRemoveEndpoints struct { } func (*awsAwsjson11_deserializeOpRemoveEndpoints) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRemoveEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorRemoveEndpoints(response, &metadata) } output := &RemoveEndpointsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRemoveEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("TransactionInProgressException", errorCode): return awsAwsjson11_deserializeErrorTransactionInProgressException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTagResource struct { } func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUntagResource struct { } func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateAccelerator struct { } func (*awsAwsjson11_deserializeOpUpdateAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAccelerator(response, &metadata) } output := &UpdateAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateAcceleratorAttributes struct { } func (*awsAwsjson11_deserializeOpUpdateAcceleratorAttributes) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateAcceleratorAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAcceleratorAttributes(response, &metadata) } output := &UpdateAcceleratorAttributesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateAcceleratorAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateAcceleratorAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateCustomRoutingAccelerator struct { } func (*awsAwsjson11_deserializeOpUpdateCustomRoutingAccelerator) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateCustomRoutingAccelerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCustomRoutingAccelerator(response, &metadata) } output := &UpdateCustomRoutingAcceleratorOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingAcceleratorOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateCustomRoutingAccelerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateCustomRoutingAcceleratorAttributes struct { } func (*awsAwsjson11_deserializeOpUpdateCustomRoutingAcceleratorAttributes) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateCustomRoutingAcceleratorAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCustomRoutingAcceleratorAttributes(response, &metadata) } output := &UpdateCustomRoutingAcceleratorAttributesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingAcceleratorAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateCustomRoutingAcceleratorAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AcceleratorNotFoundException", errorCode): return awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response, errorBody) case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateCustomRoutingListener struct { } func (*awsAwsjson11_deserializeOpUpdateCustomRoutingListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateCustomRoutingListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCustomRoutingListener(response, &metadata) } output := &UpdateCustomRoutingListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateCustomRoutingListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidPortRangeException", errorCode): return awsAwsjson11_deserializeErrorInvalidPortRangeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateEndpointGroup struct { } func (*awsAwsjson11_deserializeOpUpdateEndpointGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateEndpointGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateEndpointGroup(response, &metadata) } output := &UpdateEndpointGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateEndpointGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateEndpointGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EndpointGroupNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateListener struct { } func (*awsAwsjson11_deserializeOpUpdateListener) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateListener) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateListener(response, &metadata) } output := &UpdateListenerOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateListenerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateListener(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidPortRangeException", errorCode): return awsAwsjson11_deserializeErrorInvalidPortRangeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ListenerNotFoundException", errorCode): return awsAwsjson11_deserializeErrorListenerNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpWithdrawByoipCidr struct { } func (*awsAwsjson11_deserializeOpWithdrawByoipCidr) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorWithdrawByoipCidr(response, &metadata) } output := &WithdrawByoipCidrOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentWithdrawByoipCidrOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorWithdrawByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ByoipCidrNotFoundException", errorCode): return awsAwsjson11_deserializeErrorByoipCidrNotFoundException(response, errorBody) case strings.EqualFold("IncorrectCidrStateException", errorCode): return awsAwsjson11_deserializeErrorIncorrectCidrStateException(response, errorBody) case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorAcceleratorNotDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.AcceleratorNotDisabledException{} err := awsAwsjson11_deserializeDocumentAcceleratorNotDisabledException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorAcceleratorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.AcceleratorNotFoundException{} err := awsAwsjson11_deserializeDocumentAcceleratorNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.AccessDeniedException{} err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorAssociatedEndpointGroupFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.AssociatedEndpointGroupFoundException{} err := awsAwsjson11_deserializeDocumentAssociatedEndpointGroupFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorAssociatedListenerFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.AssociatedListenerFoundException{} err := awsAwsjson11_deserializeDocumentAssociatedListenerFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorByoipCidrNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ByoipCidrNotFoundException{} err := awsAwsjson11_deserializeDocumentByoipCidrNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ConflictException{} err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEndpointAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EndpointAlreadyExistsException{} err := awsAwsjson11_deserializeDocumentEndpointAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEndpointGroupAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EndpointGroupAlreadyExistsException{} err := awsAwsjson11_deserializeDocumentEndpointGroupAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEndpointGroupNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EndpointGroupNotFoundException{} err := awsAwsjson11_deserializeDocumentEndpointGroupNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorEndpointNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.EndpointNotFoundException{} err := awsAwsjson11_deserializeDocumentEndpointNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorIncorrectCidrStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.IncorrectCidrStateException{} err := awsAwsjson11_deserializeDocumentIncorrectCidrStateException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInternalServiceErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InternalServiceErrorException{} err := awsAwsjson11_deserializeDocumentInternalServiceErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidArgumentException{} err := awsAwsjson11_deserializeDocumentInvalidArgumentException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidNextTokenException{} err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidPortRangeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidPortRangeException{} err := awsAwsjson11_deserializeDocumentInvalidPortRangeException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LimitExceededException{} err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorListenerNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ListenerNotFoundException{} err := awsAwsjson11_deserializeDocumentListenerNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorTransactionInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.TransactionInProgressException{} err := awsAwsjson11_deserializeDocumentTransactionInProgressException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeDocumentAccelerator(v **types.Accelerator, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Accelerator if *v == nil { sv = &types.Accelerator{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.AcceleratorArn = ptr.String(jtv) } case "CreatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DnsName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.DnsName = ptr.String(jtv) } case "DualStackDnsName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.DualStackDnsName = ptr.String(jtv) } case "Enabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) } sv.Enabled = ptr.Bool(jtv) } case "Events": if err := awsAwsjson11_deserializeDocumentAcceleratorEvents(&sv.Events, value); err != nil { return err } case "IpAddressType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddressType to be of type string, got %T instead", value) } sv.IpAddressType = types.IpAddressType(jtv) } case "IpSets": if err := awsAwsjson11_deserializeDocumentIpSets(&sv.IpSets, value); err != nil { return err } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AcceleratorStatus to be of type string, got %T instead", value) } sv.Status = types.AcceleratorStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAcceleratorAttributes(v **types.AcceleratorAttributes, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AcceleratorAttributes if *v == nil { sv = &types.AcceleratorAttributes{} } else { sv = *v } for key, value := range shape { switch key { case "FlowLogsEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) } sv.FlowLogsEnabled = ptr.Bool(jtv) } case "FlowLogsS3Bucket": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.FlowLogsS3Bucket = ptr.String(jtv) } case "FlowLogsS3Prefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.FlowLogsS3Prefix = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAcceleratorEvent(v **types.AcceleratorEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AcceleratorEvent if *v == nil { sv = &types.AcceleratorEvent{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "Timestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAcceleratorEvents(v *[]types.AcceleratorEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.AcceleratorEvent if *v == nil { cv = []types.AcceleratorEvent{} } else { cv = *v } for _, value := range shape { var col types.AcceleratorEvent destAddr := &col if err := awsAwsjson11_deserializeDocumentAcceleratorEvent(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAcceleratorNotDisabledException(v **types.AcceleratorNotDisabledException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AcceleratorNotDisabledException if *v == nil { sv = &types.AcceleratorNotDisabledException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAcceleratorNotFoundException(v **types.AcceleratorNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AcceleratorNotFoundException if *v == nil { sv = &types.AcceleratorNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAccelerators(v *[]types.Accelerator, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Accelerator if *v == nil { cv = []types.Accelerator{} } else { cv = *v } for _, value := range shape { var col types.Accelerator destAddr := &col if err := awsAwsjson11_deserializeDocumentAccelerator(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AccessDeniedException if *v == nil { sv = &types.AccessDeniedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAssociatedEndpointGroupFoundException(v **types.AssociatedEndpointGroupFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AssociatedEndpointGroupFoundException if *v == nil { sv = &types.AssociatedEndpointGroupFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAssociatedListenerFoundException(v **types.AssociatedListenerFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AssociatedListenerFoundException if *v == nil { sv = &types.AssociatedListenerFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByoipCidr(v **types.ByoipCidr, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByoipCidr if *v == nil { sv = &types.ByoipCidr{} } else { sv = *v } for key, value := range shape { switch key { case "Cidr": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Cidr = ptr.String(jtv) } case "Events": if err := awsAwsjson11_deserializeDocumentByoipCidrEvents(&sv.Events, value); err != nil { return err } case "State": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ByoipCidrState to be of type string, got %T instead", value) } sv.State = types.ByoipCidrState(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByoipCidrEvent(v **types.ByoipCidrEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByoipCidrEvent if *v == nil { sv = &types.ByoipCidrEvent{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "Timestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByoipCidrEvents(v *[]types.ByoipCidrEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ByoipCidrEvent if *v == nil { cv = []types.ByoipCidrEvent{} } else { cv = *v } for _, value := range shape { var col types.ByoipCidrEvent destAddr := &col if err := awsAwsjson11_deserializeDocumentByoipCidrEvent(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentByoipCidrNotFoundException(v **types.ByoipCidrNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByoipCidrNotFoundException if *v == nil { sv = &types.ByoipCidrNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByoipCidrs(v *[]types.ByoipCidr, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ByoipCidr if *v == nil { cv = []types.ByoipCidr{} } else { cv = *v } for _, value := range shape { var col types.ByoipCidr destAddr := &col if err := awsAwsjson11_deserializeDocumentByoipCidr(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ConflictException if *v == nil { sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingAccelerator(v **types.CustomRoutingAccelerator, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingAccelerator if *v == nil { sv = &types.CustomRoutingAccelerator{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.AcceleratorArn = ptr.String(jtv) } case "CreatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DnsName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.DnsName = ptr.String(jtv) } case "Enabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) } sv.Enabled = ptr.Bool(jtv) } case "IpAddressType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddressType to be of type string, got %T instead", value) } sv.IpAddressType = types.IpAddressType(jtv) } case "IpSets": if err := awsAwsjson11_deserializeDocumentIpSets(&sv.IpSets, value); err != nil { return err } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CustomRoutingAcceleratorStatus to be of type string, got %T instead", value) } sv.Status = types.CustomRoutingAcceleratorStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingAcceleratorAttributes(v **types.CustomRoutingAcceleratorAttributes, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingAcceleratorAttributes if *v == nil { sv = &types.CustomRoutingAcceleratorAttributes{} } else { sv = *v } for key, value := range shape { switch key { case "FlowLogsEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) } sv.FlowLogsEnabled = ptr.Bool(jtv) } case "FlowLogsS3Bucket": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.FlowLogsS3Bucket = ptr.String(jtv) } case "FlowLogsS3Prefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.FlowLogsS3Prefix = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingAccelerators(v *[]types.CustomRoutingAccelerator, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingAccelerator if *v == nil { cv = []types.CustomRoutingAccelerator{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingAccelerator destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomRoutingAccelerator(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingDestinationDescription(v **types.CustomRoutingDestinationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingDestinationDescription if *v == nil { sv = &types.CustomRoutingDestinationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "FromPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FromPort = ptr.Int32(int32(i64)) } case "Protocols": if err := awsAwsjson11_deserializeDocumentProtocols(&sv.Protocols, value); err != nil { return err } case "ToPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ToPort = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingDestinationDescriptions(v *[]types.CustomRoutingDestinationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingDestinationDescription if *v == nil { cv = []types.CustomRoutingDestinationDescription{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingDestinationDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomRoutingDestinationDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingEndpointDescription(v **types.CustomRoutingEndpointDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingEndpointDescription if *v == nil { sv = &types.CustomRoutingEndpointDescription{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingEndpointDescriptions(v *[]types.CustomRoutingEndpointDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingEndpointDescription if *v == nil { cv = []types.CustomRoutingEndpointDescription{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingEndpointDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroup(v **types.CustomRoutingEndpointGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingEndpointGroup if *v == nil { sv = &types.CustomRoutingEndpointGroup{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationDescriptions": if err := awsAwsjson11_deserializeDocumentCustomRoutingDestinationDescriptions(&sv.DestinationDescriptions, value); err != nil { return err } case "EndpointDescriptions": if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointDescriptions(&sv.EndpointDescriptions, value); err != nil { return err } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } case "EndpointGroupRegion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupRegion = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroups(v *[]types.CustomRoutingEndpointGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingEndpointGroup if *v == nil { cv = []types.CustomRoutingEndpointGroup{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingEndpointGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingListener(v **types.CustomRoutingListener, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomRoutingListener if *v == nil { sv = &types.CustomRoutingListener{} } else { sv = *v } for key, value := range shape { switch key { case "ListenerArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.ListenerArn = ptr.String(jtv) } case "PortRanges": if err := awsAwsjson11_deserializeDocumentPortRanges(&sv.PortRanges, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingListeners(v *[]types.CustomRoutingListener, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingListener if *v == nil { cv = []types.CustomRoutingListener{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingListener destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomRoutingListener(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomRoutingProtocols(v *[]types.CustomRoutingProtocol, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomRoutingProtocol if *v == nil { cv = []types.CustomRoutingProtocol{} } else { cv = *v } for _, value := range shape { var col types.CustomRoutingProtocol if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CustomRoutingProtocol to be of type string, got %T instead", value) } col = types.CustomRoutingProtocol(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDestinationPortMapping(v **types.DestinationPortMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DestinationPortMapping if *v == nil { sv = &types.DestinationPortMapping{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.AcceleratorArn = ptr.String(jtv) } case "AcceleratorSocketAddresses": if err := awsAwsjson11_deserializeDocumentSocketAddresses(&sv.AcceleratorSocketAddresses, value); err != nil { return err } case "DestinationSocketAddress": if err := awsAwsjson11_deserializeDocumentSocketAddress(&sv.DestinationSocketAddress, value); err != nil { return err } case "DestinationTrafficState": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CustomRoutingDestinationTrafficState to be of type string, got %T instead", value) } sv.DestinationTrafficState = types.CustomRoutingDestinationTrafficState(jtv) } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } case "EndpointGroupRegion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupRegion = ptr.String(jtv) } case "EndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointId = ptr.String(jtv) } case "IpAddressType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddressType to be of type string, got %T instead", value) } sv.IpAddressType = types.IpAddressType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDestinationPortMappings(v *[]types.DestinationPortMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.DestinationPortMapping if *v == nil { cv = []types.DestinationPortMapping{} } else { cv = *v } for _, value := range shape { var col types.DestinationPortMapping destAddr := &col if err := awsAwsjson11_deserializeDocumentDestinationPortMapping(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentEndpointAlreadyExistsException(v **types.EndpointAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointAlreadyExistsException if *v == nil { sv = &types.EndpointAlreadyExistsException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEndpointDescription(v **types.EndpointDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointDescription if *v == nil { sv = &types.EndpointDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ClientIPPreservationEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) } sv.ClientIPPreservationEnabled = ptr.Bool(jtv) } case "EndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointId = ptr.String(jtv) } case "HealthReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.HealthReason = ptr.String(jtv) } case "HealthState": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HealthState to be of type string, got %T instead", value) } sv.HealthState = types.HealthState(jtv) } case "Weight": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected EndpointWeight to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Weight = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEndpointDescriptions(v *[]types.EndpointDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.EndpointDescription if *v == nil { cv = []types.EndpointDescription{} } else { cv = *v } for _, value := range shape { var col types.EndpointDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentEndpointDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentEndpointGroup(v **types.EndpointGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointGroup if *v == nil { sv = &types.EndpointGroup{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointDescriptions": if err := awsAwsjson11_deserializeDocumentEndpointDescriptions(&sv.EndpointDescriptions, value); err != nil { return err } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } case "EndpointGroupRegion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupRegion = ptr.String(jtv) } case "HealthCheckIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected HealthCheckIntervalSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.HealthCheckIntervalSeconds = ptr.Int32(int32(i64)) } case "HealthCheckPath": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HealthCheckPath to be of type string, got %T instead", value) } sv.HealthCheckPath = ptr.String(jtv) } case "HealthCheckPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected HealthCheckPort to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.HealthCheckPort = ptr.Int32(int32(i64)) } case "HealthCheckProtocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HealthCheckProtocol to be of type string, got %T instead", value) } sv.HealthCheckProtocol = types.HealthCheckProtocol(jtv) } case "PortOverrides": if err := awsAwsjson11_deserializeDocumentPortOverrides(&sv.PortOverrides, value); err != nil { return err } case "ThresholdCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ThresholdCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ThresholdCount = ptr.Int32(int32(i64)) } case "TrafficDialPercentage": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.TrafficDialPercentage = ptr.Float32(float32(f64)) case string: var f64 float64 switch { case strings.EqualFold(jtv, "NaN"): f64 = math.NaN() case strings.EqualFold(jtv, "Infinity"): f64 = math.Inf(1) case strings.EqualFold(jtv, "-Infinity"): f64 = math.Inf(-1) default: return fmt.Errorf("unknown JSON number value: %s", jtv) } sv.TrafficDialPercentage = ptr.Float32(float32(f64)) default: return fmt.Errorf("expected TrafficDialPercentage to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEndpointGroupAlreadyExistsException(v **types.EndpointGroupAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointGroupAlreadyExistsException if *v == nil { sv = &types.EndpointGroupAlreadyExistsException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEndpointGroupNotFoundException(v **types.EndpointGroupNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointGroupNotFoundException if *v == nil { sv = &types.EndpointGroupNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEndpointGroups(v *[]types.EndpointGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.EndpointGroup if *v == nil { cv = []types.EndpointGroup{} } else { cv = *v } for _, value := range shape { var col types.EndpointGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentEndpointGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentEndpointNotFoundException(v **types.EndpointNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EndpointNotFoundException if *v == nil { sv = &types.EndpointNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIncorrectCidrStateException(v **types.IncorrectCidrStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IncorrectCidrStateException if *v == nil { sv = &types.IncorrectCidrStateException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInternalServiceErrorException(v **types.InternalServiceErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServiceErrorException if *v == nil { sv = &types.InternalServiceErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidArgumentException(v **types.InvalidArgumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidArgumentException if *v == nil { sv = &types.InvalidArgumentException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidNextTokenException if *v == nil { sv = &types.InvalidNextTokenException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidPortRangeException(v **types.InvalidPortRangeException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidPortRangeException if *v == nil { sv = &types.InvalidPortRangeException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIpAddresses(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddress to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentIpSet(v **types.IpSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IpSet if *v == nil { sv = &types.IpSet{} } else { sv = *v } for key, value := range shape { switch key { case "IpAddresses": if err := awsAwsjson11_deserializeDocumentIpAddresses(&sv.IpAddresses, value); err != nil { return err } case "IpAddressFamily": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IpAddressFamily to be of type string, got %T instead", value) } sv.IpAddressFamily = types.IpAddressFamily(jtv) } case "IpFamily": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.IpFamily = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIpSets(v *[]types.IpSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.IpSet if *v == nil { cv = []types.IpSet{} } else { cv = *v } for _, value := range shape { var col types.IpSet destAddr := &col if err := awsAwsjson11_deserializeDocumentIpSet(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LimitExceededException if *v == nil { sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentListener(v **types.Listener, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Listener if *v == nil { sv = &types.Listener{} } else { sv = *v } for key, value := range shape { switch key { case "ClientAffinity": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientAffinity to be of type string, got %T instead", value) } sv.ClientAffinity = types.ClientAffinity(jtv) } case "ListenerArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.ListenerArn = ptr.String(jtv) } case "PortRanges": if err := awsAwsjson11_deserializeDocumentPortRanges(&sv.PortRanges, value); err != nil { return err } case "Protocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) } sv.Protocol = types.Protocol(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentListenerNotFoundException(v **types.ListenerNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ListenerNotFoundException if *v == nil { sv = &types.ListenerNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentListeners(v *[]types.Listener, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Listener if *v == nil { cv = []types.Listener{} } else { cv = *v } for _, value := range shape { var col types.Listener destAddr := &col if err := awsAwsjson11_deserializeDocumentListener(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPortMapping(v **types.PortMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PortMapping if *v == nil { sv = &types.PortMapping{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.AcceleratorPort = ptr.Int32(int32(i64)) } case "DestinationSocketAddress": if err := awsAwsjson11_deserializeDocumentSocketAddress(&sv.DestinationSocketAddress, value); err != nil { return err } case "DestinationTrafficState": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CustomRoutingDestinationTrafficState to be of type string, got %T instead", value) } sv.DestinationTrafficState = types.CustomRoutingDestinationTrafficState(jtv) } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } case "EndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointId = ptr.String(jtv) } case "Protocols": if err := awsAwsjson11_deserializeDocumentCustomRoutingProtocols(&sv.Protocols, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPortMappings(v *[]types.PortMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PortMapping if *v == nil { cv = []types.PortMapping{} } else { cv = *v } for _, value := range shape { var col types.PortMapping destAddr := &col if err := awsAwsjson11_deserializeDocumentPortMapping(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPortOverride(v **types.PortOverride, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PortOverride if *v == nil { sv = &types.PortOverride{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.EndpointPort = ptr.Int32(int32(i64)) } case "ListenerPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ListenerPort = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPortOverrides(v *[]types.PortOverride, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PortOverride if *v == nil { cv = []types.PortOverride{} } else { cv = *v } for _, value := range shape { var col types.PortOverride destAddr := &col if err := awsAwsjson11_deserializeDocumentPortOverride(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPortRange(v **types.PortRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PortRange if *v == nil { sv = &types.PortRange{} } else { sv = *v } for key, value := range shape { switch key { case "FromPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FromPort = ptr.Int32(int32(i64)) } case "ToPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ToPort = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPortRanges(v *[]types.PortRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PortRange if *v == nil { cv = []types.PortRange{} } else { cv = *v } for _, value := range shape { var col types.PortRange destAddr := &col if err := awsAwsjson11_deserializeDocumentPortRange(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentProtocols(v *[]types.Protocol, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Protocol if *v == nil { cv = []types.Protocol{} } else { cv = *v } for _, value := range shape { var col types.Protocol if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) } col = types.Protocol(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSocketAddress(v **types.SocketAddress, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SocketAddress if *v == nil { sv = &types.SocketAddress{} } else { sv = *v } for key, value := range shape { switch key { case "IpAddress": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.IpAddress = ptr.String(jtv) } case "Port": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Port = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSocketAddresses(v *[]types.SocketAddress, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SocketAddress if *v == nil { cv = []types.SocketAddress{} } else { cv = *v } for _, value := range shape { var col types.SocketAddress destAddr := &col if err := awsAwsjson11_deserializeDocumentSocketAddress(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTags(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTransactionInProgressException(v **types.TransactionInProgressException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TransactionInProgressException if *v == nil { sv = &types.TransactionInProgressException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddCustomRoutingEndpointsOutput(v **AddCustomRoutingEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AddCustomRoutingEndpointsOutput if *v == nil { sv = &AddCustomRoutingEndpointsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointDescriptions": if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointDescriptions(&sv.EndpointDescriptions, value); err != nil { return err } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddEndpointsOutput(v **AddEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AddEndpointsOutput if *v == nil { sv = &AddEndpointsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointDescriptions": if err := awsAwsjson11_deserializeDocumentEndpointDescriptions(&sv.EndpointDescriptions, value); err != nil { return err } case "EndpointGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.EndpointGroupArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAdvertiseByoipCidrOutput(v **AdvertiseByoipCidrOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AdvertiseByoipCidrOutput if *v == nil { sv = &AdvertiseByoipCidrOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByoipCidr": if err := awsAwsjson11_deserializeDocumentByoipCidr(&sv.ByoipCidr, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateAcceleratorOutput(v **CreateAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateAcceleratorOutput if *v == nil { sv = &CreateAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateCustomRoutingAcceleratorOutput(v **CreateCustomRoutingAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateCustomRoutingAcceleratorOutput if *v == nil { sv = &CreateCustomRoutingAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentCustomRoutingAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateCustomRoutingEndpointGroupOutput(v **CreateCustomRoutingEndpointGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateCustomRoutingEndpointGroupOutput if *v == nil { sv = &CreateCustomRoutingEndpointGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroup": if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroup(&sv.EndpointGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateCustomRoutingListenerOutput(v **CreateCustomRoutingListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateCustomRoutingListenerOutput if *v == nil { sv = &CreateCustomRoutingListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentCustomRoutingListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateEndpointGroupOutput(v **CreateEndpointGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateEndpointGroupOutput if *v == nil { sv = &CreateEndpointGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroup": if err := awsAwsjson11_deserializeDocumentEndpointGroup(&sv.EndpointGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateListenerOutput(v **CreateListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateListenerOutput if *v == nil { sv = &CreateListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeprovisionByoipCidrOutput(v **DeprovisionByoipCidrOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeprovisionByoipCidrOutput if *v == nil { sv = &DeprovisionByoipCidrOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByoipCidr": if err := awsAwsjson11_deserializeDocumentByoipCidr(&sv.ByoipCidr, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeAcceleratorAttributesOutput(v **DescribeAcceleratorAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeAcceleratorAttributesOutput if *v == nil { sv = &DescribeAcceleratorAttributesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorAttributes": if err := awsAwsjson11_deserializeDocumentAcceleratorAttributes(&sv.AcceleratorAttributes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeAcceleratorOutput(v **DescribeAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeAcceleratorOutput if *v == nil { sv = &DescribeAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingAcceleratorAttributesOutput(v **DescribeCustomRoutingAcceleratorAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeCustomRoutingAcceleratorAttributesOutput if *v == nil { sv = &DescribeCustomRoutingAcceleratorAttributesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorAttributes": if err := awsAwsjson11_deserializeDocumentCustomRoutingAcceleratorAttributes(&sv.AcceleratorAttributes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingAcceleratorOutput(v **DescribeCustomRoutingAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeCustomRoutingAcceleratorOutput if *v == nil { sv = &DescribeCustomRoutingAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentCustomRoutingAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingEndpointGroupOutput(v **DescribeCustomRoutingEndpointGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeCustomRoutingEndpointGroupOutput if *v == nil { sv = &DescribeCustomRoutingEndpointGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroup": if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroup(&sv.EndpointGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeCustomRoutingListenerOutput(v **DescribeCustomRoutingListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeCustomRoutingListenerOutput if *v == nil { sv = &DescribeCustomRoutingListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentCustomRoutingListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeEndpointGroupOutput(v **DescribeEndpointGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeEndpointGroupOutput if *v == nil { sv = &DescribeEndpointGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroup": if err := awsAwsjson11_deserializeDocumentEndpointGroup(&sv.EndpointGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeListenerOutput(v **DescribeListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeListenerOutput if *v == nil { sv = &DescribeListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAcceleratorsOutput(v **ListAcceleratorsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListAcceleratorsOutput if *v == nil { sv = &ListAcceleratorsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerators": if err := awsAwsjson11_deserializeDocumentAccelerators(&sv.Accelerators, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListByoipCidrsOutput(v **ListByoipCidrsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListByoipCidrsOutput if *v == nil { sv = &ListByoipCidrsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByoipCidrs": if err := awsAwsjson11_deserializeDocumentByoipCidrs(&sv.ByoipCidrs, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListCustomRoutingAcceleratorsOutput(v **ListCustomRoutingAcceleratorsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListCustomRoutingAcceleratorsOutput if *v == nil { sv = &ListCustomRoutingAcceleratorsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerators": if err := awsAwsjson11_deserializeDocumentCustomRoutingAccelerators(&sv.Accelerators, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListCustomRoutingEndpointGroupsOutput(v **ListCustomRoutingEndpointGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListCustomRoutingEndpointGroupsOutput if *v == nil { sv = &ListCustomRoutingEndpointGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroups": if err := awsAwsjson11_deserializeDocumentCustomRoutingEndpointGroups(&sv.EndpointGroups, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListCustomRoutingListenersOutput(v **ListCustomRoutingListenersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListCustomRoutingListenersOutput if *v == nil { sv = &ListCustomRoutingListenersOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listeners": if err := awsAwsjson11_deserializeDocumentCustomRoutingListeners(&sv.Listeners, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListCustomRoutingPortMappingsByDestinationOutput(v **ListCustomRoutingPortMappingsByDestinationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListCustomRoutingPortMappingsByDestinationOutput if *v == nil { sv = &ListCustomRoutingPortMappingsByDestinationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationPortMappings": if err := awsAwsjson11_deserializeDocumentDestinationPortMappings(&sv.DestinationPortMappings, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListCustomRoutingPortMappingsOutput(v **ListCustomRoutingPortMappingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListCustomRoutingPortMappingsOutput if *v == nil { sv = &ListCustomRoutingPortMappingsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "PortMappings": if err := awsAwsjson11_deserializeDocumentPortMappings(&sv.PortMappings, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListEndpointGroupsOutput(v **ListEndpointGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListEndpointGroupsOutput if *v == nil { sv = &ListEndpointGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroups": if err := awsAwsjson11_deserializeDocumentEndpointGroups(&sv.EndpointGroups, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListListenersOutput(v **ListListenersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListListenersOutput if *v == nil { sv = &ListListenersOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listeners": if err := awsAwsjson11_deserializeDocumentListeners(&sv.Listeners, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Tags": if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentProvisionByoipCidrOutput(v **ProvisionByoipCidrOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ProvisionByoipCidrOutput if *v == nil { sv = &ProvisionByoipCidrOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByoipCidr": if err := awsAwsjson11_deserializeDocumentByoipCidr(&sv.ByoipCidr, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateAcceleratorAttributesOutput(v **UpdateAcceleratorAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateAcceleratorAttributesOutput if *v == nil { sv = &UpdateAcceleratorAttributesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorAttributes": if err := awsAwsjson11_deserializeDocumentAcceleratorAttributes(&sv.AcceleratorAttributes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateAcceleratorOutput(v **UpdateAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateAcceleratorOutput if *v == nil { sv = &UpdateAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingAcceleratorAttributesOutput(v **UpdateCustomRoutingAcceleratorAttributesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateCustomRoutingAcceleratorAttributesOutput if *v == nil { sv = &UpdateCustomRoutingAcceleratorAttributesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AcceleratorAttributes": if err := awsAwsjson11_deserializeDocumentCustomRoutingAcceleratorAttributes(&sv.AcceleratorAttributes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingAcceleratorOutput(v **UpdateCustomRoutingAcceleratorOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateCustomRoutingAcceleratorOutput if *v == nil { sv = &UpdateCustomRoutingAcceleratorOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Accelerator": if err := awsAwsjson11_deserializeDocumentCustomRoutingAccelerator(&sv.Accelerator, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateCustomRoutingListenerOutput(v **UpdateCustomRoutingListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateCustomRoutingListenerOutput if *v == nil { sv = &UpdateCustomRoutingListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentCustomRoutingListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateEndpointGroupOutput(v **UpdateEndpointGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateEndpointGroupOutput if *v == nil { sv = &UpdateEndpointGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointGroup": if err := awsAwsjson11_deserializeDocumentEndpointGroup(&sv.EndpointGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateListenerOutput(v **UpdateListenerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateListenerOutput if *v == nil { sv = &UpdateListenerOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Listener": if err := awsAwsjson11_deserializeDocumentListener(&sv.Listener, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentWithdrawByoipCidrOutput(v **WithdrawByoipCidrOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *WithdrawByoipCidrOutput if *v == nil { sv = &WithdrawByoipCidrOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByoipCidr": if err := awsAwsjson11_deserializeDocumentByoipCidr(&sv.ByoipCidr, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil }
10,864
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package globalaccelerator provides the API client, operations, and parameter // types for AWS Global Accelerator. // // Global Accelerator This is the Global Accelerator API Reference. This guide is // for developers who need detailed information about Global Accelerator API // actions, data types, and errors. For more information about Global Accelerator // features, see the Global Accelerator Developer Guide (https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html) // . Global Accelerator is a service in which you create accelerators to improve // the performance of your applications for local and global users. Depending on // the type of accelerator you choose, you can gain additional benefits. // - By using a standard accelerator, you can improve availability of your // internet applications that are used by a global audience. With a standard // accelerator, Global Accelerator directs traffic to optimal endpoints over the // Amazon Web Services global network. // - For other scenarios, you might choose a custom routing accelerator. With a // custom routing accelerator, you can use application logic to directly map one or // more users to a specific endpoint among many endpoints. // // Global Accelerator is a global service that supports endpoints in multiple // Amazon Web Services Regions but you must specify the US West (Oregon) Region to // create, update, or otherwise work with accelerators. That is, for example, // specify --region us-west-2 on AWS CLI commands. By default, Global Accelerator // provides you with static IP addresses that you associate with your accelerator. // The static IP addresses are anycast from the Amazon Web Services edge network. // For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, // Global Accelerator provides a total of four addresses: two static IPv4 addresses // and two static IPv6 addresses. With a standard accelerator for IPv4, instead of // using the addresses that Global Accelerator provides, you can configure these // entry points to be IPv4 addresses from your own IP address ranges that you bring // toGlobal Accelerator (BYOIP). For a standard accelerator, they distribute // incoming application traffic across multiple endpoint resources in multiple // Amazon Web Services Regions , which increases the availability of your // applications. Endpoints for standard accelerators can be Network Load Balancers, // Application Load Balancers, Amazon EC2 instances, or Elastic IP addresses that // are located in one Amazon Web Services Region or multiple Amazon Web Services // Regions. For custom routing accelerators, you map traffic that arrives to the // static IP addresses to specific Amazon EC2 servers in endpoints that are virtual // private cloud (VPC) subnets. The static IP addresses remain assigned to your // accelerator for as long as it exists, even if you disable the accelerator and it // no longer accepts or routes traffic. However, when you delete an accelerator, // you lose the static IP addresses that are assigned to it, so you can no longer // route traffic by using them. You can use IAM policies like tag-based permissions // with Global Accelerator to limit the users who have permissions to delete an // accelerator. For more information, see Tag-based policies (https://docs.aws.amazon.com/global-accelerator/latest/dg/access-control-manage-access-tag-policies.html) // . For standard accelerators, Global Accelerator uses the Amazon Web Services // global network to route traffic to the optimal regional endpoint based on // health, client location, and policies that you configure. The service reacts // instantly to changes in health or configuration to ensure that internet traffic // from clients is always directed to healthy endpoints. For more information about // understanding and using Global Accelerator, see the Global Accelerator // Developer Guide (https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html) // . package globalaccelerator
56
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/globalaccelerator/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "globalaccelerator" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package globalaccelerator // goModuleVersion is the tagged release for this module const goModuleVersion = "1.16.12"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/globalaccelerator/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" "path" ) type awsAwsjson11_serializeOpAddCustomRoutingEndpoints struct { } func (*awsAwsjson11_serializeOpAddCustomRoutingEndpoints) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddCustomRoutingEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddCustomRoutingEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.AddCustomRoutingEndpoints") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddCustomRoutingEndpointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddEndpoints struct { } func (*awsAwsjson11_serializeOpAddEndpoints) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.AddEndpoints") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddEndpointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAdvertiseByoipCidr struct { } func (*awsAwsjson11_serializeOpAdvertiseByoipCidr) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAdvertiseByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AdvertiseByoipCidrInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.AdvertiseByoipCidr") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAdvertiseByoipCidrInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAllowCustomRoutingTraffic struct { } func (*awsAwsjson11_serializeOpAllowCustomRoutingTraffic) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAllowCustomRoutingTraffic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AllowCustomRoutingTrafficInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.AllowCustomRoutingTraffic") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAllowCustomRoutingTrafficInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateAccelerator struct { } func (*awsAwsjson11_serializeOpCreateAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateCustomRoutingAccelerator struct { } func (*awsAwsjson11_serializeOpCreateCustomRoutingAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateCustomRoutingAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateCustomRoutingAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateCustomRoutingAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateCustomRoutingAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_serializeOpCreateCustomRoutingEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateCustomRoutingEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateCustomRoutingEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateCustomRoutingEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateCustomRoutingEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateCustomRoutingListener struct { } func (*awsAwsjson11_serializeOpCreateCustomRoutingListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateCustomRoutingListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateCustomRoutingListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateCustomRoutingListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateCustomRoutingListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateEndpointGroup struct { } func (*awsAwsjson11_serializeOpCreateEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateListener struct { } func (*awsAwsjson11_serializeOpCreateListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.CreateListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteAccelerator struct { } func (*awsAwsjson11_serializeOpDeleteAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteCustomRoutingAccelerator struct { } func (*awsAwsjson11_serializeOpDeleteCustomRoutingAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteCustomRoutingAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteCustomRoutingAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteCustomRoutingAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteCustomRoutingAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_serializeOpDeleteCustomRoutingEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteCustomRoutingEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteCustomRoutingEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteCustomRoutingEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteCustomRoutingEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteCustomRoutingListener struct { } func (*awsAwsjson11_serializeOpDeleteCustomRoutingListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteCustomRoutingListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteCustomRoutingListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteCustomRoutingListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteCustomRoutingListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteEndpointGroup struct { } func (*awsAwsjson11_serializeOpDeleteEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteListener struct { } func (*awsAwsjson11_serializeOpDeleteListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeleteListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDenyCustomRoutingTraffic struct { } func (*awsAwsjson11_serializeOpDenyCustomRoutingTraffic) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDenyCustomRoutingTraffic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DenyCustomRoutingTrafficInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DenyCustomRoutingTraffic") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDenyCustomRoutingTrafficInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeprovisionByoipCidr struct { } func (*awsAwsjson11_serializeOpDeprovisionByoipCidr) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeprovisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeprovisionByoipCidrInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DeprovisionByoipCidr") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeprovisionByoipCidrInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeAccelerator struct { } func (*awsAwsjson11_serializeOpDescribeAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeAcceleratorAttributes struct { } func (*awsAwsjson11_serializeOpDescribeAcceleratorAttributes) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeAcceleratorAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeAcceleratorAttributesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeAcceleratorAttributes") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeAcceleratorAttributesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeCustomRoutingAccelerator struct { } func (*awsAwsjson11_serializeOpDescribeCustomRoutingAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeCustomRoutingAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeCustomRoutingAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeCustomRoutingAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeCustomRoutingAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeCustomRoutingAcceleratorAttributes struct { } func (*awsAwsjson11_serializeOpDescribeCustomRoutingAcceleratorAttributes) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeCustomRoutingAcceleratorAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeCustomRoutingAcceleratorAttributesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeCustomRoutingAcceleratorAttributes") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeCustomRoutingAcceleratorAttributesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeCustomRoutingEndpointGroup struct { } func (*awsAwsjson11_serializeOpDescribeCustomRoutingEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeCustomRoutingEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeCustomRoutingEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeCustomRoutingEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeCustomRoutingEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeCustomRoutingListener struct { } func (*awsAwsjson11_serializeOpDescribeCustomRoutingListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeCustomRoutingListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeCustomRoutingListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeCustomRoutingListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeCustomRoutingListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeEndpointGroup struct { } func (*awsAwsjson11_serializeOpDescribeEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeListener struct { } func (*awsAwsjson11_serializeOpDescribeListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.DescribeListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListAccelerators struct { } func (*awsAwsjson11_serializeOpListAccelerators) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAccelerators) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAcceleratorsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListAccelerators") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAcceleratorsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListByoipCidrs struct { } func (*awsAwsjson11_serializeOpListByoipCidrs) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListByoipCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListByoipCidrsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListByoipCidrs") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListByoipCidrsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListCustomRoutingAccelerators struct { } func (*awsAwsjson11_serializeOpListCustomRoutingAccelerators) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListCustomRoutingAccelerators) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListCustomRoutingAcceleratorsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListCustomRoutingAccelerators") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListCustomRoutingAcceleratorsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListCustomRoutingEndpointGroups struct { } func (*awsAwsjson11_serializeOpListCustomRoutingEndpointGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListCustomRoutingEndpointGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListCustomRoutingEndpointGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListCustomRoutingEndpointGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListCustomRoutingEndpointGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListCustomRoutingListeners struct { } func (*awsAwsjson11_serializeOpListCustomRoutingListeners) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListCustomRoutingListeners) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListCustomRoutingListenersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListCustomRoutingListeners") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListCustomRoutingListenersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListCustomRoutingPortMappings struct { } func (*awsAwsjson11_serializeOpListCustomRoutingPortMappings) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListCustomRoutingPortMappings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListCustomRoutingPortMappingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListCustomRoutingPortMappings") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListCustomRoutingPortMappingsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListCustomRoutingPortMappingsByDestination struct { } func (*awsAwsjson11_serializeOpListCustomRoutingPortMappingsByDestination) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListCustomRoutingPortMappingsByDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListCustomRoutingPortMappingsByDestinationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListCustomRoutingPortMappingsByDestination") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListCustomRoutingPortMappingsByDestinationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListEndpointGroups struct { } func (*awsAwsjson11_serializeOpListEndpointGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListEndpointGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListEndpointGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListEndpointGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListEndpointGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListListeners struct { } func (*awsAwsjson11_serializeOpListListeners) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListListeners) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListListenersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListListeners") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListListenersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListTagsForResource struct { } func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpProvisionByoipCidr struct { } func (*awsAwsjson11_serializeOpProvisionByoipCidr) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpProvisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ProvisionByoipCidrInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.ProvisionByoipCidr") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentProvisionByoipCidrInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRemoveCustomRoutingEndpoints struct { } func (*awsAwsjson11_serializeOpRemoveCustomRoutingEndpoints) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRemoveCustomRoutingEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveCustomRoutingEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.RemoveCustomRoutingEndpoints") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRemoveCustomRoutingEndpointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRemoveEndpoints struct { } func (*awsAwsjson11_serializeOpRemoveEndpoints) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRemoveEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.RemoveEndpoints") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRemoveEndpointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTagResource struct { } func (*awsAwsjson11_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUntagResource struct { } func (*awsAwsjson11_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateAccelerator struct { } func (*awsAwsjson11_serializeOpUpdateAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateAcceleratorAttributes struct { } func (*awsAwsjson11_serializeOpUpdateAcceleratorAttributes) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateAcceleratorAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateAcceleratorAttributesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateAcceleratorAttributes") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateAcceleratorAttributesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateCustomRoutingAccelerator struct { } func (*awsAwsjson11_serializeOpUpdateCustomRoutingAccelerator) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateCustomRoutingAccelerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateCustomRoutingAcceleratorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateCustomRoutingAccelerator") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateCustomRoutingAcceleratorInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateCustomRoutingAcceleratorAttributes struct { } func (*awsAwsjson11_serializeOpUpdateCustomRoutingAcceleratorAttributes) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateCustomRoutingAcceleratorAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateCustomRoutingAcceleratorAttributesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateCustomRoutingAcceleratorAttributes") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateCustomRoutingAcceleratorAttributesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateCustomRoutingListener struct { } func (*awsAwsjson11_serializeOpUpdateCustomRoutingListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateCustomRoutingListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateCustomRoutingListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateCustomRoutingListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateCustomRoutingListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateEndpointGroup struct { } func (*awsAwsjson11_serializeOpUpdateEndpointGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateEndpointGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateEndpointGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateEndpointGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateEndpointGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateListener struct { } func (*awsAwsjson11_serializeOpUpdateListener) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateListener) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateListenerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.UpdateListener") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateListenerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpWithdrawByoipCidr struct { } func (*awsAwsjson11_serializeOpWithdrawByoipCidr) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpWithdrawByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*WithdrawByoipCidrInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("GlobalAccelerator_V20180706.WithdrawByoipCidr") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentWithdrawByoipCidrInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentCidrAuthorizationContext(v *types.CidrAuthorizationContext, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Message != nil { ok := object.Key("Message") ok.String(*v.Message) } if v.Signature != nil { ok := object.Key("Signature") ok.String(*v.Signature) } return nil } func awsAwsjson11_serializeDocumentCustomRoutingDestinationConfiguration(v *types.CustomRoutingDestinationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FromPort != nil { ok := object.Key("FromPort") ok.Integer(*v.FromPort) } if v.Protocols != nil { ok := object.Key("Protocols") if err := awsAwsjson11_serializeDocumentCustomRoutingProtocols(v.Protocols, ok); err != nil { return err } } if v.ToPort != nil { ok := object.Key("ToPort") ok.Integer(*v.ToPort) } return nil } func awsAwsjson11_serializeDocumentCustomRoutingDestinationConfigurations(v []types.CustomRoutingDestinationConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentCustomRoutingDestinationConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCustomRoutingEndpointConfiguration(v *types.CustomRoutingEndpointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } return nil } func awsAwsjson11_serializeDocumentCustomRoutingEndpointConfigurations(v []types.CustomRoutingEndpointConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentCustomRoutingEndpointConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCustomRoutingProtocols(v []types.CustomRoutingProtocol, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsAwsjson11_serializeDocumentDestinationAddresses(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentDestinationPorts(v []int32, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.Integer(v[i]) } return nil } func awsAwsjson11_serializeDocumentEndpointConfiguration(v *types.EndpointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientIPPreservationEnabled != nil { ok := object.Key("ClientIPPreservationEnabled") ok.Boolean(*v.ClientIPPreservationEnabled) } if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } if v.Weight != nil { ok := object.Key("Weight") ok.Integer(*v.Weight) } return nil } func awsAwsjson11_serializeDocumentEndpointConfigurations(v []types.EndpointConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEndpointConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentEndpointIdentifier(v *types.EndpointIdentifier, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientIPPreservationEnabled != nil { ok := object.Key("ClientIPPreservationEnabled") ok.Boolean(*v.ClientIPPreservationEnabled) } if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } return nil } func awsAwsjson11_serializeDocumentEndpointIdentifiers(v []types.EndpointIdentifier, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEndpointIdentifier(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentEndpointIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentIpAddresses(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentPortOverride(v *types.PortOverride, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointPort != nil { ok := object.Key("EndpointPort") ok.Integer(*v.EndpointPort) } if v.ListenerPort != nil { ok := object.Key("ListenerPort") ok.Integer(*v.ListenerPort) } return nil } func awsAwsjson11_serializeDocumentPortOverrides(v []types.PortOverride, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentPortOverride(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentPortRange(v *types.PortRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FromPort != nil { ok := object.Key("FromPort") ok.Integer(*v.FromPort) } if v.ToPort != nil { ok := object.Key("ToPort") ok.Integer(*v.ToPort) } return nil } func awsAwsjson11_serializeDocumentPortRanges(v []types.PortRange, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentPortRange(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAddCustomRoutingEndpointsInput(v *AddCustomRoutingEndpointsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointConfigurations != nil { ok := object.Key("EndpointConfigurations") if err := awsAwsjson11_serializeDocumentCustomRoutingEndpointConfigurations(v.EndpointConfigurations, ok); err != nil { return err } } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentAddEndpointsInput(v *AddEndpointsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointConfigurations != nil { ok := object.Key("EndpointConfigurations") if err := awsAwsjson11_serializeDocumentEndpointConfigurations(v.EndpointConfigurations, ok); err != nil { return err } } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Cidr != nil { ok := object.Key("Cidr") ok.String(*v.Cidr) } return nil } func awsAwsjson11_serializeOpDocumentAllowCustomRoutingTrafficInput(v *AllowCustomRoutingTrafficInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllowAllTrafficToEndpoint != nil { ok := object.Key("AllowAllTrafficToEndpoint") ok.Boolean(*v.AllowAllTrafficToEndpoint) } if v.DestinationAddresses != nil { ok := object.Key("DestinationAddresses") if err := awsAwsjson11_serializeDocumentDestinationAddresses(v.DestinationAddresses, ok); err != nil { return err } } if v.DestinationPorts != nil { ok := object.Key("DestinationPorts") if err := awsAwsjson11_serializeDocumentDestinationPorts(v.DestinationPorts, ok); err != nil { return err } } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } return nil } func awsAwsjson11_serializeOpDocumentCreateAcceleratorInput(v *CreateAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Enabled != nil { ok := object.Key("Enabled") ok.Boolean(*v.Enabled) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.IpAddresses != nil { ok := object.Key("IpAddresses") if err := awsAwsjson11_serializeDocumentIpAddresses(v.IpAddresses, ok); err != nil { return err } } if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateCustomRoutingAcceleratorInput(v *CreateCustomRoutingAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Enabled != nil { ok := object.Key("Enabled") ok.Boolean(*v.Enabled) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.IpAddresses != nil { ok := object.Key("IpAddresses") if err := awsAwsjson11_serializeDocumentIpAddresses(v.IpAddresses, ok); err != nil { return err } } if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateCustomRoutingEndpointGroupInput(v *CreateCustomRoutingEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationConfigurations != nil { ok := object.Key("DestinationConfigurations") if err := awsAwsjson11_serializeDocumentCustomRoutingDestinationConfigurations(v.DestinationConfigurations, ok); err != nil { return err } } if v.EndpointGroupRegion != nil { ok := object.Key("EndpointGroupRegion") ok.String(*v.EndpointGroupRegion) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } return nil } func awsAwsjson11_serializeOpDocumentCreateCustomRoutingListenerInput(v *CreateCustomRoutingListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.PortRanges != nil { ok := object.Key("PortRanges") if err := awsAwsjson11_serializeDocumentPortRanges(v.PortRanges, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateEndpointGroupInput(v *CreateEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointConfigurations != nil { ok := object.Key("EndpointConfigurations") if err := awsAwsjson11_serializeDocumentEndpointConfigurations(v.EndpointConfigurations, ok); err != nil { return err } } if v.EndpointGroupRegion != nil { ok := object.Key("EndpointGroupRegion") ok.String(*v.EndpointGroupRegion) } if v.HealthCheckIntervalSeconds != nil { ok := object.Key("HealthCheckIntervalSeconds") ok.Integer(*v.HealthCheckIntervalSeconds) } if v.HealthCheckPath != nil { ok := object.Key("HealthCheckPath") ok.String(*v.HealthCheckPath) } if v.HealthCheckPort != nil { ok := object.Key("HealthCheckPort") ok.Integer(*v.HealthCheckPort) } if len(v.HealthCheckProtocol) > 0 { ok := object.Key("HealthCheckProtocol") ok.String(string(v.HealthCheckProtocol)) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } if v.PortOverrides != nil { ok := object.Key("PortOverrides") if err := awsAwsjson11_serializeDocumentPortOverrides(v.PortOverrides, ok); err != nil { return err } } if v.ThresholdCount != nil { ok := object.Key("ThresholdCount") ok.Integer(*v.ThresholdCount) } if v.TrafficDialPercentage != nil { ok := object.Key("TrafficDialPercentage") switch { case math.IsNaN(float64(*v.TrafficDialPercentage)): ok.String("NaN") case math.IsInf(float64(*v.TrafficDialPercentage), 1): ok.String("Infinity") case math.IsInf(float64(*v.TrafficDialPercentage), -1): ok.String("-Infinity") default: ok.Float(*v.TrafficDialPercentage) } } return nil } func awsAwsjson11_serializeOpDocumentCreateListenerInput(v *CreateListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if len(v.ClientAffinity) > 0 { ok := object.Key("ClientAffinity") ok.String(string(v.ClientAffinity)) } if v.IdempotencyToken != nil { ok := object.Key("IdempotencyToken") ok.String(*v.IdempotencyToken) } if v.PortRanges != nil { ok := object.Key("PortRanges") if err := awsAwsjson11_serializeDocumentPortRanges(v.PortRanges, ok); err != nil { return err } } if len(v.Protocol) > 0 { ok := object.Key("Protocol") ok.String(string(v.Protocol)) } return nil } func awsAwsjson11_serializeOpDocumentDeleteAcceleratorInput(v *DeleteAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteCustomRoutingAcceleratorInput(v *DeleteCustomRoutingAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteCustomRoutingEndpointGroupInput(v *DeleteCustomRoutingEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteCustomRoutingListenerInput(v *DeleteCustomRoutingListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteEndpointGroupInput(v *DeleteEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteListenerInput(v *DeleteListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } return nil } func awsAwsjson11_serializeOpDocumentDenyCustomRoutingTrafficInput(v *DenyCustomRoutingTrafficInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DenyAllTrafficToEndpoint != nil { ok := object.Key("DenyAllTrafficToEndpoint") ok.Boolean(*v.DenyAllTrafficToEndpoint) } if v.DestinationAddresses != nil { ok := object.Key("DestinationAddresses") if err := awsAwsjson11_serializeDocumentDestinationAddresses(v.DestinationAddresses, ok); err != nil { return err } } if v.DestinationPorts != nil { ok := object.Key("DestinationPorts") if err := awsAwsjson11_serializeDocumentDestinationPorts(v.DestinationPorts, ok); err != nil { return err } } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } return nil } func awsAwsjson11_serializeOpDocumentDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Cidr != nil { ok := object.Key("Cidr") ok.String(*v.Cidr) } return nil } func awsAwsjson11_serializeOpDocumentDescribeAcceleratorAttributesInput(v *DescribeAcceleratorAttributesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeAcceleratorInput(v *DescribeAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeCustomRoutingAcceleratorAttributesInput(v *DescribeCustomRoutingAcceleratorAttributesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeCustomRoutingAcceleratorInput(v *DescribeCustomRoutingAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeCustomRoutingEndpointGroupInput(v *DescribeCustomRoutingEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeCustomRoutingListenerInput(v *DescribeCustomRoutingListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeEndpointGroupInput(v *DescribeEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } return nil } func awsAwsjson11_serializeOpDocumentDescribeListenerInput(v *DescribeListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } return nil } func awsAwsjson11_serializeOpDocumentListAcceleratorsInput(v *ListAcceleratorsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListByoipCidrsInput(v *ListByoipCidrsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListCustomRoutingAcceleratorsInput(v *ListCustomRoutingAcceleratorsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListCustomRoutingEndpointGroupsInput(v *ListCustomRoutingEndpointGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListCustomRoutingListenersInput(v *ListCustomRoutingListenersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListCustomRoutingPortMappingsByDestinationInput(v *ListCustomRoutingPortMappingsByDestinationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationAddress != nil { ok := object.Key("DestinationAddress") ok.String(*v.DestinationAddress) } if v.EndpointId != nil { ok := object.Key("EndpointId") ok.String(*v.EndpointId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListCustomRoutingPortMappingsInput(v *ListCustomRoutingPortMappingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListEndpointGroupsInput(v *ListEndpointGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListListenersInput(v *ListListenersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentProvisionByoipCidrInput(v *ProvisionByoipCidrInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Cidr != nil { ok := object.Key("Cidr") ok.String(*v.Cidr) } if v.CidrAuthorizationContext != nil { ok := object.Key("CidrAuthorizationContext") if err := awsAwsjson11_serializeDocumentCidrAuthorizationContext(v.CidrAuthorizationContext, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentRemoveCustomRoutingEndpointsInput(v *RemoveCustomRoutingEndpointsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.EndpointIds != nil { ok := object.Key("EndpointIds") if err := awsAwsjson11_serializeDocumentEndpointIds(v.EndpointIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentRemoveEndpointsInput(v *RemoveEndpointsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.EndpointIdentifiers != nil { ok := object.Key("EndpointIdentifiers") if err := awsAwsjson11_serializeDocumentEndpointIdentifiers(v.EndpointIdentifiers, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeys(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateAcceleratorAttributesInput(v *UpdateAcceleratorAttributesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.FlowLogsEnabled != nil { ok := object.Key("FlowLogsEnabled") ok.Boolean(*v.FlowLogsEnabled) } if v.FlowLogsS3Bucket != nil { ok := object.Key("FlowLogsS3Bucket") ok.String(*v.FlowLogsS3Bucket) } if v.FlowLogsS3Prefix != nil { ok := object.Key("FlowLogsS3Prefix") ok.String(*v.FlowLogsS3Prefix) } return nil } func awsAwsjson11_serializeOpDocumentUpdateAcceleratorInput(v *UpdateAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.Enabled != nil { ok := object.Key("Enabled") ok.Boolean(*v.Enabled) } if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentUpdateCustomRoutingAcceleratorAttributesInput(v *UpdateCustomRoutingAcceleratorAttributesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.FlowLogsEnabled != nil { ok := object.Key("FlowLogsEnabled") ok.Boolean(*v.FlowLogsEnabled) } if v.FlowLogsS3Bucket != nil { ok := object.Key("FlowLogsS3Bucket") ok.String(*v.FlowLogsS3Bucket) } if v.FlowLogsS3Prefix != nil { ok := object.Key("FlowLogsS3Prefix") ok.String(*v.FlowLogsS3Prefix) } return nil } func awsAwsjson11_serializeOpDocumentUpdateCustomRoutingAcceleratorInput(v *UpdateCustomRoutingAcceleratorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AcceleratorArn != nil { ok := object.Key("AcceleratorArn") ok.String(*v.AcceleratorArn) } if v.Enabled != nil { ok := object.Key("Enabled") ok.Boolean(*v.Enabled) } if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentUpdateCustomRoutingListenerInput(v *UpdateCustomRoutingListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } if v.PortRanges != nil { ok := object.Key("PortRanges") if err := awsAwsjson11_serializeDocumentPortRanges(v.PortRanges, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateEndpointGroupInput(v *UpdateEndpointGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndpointConfigurations != nil { ok := object.Key("EndpointConfigurations") if err := awsAwsjson11_serializeDocumentEndpointConfigurations(v.EndpointConfigurations, ok); err != nil { return err } } if v.EndpointGroupArn != nil { ok := object.Key("EndpointGroupArn") ok.String(*v.EndpointGroupArn) } if v.HealthCheckIntervalSeconds != nil { ok := object.Key("HealthCheckIntervalSeconds") ok.Integer(*v.HealthCheckIntervalSeconds) } if v.HealthCheckPath != nil { ok := object.Key("HealthCheckPath") ok.String(*v.HealthCheckPath) } if v.HealthCheckPort != nil { ok := object.Key("HealthCheckPort") ok.Integer(*v.HealthCheckPort) } if len(v.HealthCheckProtocol) > 0 { ok := object.Key("HealthCheckProtocol") ok.String(string(v.HealthCheckProtocol)) } if v.PortOverrides != nil { ok := object.Key("PortOverrides") if err := awsAwsjson11_serializeDocumentPortOverrides(v.PortOverrides, ok); err != nil { return err } } if v.ThresholdCount != nil { ok := object.Key("ThresholdCount") ok.Integer(*v.ThresholdCount) } if v.TrafficDialPercentage != nil { ok := object.Key("TrafficDialPercentage") switch { case math.IsNaN(float64(*v.TrafficDialPercentage)): ok.String("NaN") case math.IsInf(float64(*v.TrafficDialPercentage), 1): ok.String("Infinity") case math.IsInf(float64(*v.TrafficDialPercentage), -1): ok.String("-Infinity") default: ok.Float(*v.TrafficDialPercentage) } } return nil } func awsAwsjson11_serializeOpDocumentUpdateListenerInput(v *UpdateListenerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ClientAffinity) > 0 { ok := object.Key("ClientAffinity") ok.String(string(v.ClientAffinity)) } if v.ListenerArn != nil { ok := object.Key("ListenerArn") ok.String(*v.ListenerArn) } if v.PortRanges != nil { ok := object.Key("PortRanges") if err := awsAwsjson11_serializeDocumentPortRanges(v.PortRanges, ok); err != nil { return err } } if len(v.Protocol) > 0 { ok := object.Key("Protocol") ok.String(string(v.Protocol)) } return nil } func awsAwsjson11_serializeOpDocumentWithdrawByoipCidrInput(v *WithdrawByoipCidrInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Cidr != nil { ok := object.Key("Cidr") ok.String(*v.Cidr) } return nil }
4,099
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package globalaccelerator import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/globalaccelerator/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAddCustomRoutingEndpoints struct { } func (*validateOpAddCustomRoutingEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpAddCustomRoutingEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddCustomRoutingEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddCustomRoutingEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddEndpoints struct { } func (*validateOpAddEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpAddEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAdvertiseByoipCidr struct { } func (*validateOpAdvertiseByoipCidr) ID() string { return "OperationInputValidation" } func (m *validateOpAdvertiseByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AdvertiseByoipCidrInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAdvertiseByoipCidrInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAllowCustomRoutingTraffic struct { } func (*validateOpAllowCustomRoutingTraffic) ID() string { return "OperationInputValidation" } func (m *validateOpAllowCustomRoutingTraffic) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AllowCustomRoutingTrafficInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAllowCustomRoutingTrafficInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateAccelerator struct { } func (*validateOpCreateAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpCreateAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateCustomRoutingAccelerator struct { } func (*validateOpCreateCustomRoutingAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpCreateCustomRoutingAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateCustomRoutingAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateCustomRoutingAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateCustomRoutingEndpointGroup struct { } func (*validateOpCreateCustomRoutingEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateCustomRoutingEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateCustomRoutingEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateCustomRoutingEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateCustomRoutingListener struct { } func (*validateOpCreateCustomRoutingListener) ID() string { return "OperationInputValidation" } func (m *validateOpCreateCustomRoutingListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateCustomRoutingListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateCustomRoutingListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateEndpointGroup struct { } func (*validateOpCreateEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateListener struct { } func (*validateOpCreateListener) ID() string { return "OperationInputValidation" } func (m *validateOpCreateListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAccelerator struct { } func (*validateOpDeleteAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteCustomRoutingAccelerator struct { } func (*validateOpDeleteCustomRoutingAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteCustomRoutingAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteCustomRoutingAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteCustomRoutingAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteCustomRoutingEndpointGroup struct { } func (*validateOpDeleteCustomRoutingEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteCustomRoutingEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteCustomRoutingEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteCustomRoutingEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteCustomRoutingListener struct { } func (*validateOpDeleteCustomRoutingListener) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteCustomRoutingListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteCustomRoutingListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteCustomRoutingListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteEndpointGroup struct { } func (*validateOpDeleteEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteListener struct { } func (*validateOpDeleteListener) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDenyCustomRoutingTraffic struct { } func (*validateOpDenyCustomRoutingTraffic) ID() string { return "OperationInputValidation" } func (m *validateOpDenyCustomRoutingTraffic) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DenyCustomRoutingTrafficInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDenyCustomRoutingTrafficInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeprovisionByoipCidr struct { } func (*validateOpDeprovisionByoipCidr) ID() string { return "OperationInputValidation" } func (m *validateOpDeprovisionByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeprovisionByoipCidrInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeprovisionByoipCidrInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeAcceleratorAttributes struct { } func (*validateOpDescribeAcceleratorAttributes) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeAcceleratorAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeAcceleratorAttributesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeAcceleratorAttributesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeAccelerator struct { } func (*validateOpDescribeAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeCustomRoutingAcceleratorAttributes struct { } func (*validateOpDescribeCustomRoutingAcceleratorAttributes) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeCustomRoutingAcceleratorAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeCustomRoutingAcceleratorAttributesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeCustomRoutingAcceleratorAttributesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeCustomRoutingAccelerator struct { } func (*validateOpDescribeCustomRoutingAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeCustomRoutingAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeCustomRoutingAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeCustomRoutingAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeCustomRoutingEndpointGroup struct { } func (*validateOpDescribeCustomRoutingEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeCustomRoutingEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeCustomRoutingEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeCustomRoutingEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeCustomRoutingListener struct { } func (*validateOpDescribeCustomRoutingListener) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeCustomRoutingListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeCustomRoutingListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeCustomRoutingListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEndpointGroup struct { } func (*validateOpDescribeEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeListener struct { } func (*validateOpDescribeListener) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListCustomRoutingEndpointGroups struct { } func (*validateOpListCustomRoutingEndpointGroups) ID() string { return "OperationInputValidation" } func (m *validateOpListCustomRoutingEndpointGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListCustomRoutingEndpointGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListCustomRoutingEndpointGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListCustomRoutingListeners struct { } func (*validateOpListCustomRoutingListeners) ID() string { return "OperationInputValidation" } func (m *validateOpListCustomRoutingListeners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListCustomRoutingListenersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListCustomRoutingListenersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListCustomRoutingPortMappingsByDestination struct { } func (*validateOpListCustomRoutingPortMappingsByDestination) ID() string { return "OperationInputValidation" } func (m *validateOpListCustomRoutingPortMappingsByDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListCustomRoutingPortMappingsByDestinationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListCustomRoutingPortMappingsByDestinationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListCustomRoutingPortMappings struct { } func (*validateOpListCustomRoutingPortMappings) ID() string { return "OperationInputValidation" } func (m *validateOpListCustomRoutingPortMappings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListCustomRoutingPortMappingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListCustomRoutingPortMappingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListEndpointGroups struct { } func (*validateOpListEndpointGroups) ID() string { return "OperationInputValidation" } func (m *validateOpListEndpointGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListEndpointGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListEndpointGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListListeners struct { } func (*validateOpListListeners) ID() string { return "OperationInputValidation" } func (m *validateOpListListeners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListListenersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListListenersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpProvisionByoipCidr struct { } func (*validateOpProvisionByoipCidr) ID() string { return "OperationInputValidation" } func (m *validateOpProvisionByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ProvisionByoipCidrInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpProvisionByoipCidrInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveCustomRoutingEndpoints struct { } func (*validateOpRemoveCustomRoutingEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveCustomRoutingEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveCustomRoutingEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveCustomRoutingEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveEndpoints struct { } func (*validateOpRemoveEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAcceleratorAttributes struct { } func (*validateOpUpdateAcceleratorAttributes) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAcceleratorAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAcceleratorAttributesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAcceleratorAttributesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAccelerator struct { } func (*validateOpUpdateAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateCustomRoutingAcceleratorAttributes struct { } func (*validateOpUpdateCustomRoutingAcceleratorAttributes) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateCustomRoutingAcceleratorAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateCustomRoutingAcceleratorAttributesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateCustomRoutingAcceleratorAttributesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateCustomRoutingAccelerator struct { } func (*validateOpUpdateCustomRoutingAccelerator) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateCustomRoutingAccelerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateCustomRoutingAcceleratorInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateCustomRoutingAcceleratorInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateCustomRoutingListener struct { } func (*validateOpUpdateCustomRoutingListener) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateCustomRoutingListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateCustomRoutingListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateCustomRoutingListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateEndpointGroup struct { } func (*validateOpUpdateEndpointGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateEndpointGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateEndpointGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateEndpointGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateListener struct { } func (*validateOpUpdateListener) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateListenerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateListenerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpWithdrawByoipCidr struct { } func (*validateOpWithdrawByoipCidr) ID() string { return "OperationInputValidation" } func (m *validateOpWithdrawByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*WithdrawByoipCidrInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpWithdrawByoipCidrInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAddCustomRoutingEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddCustomRoutingEndpoints{}, middleware.After) } func addOpAddEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddEndpoints{}, middleware.After) } func addOpAdvertiseByoipCidrValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAdvertiseByoipCidr{}, middleware.After) } func addOpAllowCustomRoutingTrafficValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAllowCustomRoutingTraffic{}, middleware.After) } func addOpCreateAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAccelerator{}, middleware.After) } func addOpCreateCustomRoutingAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCustomRoutingAccelerator{}, middleware.After) } func addOpCreateCustomRoutingEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCustomRoutingEndpointGroup{}, middleware.After) } func addOpCreateCustomRoutingListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCustomRoutingListener{}, middleware.After) } func addOpCreateEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateEndpointGroup{}, middleware.After) } func addOpCreateListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateListener{}, middleware.After) } func addOpDeleteAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccelerator{}, middleware.After) } func addOpDeleteCustomRoutingAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCustomRoutingAccelerator{}, middleware.After) } func addOpDeleteCustomRoutingEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCustomRoutingEndpointGroup{}, middleware.After) } func addOpDeleteCustomRoutingListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCustomRoutingListener{}, middleware.After) } func addOpDeleteEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEndpointGroup{}, middleware.After) } func addOpDeleteListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteListener{}, middleware.After) } func addOpDenyCustomRoutingTrafficValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDenyCustomRoutingTraffic{}, middleware.After) } func addOpDeprovisionByoipCidrValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeprovisionByoipCidr{}, middleware.After) } func addOpDescribeAcceleratorAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeAcceleratorAttributes{}, middleware.After) } func addOpDescribeAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeAccelerator{}, middleware.After) } func addOpDescribeCustomRoutingAcceleratorAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCustomRoutingAcceleratorAttributes{}, middleware.After) } func addOpDescribeCustomRoutingAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCustomRoutingAccelerator{}, middleware.After) } func addOpDescribeCustomRoutingEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCustomRoutingEndpointGroup{}, middleware.After) } func addOpDescribeCustomRoutingListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCustomRoutingListener{}, middleware.After) } func addOpDescribeEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEndpointGroup{}, middleware.After) } func addOpDescribeListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeListener{}, middleware.After) } func addOpListCustomRoutingEndpointGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListCustomRoutingEndpointGroups{}, middleware.After) } func addOpListCustomRoutingListenersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListCustomRoutingListeners{}, middleware.After) } func addOpListCustomRoutingPortMappingsByDestinationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListCustomRoutingPortMappingsByDestination{}, middleware.After) } func addOpListCustomRoutingPortMappingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListCustomRoutingPortMappings{}, middleware.After) } func addOpListEndpointGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEndpointGroups{}, middleware.After) } func addOpListListenersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListListeners{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpProvisionByoipCidrValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpProvisionByoipCidr{}, middleware.After) } func addOpRemoveCustomRoutingEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveCustomRoutingEndpoints{}, middleware.After) } func addOpRemoveEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveEndpoints{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateAcceleratorAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAcceleratorAttributes{}, middleware.After) } func addOpUpdateAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAccelerator{}, middleware.After) } func addOpUpdateCustomRoutingAcceleratorAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCustomRoutingAcceleratorAttributes{}, middleware.After) } func addOpUpdateCustomRoutingAcceleratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCustomRoutingAccelerator{}, middleware.After) } func addOpUpdateCustomRoutingListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCustomRoutingListener{}, middleware.After) } func addOpUpdateEndpointGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEndpointGroup{}, middleware.After) } func addOpUpdateListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateListener{}, middleware.After) } func addOpWithdrawByoipCidrValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpWithdrawByoipCidr{}, middleware.After) } func validateCidrAuthorizationContext(v *types.CidrAuthorizationContext) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CidrAuthorizationContext"} if v.Message == nil { invalidParams.Add(smithy.NewErrParamRequired("Message")) } if v.Signature == nil { invalidParams.Add(smithy.NewErrParamRequired("Signature")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomRoutingDestinationConfiguration(v *types.CustomRoutingDestinationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomRoutingDestinationConfiguration"} if v.FromPort == nil { invalidParams.Add(smithy.NewErrParamRequired("FromPort")) } if v.ToPort == nil { invalidParams.Add(smithy.NewErrParamRequired("ToPort")) } if v.Protocols == nil { invalidParams.Add(smithy.NewErrParamRequired("Protocols")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomRoutingDestinationConfigurations(v []types.CustomRoutingDestinationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomRoutingDestinationConfigurations"} for i := range v { if err := validateCustomRoutingDestinationConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEndpointIdentifier(v *types.EndpointIdentifier) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EndpointIdentifier"} if v.EndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEndpointIdentifiers(v []types.EndpointIdentifier) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EndpointIdentifiers"} for i := range v { if err := validateEndpointIdentifier(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTags(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tags"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddCustomRoutingEndpointsInput(v *AddCustomRoutingEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddCustomRoutingEndpointsInput"} if v.EndpointConfigurations == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointConfigurations")) } if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddEndpointsInput(v *AddEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddEndpointsInput"} if v.EndpointConfigurations == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointConfigurations")) } if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AdvertiseByoipCidrInput"} if v.Cidr == nil { invalidParams.Add(smithy.NewErrParamRequired("Cidr")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAllowCustomRoutingTrafficInput(v *AllowCustomRoutingTrafficInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AllowCustomRoutingTrafficInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if v.EndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateAcceleratorInput(v *CreateAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAcceleratorInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateCustomRoutingAcceleratorInput(v *CreateCustomRoutingAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateCustomRoutingAcceleratorInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateCustomRoutingEndpointGroupInput(v *CreateCustomRoutingEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateCustomRoutingEndpointGroupInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if v.EndpointGroupRegion == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupRegion")) } if v.DestinationConfigurations == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationConfigurations")) } else if v.DestinationConfigurations != nil { if err := validateCustomRoutingDestinationConfigurations(v.DestinationConfigurations); err != nil { invalidParams.AddNested("DestinationConfigurations", err.(smithy.InvalidParamsError)) } } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateCustomRoutingListenerInput(v *CreateCustomRoutingListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateCustomRoutingListenerInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if v.PortRanges == nil { invalidParams.Add(smithy.NewErrParamRequired("PortRanges")) } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateEndpointGroupInput(v *CreateEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateEndpointGroupInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if v.EndpointGroupRegion == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupRegion")) } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateListenerInput(v *CreateListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateListenerInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if v.PortRanges == nil { invalidParams.Add(smithy.NewErrParamRequired("PortRanges")) } if len(v.Protocol) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) } if v.IdempotencyToken == nil { invalidParams.Add(smithy.NewErrParamRequired("IdempotencyToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAcceleratorInput(v *DeleteAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteCustomRoutingAcceleratorInput(v *DeleteCustomRoutingAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomRoutingAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteCustomRoutingEndpointGroupInput(v *DeleteCustomRoutingEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomRoutingEndpointGroupInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteCustomRoutingListenerInput(v *DeleteCustomRoutingListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomRoutingListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteEndpointGroupInput(v *DeleteEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteEndpointGroupInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteListenerInput(v *DeleteListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDenyCustomRoutingTrafficInput(v *DenyCustomRoutingTrafficInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DenyCustomRoutingTrafficInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if v.EndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeprovisionByoipCidrInput"} if v.Cidr == nil { invalidParams.Add(smithy.NewErrParamRequired("Cidr")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeAcceleratorAttributesInput(v *DescribeAcceleratorAttributesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeAcceleratorAttributesInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeAcceleratorInput(v *DescribeAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeCustomRoutingAcceleratorAttributesInput(v *DescribeCustomRoutingAcceleratorAttributesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomRoutingAcceleratorAttributesInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeCustomRoutingAcceleratorInput(v *DescribeCustomRoutingAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomRoutingAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeCustomRoutingEndpointGroupInput(v *DescribeCustomRoutingEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomRoutingEndpointGroupInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeCustomRoutingListenerInput(v *DescribeCustomRoutingListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomRoutingListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEndpointGroupInput(v *DescribeEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEndpointGroupInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeListenerInput(v *DescribeListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListCustomRoutingEndpointGroupsInput(v *ListCustomRoutingEndpointGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListCustomRoutingEndpointGroupsInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListCustomRoutingListenersInput(v *ListCustomRoutingListenersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListCustomRoutingListenersInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListCustomRoutingPortMappingsByDestinationInput(v *ListCustomRoutingPortMappingsByDestinationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListCustomRoutingPortMappingsByDestinationInput"} if v.EndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointId")) } if v.DestinationAddress == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationAddress")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListCustomRoutingPortMappingsInput(v *ListCustomRoutingPortMappingsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListCustomRoutingPortMappingsInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListEndpointGroupsInput(v *ListEndpointGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListEndpointGroupsInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListListenersInput(v *ListListenersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListListenersInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpProvisionByoipCidrInput(v *ProvisionByoipCidrInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ProvisionByoipCidrInput"} if v.Cidr == nil { invalidParams.Add(smithy.NewErrParamRequired("Cidr")) } if v.CidrAuthorizationContext == nil { invalidParams.Add(smithy.NewErrParamRequired("CidrAuthorizationContext")) } else if v.CidrAuthorizationContext != nil { if err := validateCidrAuthorizationContext(v.CidrAuthorizationContext); err != nil { invalidParams.AddNested("CidrAuthorizationContext", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveCustomRoutingEndpointsInput(v *RemoveCustomRoutingEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveCustomRoutingEndpointsInput"} if v.EndpointIds == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointIds")) } if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveEndpointsInput(v *RemoveEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveEndpointsInput"} if v.EndpointIdentifiers == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointIdentifiers")) } else if v.EndpointIdentifiers != nil { if err := validateEndpointIdentifiers(v.EndpointIdentifiers); err != nil { invalidParams.AddNested("EndpointIdentifiers", err.(smithy.InvalidParamsError)) } } if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAcceleratorAttributesInput(v *UpdateAcceleratorAttributesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAcceleratorAttributesInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAcceleratorInput(v *UpdateAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateCustomRoutingAcceleratorAttributesInput(v *UpdateCustomRoutingAcceleratorAttributesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomRoutingAcceleratorAttributesInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateCustomRoutingAcceleratorInput(v *UpdateCustomRoutingAcceleratorInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomRoutingAcceleratorInput"} if v.AcceleratorArn == nil { invalidParams.Add(smithy.NewErrParamRequired("AcceleratorArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateCustomRoutingListenerInput(v *UpdateCustomRoutingListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomRoutingListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if v.PortRanges == nil { invalidParams.Add(smithy.NewErrParamRequired("PortRanges")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateEndpointGroupInput(v *UpdateEndpointGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateEndpointGroupInput"} if v.EndpointGroupArn == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointGroupArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateListenerInput(v *UpdateListenerInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateListenerInput"} if v.ListenerArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpWithdrawByoipCidrInput(v *WithdrawByoipCidrInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WithdrawByoipCidrInput"} if v.Cidr == nil { invalidParams.Add(smithy.NewErrParamRequired("Cidr")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
2,024
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Global Accelerator endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "globalaccelerator.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "globalaccelerator-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "globalaccelerator.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "globalaccelerator-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "globalaccelerator.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "globalaccelerator-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "globalaccelerator-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "globalaccelerator.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
297
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AcceleratorStatus string // Enum values for AcceleratorStatus const ( AcceleratorStatusDeployed AcceleratorStatus = "DEPLOYED" AcceleratorStatusInProgress AcceleratorStatus = "IN_PROGRESS" ) // Values returns all known values for AcceleratorStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AcceleratorStatus) Values() []AcceleratorStatus { return []AcceleratorStatus{ "DEPLOYED", "IN_PROGRESS", } } type ByoipCidrState string // Enum values for ByoipCidrState const ( ByoipCidrStatePendingProvisioning ByoipCidrState = "PENDING_PROVISIONING" ByoipCidrStateReady ByoipCidrState = "READY" ByoipCidrStatePendingAdvertising ByoipCidrState = "PENDING_ADVERTISING" ByoipCidrStateAdvertising ByoipCidrState = "ADVERTISING" ByoipCidrStatePendingWithdrawing ByoipCidrState = "PENDING_WITHDRAWING" ByoipCidrStatePendingDeprovisioning ByoipCidrState = "PENDING_DEPROVISIONING" ByoipCidrStateDeprovisioned ByoipCidrState = "DEPROVISIONED" ByoipCidrStateFailedProvision ByoipCidrState = "FAILED_PROVISION" ByoipCidrStateFailedAdvertising ByoipCidrState = "FAILED_ADVERTISING" ByoipCidrStateFailedWithdraw ByoipCidrState = "FAILED_WITHDRAW" ByoipCidrStateFailedDeprovision ByoipCidrState = "FAILED_DEPROVISION" ) // Values returns all known values for ByoipCidrState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ByoipCidrState) Values() []ByoipCidrState { return []ByoipCidrState{ "PENDING_PROVISIONING", "READY", "PENDING_ADVERTISING", "ADVERTISING", "PENDING_WITHDRAWING", "PENDING_DEPROVISIONING", "DEPROVISIONED", "FAILED_PROVISION", "FAILED_ADVERTISING", "FAILED_WITHDRAW", "FAILED_DEPROVISION", } } type ClientAffinity string // Enum values for ClientAffinity const ( ClientAffinityNone ClientAffinity = "NONE" ClientAffinitySourceIp ClientAffinity = "SOURCE_IP" ) // Values returns all known values for ClientAffinity. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ClientAffinity) Values() []ClientAffinity { return []ClientAffinity{ "NONE", "SOURCE_IP", } } type CustomRoutingAcceleratorStatus string // Enum values for CustomRoutingAcceleratorStatus const ( CustomRoutingAcceleratorStatusDeployed CustomRoutingAcceleratorStatus = "DEPLOYED" CustomRoutingAcceleratorStatusInProgress CustomRoutingAcceleratorStatus = "IN_PROGRESS" ) // Values returns all known values for CustomRoutingAcceleratorStatus. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (CustomRoutingAcceleratorStatus) Values() []CustomRoutingAcceleratorStatus { return []CustomRoutingAcceleratorStatus{ "DEPLOYED", "IN_PROGRESS", } } type CustomRoutingDestinationTrafficState string // Enum values for CustomRoutingDestinationTrafficState const ( CustomRoutingDestinationTrafficStateAllow CustomRoutingDestinationTrafficState = "ALLOW" CustomRoutingDestinationTrafficStateDeny CustomRoutingDestinationTrafficState = "DENY" ) // Values returns all known values for CustomRoutingDestinationTrafficState. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (CustomRoutingDestinationTrafficState) Values() []CustomRoutingDestinationTrafficState { return []CustomRoutingDestinationTrafficState{ "ALLOW", "DENY", } } type CustomRoutingProtocol string // Enum values for CustomRoutingProtocol const ( CustomRoutingProtocolTcp CustomRoutingProtocol = "TCP" CustomRoutingProtocolUdp CustomRoutingProtocol = "UDP" ) // Values returns all known values for CustomRoutingProtocol. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (CustomRoutingProtocol) Values() []CustomRoutingProtocol { return []CustomRoutingProtocol{ "TCP", "UDP", } } type HealthCheckProtocol string // Enum values for HealthCheckProtocol const ( HealthCheckProtocolTcp HealthCheckProtocol = "TCP" HealthCheckProtocolHttp HealthCheckProtocol = "HTTP" HealthCheckProtocolHttps HealthCheckProtocol = "HTTPS" ) // Values returns all known values for HealthCheckProtocol. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HealthCheckProtocol) Values() []HealthCheckProtocol { return []HealthCheckProtocol{ "TCP", "HTTP", "HTTPS", } } type HealthState string // Enum values for HealthState const ( HealthStateInitial HealthState = "INITIAL" HealthStateHealthy HealthState = "HEALTHY" HealthStateUnhealthy HealthState = "UNHEALTHY" ) // Values returns all known values for HealthState. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (HealthState) Values() []HealthState { return []HealthState{ "INITIAL", "HEALTHY", "UNHEALTHY", } } type IpAddressFamily string // Enum values for IpAddressFamily const ( IpAddressFamilyIPv4 IpAddressFamily = "IPv4" IpAddressFamilyIPv6 IpAddressFamily = "IPv6" ) // Values returns all known values for IpAddressFamily. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IpAddressFamily) Values() []IpAddressFamily { return []IpAddressFamily{ "IPv4", "IPv6", } } type IpAddressType string // Enum values for IpAddressType const ( IpAddressTypeIpv4 IpAddressType = "IPV4" IpAddressTypeDualStack IpAddressType = "DUAL_STACK" ) // Values returns all known values for IpAddressType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IpAddressType) Values() []IpAddressType { return []IpAddressType{ "IPV4", "DUAL_STACK", } } type Protocol string // Enum values for Protocol const ( ProtocolTcp Protocol = "TCP" ProtocolUdp Protocol = "UDP" ) // Values returns all known values for Protocol. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Protocol) Values() []Protocol { return []Protocol{ "TCP", "UDP", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // The accelerator that you specified could not be disabled. type AcceleratorNotDisabledException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AcceleratorNotDisabledException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AcceleratorNotDisabledException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AcceleratorNotDisabledException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AcceleratorNotDisabledException" } return *e.ErrorCodeOverride } func (e *AcceleratorNotDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The accelerator that you specified doesn't exist. type AcceleratorNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AcceleratorNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AcceleratorNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AcceleratorNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AcceleratorNotFoundException" } return *e.ErrorCodeOverride } func (e *AcceleratorNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You don't have access permission. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The listener that you specified has an endpoint group associated with it. You // must remove all dependent resources from a listener before you can delete it. type AssociatedEndpointGroupFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AssociatedEndpointGroupFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AssociatedEndpointGroupFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AssociatedEndpointGroupFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AssociatedEndpointGroupFoundException" } return *e.ErrorCodeOverride } func (e *AssociatedEndpointGroupFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The accelerator that you specified has a listener associated with it. You must // remove all dependent resources from an accelerator before you can delete it. type AssociatedListenerFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AssociatedListenerFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AssociatedListenerFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AssociatedListenerFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AssociatedListenerFoundException" } return *e.ErrorCodeOverride } func (e *AssociatedListenerFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The CIDR that you specified was not found or is incorrect. type ByoipCidrNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ByoipCidrNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ByoipCidrNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ByoipCidrNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ByoipCidrNotFoundException" } return *e.ErrorCodeOverride } func (e *ByoipCidrNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You can't use both of those options. type ConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The endpoint that you specified doesn't exist. type EndpointAlreadyExistsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EndpointAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EndpointAlreadyExistsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EndpointAlreadyExistsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EndpointAlreadyExistsException" } return *e.ErrorCodeOverride } func (e *EndpointAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The endpoint group that you specified already exists. type EndpointGroupAlreadyExistsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EndpointGroupAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EndpointGroupAlreadyExistsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EndpointGroupAlreadyExistsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EndpointGroupAlreadyExistsException" } return *e.ErrorCodeOverride } func (e *EndpointGroupAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The endpoint group that you specified doesn't exist. type EndpointGroupNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EndpointGroupNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EndpointGroupNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EndpointGroupNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EndpointGroupNotFoundException" } return *e.ErrorCodeOverride } func (e *EndpointGroupNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The endpoint that you specified doesn't exist. type EndpointNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EndpointNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EndpointNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EndpointNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EndpointNotFoundException" } return *e.ErrorCodeOverride } func (e *EndpointNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The CIDR that you specified is not valid for this action. For example, the // state of the CIDR might be incorrect for this action. type IncorrectCidrStateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *IncorrectCidrStateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *IncorrectCidrStateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *IncorrectCidrStateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "IncorrectCidrStateException" } return *e.ErrorCodeOverride } func (e *IncorrectCidrStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // There was an internal error for Global Accelerator. type InternalServiceErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServiceErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServiceErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServiceErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServiceErrorException" } return *e.ErrorCodeOverride } func (e *InternalServiceErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // An argument that you specified is invalid. type InvalidArgumentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidArgumentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidArgumentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidArgumentException" } return *e.ErrorCodeOverride } func (e *InvalidArgumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // There isn't another item to return. type InvalidNextTokenException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidNextTokenException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidNextTokenException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidNextTokenException" } return *e.ErrorCodeOverride } func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The port numbers that you specified are not valid numbers or are not unique for // this accelerator. type InvalidPortRangeException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidPortRangeException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidPortRangeException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidPortRangeException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidPortRangeException" } return *e.ErrorCodeOverride } func (e *InvalidPortRangeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Processing your request would cause you to exceed an Global Accelerator limit. type LimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *LimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *LimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "LimitExceededException" } return *e.ErrorCodeOverride } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The listener that you specified doesn't exist. type ListenerNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ListenerNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ListenerNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ListenerNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ListenerNotFoundException" } return *e.ErrorCodeOverride } func (e *ListenerNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // There's already a transaction in progress. Another transaction can't be // processed. type TransactionInProgressException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TransactionInProgressException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TransactionInProgressException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TransactionInProgressException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TransactionInProgressException" } return *e.ErrorCodeOverride } func (e *TransactionInProgressException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
512
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // An accelerator is a complex type that includes one or more listeners that // process inbound connections and then direct traffic to one or more endpoint // groups, each of which includes endpoints, such as load balancers. type Accelerator struct { // The Amazon Resource Name (ARN) of the accelerator. AcceleratorArn *string // The date and time that the accelerator was created. CreatedTime *time.Time // The Domain Name System (DNS) name that Global Accelerator creates that points // to an accelerator's static IPv4 addresses. The naming convention for the DNS // name for an accelerator is the following: A lowercase letter a, followed by a // 16-bit random hex string, followed by .awsglobalaccelerator.com. For example: // a1234567890abcdef.awsglobalaccelerator.com. If you have a dual-stack // accelerator, you also have a second DNS name, DualStackDnsName , that points to // both the A record and the AAAA record for all four static addresses for the // accelerator: two IPv4 addresses and two IPv6 addresses. For more information // about the default DNS name, see Support for DNS addressing in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/dns-addressing-custom-domains.dns-addressing.html) // in the Global Accelerator Developer Guide. DnsName *string // The Domain Name System (DNS) name that Global Accelerator creates that points // to a dual-stack accelerator's four static IP addresses: two IPv4 addresses and // two IPv6 addresses. The naming convention for the dual-stack DNS name is the // following: A lowercase letter a, followed by a 16-bit random hex string, // followed by .dualstack.awsglobalaccelerator.com. For example: // a1234567890abcdef.dualstack.awsglobalaccelerator.com. Note: Global Accelerator // also assigns a default DNS name, DnsName , to your accelerator that points just // to the static IPv4 addresses. For more information, see Support for DNS // addressing in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing) // in the Global Accelerator Developer Guide. DualStackDnsName *string // Indicates whether the accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, the accelerator cannot be // deleted. If set to false, accelerator can be deleted. Enabled *bool // A history of changes that you make to an accelerator in Global Accelerator. Events []AcceleratorEvent // The IP address type that an accelerator supports. For a standard accelerator, // the value can be IPV4 or DUAL_STACK. IpAddressType IpAddressType // The static IP addresses that Global Accelerator associates with the accelerator. IpSets []IpSet // The date and time that the accelerator was last modified. LastModifiedTime *time.Time // The name of the accelerator. The name must contain only alphanumeric characters // or hyphens (-), and must not begin or end with a hyphen. Name *string // Describes the deployment status of the accelerator. Status AcceleratorStatus noSmithyDocumentSerde } // Attributes of an accelerator. type AcceleratorAttributes struct { // Indicates whether flow logs are enabled. The default value is false. If the // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For // more information, see Flow logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) // in the Global Accelerator Developer Guide. FlowLogsEnabled *bool // The name of the Amazon S3 bucket for the flow logs. Attribute is required if // FlowLogsEnabled is true . The bucket must exist and have a bucket policy that // grants Global Accelerator permission to write to the bucket. FlowLogsS3Bucket *string // The prefix for the location in the Amazon S3 bucket for the flow logs. // Attribute is required if FlowLogsEnabled is true . If you specify slash (/) for // the S3 bucket prefix, the log file bucket folder structure will include a double // slash (//), like the following: s3-bucket_name//AWSLogs/aws_account_id FlowLogsS3Prefix *string noSmithyDocumentSerde } // A complex type that contains a Timestamp value and Message for changes that you // make to an accelerator in Global Accelerator. Messages stored here provide // progress or error information when you update an accelerator from IPv4 to // dual-stack, or from dual-stack to IPv4. Global Accelerator stores a maximum of // ten event messages. type AcceleratorEvent struct { // A string that contains an Event message describing changes or errors when you // update an accelerator in Global Accelerator from IPv4 to dual-stack, or // dual-stack to IPv4. Message *string // A timestamp for when you update an accelerator in Global Accelerator from IPv4 // to dual-stack, or dual-stack to IPv4. Timestamp *time.Time noSmithyDocumentSerde } // Information about an IP address range that is provisioned for use with your // Amazon Web Services resources through bring your own IP address (BYOIP). The // following describes each BYOIP State that your IP address range can be in. // - PENDING_PROVISIONING — You’ve submitted a request to provision an IP // address range but it is not yet provisioned with Global Accelerator. // - READY — The address range is provisioned with Global Accelerator and can be // advertised. // - PENDING_ADVERTISING — You’ve submitted a request for Global Accelerator to // advertise an address range but it is not yet being advertised. // - ADVERTISING — The address range is being advertised by Global Accelerator. // - PENDING_WITHDRAWING — You’ve submitted a request to withdraw an address // range from being advertised but it is still being advertised by Global // Accelerator. // - PENDING_DEPROVISIONING — You’ve submitted a request to deprovision an // address range from Global Accelerator but it is still provisioned. // - DEPROVISIONED — The address range is deprovisioned from Global Accelerator. // - FAILED_PROVISION — The request to provision the address range from Global // Accelerator was not successful. Please make sure that you provide all of the // correct information, and try again. If the request fails a second time, contact // Amazon Web Services support. // - FAILED_ADVERTISING — The request for Global Accelerator to advertise the // address range was not successful. Please make sure that you provide all of the // correct information, and try again. If the request fails a second time, contact // Amazon Web Services support. // - FAILED_WITHDRAW — The request to withdraw the address range from // advertising by Global Accelerator was not successful. Please make sure that you // provide all of the correct information, and try again. If the request fails a // second time, contact Amazon Web Services support. // - FAILED_DEPROVISION — The request to deprovision the address range from // Global Accelerator was not successful. Please make sure that you provide all of // the correct information, and try again. If the request fails a second time, // contact Amazon Web Services support. type ByoipCidr struct { // The address range, in CIDR notation. Cidr *string // A history of status changes for an IP address range that you bring to Global // Accelerator through bring your own IP address (BYOIP). Events []ByoipCidrEvent // The state of the address pool. State ByoipCidrState noSmithyDocumentSerde } // A complex type that contains a Message and a Timestamp value for changes that // you make in the status of an IP address range that you bring to Global // Accelerator through bring your own IP address (BYOIP). type ByoipCidrEvent struct { // A string that contains an Event message describing changes that you make in the // status of an IP address range that you bring to Global Accelerator through bring // your own IP address (BYOIP). Message *string // A timestamp for when you make a status change for an IP address range that you // bring to Global Accelerator through bring your own IP address (BYOIP). Timestamp *time.Time noSmithyDocumentSerde } // Provides authorization for Amazon to bring a specific IP address range to a // specific Amazon Web Services account using bring your own IP addresses (BYOIP). // For more information, see Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) // in the Global Accelerator Developer Guide. type CidrAuthorizationContext struct { // The plain-text authorization message for the prefix and account. // // This member is required. Message *string // The signed authorization message for the prefix and account. // // This member is required. Signature *string noSmithyDocumentSerde } // Attributes of a custom routing accelerator. type CustomRoutingAccelerator struct { // The Amazon Resource Name (ARN) of the custom routing accelerator. AcceleratorArn *string // The date and time that the accelerator was created. CreatedTime *time.Time // The Domain Name System (DNS) name that Global Accelerator creates that points // to an accelerator's static IPv4 addresses. The naming convention for the DNS // name is the following: A lowercase letter a, followed by a 16-bit random hex // string, followed by .awsglobalaccelerator.com. For example: // a1234567890abcdef.awsglobalaccelerator.com. If you have a dual-stack // accelerator, you also have a second DNS name, DualStackDnsName , that points to // both the A record and the AAAA record for all four static addresses for the // accelerator: two IPv4 addresses and two IPv6 addresses. For more information // about the default DNS name, see Support for DNS addressing in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/dns-addressing-custom-domains.dns-addressing.html) // in the Global Accelerator Developer Guide. DnsName *string // Indicates whether the accelerator is enabled. The value is true or false. The // default value is true. If the value is set to true, the accelerator cannot be // deleted. If set to false, accelerator can be deleted. Enabled *bool // The IP address type that an accelerator supports. For a custom routing // accelerator, the value must be IPV4. IpAddressType IpAddressType // The static IP addresses that Global Accelerator associates with the accelerator. IpSets []IpSet // The date and time that the accelerator was last modified. LastModifiedTime *time.Time // The name of the accelerator. The name must contain only alphanumeric characters // or hyphens (-), and must not begin or end with a hyphen. Name *string // Describes the deployment status of the accelerator. Status CustomRoutingAcceleratorStatus noSmithyDocumentSerde } // Attributes of a custom routing accelerator. type CustomRoutingAcceleratorAttributes struct { // Indicates whether flow logs are enabled. The default value is false. If the // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. For // more information, see Flow logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) // in the Global Accelerator Developer Guide. FlowLogsEnabled *bool // The name of the Amazon S3 bucket for the flow logs. Attribute is required if // FlowLogsEnabled is true . The bucket must exist and have a bucket policy that // grants Global Accelerator permission to write to the bucket. FlowLogsS3Bucket *string // The prefix for the location in the Amazon S3 bucket for the flow logs. // Attribute is required if FlowLogsEnabled is true . If you don’t specify a // prefix, the flow logs are stored in the root of the bucket. If you specify slash // (/) for the S3 bucket prefix, the log file bucket folder structure will include // a double slash (//), like the following: // DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id FlowLogsS3Prefix *string noSmithyDocumentSerde } // For a custom routing accelerator, sets the port range and protocol for all // endpoints (virtual private cloud subnets) in an endpoint group to accept client // traffic on. type CustomRoutingDestinationConfiguration struct { // The first port, inclusive, in the range of ports for the endpoint group that is // associated with a custom routing accelerator. // // This member is required. FromPort *int32 // The protocol for the endpoint group that is associated with a custom routing // accelerator. The protocol can be either TCP or UDP. // // This member is required. Protocols []CustomRoutingProtocol // The last port, inclusive, in the range of ports for the endpoint group that is // associated with a custom routing accelerator. // // This member is required. ToPort *int32 noSmithyDocumentSerde } // For a custom routing accelerator, describes the port range and protocol for all // endpoints (virtual private cloud subnets) in an endpoint group to accept client // traffic on. type CustomRoutingDestinationDescription struct { // The first port, inclusive, in the range of ports for the endpoint group that is // associated with a custom routing accelerator. FromPort *int32 // The protocol for the endpoint group that is associated with a custom routing // accelerator. The protocol can be either TCP or UDP. Protocols []Protocol // The last port, inclusive, in the range of ports for the endpoint group that is // associated with a custom routing accelerator. ToPort *int32 noSmithyDocumentSerde } // The list of endpoint objects. For custom routing, this is a list of virtual // private cloud (VPC) subnet IDs. type CustomRoutingEndpointConfiguration struct { // An ID for the endpoint. For custom routing accelerators, this is the virtual // private cloud (VPC) subnet ID. EndpointId *string noSmithyDocumentSerde } // A complex type for an endpoint for a custom routing accelerator. Each endpoint // group can include one or more endpoints, which are virtual private cloud (VPC) // subnets. type CustomRoutingEndpointDescription struct { // An ID for the endpoint. For custom routing accelerators, this is the virtual // private cloud (VPC) subnet ID. EndpointId *string noSmithyDocumentSerde } // A complex type for the endpoint group for a custom routing accelerator. An // Amazon Web Services Region can have only one endpoint group for a specific // listener. type CustomRoutingEndpointGroup struct { // For a custom routing accelerator, describes the port range and protocol for all // endpoints (virtual private cloud subnets) in an endpoint group to accept client // traffic on. DestinationDescriptions []CustomRoutingDestinationDescription // For a custom routing accelerator, describes the endpoints (virtual private // cloud subnets) in an endpoint group to accept client traffic on. EndpointDescriptions []CustomRoutingEndpointDescription // The Amazon Resource Name (ARN) of the endpoint group. EndpointGroupArn *string // The Amazon Web Services Region where the endpoint group is located. EndpointGroupRegion *string noSmithyDocumentSerde } // A complex type for a listener for a custom routing accelerator. type CustomRoutingListener struct { // The Amazon Resource Name (ARN) of the listener. ListenerArn *string // The port range to support for connections from clients to your accelerator. // Separately, you set port ranges for endpoints. For more information, see About // endpoints for custom routing accelerators (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html) // . PortRanges []PortRange noSmithyDocumentSerde } // The port mappings for a specified endpoint IP address (destination). type DestinationPortMapping struct { // The Amazon Resource Name (ARN) of the custom routing accelerator that you have // port mappings for. AcceleratorArn *string // The IP address/port combinations (sockets) that map to a given destination // socket address. AcceleratorSocketAddresses []SocketAddress // The endpoint IP address/port combination for traffic received on the // accelerator socket address. DestinationSocketAddress *SocketAddress // Indicates whether or not a port mapping destination can receive traffic. The // value is either ALLOW, if traffic is allowed to the destination, or DENY, if // traffic is not allowed to the destination. DestinationTrafficState CustomRoutingDestinationTrafficState // The Amazon Resource Name (ARN) of the endpoint group. EndpointGroupArn *string // The Amazon Web Services Region for the endpoint group. EndpointGroupRegion *string // The ID for the virtual private cloud (VPC) subnet. EndpointId *string // The IP address type that an accelerator supports. For a custom routing // accelerator, the value must be IPV4. IpAddressType IpAddressType noSmithyDocumentSerde } // A complex type for endpoints. A resource must be valid and active when you add // it as an endpoint. type EndpointConfiguration struct { // Indicates whether client IP address preservation is enabled for an endpoint. // The value is true or false. The default value is true for new accelerators. If // the value is set to true, the client's IP address is preserved in the // X-Forwarded-For request header as traffic travels to applications on the // endpoint fronted by the accelerator. Client IP address preservation is // supported, in specific Amazon Web Services Regions, for endpoints that are // Application Load Balancers and Amazon EC2 instances. For more information, see // Preserve client IP addresses in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html) // in the Global Accelerator Developer Guide. ClientIPPreservationEnabled *bool // An ID for the endpoint. If the endpoint is a Network Load Balancer or // Application Load Balancer, this is the Amazon Resource Name (ARN) of the // resource. If the endpoint is an Elastic IP address, this is the Elastic IP // address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A // resource must be valid and active when you add it as an endpoint. An Application // Load Balancer can be either internal or internet-facing. EndpointId *string // The weight associated with the endpoint. When you add weights to endpoints, you // configure Global Accelerator to route traffic based on proportions that you // specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 // (sum=20). The result is that 4/20 of your traffic, on average, is routed to the // first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 // is routed to the last endpoint. For more information, see Endpoint weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) // in the Global Accelerator Developer Guide. Weight *int32 noSmithyDocumentSerde } // A complex type for an endpoint. Each endpoint group can include one or more // endpoints, such as load balancers. type EndpointDescription struct { // Indicates whether client IP address preservation is enabled for an endpoint. // The value is true or false. The default value is true for new accelerators. If // the value is set to true, the client's IP address is preserved in the // X-Forwarded-For request header as traffic travels to applications on the // endpoint fronted by the accelerator. Client IP address preservation is // supported, in specific Amazon Web Services Regions, for endpoints that are // Application Load Balancers and Amazon EC2 instances. For more information, see // Preserve client IP addresses in Global Accelerator (https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html) // in the Global Accelerator Developer Guide. ClientIPPreservationEnabled *bool // An ID for the endpoint. If the endpoint is a Network Load Balancer or // Application Load Balancer, this is the Amazon Resource Name (ARN) of the // resource. If the endpoint is an Elastic IP address, this is the Elastic IP // address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. An // Application Load Balancer can be either internal or internet-facing. EndpointId *string // Returns a null result. HealthReason *string // The health status of the endpoint. HealthState HealthState // The weight associated with the endpoint. When you add weights to endpoints, you // configure Global Accelerator to route traffic based on proportions that you // specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 // (sum=20). The result is that 4/20 of your traffic, on average, is routed to the // first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 // is routed to the last endpoint. For more information, see Endpoint weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) // in the Global Accelerator Developer Guide. Weight *int32 noSmithyDocumentSerde } // A complex type for the endpoint group. An Amazon Web Services Region can have // only one endpoint group for a specific listener. type EndpointGroup struct { // The list of endpoint objects. EndpointDescriptions []EndpointDescription // The Amazon Resource Name (ARN) of the endpoint group. EndpointGroupArn *string // The Amazon Web Services Region where the endpoint group is located. EndpointGroupRegion *string // The time—10 seconds or 30 seconds—between health checks for each endpoint. The // default value is 30. HealthCheckIntervalSeconds *int32 // If the protocol is HTTP/S, then this value provides the ping path that Global // Accelerator uses for the destination on the endpoints for health checks. The // default is slash (/). HealthCheckPath *string // The port that Global Accelerator uses to perform health checks on endpoints // that are part of this endpoint group. The default port is the port for the // listener that this endpoint group is associated with. If the listener port is a // list, Global Accelerator uses the first specified port in the list of ports. HealthCheckPort *int32 // The protocol that Global Accelerator uses to perform health checks on endpoints // that are part of this endpoint group. The default value is TCP. HealthCheckProtocol HealthCheckProtocol // Allows you to override the destination ports used to route traffic to an // endpoint. Using a port override lets you map a list of external destination // ports (that your users send traffic to) to a list of internal destination ports // that you want an application endpoint to receive traffic on. PortOverrides []PortOverride // The number of consecutive health checks required to set the state of a healthy // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default // value is 3. ThresholdCount *int32 // The percentage of traffic to send to an Amazon Web Services Region. Additional // traffic is distributed to other endpoint groups for this listener. Use this // action to increase (dial up) or decrease (dial down) traffic to a specific // Region. The percentage is applied to the traffic that would otherwise have been // routed to the Region based on optimal routing. The default value is 100. TrafficDialPercentage *float32 noSmithyDocumentSerde } // A complex type for an endpoint. Specifies information about the endpoint to // remove from the endpoint group. type EndpointIdentifier struct { // An ID for the endpoint. If the endpoint is a Network Load Balancer or // Application Load Balancer, this is the Amazon Resource Name (ARN) of the // resource. If the endpoint is an Elastic IP address, this is the Elastic IP // address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. An // Application Load Balancer can be either internal or internet-facing. // // This member is required. EndpointId *string // Indicates whether client IP address preservation is enabled for an endpoint. // The value is true or false. If the value is set to true, the client's IP address // is preserved in the X-Forwarded-For request header as traffic travels to // applications on the endpoint fronted by the accelerator. ClientIPPreservationEnabled *bool noSmithyDocumentSerde } // A complex type for the set of IP addresses for an accelerator. type IpSet struct { // The types of IP addresses included in this IP set. IpAddressFamily IpAddressFamily // The array of IP addresses in the IP address set. An IP address set can have a // maximum of two IP addresses. IpAddresses []string // IpFamily is deprecated and has been replaced by IpAddressFamily. // // Deprecated: IpFamily has been replaced by IpAddressFamily IpFamily *string noSmithyDocumentSerde } // A complex type for a listener. type Listener struct { // Client affinity lets you direct all requests from a user to the same endpoint, // if you have stateful applications, regardless of the port and protocol of the // client request. Client affinity gives you control over whether to always route // each client to the same specific endpoint. Global Accelerator uses a // consistent-flow hashing algorithm to choose the optimal endpoint for a // connection. If client affinity is NONE , Global Accelerator uses the // "five-tuple" (5-tuple) properties—source IP address, source port, destination IP // address, destination port, and protocol—to select the hash value, and then // chooses the best endpoint. However, with this setting, if someone uses different // ports to connect to Global Accelerator, their connections might not be always // routed to the same endpoint because the hash value changes. If you want a given // client to always be routed to the same endpoint, set client affinity to // SOURCE_IP instead. When you use the SOURCE_IP setting, Global Accelerator uses // the "two-tuple" (2-tuple) properties— source (client) IP address and destination // IP address—to select the hash value. The default value is NONE . ClientAffinity ClientAffinity // The Amazon Resource Name (ARN) of the listener. ListenerArn *string // The list of port ranges for the connections from clients to the accelerator. PortRanges []PortRange // The protocol for the connections from clients to the accelerator. Protocol Protocol noSmithyDocumentSerde } // Returns the ports and associated IP addresses and ports of Amazon EC2 instances // in your virtual private cloud (VPC) subnets. Custom routing is a port mapping // protocol in Global Accelerator that statically associates port ranges with VPC // subnets, which allows Global Accelerator to route to specific instances and // ports within one or more subnets. type PortMapping struct { // The accelerator port. AcceleratorPort *int32 // The EC2 instance IP address and port number in the virtual private cloud (VPC) // subnet. DestinationSocketAddress *SocketAddress // Indicates whether or not a port mapping destination can receive traffic. The // value is either ALLOW, if traffic is allowed to the destination, or DENY, if // traffic is not allowed to the destination. DestinationTrafficState CustomRoutingDestinationTrafficState // The Amazon Resource Name (ARN) of the endpoint group. EndpointGroupArn *string // The IP address of the VPC subnet (the subnet ID). EndpointId *string // The protocols supported by the endpoint group. Protocols []CustomRoutingProtocol noSmithyDocumentSerde } // Override specific listener ports used to route traffic to endpoints that are // part of an endpoint group. For example, you can create a port override in which // the listener receives user traffic on ports 80 and 443, but your accelerator // routes that traffic to ports 1080 and 1443, respectively, on the endpoints. For // more information, see Overriding listener ports (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html) // in the Global Accelerator Developer Guide. type PortOverride struct { // The endpoint port that you want a listener port to be mapped to. This is the // port on the endpoint, such as the Application Load Balancer or Amazon EC2 // instance. EndpointPort *int32 // The listener port that you want to map to a specific endpoint port. This is the // port that user traffic arrives to the Global Accelerator on. ListenerPort *int32 noSmithyDocumentSerde } // A complex type for a range of ports for a listener. type PortRange struct { // The first port in the range of ports, inclusive. FromPort *int32 // The last port in the range of ports, inclusive. ToPort *int32 noSmithyDocumentSerde } // An IP address/port combination. type SocketAddress struct { // The IP address for the socket address. IpAddress *string // The port for the socket address. Port *int32 noSmithyDocumentSerde } // A complex type that contains a Tag key and Tag value. type Tag struct { // A string that contains a Tag key. // // This member is required. Key *string // A string that contains a Tag value. // // This member is required. Value *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
704
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Glue" const ServiceAPIVersion = "2017-03-31" // Client provides the API client to make operations call for AWS Glue. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "glue", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
434
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates one or more partitions in a batch operation. func (c *Client) BatchCreatePartition(ctx context.Context, params *BatchCreatePartitionInput, optFns ...func(*Options)) (*BatchCreatePartitionOutput, error) { if params == nil { params = &BatchCreatePartitionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchCreatePartition", params, optFns, c.addOperationBatchCreatePartitionMiddlewares) if err != nil { return nil, err } out := result.(*BatchCreatePartitionOutput) out.ResultMetadata = metadata return out, nil } type BatchCreatePartitionInput struct { // The name of the metadata database in which the partition is to be created. // // This member is required. DatabaseName *string // A list of PartitionInput structures that define the partitions to be created. // // This member is required. PartitionInputList []types.PartitionInput // The name of the metadata table in which the partition is to be created. // // This member is required. TableName *string // The ID of the catalog in which the partition is to be created. Currently, this // should be the Amazon Web Services account ID. CatalogId *string noSmithyDocumentSerde } type BatchCreatePartitionOutput struct { // The errors encountered when trying to create the requested partitions. Errors []types.PartitionError // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchCreatePartitionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchCreatePartition{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchCreatePartition{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchCreatePartitionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreatePartition(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_opBatchCreatePartition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchCreatePartition", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a list of connection definitions from the Data Catalog. func (c *Client) BatchDeleteConnection(ctx context.Context, params *BatchDeleteConnectionInput, optFns ...func(*Options)) (*BatchDeleteConnectionOutput, error) { if params == nil { params = &BatchDeleteConnectionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchDeleteConnection", params, optFns, c.addOperationBatchDeleteConnectionMiddlewares) if err != nil { return nil, err } out := result.(*BatchDeleteConnectionOutput) out.ResultMetadata = metadata return out, nil } type BatchDeleteConnectionInput struct { // A list of names of the connections to delete. // // This member is required. ConnectionNameList []string // The ID of the Data Catalog in which the connections reside. If none is // provided, the Amazon Web Services account ID is used by default. CatalogId *string noSmithyDocumentSerde } type BatchDeleteConnectionOutput struct { // A map of the names of connections that were not successfully deleted to error // details. Errors map[string]types.ErrorDetail // A list of names of the connection definitions that were successfully deleted. Succeeded []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchDeleteConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDeleteConnection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDeleteConnection{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchDeleteConnectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteConnection(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_opBatchDeleteConnection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchDeleteConnection", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes one or more partitions in a batch operation. func (c *Client) BatchDeletePartition(ctx context.Context, params *BatchDeletePartitionInput, optFns ...func(*Options)) (*BatchDeletePartitionOutput, error) { if params == nil { params = &BatchDeletePartitionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchDeletePartition", params, optFns, c.addOperationBatchDeletePartitionMiddlewares) if err != nil { return nil, err } out := result.(*BatchDeletePartitionOutput) out.ResultMetadata = metadata return out, nil } type BatchDeletePartitionInput struct { // The name of the catalog database in which the table in question resides. // // This member is required. DatabaseName *string // A list of PartitionInput structures that define the partitions to be deleted. // // This member is required. PartitionsToDelete []types.PartitionValueList // The name of the table that contains the partitions to be deleted. // // This member is required. TableName *string // The ID of the Data Catalog where the partition to be deleted resides. If none // is provided, the Amazon Web Services account ID is used by default. CatalogId *string noSmithyDocumentSerde } type BatchDeletePartitionOutput struct { // The errors encountered when trying to delete the requested partitions. Errors []types.PartitionError // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchDeletePartitionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDeletePartition{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDeletePartition{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchDeletePartitionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeletePartition(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_opBatchDeletePartition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchDeletePartition", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes multiple tables at once. After completing this operation, you no longer // have access to the table versions and partitions that belong to the deleted // table. Glue deletes these "orphaned" resources asynchronously in a timely // manner, at the discretion of the service. To ensure the immediate deletion of // all related resources, before calling BatchDeleteTable , use DeleteTableVersion // or BatchDeleteTableVersion , and DeletePartition or BatchDeletePartition , to // delete any resources that belong to the table. func (c *Client) BatchDeleteTable(ctx context.Context, params *BatchDeleteTableInput, optFns ...func(*Options)) (*BatchDeleteTableOutput, error) { if params == nil { params = &BatchDeleteTableInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchDeleteTable", params, optFns, c.addOperationBatchDeleteTableMiddlewares) if err != nil { return nil, err } out := result.(*BatchDeleteTableOutput) out.ResultMetadata = metadata return out, nil } type BatchDeleteTableInput struct { // The name of the catalog database in which the tables to delete reside. For Hive // compatibility, this name is entirely lowercase. // // This member is required. DatabaseName *string // A list of the table to delete. // // This member is required. TablesToDelete []string // The ID of the Data Catalog where the table resides. If none is provided, the // Amazon Web Services account ID is used by default. CatalogId *string // The transaction ID at which to delete the table contents. TransactionId *string noSmithyDocumentSerde } type BatchDeleteTableOutput struct { // A list of errors encountered in attempting to delete the specified tables. Errors []types.TableError // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchDeleteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDeleteTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDeleteTable{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchDeleteTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteTable(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_opBatchDeleteTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchDeleteTable", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a specified batch of versions of a table. func (c *Client) BatchDeleteTableVersion(ctx context.Context, params *BatchDeleteTableVersionInput, optFns ...func(*Options)) (*BatchDeleteTableVersionOutput, error) { if params == nil { params = &BatchDeleteTableVersionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchDeleteTableVersion", params, optFns, c.addOperationBatchDeleteTableVersionMiddlewares) if err != nil { return nil, err } out := result.(*BatchDeleteTableVersionOutput) out.ResultMetadata = metadata return out, nil } type BatchDeleteTableVersionInput struct { // The database in the catalog in which the table resides. For Hive compatibility, // this name is entirely lowercase. // // This member is required. DatabaseName *string // The name of the table. For Hive compatibility, this name is entirely lowercase. // // This member is required. TableName *string // A list of the IDs of versions to be deleted. A VersionId is a string // representation of an integer. Each version is incremented by 1. // // This member is required. VersionIds []string // The ID of the Data Catalog where the tables reside. If none is provided, the // Amazon Web Services account ID is used by default. CatalogId *string noSmithyDocumentSerde } type BatchDeleteTableVersionOutput struct { // A list of errors encountered while trying to delete the specified table // versions. Errors []types.TableVersionError // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchDeleteTableVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDeleteTableVersion{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDeleteTableVersion{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchDeleteTableVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteTableVersion(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_opBatchDeleteTableVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchDeleteTableVersion", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves information about a list of blueprints. func (c *Client) BatchGetBlueprints(ctx context.Context, params *BatchGetBlueprintsInput, optFns ...func(*Options)) (*BatchGetBlueprintsOutput, error) { if params == nil { params = &BatchGetBlueprintsInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetBlueprints", params, optFns, c.addOperationBatchGetBlueprintsMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetBlueprintsOutput) out.ResultMetadata = metadata return out, nil } type BatchGetBlueprintsInput struct { // A list of blueprint names. // // This member is required. Names []string // Specifies whether or not to include the blueprint in the response. IncludeBlueprint *bool // Specifies whether or not to include the parameters, as a JSON string, for the // blueprint in the response. IncludeParameterSpec *bool noSmithyDocumentSerde } type BatchGetBlueprintsOutput struct { // Returns a list of blueprint as a Blueprints object. Blueprints []types.Blueprint // Returns a list of BlueprintNames that were not found. MissingBlueprints []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetBlueprintsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetBlueprints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetBlueprints{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetBlueprintsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetBlueprints(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_opBatchGetBlueprints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetBlueprints", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of resource metadata for a given list of crawler names. After // calling the ListCrawlers operation, you can call this operation to access the // data to which you have been granted permissions. This operation supports all IAM // permissions, including permission conditions that uses tags. func (c *Client) BatchGetCrawlers(ctx context.Context, params *BatchGetCrawlersInput, optFns ...func(*Options)) (*BatchGetCrawlersOutput, error) { if params == nil { params = &BatchGetCrawlersInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetCrawlers", params, optFns, c.addOperationBatchGetCrawlersMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetCrawlersOutput) out.ResultMetadata = metadata return out, nil } type BatchGetCrawlersInput struct { // A list of crawler names, which might be the names returned from the ListCrawlers // operation. // // This member is required. CrawlerNames []string noSmithyDocumentSerde } type BatchGetCrawlersOutput struct { // A list of crawler definitions. Crawlers []types.Crawler // A list of names of crawlers that were not found. CrawlersNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetCrawlersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetCrawlers{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetCrawlers{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetCrawlersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetCrawlers(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_opBatchGetCrawlers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetCrawlers", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the details for the custom patterns specified by a list of names. func (c *Client) BatchGetCustomEntityTypes(ctx context.Context, params *BatchGetCustomEntityTypesInput, optFns ...func(*Options)) (*BatchGetCustomEntityTypesOutput, error) { if params == nil { params = &BatchGetCustomEntityTypesInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetCustomEntityTypes", params, optFns, c.addOperationBatchGetCustomEntityTypesMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetCustomEntityTypesOutput) out.ResultMetadata = metadata return out, nil } type BatchGetCustomEntityTypesInput struct { // A list of names of the custom patterns that you want to retrieve. // // This member is required. Names []string noSmithyDocumentSerde } type BatchGetCustomEntityTypesOutput struct { // A list of CustomEntityType objects representing the custom patterns that have // been created. CustomEntityTypes []types.CustomEntityType // A list of the names of custom patterns that were not found. CustomEntityTypesNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetCustomEntityTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetCustomEntityTypes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetCustomEntityTypes{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetCustomEntityTypesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetCustomEntityTypes(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_opBatchGetCustomEntityTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetCustomEntityTypes", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a list of data quality results for the specified result IDs. func (c *Client) BatchGetDataQualityResult(ctx context.Context, params *BatchGetDataQualityResultInput, optFns ...func(*Options)) (*BatchGetDataQualityResultOutput, error) { if params == nil { params = &BatchGetDataQualityResultInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetDataQualityResult", params, optFns, c.addOperationBatchGetDataQualityResultMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetDataQualityResultOutput) out.ResultMetadata = metadata return out, nil } type BatchGetDataQualityResultInput struct { // A list of unique result IDs for the data quality results. // // This member is required. ResultIds []string noSmithyDocumentSerde } type BatchGetDataQualityResultOutput struct { // A list of DataQualityResult objects representing the data quality results. // // This member is required. Results []types.DataQualityResult // A list of result IDs for which results were not found. ResultsNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetDataQualityResultMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetDataQualityResult{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetDataQualityResult{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetDataQualityResultValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetDataQualityResult(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_opBatchGetDataQualityResult(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetDataQualityResult", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of resource metadata for a given list of development endpoint // names. After calling the ListDevEndpoints operation, you can call this // operation to access the data to which you have been granted permissions. This // operation supports all IAM permissions, including permission conditions that // uses tags. func (c *Client) BatchGetDevEndpoints(ctx context.Context, params *BatchGetDevEndpointsInput, optFns ...func(*Options)) (*BatchGetDevEndpointsOutput, error) { if params == nil { params = &BatchGetDevEndpointsInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetDevEndpoints", params, optFns, c.addOperationBatchGetDevEndpointsMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetDevEndpointsOutput) out.ResultMetadata = metadata return out, nil } type BatchGetDevEndpointsInput struct { // The list of DevEndpoint names, which might be the names returned from the // ListDevEndpoint operation. // // This member is required. DevEndpointNames []string noSmithyDocumentSerde } type BatchGetDevEndpointsOutput struct { // A list of DevEndpoint definitions. DevEndpoints []types.DevEndpoint // A list of DevEndpoints not found. DevEndpointsNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetDevEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetDevEndpoints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetDevEndpoints{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetDevEndpointsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetDevEndpoints(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_opBatchGetDevEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetDevEndpoints", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of resource metadata for a given list of job names. After // calling the ListJobs operation, you can call this operation to access the data // to which you have been granted permissions. This operation supports all IAM // permissions, including permission conditions that uses tags. func (c *Client) BatchGetJobs(ctx context.Context, params *BatchGetJobsInput, optFns ...func(*Options)) (*BatchGetJobsOutput, error) { if params == nil { params = &BatchGetJobsInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetJobs", params, optFns, c.addOperationBatchGetJobsMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetJobsOutput) out.ResultMetadata = metadata return out, nil } type BatchGetJobsInput struct { // A list of job names, which might be the names returned from the ListJobs // operation. // // This member is required. JobNames []string noSmithyDocumentSerde } type BatchGetJobsOutput struct { // A list of job definitions. Jobs []types.Job // A list of names of jobs not found. JobsNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetJobs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetJobs{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetJobsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetJobs(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_opBatchGetJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetJobs", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves partitions in a batch request. func (c *Client) BatchGetPartition(ctx context.Context, params *BatchGetPartitionInput, optFns ...func(*Options)) (*BatchGetPartitionOutput, error) { if params == nil { params = &BatchGetPartitionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetPartition", params, optFns, c.addOperationBatchGetPartitionMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetPartitionOutput) out.ResultMetadata = metadata return out, nil } type BatchGetPartitionInput struct { // The name of the catalog database where the partitions reside. // // This member is required. DatabaseName *string // A list of partition values identifying the partitions to retrieve. // // This member is required. PartitionsToGet []types.PartitionValueList // The name of the partitions' table. // // This member is required. TableName *string // The ID of the Data Catalog where the partitions in question reside. If none is // supplied, the Amazon Web Services account ID is used by default. CatalogId *string noSmithyDocumentSerde } type BatchGetPartitionOutput struct { // A list of the requested partitions. Partitions []types.Partition // A list of the partition values in the request for which partitions were not // returned. UnprocessedKeys []types.PartitionValueList // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetPartitionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetPartition{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetPartition{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetPartitionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetPartition(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_opBatchGetPartition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetPartition", } }
143
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of resource metadata for a given list of trigger names. After // calling the ListTriggers operation, you can call this operation to access the // data to which you have been granted permissions. This operation supports all IAM // permissions, including permission conditions that uses tags. func (c *Client) BatchGetTriggers(ctx context.Context, params *BatchGetTriggersInput, optFns ...func(*Options)) (*BatchGetTriggersOutput, error) { if params == nil { params = &BatchGetTriggersInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetTriggers", params, optFns, c.addOperationBatchGetTriggersMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetTriggersOutput) out.ResultMetadata = metadata return out, nil } type BatchGetTriggersInput struct { // A list of trigger names, which may be the names returned from the ListTriggers // operation. // // This member is required. TriggerNames []string noSmithyDocumentSerde } type BatchGetTriggersOutput struct { // A list of trigger definitions. Triggers []types.Trigger // A list of names of triggers not found. TriggersNotFound []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetTriggersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetTriggers{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetTriggers{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetTriggersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetTriggers(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_opBatchGetTriggers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetTriggers", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of resource metadata for a given list of workflow names. After // calling the ListWorkflows operation, you can call this operation to access the // data to which you have been granted permissions. This operation supports all IAM // permissions, including permission conditions that uses tags. func (c *Client) BatchGetWorkflows(ctx context.Context, params *BatchGetWorkflowsInput, optFns ...func(*Options)) (*BatchGetWorkflowsOutput, error) { if params == nil { params = &BatchGetWorkflowsInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchGetWorkflows", params, optFns, c.addOperationBatchGetWorkflowsMiddlewares) if err != nil { return nil, err } out := result.(*BatchGetWorkflowsOutput) out.ResultMetadata = metadata return out, nil } type BatchGetWorkflowsInput struct { // A list of workflow names, which may be the names returned from the ListWorkflows // operation. // // This member is required. Names []string // Specifies whether to include a graph when returning the workflow resource // metadata. IncludeGraph *bool noSmithyDocumentSerde } type BatchGetWorkflowsOutput struct { // A list of names of workflows not found. MissingWorkflows []string // A list of workflow resource metadata. Workflows []types.Workflow // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchGetWorkflowsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetWorkflows{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetWorkflows{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchGetWorkflowsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetWorkflows(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_opBatchGetWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchGetWorkflows", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops one or more job runs for a specified job definition. func (c *Client) BatchStopJobRun(ctx context.Context, params *BatchStopJobRunInput, optFns ...func(*Options)) (*BatchStopJobRunOutput, error) { if params == nil { params = &BatchStopJobRunInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchStopJobRun", params, optFns, c.addOperationBatchStopJobRunMiddlewares) if err != nil { return nil, err } out := result.(*BatchStopJobRunOutput) out.ResultMetadata = metadata return out, nil } type BatchStopJobRunInput struct { // The name of the job definition for which to stop job runs. // // This member is required. JobName *string // A list of the JobRunIds that should be stopped for that job definition. // // This member is required. JobRunIds []string noSmithyDocumentSerde } type BatchStopJobRunOutput struct { // A list of the errors that were encountered in trying to stop JobRuns , including // the JobRunId for which each error was encountered and details about the error. Errors []types.BatchStopJobRunError // A list of the JobRuns that were successfully submitted for stopping. SuccessfulSubmissions []types.BatchStopJobRunSuccessfulSubmission // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchStopJobRunMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchStopJobRun{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchStopJobRun{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchStopJobRunValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchStopJobRun(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_opBatchStopJobRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchStopJobRun", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates one or more partitions in a batch operation. func (c *Client) BatchUpdatePartition(ctx context.Context, params *BatchUpdatePartitionInput, optFns ...func(*Options)) (*BatchUpdatePartitionOutput, error) { if params == nil { params = &BatchUpdatePartitionInput{} } result, metadata, err := c.invokeOperation(ctx, "BatchUpdatePartition", params, optFns, c.addOperationBatchUpdatePartitionMiddlewares) if err != nil { return nil, err } out := result.(*BatchUpdatePartitionOutput) out.ResultMetadata = metadata return out, nil } type BatchUpdatePartitionInput struct { // The name of the metadata database in which the partition is to be updated. // // This member is required. DatabaseName *string // A list of up to 100 BatchUpdatePartitionRequestEntry objects to update. // // This member is required. Entries []types.BatchUpdatePartitionRequestEntry // The name of the metadata table in which the partition is to be updated. // // This member is required. TableName *string // The ID of the catalog in which the partition is to be updated. Currently, this // should be the Amazon Web Services account ID. CatalogId *string noSmithyDocumentSerde } type BatchUpdatePartitionOutput struct { // The errors encountered when trying to update the requested partitions. A list // of BatchUpdatePartitionFailureEntry objects. Errors []types.BatchUpdatePartitionFailureEntry // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationBatchUpdatePartitionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchUpdatePartition{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchUpdatePartition{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpBatchUpdatePartitionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdatePartition(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_opBatchUpdatePartition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "BatchUpdatePartition", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Cancels the specified recommendation run that was being used to generate rules. func (c *Client) CancelDataQualityRuleRecommendationRun(ctx context.Context, params *CancelDataQualityRuleRecommendationRunInput, optFns ...func(*Options)) (*CancelDataQualityRuleRecommendationRunOutput, error) { if params == nil { params = &CancelDataQualityRuleRecommendationRunInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelDataQualityRuleRecommendationRun", params, optFns, c.addOperationCancelDataQualityRuleRecommendationRunMiddlewares) if err != nil { return nil, err } out := result.(*CancelDataQualityRuleRecommendationRunOutput) out.ResultMetadata = metadata return out, nil } type CancelDataQualityRuleRecommendationRunInput struct { // The unique run identifier associated with this run. // // This member is required. RunId *string noSmithyDocumentSerde } type CancelDataQualityRuleRecommendationRunOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelDataQualityRuleRecommendationRunMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelDataQualityRuleRecommendationRun{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelDataQualityRuleRecommendationRun{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCancelDataQualityRuleRecommendationRunValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelDataQualityRuleRecommendationRun(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_opCancelDataQualityRuleRecommendationRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CancelDataQualityRuleRecommendationRun", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Cancels a run where a ruleset is being evaluated against a data source. func (c *Client) CancelDataQualityRulesetEvaluationRun(ctx context.Context, params *CancelDataQualityRulesetEvaluationRunInput, optFns ...func(*Options)) (*CancelDataQualityRulesetEvaluationRunOutput, error) { if params == nil { params = &CancelDataQualityRulesetEvaluationRunInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelDataQualityRulesetEvaluationRun", params, optFns, c.addOperationCancelDataQualityRulesetEvaluationRunMiddlewares) if err != nil { return nil, err } out := result.(*CancelDataQualityRulesetEvaluationRunOutput) out.ResultMetadata = metadata return out, nil } type CancelDataQualityRulesetEvaluationRunInput struct { // The unique run identifier associated with this run. // // This member is required. RunId *string noSmithyDocumentSerde } type CancelDataQualityRulesetEvaluationRunOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelDataQualityRulesetEvaluationRunMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelDataQualityRulesetEvaluationRun{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelDataQualityRulesetEvaluationRun{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCancelDataQualityRulesetEvaluationRunValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelDataQualityRulesetEvaluationRun(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_opCancelDataQualityRulesetEvaluationRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CancelDataQualityRulesetEvaluationRun", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Cancels (stops) a task run. Machine learning task runs are asynchronous tasks // that Glue runs on your behalf as part of various machine learning workflows. You // can cancel a machine learning task run at any time by calling CancelMLTaskRun // with a task run's parent transform's TransformID and the task run's TaskRunId . func (c *Client) CancelMLTaskRun(ctx context.Context, params *CancelMLTaskRunInput, optFns ...func(*Options)) (*CancelMLTaskRunOutput, error) { if params == nil { params = &CancelMLTaskRunInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelMLTaskRun", params, optFns, c.addOperationCancelMLTaskRunMiddlewares) if err != nil { return nil, err } out := result.(*CancelMLTaskRunOutput) out.ResultMetadata = metadata return out, nil } type CancelMLTaskRunInput struct { // A unique identifier for the task run. // // This member is required. TaskRunId *string // The unique identifier of the machine learning transform. // // This member is required. TransformId *string noSmithyDocumentSerde } type CancelMLTaskRunOutput struct { // The status for this run. Status types.TaskStatusType // The unique identifier for the task run. TaskRunId *string // The unique identifier of the machine learning transform. TransformId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelMLTaskRunMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelMLTaskRun{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelMLTaskRun{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCancelMLTaskRunValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelMLTaskRun(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_opCancelMLTaskRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CancelMLTaskRun", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Cancels the statement. func (c *Client) CancelStatement(ctx context.Context, params *CancelStatementInput, optFns ...func(*Options)) (*CancelStatementOutput, error) { if params == nil { params = &CancelStatementInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelStatement", params, optFns, c.addOperationCancelStatementMiddlewares) if err != nil { return nil, err } out := result.(*CancelStatementOutput) out.ResultMetadata = metadata return out, nil } type CancelStatementInput struct { // The ID of the statement to be cancelled. // // This member is required. Id int32 // The Session ID of the statement to be cancelled. // // This member is required. SessionId *string // The origin of the request to cancel the statement. RequestOrigin *string noSmithyDocumentSerde } type CancelStatementOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelStatement{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelStatement{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCancelStatementValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelStatement(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_opCancelStatement(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CancelStatement", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Validates the supplied schema. This call has no side effects, it simply // validates using the supplied schema using DataFormat as the format. Since it // does not take a schema set name, no compatibility checks are performed. func (c *Client) CheckSchemaVersionValidity(ctx context.Context, params *CheckSchemaVersionValidityInput, optFns ...func(*Options)) (*CheckSchemaVersionValidityOutput, error) { if params == nil { params = &CheckSchemaVersionValidityInput{} } result, metadata, err := c.invokeOperation(ctx, "CheckSchemaVersionValidity", params, optFns, c.addOperationCheckSchemaVersionValidityMiddlewares) if err != nil { return nil, err } out := result.(*CheckSchemaVersionValidityOutput) out.ResultMetadata = metadata return out, nil } type CheckSchemaVersionValidityInput struct { // The data format of the schema definition. Currently AVRO , JSON and PROTOBUF // are supported. // // This member is required. DataFormat types.DataFormat // The definition of the schema that has to be validated. // // This member is required. SchemaDefinition *string noSmithyDocumentSerde } type CheckSchemaVersionValidityOutput struct { // A validation failure error message. Error *string // Return true, if the schema is valid and false otherwise. Valid bool // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCheckSchemaVersionValidityMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCheckSchemaVersionValidity{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCheckSchemaVersionValidity{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCheckSchemaVersionValidityValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCheckSchemaVersionValidity(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_opCheckSchemaVersionValidity(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CheckSchemaVersionValidity", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Registers a blueprint with Glue. func (c *Client) CreateBlueprint(ctx context.Context, params *CreateBlueprintInput, optFns ...func(*Options)) (*CreateBlueprintOutput, error) { if params == nil { params = &CreateBlueprintInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateBlueprint", params, optFns, c.addOperationCreateBlueprintMiddlewares) if err != nil { return nil, err } out := result.(*CreateBlueprintOutput) out.ResultMetadata = metadata return out, nil } type CreateBlueprintInput struct { // Specifies a path in Amazon S3 where the blueprint is published. // // This member is required. BlueprintLocation *string // The name of the blueprint. // // This member is required. Name *string // A description of the blueprint. Description *string // The tags to be applied to this blueprint. Tags map[string]string noSmithyDocumentSerde } type CreateBlueprintOutput struct { // Returns the name of the blueprint that was registered. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateBlueprintMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateBlueprint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateBlueprint{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateBlueprintValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBlueprint(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_opCreateBlueprint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateBlueprint", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a classifier in the user's account. This can be a GrokClassifier , an // XMLClassifier , a JsonClassifier , or a CsvClassifier , depending on which field // of the request is present. func (c *Client) CreateClassifier(ctx context.Context, params *CreateClassifierInput, optFns ...func(*Options)) (*CreateClassifierOutput, error) { if params == nil { params = &CreateClassifierInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateClassifier", params, optFns, c.addOperationCreateClassifierMiddlewares) if err != nil { return nil, err } out := result.(*CreateClassifierOutput) out.ResultMetadata = metadata return out, nil } type CreateClassifierInput struct { // A CsvClassifier object specifying the classifier to create. CsvClassifier *types.CreateCsvClassifierRequest // A GrokClassifier object specifying the classifier to create. GrokClassifier *types.CreateGrokClassifierRequest // A JsonClassifier object specifying the classifier to create. JsonClassifier *types.CreateJsonClassifierRequest // An XMLClassifier object specifying the classifier to create. XMLClassifier *types.CreateXMLClassifierRequest noSmithyDocumentSerde } type CreateClassifierOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateClassifierMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateClassifier{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateClassifier{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateClassifierValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateClassifier(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_opCreateClassifier(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateClassifier", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a connection definition in the Data Catalog. func (c *Client) CreateConnection(ctx context.Context, params *CreateConnectionInput, optFns ...func(*Options)) (*CreateConnectionOutput, error) { if params == nil { params = &CreateConnectionInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnection", params, optFns, c.addOperationCreateConnectionMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectionOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectionInput struct { // A ConnectionInput object defining the connection to create. // // This member is required. ConnectionInput *types.ConnectionInput // The ID of the Data Catalog in which to create the connection. If none is // provided, the Amazon Web Services account ID is used by default. CatalogId *string // The tags you assign to the connection. Tags map[string]string noSmithyDocumentSerde } type CreateConnectionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateConnection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateConnection{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnection(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_opCreateConnection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateConnection", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new crawler with specified targets, role, configuration, and optional // schedule. At least one crawl target must be specified, in the s3Targets field, // the jdbcTargets field, or the DynamoDBTargets field. func (c *Client) CreateCrawler(ctx context.Context, params *CreateCrawlerInput, optFns ...func(*Options)) (*CreateCrawlerOutput, error) { if params == nil { params = &CreateCrawlerInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCrawler", params, optFns, c.addOperationCreateCrawlerMiddlewares) if err != nil { return nil, err } out := result.(*CreateCrawlerOutput) out.ResultMetadata = metadata return out, nil } type CreateCrawlerInput struct { // Name of the new crawler. // // This member is required. Name *string // The IAM role or Amazon Resource Name (ARN) of an IAM role used by the new // crawler to access customer resources. // // This member is required. Role *string // A list of collection of targets to crawl. // // This member is required. Targets *types.CrawlerTargets // A list of custom classifiers that the user has registered. By default, all // built-in classifiers are included in a crawl, but these custom classifiers // always override the default classifiers for a given classification. Classifiers []string // Crawler configuration information. This versioned JSON string allows users to // specify aspects of a crawler's behavior. For more information, see Setting // crawler configuration options (https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html) // . Configuration *string // The name of the SecurityConfiguration structure to be used by this crawler. CrawlerSecurityConfiguration *string // The Glue database where results are written, such as: // arn:aws:daylight:us-east-1::database/sometable/* . DatabaseName *string // A description of the new crawler. Description *string // Specifies Lake Formation configuration settings for the crawler. LakeFormationConfiguration *types.LakeFormationConfiguration // Specifies data lineage configuration settings for the crawler. LineageConfiguration *types.LineageConfiguration // A policy that specifies whether to crawl the entire dataset again, or to crawl // only folders that were added since the last crawler run. RecrawlPolicy *types.RecrawlPolicy // A cron expression used to specify the schedule (see Time-Based Schedules for // Jobs and Crawlers (https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) // . For example, to run something every day at 12:15 UTC, you would specify: // cron(15 12 * * ? *) . Schedule *string // The policy for the crawler's update and deletion behavior. SchemaChangePolicy *types.SchemaChangePolicy // The table prefix used for catalog tables that are created. TablePrefix *string // The tags to use with this crawler request. You may use tags to limit access to // the crawler. For more information about tags in Glue, see Amazon Web Services // Tags in Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in // the developer guide. Tags map[string]string noSmithyDocumentSerde } type CreateCrawlerOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCrawlerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCrawler{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCrawler{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateCrawlerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCrawler(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_opCreateCrawler(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateCrawler", } }
183
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a custom pattern that is used to detect sensitive data across the // columns and rows of your structured data. Each custom pattern you create // specifies a regular expression and an optional list of context words. If no // context words are passed only a regular expression is checked. func (c *Client) CreateCustomEntityType(ctx context.Context, params *CreateCustomEntityTypeInput, optFns ...func(*Options)) (*CreateCustomEntityTypeOutput, error) { if params == nil { params = &CreateCustomEntityTypeInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCustomEntityType", params, optFns, c.addOperationCreateCustomEntityTypeMiddlewares) if err != nil { return nil, err } out := result.(*CreateCustomEntityTypeOutput) out.ResultMetadata = metadata return out, nil } type CreateCustomEntityTypeInput struct { // A name for the custom pattern that allows it to be retrieved or deleted later. // This name must be unique per Amazon Web Services account. // // This member is required. Name *string // A regular expression string that is used for detecting sensitive data in a // custom pattern. // // This member is required. RegexString *string // A list of context words. If none of these context words are found within the // vicinity of the regular expression the data will not be detected as sensitive // data. If no context words are passed only a regular expression is checked. ContextWords []string // A list of tags applied to the custom entity type. Tags map[string]string noSmithyDocumentSerde } type CreateCustomEntityTypeOutput struct { // The name of the custom pattern you created. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCustomEntityTypeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCustomEntityType{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCustomEntityType{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateCustomEntityTypeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomEntityType(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_opCreateCustomEntityType(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateCustomEntityType", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new database in a Data Catalog. func (c *Client) CreateDatabase(ctx context.Context, params *CreateDatabaseInput, optFns ...func(*Options)) (*CreateDatabaseOutput, error) { if params == nil { params = &CreateDatabaseInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateDatabase", params, optFns, c.addOperationCreateDatabaseMiddlewares) if err != nil { return nil, err } out := result.(*CreateDatabaseOutput) out.ResultMetadata = metadata return out, nil } type CreateDatabaseInput struct { // The metadata for the database. // // This member is required. DatabaseInput *types.DatabaseInput // The ID of the Data Catalog in which to create the database. If none is // provided, the Amazon Web Services account ID is used by default. CatalogId *string // The tags you assign to the database. Tags map[string]string noSmithyDocumentSerde } type CreateDatabaseOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateDatabaseMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDatabase{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDatabase{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateDatabaseValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDatabase(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_opCreateDatabase(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateDatabase", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a data quality ruleset with DQDL rules applied to a specified Glue // table. You create the ruleset using the Data Quality Definition Language (DQDL). // For more information, see the Glue developer guide. func (c *Client) CreateDataQualityRuleset(ctx context.Context, params *CreateDataQualityRulesetInput, optFns ...func(*Options)) (*CreateDataQualityRulesetOutput, error) { if params == nil { params = &CreateDataQualityRulesetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateDataQualityRuleset", params, optFns, c.addOperationCreateDataQualityRulesetMiddlewares) if err != nil { return nil, err } out := result.(*CreateDataQualityRulesetOutput) out.ResultMetadata = metadata return out, nil } type CreateDataQualityRulesetInput struct { // A unique name for the data quality ruleset. // // This member is required. Name *string // A Data Quality Definition Language (DQDL) ruleset. For more information, see // the Glue developer guide. // // This member is required. Ruleset *string // Used for idempotency and is recommended to be set to a random ID (such as a // UUID) to avoid creating or starting multiple instances of the same resource. ClientToken *string // A description of the data quality ruleset. Description *string // A list of tags applied to the data quality ruleset. Tags map[string]string // A target table associated with the data quality ruleset. TargetTable *types.DataQualityTargetTable noSmithyDocumentSerde } type CreateDataQualityRulesetOutput struct { // A unique name for the data quality ruleset. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateDataQualityRulesetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDataQualityRuleset{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDataQualityRuleset{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateDataQualityRulesetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDataQualityRuleset(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_opCreateDataQualityRuleset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateDataQualityRuleset", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Creates a new development endpoint. func (c *Client) CreateDevEndpoint(ctx context.Context, params *CreateDevEndpointInput, optFns ...func(*Options)) (*CreateDevEndpointOutput, error) { if params == nil { params = &CreateDevEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateDevEndpoint", params, optFns, c.addOperationCreateDevEndpointMiddlewares) if err != nil { return nil, err } out := result.(*CreateDevEndpointOutput) out.ResultMetadata = metadata return out, nil } type CreateDevEndpointInput struct { // The name to be assigned to the new DevEndpoint . // // This member is required. EndpointName *string // The IAM role for the DevEndpoint . // // This member is required. RoleArn *string // A map of arguments used to configure the DevEndpoint . Arguments map[string]string // The path to one or more Java .jar files in an S3 bucket that should be loaded // in your DevEndpoint . ExtraJarsS3Path *string // The paths to one or more Python libraries in an Amazon S3 bucket that should be // loaded in your DevEndpoint . Multiple values must be complete paths separated by // a comma. You can only use pure Python libraries with a DevEndpoint . Libraries // that rely on C extensions, such as the pandas (http://pandas.pydata.org/) // Python data analysis library, are not yet supported. ExtraPythonLibsS3Path *string // Glue version determines the versions of Apache Spark and Python that Glue // supports. The Python version indicates the version supported for running your // ETL scripts on development endpoints. For more information about the available // Glue versions and corresponding Spark and Python versions, see Glue version (https://docs.aws.amazon.com/glue/latest/dg/add-job.html) // in the developer guide. Development endpoints that are created without // specifying a Glue version default to Glue 0.9. You can specify a version of // Python support for development endpoints by using the Arguments parameter in // the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are provided, // the version defaults to Python 2. GlueVersion *string // The number of Glue Data Processing Units (DPUs) to allocate to this DevEndpoint . NumberOfNodes int32 // The number of workers of a defined workerType that are allocated to the // development endpoint. The maximum number of workers you can define are 299 for // G.1X , and 149 for G.2X . NumberOfWorkers *int32 // The public key to be used by this DevEndpoint for authentication. This // attribute is provided for backward compatibility because the recommended // attribute to use is public keys. PublicKey *string // A list of public keys to be used by the development endpoints for // authentication. The use of this attribute is preferred over a single public key // because the public keys allow you to have a different private key per client. If // you previously created an endpoint with a public key, you must remove that key // to be able to set a list of public keys. Call the UpdateDevEndpoint API with // the public key content in the deletePublicKeys attribute, and the list of new // keys in the addPublicKeys attribute. PublicKeys []string // The name of the SecurityConfiguration structure to be used with this DevEndpoint // . SecurityConfiguration *string // Security group IDs for the security groups to be used by the new DevEndpoint . SecurityGroupIds []string // The subnet ID for the new DevEndpoint to use. SubnetId *string // The tags to use with this DevEndpoint. You may use tags to limit access to the // DevEndpoint. For more information about tags in Glue, see Amazon Web Services // Tags in Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in // the developer guide. Tags map[string]string // The type of predefined worker that is allocated to the development endpoint. // Accepts a value of Standard, G.1X, or G.2X. // - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory // and a 50GB disk, and 2 executors per worker. // - For the G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of // memory, 64 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // - For the G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of // memory, 128 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // Known issue: when a development endpoint is created with the G.2X WorkerType // configuration, the Spark drivers for the development endpoint will run on 4 // vCPU, 16 GB of memory, and a 64 GB disk. WorkerType types.WorkerType noSmithyDocumentSerde } type CreateDevEndpointOutput struct { // The map of arguments used to configure this DevEndpoint . Valid arguments are: // - "--enable-glue-datacatalog": "" // You can specify a version of Python support for development endpoints by using // the Arguments parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If // no arguments are provided, the version defaults to Python 2. Arguments map[string]string // The Amazon Web Services Availability Zone where this DevEndpoint is located. AvailabilityZone *string // The point in time at which this DevEndpoint was created. CreatedTimestamp *time.Time // The name assigned to the new DevEndpoint . EndpointName *string // Path to one or more Java .jar files in an S3 bucket that will be loaded in your // DevEndpoint . ExtraJarsS3Path *string // The paths to one or more Python libraries in an S3 bucket that will be loaded // in your DevEndpoint . ExtraPythonLibsS3Path *string // The reason for a current failure in this DevEndpoint . FailureReason *string // Glue version determines the versions of Apache Spark and Python that Glue // supports. The Python version indicates the version supported for running your // ETL scripts on development endpoints. For more information about the available // Glue versions and corresponding Spark and Python versions, see Glue version (https://docs.aws.amazon.com/glue/latest/dg/add-job.html) // in the developer guide. GlueVersion *string // The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint. NumberOfNodes int32 // The number of workers of a defined workerType that are allocated to the // development endpoint. NumberOfWorkers *int32 // The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint . RoleArn *string // The name of the SecurityConfiguration structure being used with this DevEndpoint // . SecurityConfiguration *string // The security groups assigned to the new DevEndpoint . SecurityGroupIds []string // The current status of the new DevEndpoint . Status *string // The subnet ID assigned to the new DevEndpoint . SubnetId *string // The ID of the virtual private cloud (VPC) used by this DevEndpoint . VpcId *string // The type of predefined worker that is allocated to the development endpoint. // May be a value of Standard, G.1X, or G.2X. WorkerType types.WorkerType // The address of the YARN endpoint used by this DevEndpoint . YarnEndpointAddress *string // The Apache Zeppelin port for the remote Apache Spark interpreter. ZeppelinRemoteSparkInterpreterPort int32 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateDevEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDevEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDevEndpoint{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateDevEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDevEndpoint(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_opCreateDevEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateDevEndpoint", } }
276
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new job definition. func (c *Client) CreateJob(ctx context.Context, params *CreateJobInput, optFns ...func(*Options)) (*CreateJobOutput, error) { if params == nil { params = &CreateJobInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateJob", params, optFns, c.addOperationCreateJobMiddlewares) if err != nil { return nil, err } out := result.(*CreateJobOutput) out.ResultMetadata = metadata return out, nil } type CreateJobInput struct { // The JobCommand that runs this job. // // This member is required. Command *types.JobCommand // The name you assign to this job definition. It must be unique in your account. // // This member is required. Name *string // The name or Amazon Resource Name (ARN) of the IAM role associated with this job. // // This member is required. Role *string // This parameter is deprecated. Use MaxCapacity instead. The number of Glue data // processing units (DPUs) to allocate to this Job. You can allocate a minimum of 2 // DPUs; the default is 10. A DPU is a relative measure of processing power that // consists of 4 vCPUs of compute capacity and 16 GB of memory. For more // information, see the Glue pricing page (https://aws.amazon.com/glue/pricing/) . // // Deprecated: This property is deprecated, use MaxCapacity instead. AllocatedCapacity int32 // The representation of a directed acyclic graph on which both the Glue Studio // visual component and Glue Studio code generation is based. CodeGenConfigurationNodes map[string]types.CodeGenConfigurationNode // The connections used for this job. Connections *types.ConnectionsList // The default arguments for every run of this job, specified as name-value pairs. // You can specify arguments here that your own job-execution script consumes, as // well as arguments that Glue itself consumes. Job arguments may be logged. Do not // pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, // Secrets Manager or other secret management mechanism if you intend to keep them // within the Job. For information about how to specify and consume your own Job // arguments, see the Calling Glue APIs in Python (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) // topic in the developer guide. For information about the arguments you can // provide to this field when configuring Spark jobs, see the Special Parameters // Used by Glue (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. For information about the arguments you can // provide to this field when configuring Ray jobs, see Using job parameters in // Ray jobs (https://docs.aws.amazon.com/glue/latest/dg/author-job-ray-job-parameters.html) // in the developer guide. DefaultArguments map[string]string // Description of the job being defined. Description *string // Indicates whether the job is run with a standard or flexible execution class. // The standard execution-class is ideal for time-sensitive workloads that require // fast job startup and dedicated resources. The flexible execution class is // appropriate for time-insensitive jobs whose start and completion times may vary. // Only jobs with Glue version 3.0 and above and command type glueetl will be // allowed to set ExecutionClass to FLEX . The flexible execution class is // available for Spark jobs. ExecutionClass types.ExecutionClass // An ExecutionProperty specifying the maximum number of concurrent runs allowed // for this job. ExecutionProperty *types.ExecutionProperty // In Spark jobs, GlueVersion determines the versions of Apache Spark and Python // that Glue available in a job. The Python version indicates the version supported // for jobs of type Spark. Ray jobs should set GlueVersion to 4.0 or greater. // However, the versions of Ray, Python and additional libraries available in your // Ray job are determined by the Runtime parameter of the Job command. For more // information about the available Glue versions and corresponding Spark and Python // versions, see Glue version (https://docs.aws.amazon.com/glue/latest/dg/add-job.html) // in the developer guide. Jobs that are created without specifying a Glue version // default to Glue 0.9. GlueVersion *string // This field is reserved for future use. LogUri *string // For Glue version 1.0 or earlier jobs, using the standard worker type, the // number of Glue data processing units (DPUs) that can be allocated when this job // runs. A DPU is a relative measure of processing power that consists of 4 vCPUs // of compute capacity and 16 GB of memory. For more information, see the Glue // pricing page (https://aws.amazon.com/glue/pricing/) . For Glue version 2.0+ // jobs, you cannot specify a Maximum capacity . Instead, you should specify a // Worker type and the Number of workers . Do not set MaxCapacity if using // WorkerType and NumberOfWorkers . The value that can be allocated for MaxCapacity // depends on whether you are running a Python shell job, an Apache Spark ETL job, // or an Apache Spark streaming ETL job: // - When you specify a Python shell job ( JobCommand.Name ="pythonshell"), you // can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU. // - When you specify an Apache Spark ETL job ( JobCommand.Name ="glueetl") or // Apache Spark streaming ETL job ( JobCommand.Name ="gluestreaming"), you can // allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a // fractional DPU allocation. MaxCapacity *float64 // The maximum number of times to retry this job if it fails. MaxRetries int32 // Arguments for this job that are not overridden when providing job arguments in // a job run, specified as name-value pairs. NonOverridableArguments map[string]string // Specifies configuration properties of a job notification. NotificationProperty *types.NotificationProperty // The number of workers of a defined workerType that are allocated when a job // runs. NumberOfWorkers *int32 // The name of the SecurityConfiguration structure to be used with this job. SecurityConfiguration *string // The details for a source control configuration for a job, allowing // synchronization of job artifacts to or from a remote repository. SourceControlDetails *types.SourceControlDetails // The tags to use with this job. You may use tags to limit access to the job. For // more information about tags in Glue, see Amazon Web Services Tags in Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) // in the developer guide. Tags map[string]string // The job timeout in minutes. This is the maximum time that a job run can consume // resources before it is terminated and enters TIMEOUT status. The default is // 2,880 minutes (48 hours). Timeout *int32 // The type of predefined worker that is allocated when a job runs. Accepts a // value of Standard, G.1X, G.2X, or G.025X for Spark jobs. Accepts the value Z.2X // for Ray jobs. // - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory // and a 50GB disk, and 2 executors per worker. // - For the G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of // memory, 64 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // - For the G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of // memory, 128 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // - For the G.025X worker type, each worker maps to 0.25 DPU (2 vCPU, 4 GB of // memory, 64 GB disk), and provides 1 executor per worker. We recommend this // worker type for low volume streaming jobs. This worker type is only available // for Glue version 3.0 streaming jobs. // - For the Z.2X worker type, each worker maps to 2 M-DPU (8vCPU, 64 GB of m // emory, 128 GB disk), and provides up to 8 Ray workers based on the autoscaler. WorkerType types.WorkerType noSmithyDocumentSerde } type CreateJobOutput struct { // The unique name that was provided for this job definition. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateJob{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateJob(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_opCreateJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateJob", } }
265
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Glue machine learning transform. This operation creates the // transform and all the necessary parameters to train it. Call this operation as // the first step in the process of using a machine learning transform (such as the // FindMatches transform) for deduplicating data. You can provide an optional // Description , in addition to the parameters that you want to use for your // algorithm. You must also specify certain parameters for the tasks that Glue runs // on your behalf as part of learning from your data and creating a high-quality // machine learning transform. These parameters include Role , and optionally, // AllocatedCapacity , Timeout , and MaxRetries . For more information, see Jobs (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html) // . func (c *Client) CreateMLTransform(ctx context.Context, params *CreateMLTransformInput, optFns ...func(*Options)) (*CreateMLTransformOutput, error) { if params == nil { params = &CreateMLTransformInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateMLTransform", params, optFns, c.addOperationCreateMLTransformMiddlewares) if err != nil { return nil, err } out := result.(*CreateMLTransformOutput) out.ResultMetadata = metadata return out, nil } type CreateMLTransformInput struct { // A list of Glue table definitions used by the transform. // // This member is required. InputRecordTables []types.GlueTable // The unique name that you give the transform when you create it. // // This member is required. Name *string // The algorithmic parameters that are specific to the transform type used. // Conditionally dependent on the transform type. // // This member is required. Parameters *types.TransformParameters // The name or Amazon Resource Name (ARN) of the IAM role with the required // permissions. The required permissions include both Glue service role permissions // to Glue resources, and Amazon S3 permissions required by the transform. // - This role needs Glue service role permissions to allow access to resources // in Glue. See Attach a Policy to IAM Users That Access Glue (https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html) // . // - This role needs permission to your Amazon Simple Storage Service (Amazon // S3) sources, targets, temporary directory, scripts, and any libraries used by // the task run for this transform. // // This member is required. Role *string // A description of the machine learning transform that is being defined. The // default is an empty string. Description *string // This value determines which version of Glue this machine learning transform is // compatible with. Glue 1.0 is recommended for most customers. If the value is not // set, the Glue compatibility defaults to Glue 0.9. For more information, see // Glue Versions (https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) // in the developer guide. GlueVersion *string // The number of Glue data processing units (DPUs) that are allocated to task runs // for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A // DPU is a relative measure of processing power that consists of 4 vCPUs of // compute capacity and 16 GB of memory. For more information, see the Glue // pricing page (https://aws.amazon.com/glue/pricing/) . MaxCapacity is a mutually // exclusive option with NumberOfWorkers and WorkerType . // - If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be // set. // - If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set. // - If WorkerType is set, then NumberOfWorkers is required (and vice versa). // - MaxCapacity and NumberOfWorkers must both be at least 1. // When the WorkerType field is set to a value other than Standard , the // MaxCapacity field is set automatically and becomes read-only. When the // WorkerType field is set to a value other than Standard , the MaxCapacity field // is set automatically and becomes read-only. MaxCapacity *float64 // The maximum number of times to retry a task for this transform after a task run // fails. MaxRetries *int32 // The number of workers of a defined workerType that are allocated when this task // runs. If WorkerType is set, then NumberOfWorkers is required (and vice versa). NumberOfWorkers *int32 // The tags to use with this machine learning transform. You may use tags to limit // access to the machine learning transform. For more information about tags in // Glue, see Amazon Web Services Tags in Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) // in the developer guide. Tags map[string]string // The timeout of the task run for this transform in minutes. This is the maximum // time that a task run for this transform can consume resources before it is // terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours). Timeout *int32 // The encryption-at-rest settings of the transform that apply to accessing user // data. Machine learning transforms can access user data encrypted in Amazon S3 // using KMS. TransformEncryption *types.TransformEncryption // The type of predefined worker that is allocated when this task runs. Accepts a // value of Standard, G.1X, or G.2X. // - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory // and a 50GB disk, and 2 executors per worker. // - For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a // 64GB disk, and 1 executor per worker. // - For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a // 128GB disk, and 1 executor per worker. // MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType . // - If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be // set. // - If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set. // - If WorkerType is set, then NumberOfWorkers is required (and vice versa). // - MaxCapacity and NumberOfWorkers must both be at least 1. WorkerType types.WorkerType noSmithyDocumentSerde } type CreateMLTransformOutput struct { // A unique identifier that is generated for the transform. TransformId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateMLTransformMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateMLTransform{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateMLTransform{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateMLTransformValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMLTransform(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_opCreateMLTransform(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateMLTransform", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new partition. func (c *Client) CreatePartition(ctx context.Context, params *CreatePartitionInput, optFns ...func(*Options)) (*CreatePartitionOutput, error) { if params == nil { params = &CreatePartitionInput{} } result, metadata, err := c.invokeOperation(ctx, "CreatePartition", params, optFns, c.addOperationCreatePartitionMiddlewares) if err != nil { return nil, err } out := result.(*CreatePartitionOutput) out.ResultMetadata = metadata return out, nil } type CreatePartitionInput struct { // The name of the metadata database in which the partition is to be created. // // This member is required. DatabaseName *string // A PartitionInput structure defining the partition to be created. // // This member is required. PartitionInput *types.PartitionInput // The name of the metadata table in which the partition is to be created. // // This member is required. TableName *string // The Amazon Web Services account ID of the catalog in which the partition is to // be created. CatalogId *string noSmithyDocumentSerde } type CreatePartitionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreatePartitionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePartition{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePartition{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreatePartitionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePartition(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_opCreatePartition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreatePartition", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a specified partition index in an existing table. func (c *Client) CreatePartitionIndex(ctx context.Context, params *CreatePartitionIndexInput, optFns ...func(*Options)) (*CreatePartitionIndexOutput, error) { if params == nil { params = &CreatePartitionIndexInput{} } result, metadata, err := c.invokeOperation(ctx, "CreatePartitionIndex", params, optFns, c.addOperationCreatePartitionIndexMiddlewares) if err != nil { return nil, err } out := result.(*CreatePartitionIndexOutput) out.ResultMetadata = metadata return out, nil } type CreatePartitionIndexInput struct { // Specifies the name of a database in which you want to create a partition index. // // This member is required. DatabaseName *string // Specifies a PartitionIndex structure to create a partition index in an existing // table. // // This member is required. PartitionIndex *types.PartitionIndex // Specifies the name of a table in which you want to create a partition index. // // This member is required. TableName *string // The catalog ID where the table resides. CatalogId *string noSmithyDocumentSerde } type CreatePartitionIndexOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreatePartitionIndexMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePartitionIndex{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePartitionIndex{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreatePartitionIndexValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePartitionIndex(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_opCreatePartitionIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreatePartitionIndex", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new registry which may be used to hold a collection of schemas. func (c *Client) CreateRegistry(ctx context.Context, params *CreateRegistryInput, optFns ...func(*Options)) (*CreateRegistryOutput, error) { if params == nil { params = &CreateRegistryInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRegistry", params, optFns, c.addOperationCreateRegistryMiddlewares) if err != nil { return nil, err } out := result.(*CreateRegistryOutput) out.ResultMetadata = metadata return out, nil } type CreateRegistryInput struct { // Name of the registry to be created of max length of 255, and may only contain // letters, numbers, hyphen, underscore, dollar sign, or hash mark. No whitespace. // // This member is required. RegistryName *string // A description of the registry. If description is not provided, there will not // be any default value for this. Description *string // Amazon Web Services tags that contain a key value pair and may be searched by // console, command line, or API. Tags map[string]string noSmithyDocumentSerde } type CreateRegistryOutput struct { // A description of the registry. Description *string // The Amazon Resource Name (ARN) of the newly created registry. RegistryArn *string // The name of the registry. RegistryName *string // The tags for the registry. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRegistryMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRegistry{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRegistry{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRegistryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRegistry(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_opCreateRegistry(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateRegistry", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new schema set and registers the schema definition. Returns an error // if the schema set already exists without actually registering the version. When // the schema set is created, a version checkpoint will be set to the first // version. Compatibility mode "DISABLED" restricts any additional schema versions // from being added after the first schema version. For all other compatibility // modes, validation of compatibility settings will be applied only from the second // version onwards when the RegisterSchemaVersion API is used. When this API is // called without a RegistryId , this will create an entry for a "default-registry" // in the registry database tables, if it is not already present. func (c *Client) CreateSchema(ctx context.Context, params *CreateSchemaInput, optFns ...func(*Options)) (*CreateSchemaOutput, error) { if params == nil { params = &CreateSchemaInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSchema", params, optFns, c.addOperationCreateSchemaMiddlewares) if err != nil { return nil, err } out := result.(*CreateSchemaOutput) out.ResultMetadata = metadata return out, nil } type CreateSchemaInput struct { // The data format of the schema definition. Currently AVRO , JSON and PROTOBUF // are supported. // // This member is required. DataFormat types.DataFormat // Name of the schema to be created of max length of 255, and may only contain // letters, numbers, hyphen, underscore, dollar sign, or hash mark. No whitespace. // // This member is required. SchemaName *string // The compatibility mode of the schema. The possible values are: // - NONE: No compatibility mode applies. You can use this choice in development // scenarios or if you do not know the compatibility mode that you want to apply to // schemas. Any new version added will be accepted without undergoing a // compatibility check. // - DISABLED: This compatibility choice prevents versioning for a particular // schema. You can use this choice to prevent future versioning of a schema. // - BACKWARD: This compatibility choice is recommended as it allows data // receivers to read both the current and one previous schema version. This means // that for instance, a new schema version cannot drop data fields or change the // type of these fields, so they can't be read by readers using the previous // version. // - BACKWARD_ALL: This compatibility choice allows data receivers to read both // the current and all previous schema versions. You can use this choice when you // need to delete fields or add optional fields, and check compatibility against // all previous schema versions. // - FORWARD: This compatibility choice allows data receivers to read both the // current and one next schema version, but not necessarily later versions. You can // use this choice when you need to add fields or delete optional fields, but only // check compatibility against the last schema version. // - FORWARD_ALL: This compatibility choice allows data receivers to read // written by producers of any new registered schema. You can use this choice when // you need to add fields or delete optional fields, and check compatibility // against all previous schema versions. // - FULL: This compatibility choice allows data receivers to read data written // by producers using the previous or next version of the schema, but not // necessarily earlier or later versions. You can use this choice when you need to // add or remove optional fields, but only check compatibility against the last // schema version. // - FULL_ALL: This compatibility choice allows data receivers to read data // written by producers using all previous schema versions. You can use this choice // when you need to add or remove optional fields, and check compatibility against // all previous schema versions. Compatibility types.Compatibility // An optional description of the schema. If description is not provided, there // will not be any automatic default value for this. Description *string // This is a wrapper shape to contain the registry identity fields. If this is not // provided, the default registry will be used. The ARN format for the same will // be: arn:aws:glue:us-east-2::registry/default-registry:random-5-letter-id . RegistryId *types.RegistryId // The schema definition using the DataFormat setting for SchemaName . SchemaDefinition *string // Amazon Web Services tags that contain a key value pair and may be searched by // console, command line, or API. If specified, follows the Amazon Web Services // tags-on-create pattern. Tags map[string]string noSmithyDocumentSerde } type CreateSchemaOutput struct { // The schema compatibility mode. Compatibility types.Compatibility // The data format of the schema definition. Currently AVRO , JSON and PROTOBUF // are supported. DataFormat types.DataFormat // A description of the schema if specified when created. Description *string // The latest version of the schema associated with the returned schema definition. LatestSchemaVersion int64 // The next version of the schema associated with the returned schema definition. NextSchemaVersion int64 // The Amazon Resource Name (ARN) of the registry. RegistryArn *string // The name of the registry. RegistryName *string // The Amazon Resource Name (ARN) of the schema. SchemaArn *string // The version number of the checkpoint (the last time the compatibility mode was // changed). SchemaCheckpoint int64 // The name of the schema. SchemaName *string // The status of the schema. SchemaStatus types.SchemaStatus // The unique identifier of the first schema version. SchemaVersionId *string // The status of the first schema version created. SchemaVersionStatus types.SchemaVersionStatus // The tags for the schema. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSchemaMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSchema{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSchema{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSchemaValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSchema(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_opCreateSchema(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateSchema", } }
233
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Transforms a directed acyclic graph (DAG) into code. func (c *Client) CreateScript(ctx context.Context, params *CreateScriptInput, optFns ...func(*Options)) (*CreateScriptOutput, error) { if params == nil { params = &CreateScriptInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateScript", params, optFns, c.addOperationCreateScriptMiddlewares) if err != nil { return nil, err } out := result.(*CreateScriptOutput) out.ResultMetadata = metadata return out, nil } type CreateScriptInput struct { // A list of the edges in the DAG. DagEdges []types.CodeGenEdge // A list of the nodes in the DAG. DagNodes []types.CodeGenNode // The programming language of the resulting code from the DAG. Language types.Language noSmithyDocumentSerde } type CreateScriptOutput struct { // The Python script generated from the DAG. PythonScript *string // The Scala code generated from the DAG. ScalaCode *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateScriptMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateScript{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateScript{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateScriptValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateScript(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_opCreateScript(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateScript", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Creates a new security configuration. A security configuration is a set of // security properties that can be used by Glue. You can use a security // configuration to encrypt data at rest. For information about using security // configurations in Glue, see Encrypting Data Written by Crawlers, Jobs, and // Development Endpoints (https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html) // . func (c *Client) CreateSecurityConfiguration(ctx context.Context, params *CreateSecurityConfigurationInput, optFns ...func(*Options)) (*CreateSecurityConfigurationOutput, error) { if params == nil { params = &CreateSecurityConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSecurityConfiguration", params, optFns, c.addOperationCreateSecurityConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreateSecurityConfigurationOutput) out.ResultMetadata = metadata return out, nil } type CreateSecurityConfigurationInput struct { // The encryption configuration for the new security configuration. // // This member is required. EncryptionConfiguration *types.EncryptionConfiguration // The name for the new security configuration. // // This member is required. Name *string noSmithyDocumentSerde } type CreateSecurityConfigurationOutput struct { // The time at which the new security configuration was created. CreatedTimestamp *time.Time // The name assigned to the new security configuration. Name *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSecurityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSecurityConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSecurityConfiguration{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSecurityConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSecurityConfiguration(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_opCreateSecurityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateSecurityConfiguration", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new session. func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) { if params == nil { params = &CreateSessionInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSession", params, optFns, c.addOperationCreateSessionMiddlewares) if err != nil { return nil, err } out := result.(*CreateSessionOutput) out.ResultMetadata = metadata return out, nil } // Request to create a new session. type CreateSessionInput struct { // The SessionCommand that runs the job. // // This member is required. Command *types.SessionCommand // The ID of the session request. // // This member is required. Id *string // The IAM Role ARN // // This member is required. Role *string // The number of connections to use for the session. Connections *types.ConnectionsList // A map array of key-value pairs. Max is 75 pairs. DefaultArguments map[string]string // The description of the session. Description *string // The Glue version determines the versions of Apache Spark and Python that Glue // supports. The GlueVersion must be greater than 2.0. GlueVersion *string // The number of minutes when idle before session times out. Default for Spark ETL // jobs is value of Timeout. Consult the documentation for other job types. IdleTimeout *int32 // The number of Glue data processing units (DPUs) that can be allocated when the // job runs. A DPU is a relative measure of processing power that consists of 4 // vCPUs of compute capacity and 16 GB memory. MaxCapacity *float64 // The number of workers of a defined WorkerType to use for the session. NumberOfWorkers *int32 // The origin of the request. RequestOrigin *string // The name of the SecurityConfiguration structure to be used with the session SecurityConfiguration *string // The map of key value pairs (tags) belonging to the session. Tags map[string]string // The number of minutes before session times out. Default for Spark ETL jobs is // 48 hours (2880 minutes), the maximum session lifetime for this job type. Consult // the documentation for other job types. Timeout *int32 // The type of predefined worker that is allocated to use for the session. Accepts // a value of Standard, G.1X, G.2X, or G.025X. // - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory // and a 50GB disk, and 2 executors per worker. // - For the G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of // memory, 64 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // - For the G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of // memory, 128 GB disk), and provides 1 executor per worker. We recommend this // worker type for memory-intensive jobs. // - For the G.025X worker type, each worker maps to 0.25 DPU (2 vCPU, 4 GB of // memory, 64 GB disk), and provides 1 executor per worker. We recommend this // worker type for low volume streaming jobs. This worker type is only available // for Glue version 3.0 streaming jobs. WorkerType types.WorkerType noSmithyDocumentSerde } type CreateSessionOutput struct { // Returns the session object in the response. Session *types.Session // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSession{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSession{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSessionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSession(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_opCreateSession(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateSession", } }
191
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package glue 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/glue/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new table definition in the Data Catalog. func (c *Client) CreateTable(ctx context.Context, params *CreateTableInput, optFns ...func(*Options)) (*CreateTableOutput, error) { if params == nil { params = &CreateTableInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTable", params, optFns, c.addOperationCreateTableMiddlewares) if err != nil { return nil, err } out := result.(*CreateTableOutput) out.ResultMetadata = metadata return out, nil } type CreateTableInput struct { // The catalog database in which to create the new table. For Hive compatibility, // this name is entirely lowercase. // // This member is required. DatabaseName *string // The TableInput object that defines the metadata table to create in the catalog. // // This member is required. TableInput *types.TableInput // The ID of the Data Catalog in which to create the Table . If none is supplied, // the Amazon Web Services account ID is used by default. CatalogId *string // A list of partition indexes, PartitionIndex structures, to create in the table. PartitionIndexes []types.PartitionIndex // The ID of the transaction. TransactionId *string noSmithyDocumentSerde } type CreateTableOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateTable{}, 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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTable(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_opCreateTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "glue", OperationName: "CreateTable", } }
137