Documentation ¶
Overview ¶
Package customizations provides customizations for the Amazon S3-Control API client.
This package provides support for following S3-Control customizations
BackfillInput Middleware: validates and backfills data from an ARN resource into a copy of operation input. ProcessOutpostID Middleware: applied on CreateBucket, ListRegionalBuckets operation, triggers a custom endpoint generation flow. ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type. UpdateEndpoint Middleware: resolves a custom endpoint as per s3-control config options.
Dualstack support ¶
By default dualstack support for s3-control client is disabled. By enabling `UseDualstack` option on s3-control client, you can enable dualstack endpoint support.
Endpoint customizations ¶
Customizations to lookup ARN, backfill input, process outpost id, process ARN needs to happen before request serialization. UpdateEndpoint middleware which mutates resources based on Options such as UseDualstack for modifying resolved endpoint are executed after request serialization.
Middleware layering: Initialize : HTTP Request -> ARN Lookup -> BackfillInput -> Input-Validation -> Serialize step Serialize : HTTP Request -> Process-OutpostID -> Process ARN -> operation serializer -> Update-Endpoint customization -> next middleware
Customization option:
UseARNRegion (Disabled by Default) UseDualstack (Disabled by Default)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateEndpoint ¶
func UpdateEndpoint(stack *middleware.Stack, options UpdateEndpointOptions) (err error)
UpdateEndpoint adds the middleware to the middleware stack based on the UpdateEndpointOptions.
Types ¶
type BackfillInput ¶ added in v0.30.0
type BackfillInput struct { // CopyInput creates a copy of input to be modified, this ensures the original input is not modified. CopyInput func(interface{}) (interface{}, error) // BackfillAccountID points to a function that validates the input for accountID. If absent, it populates the // accountID and returns a copy. If present, but different than passed in accountID value throws an error BackfillAccountID func(interface{}, string) error }
BackfillInput validates and backfill's values from ARN into request serializable input. This middleware must be executed after `ARNLookup` and before `inputValidationMiddleware`.
func (*BackfillInput) HandleInitialize ¶ added in v0.30.0
func (m *BackfillInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, )
HandleInitialize handles the middleware behavior in an Initialize step.
func (*BackfillInput) ID ¶ added in v0.30.0
func (m *BackfillInput) ID() string
ID representing the middleware
type EndpointResolver ¶ added in v0.30.0
type EndpointResolver interface {
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}
EndpointResolver interface for resolving service endpoints.
type EndpointResolverOptions ¶ added in v0.30.0
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type UpdateEndpointOptions ¶
type UpdateEndpointOptions struct { // Accessor are parameter accessors used by the middleware Accessor UpdateEndpointParameterAccessor // UseARNRegion indicates if region parsed from an ARN should be used. UseARNRegion bool // EndpointResolver used to resolve endpoints. This may be a custom endpoint resolver EndpointResolver EndpointResolver // EndpointResolverOptions used by endpoint resolver EndpointResolverOptions EndpointResolverOptions }
UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup.
type UpdateEndpointParameterAccessor ¶ added in v0.30.0
type UpdateEndpointParameterAccessor struct { // GetARNInput points to a function that processes an input and returns ARN as string ptr, // and bool indicating if ARN is supported or set. GetARNInput func(interface{}) (*string, bool) // GetOutpostIDInput points to a function that processes an input and returns a outpostID as string ptr, // and bool indicating if outpostID is supported or set. GetOutpostIDInput func(interface{}) (*string, bool) // CopyInput creates a copy of input to be modified, this ensures the original input is not modified. CopyInput func(interface{}) (interface{}, error) // BackfillAccountID points to a function that validates the input for accountID. If absent, it populates the // accountID. If present, but different than passed in accountID value throws an error BackfillAccountID func(interface{}, string) error // UpdateARNField points to a function that takes in a copy of input, updates the ARN field with // the provided value and returns any error UpdateARNField func(interface{}, string) error }
UpdateEndpointParameterAccessor represents accessor functions used by the middleware