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 redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of tags. You can return tags from a specific resource by
// specifying an ARN, or you can return all tags for a given type of resource, such
// as clusters, snapshots, and so on. The following are limitations for
// DescribeTags :
// - You cannot specify an ARN and a resource-type value together in the same
// request.
// - You cannot use the MaxRecords and Marker parameters together with the ARN
// parameter.
// - The MaxRecords parameter can be a range from 10 to 50 results to return in a
// request.
//
// If you specify both tag keys and tag values in the same request, Amazon
// Redshift returns all resources that match any combination of the specified keys
// and values. For example, if you have owner and environment for tag keys, and
// admin and test for tag values, all resources that have any combination of those
// values are returned. If both tag keys and values are omitted from the request,
// resources are returned regardless of whether they have tag keys or values
// associated with them.
func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) {
if params == nil {
params = &DescribeTagsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeTagsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeTagsInput struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned marker value in the marker
// parameter and retrying the command. If the marker field is empty, all response
// records have been retrieved for the request.
Marker *string
// The maximum number or response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker value.
MaxRecords *int32
// The Amazon Resource Name (ARN) for which you want to describe the tag or tags.
// For example, arn:aws:redshift:us-east-2:123456789:cluster:t1 .
ResourceName *string
// The type of resource with which you want to view tags. Valid resource types
// are:
// - Cluster
// - CIDR/IP
// - EC2 security group
// - Snapshot
// - Cluster security group
// - Subnet group
// - HSM connection
// - HSM certificate
// - Parameter group
// - Snapshot copy grant
// For more information about Amazon Redshift resource types and constructing
// ARNs, go to Specifying Policy Elements: Actions, Effects, Resources, and
// Principals (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions)
// in the Amazon Redshift Cluster Management Guide.
ResourceType *string
// A tag key or keys for which you want to return all matching resources that are
// associated with the specified key or keys. For example, suppose that you have
// resources tagged with keys called owner and environment . If you specify both of
// these tag keys in the request, Amazon Redshift returns a response with all
// resources that have either or both of these tag keys associated with them.
TagKeys []string
// A tag value or values for which you want to return all matching resources that
// are associated with the specified value or values. For example, suppose that you
// have resources tagged with values called admin and test . If you specify both of
// these tag values in the request, Amazon Redshift returns a response with all
// resources that have either or both of these tag values associated with them.
TagValues []string
noSmithyDocumentSerde
}
type DescribeTagsOutput struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned marker value in the Marker
// parameter and retrying the command. If the Marker field is empty, all response
// records have been retrieved for the request.
Marker *string
// A list of tags with their associated resources.
TaggedResources []types.TaggedResource
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeTags{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeTags{}, 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_opDescribeTags(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
}
// DescribeTagsAPIClient is a client that implements the DescribeTags operation.
type DescribeTagsAPIClient interface {
DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error)
}
var _ DescribeTagsAPIClient = (*Client)(nil)
// DescribeTagsPaginatorOptions is the paginator options for DescribeTags
type DescribeTagsPaginatorOptions struct {
// The maximum number or response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker 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
}
// DescribeTagsPaginator is a paginator for DescribeTags
type DescribeTagsPaginator struct {
options DescribeTagsPaginatorOptions
client DescribeTagsAPIClient
params *DescribeTagsInput
nextToken *string
firstPage bool
}
// NewDescribeTagsPaginator returns a new DescribeTagsPaginator
func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTagsInput, optFns ...func(*DescribeTagsPaginatorOptions)) *DescribeTagsPaginator {
if params == nil {
params = &DescribeTagsInput{}
}
options := DescribeTagsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeTagsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeTagsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeTags page.
func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTagsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxRecords = limit
result, err := p.client.DescribeTags(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.Marker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "DescribeTags",
}
}
| 283 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Shows usage limits on a cluster. Results are filtered based on the combination
// of input usage limit identifier, cluster identifier, and feature type
// parameters:
// - If usage limit identifier, cluster identifier, and feature type are not
// provided, then all usage limit objects for the current account in the current
// region are returned.
// - If usage limit identifier is provided, then the corresponding usage limit
// object is returned.
// - If cluster identifier is provided, then all usage limit objects for the
// specified cluster are returned.
// - If cluster identifier and feature type are provided, then all usage limit
// objects for the combination of cluster and feature are returned.
func (c *Client) DescribeUsageLimits(ctx context.Context, params *DescribeUsageLimitsInput, optFns ...func(*Options)) (*DescribeUsageLimitsOutput, error) {
if params == nil {
params = &DescribeUsageLimitsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeUsageLimits", params, optFns, c.addOperationDescribeUsageLimitsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeUsageLimitsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeUsageLimitsInput struct {
// The identifier of the cluster for which you want to describe usage limits.
ClusterIdentifier *string
// The feature type for which you want to describe usage limits.
FeatureType types.UsageLimitFeatureType
// An optional parameter that specifies the starting point to return a set of
// response records. When the results of a DescribeUsageLimits request exceed the
// value specified in MaxRecords , Amazon Web Services returns a value in the
// Marker field of the response. You can retrieve the next set of response records
// by providing the returned marker value in the Marker parameter and retrying the
// request.
Marker *string
// The maximum number of response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker value. Default: 100
// Constraints: minimum 20, maximum 100.
MaxRecords *int32
// A tag key or keys for which you want to return all matching usage limit objects
// that are associated with the specified key or keys. For example, suppose that
// you have parameter groups that are tagged with keys called owner and environment
// . If you specify both of these tag keys in the request, Amazon Redshift returns
// a response with the usage limit objects have either or both of these tag keys
// associated with them.
TagKeys []string
// A tag value or values for which you want to return all matching usage limit
// objects that are associated with the specified tag value or values. For example,
// suppose that you have parameter groups that are tagged with values called admin
// and test . If you specify both of these tag values in the request, Amazon
// Redshift returns a response with the usage limit objects that have either or
// both of these tag values associated with them.
TagValues []string
// The identifier of the usage limit to describe.
UsageLimitId *string
noSmithyDocumentSerde
}
type DescribeUsageLimitsOutput struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned marker value in the Marker
// parameter and retrying the command. If the Marker field is empty, all response
// records have been retrieved for the request.
Marker *string
// Contains the output from the DescribeUsageLimits action.
UsageLimits []types.UsageLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeUsageLimitsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeUsageLimits{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeUsageLimits{}, 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_opDescribeUsageLimits(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
}
// DescribeUsageLimitsAPIClient is a client that implements the
// DescribeUsageLimits operation.
type DescribeUsageLimitsAPIClient interface {
DescribeUsageLimits(context.Context, *DescribeUsageLimitsInput, ...func(*Options)) (*DescribeUsageLimitsOutput, error)
}
var _ DescribeUsageLimitsAPIClient = (*Client)(nil)
// DescribeUsageLimitsPaginatorOptions is the paginator options for
// DescribeUsageLimits
type DescribeUsageLimitsPaginatorOptions struct {
// The maximum number of response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker value. Default: 100
// Constraints: minimum 20, maximum 100.
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
}
// DescribeUsageLimitsPaginator is a paginator for DescribeUsageLimits
type DescribeUsageLimitsPaginator struct {
options DescribeUsageLimitsPaginatorOptions
client DescribeUsageLimitsAPIClient
params *DescribeUsageLimitsInput
nextToken *string
firstPage bool
}
// NewDescribeUsageLimitsPaginator returns a new DescribeUsageLimitsPaginator
func NewDescribeUsageLimitsPaginator(client DescribeUsageLimitsAPIClient, params *DescribeUsageLimitsInput, optFns ...func(*DescribeUsageLimitsPaginatorOptions)) *DescribeUsageLimitsPaginator {
if params == nil {
params = &DescribeUsageLimitsInput{}
}
options := DescribeUsageLimitsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeUsageLimitsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeUsageLimitsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeUsageLimits page.
func (p *DescribeUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeUsageLimitsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxRecords = limit
result, err := p.client.DescribeUsageLimits(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.Marker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opDescribeUsageLimits(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "DescribeUsageLimits",
}
}
| 271 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Stops logging information, such as queries and connection attempts, for the
// specified Amazon Redshift cluster.
func (c *Client) DisableLogging(ctx context.Context, params *DisableLoggingInput, optFns ...func(*Options)) (*DisableLoggingOutput, error) {
if params == nil {
params = &DisableLoggingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisableLogging", params, optFns, c.addOperationDisableLoggingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisableLoggingOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisableLoggingInput struct {
// The identifier of the cluster on which logging is to be stopped. Example:
// examplecluster
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
// Describes the status of logging for a cluster.
type DisableLoggingOutput struct {
// The name of the S3 bucket where the log files are stored.
BucketName *string
// The message indicating that logs failed to be delivered.
LastFailureMessage *string
// The last time when logs failed to be delivered.
LastFailureTime *time.Time
// The last time that logs were delivered.
LastSuccessfulDeliveryTime *time.Time
// The log destination type. An enum with possible values of s3 and cloudwatch .
LogDestinationType types.LogDestinationType
// The collection of exported log types. Possible values are connectionlog ,
// useractivitylog , and userlog .
LogExports []string
// true if logging is on, false if logging is off.
LoggingEnabled bool
// The prefix applied to the log file names.
S3KeyPrefix *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisableLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDisableLogging{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisableLogging{}, 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 = addOpDisableLoggingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableLogging(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_opDisableLogging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "DisableLogging",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Disables the automatic copying of snapshots from one region to another region
// for a specified cluster. If your cluster and its snapshots are encrypted using
// an encrypted symmetric key from Key Management Service, use
// DeleteSnapshotCopyGrant to delete the grant that grants Amazon Redshift
// permission to the key in the destination region.
func (c *Client) DisableSnapshotCopy(ctx context.Context, params *DisableSnapshotCopyInput, optFns ...func(*Options)) (*DisableSnapshotCopyOutput, error) {
if params == nil {
params = &DisableSnapshotCopyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisableSnapshotCopy", params, optFns, c.addOperationDisableSnapshotCopyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisableSnapshotCopyOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisableSnapshotCopyInput struct {
// The unique identifier of the source cluster that you want to disable copying of
// snapshots to a destination region. Constraints: Must be the valid name of an
// existing cluster that has cross-region snapshot copy enabled.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
type DisableSnapshotCopyOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisableSnapshotCopyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDisableSnapshotCopy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisableSnapshotCopy{}, 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 = addOpDisableSnapshotCopyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSnapshotCopy(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_opDisableSnapshotCopy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "DisableSnapshotCopy",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// From a datashare consumer account, remove association for the specified
// datashare.
func (c *Client) DisassociateDataShareConsumer(ctx context.Context, params *DisassociateDataShareConsumerInput, optFns ...func(*Options)) (*DisassociateDataShareConsumerOutput, error) {
if params == nil {
params = &DisassociateDataShareConsumerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisassociateDataShareConsumer", params, optFns, c.addOperationDisassociateDataShareConsumerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisassociateDataShareConsumerOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisassociateDataShareConsumerInput struct {
// The Amazon Resource Name (ARN) of the datashare to remove association for.
//
// This member is required.
DataShareArn *string
// The Amazon Resource Name (ARN) of the consumer that association for the
// datashare is removed from.
ConsumerArn *string
// From a datashare consumer account, removes association of a datashare from all
// the existing and future namespaces in the specified Amazon Web Services Region.
ConsumerRegion *string
// A value that specifies whether association for the datashare is removed from
// the entire account.
DisassociateEntireAccount *bool
noSmithyDocumentSerde
}
type DisassociateDataShareConsumerOutput struct {
// A value that specifies whether the datashare can be shared to a publicly
// accessible cluster.
AllowPubliclyAccessibleConsumers bool
// An Amazon Resource Name (ARN) that references the datashare that is owned by a
// specific namespace of the producer cluster. A datashare ARN is in the
// arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name}
// format.
DataShareArn *string
// A value that specifies when the datashare has an association between producer
// and data consumers.
DataShareAssociations []types.DataShareAssociation
// The identifier of a datashare to show its managing entity.
ManagedBy *string
// The Amazon Resource Name (ARN) of the producer.
ProducerArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisassociateDataShareConsumerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDisassociateDataShareConsumer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisassociateDataShareConsumer{}, 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 = addOpDisassociateDataShareConsumerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDataShareConsumer(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_opDisassociateDataShareConsumer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "DisassociateDataShareConsumer",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Starts logging information, such as queries and connection attempts, for the
// specified Amazon Redshift cluster.
func (c *Client) EnableLogging(ctx context.Context, params *EnableLoggingInput, optFns ...func(*Options)) (*EnableLoggingOutput, error) {
if params == nil {
params = &EnableLoggingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "EnableLogging", params, optFns, c.addOperationEnableLoggingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*EnableLoggingOutput)
out.ResultMetadata = metadata
return out, nil
}
type EnableLoggingInput struct {
// The identifier of the cluster on which logging is to be started. Example:
// examplecluster
//
// This member is required.
ClusterIdentifier *string
// The name of an existing S3 bucket where the log files are to be stored.
// Constraints:
// - Must be in the same region as the cluster
// - The cluster must have read bucket and put object permissions
BucketName *string
// The log destination type. An enum with possible values of s3 and cloudwatch .
LogDestinationType types.LogDestinationType
// The collection of exported log types. Possible values are connectionlog ,
// useractivitylog , and userlog .
LogExports []string
// The prefix applied to the log file names. Constraints:
// - Cannot exceed 512 characters
// - Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash
// (\), or control characters. The hexadecimal codes for invalid characters are:
// - x00 to x20
// - x22
// - x27
// - x5c
// - x7f or larger
S3KeyPrefix *string
noSmithyDocumentSerde
}
// Describes the status of logging for a cluster.
type EnableLoggingOutput struct {
// The name of the S3 bucket where the log files are stored.
BucketName *string
// The message indicating that logs failed to be delivered.
LastFailureMessage *string
// The last time when logs failed to be delivered.
LastFailureTime *time.Time
// The last time that logs were delivered.
LastSuccessfulDeliveryTime *time.Time
// The log destination type. An enum with possible values of s3 and cloudwatch .
LogDestinationType types.LogDestinationType
// The collection of exported log types. Possible values are connectionlog ,
// useractivitylog , and userlog .
LogExports []string
// true if logging is on, false if logging is off.
LoggingEnabled bool
// The prefix applied to the log file names.
S3KeyPrefix *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationEnableLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableLogging{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableLogging{}, 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 = addOpEnableLoggingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableLogging(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_opEnableLogging(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "EnableLogging",
}
}
| 175 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables the automatic copy of snapshots from one region to another region for a
// specified cluster.
func (c *Client) EnableSnapshotCopy(ctx context.Context, params *EnableSnapshotCopyInput, optFns ...func(*Options)) (*EnableSnapshotCopyOutput, error) {
if params == nil {
params = &EnableSnapshotCopyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "EnableSnapshotCopy", params, optFns, c.addOperationEnableSnapshotCopyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*EnableSnapshotCopyOutput)
out.ResultMetadata = metadata
return out, nil
}
type EnableSnapshotCopyInput struct {
// The unique identifier of the source cluster to copy snapshots from.
// Constraints: Must be the valid name of an existing cluster that does not already
// have cross-region snapshot copy enabled.
//
// This member is required.
ClusterIdentifier *string
// The destination Amazon Web Services Region that you want to copy snapshots to.
// Constraints: Must be the name of a valid Amazon Web Services Region. For more
// information, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region)
// in the Amazon Web Services General Reference.
//
// This member is required.
DestinationRegion *string
// The number of days to retain newly copied snapshots in the destination Amazon
// Web Services Region after they are copied from the source Amazon Web Services
// Region. If the value is -1, the manual snapshot is retained indefinitely. The
// value must be either -1 or an integer between 1 and 3,653.
ManualSnapshotRetentionPeriod *int32
// The number of days to retain automated snapshots in the destination region
// after they are copied from the source region. Default: 7. Constraints: Must be
// at least 1 and no more than 35.
RetentionPeriod *int32
// The name of the snapshot copy grant to use when snapshots of an Amazon Web
// Services KMS-encrypted cluster are copied to the destination region.
SnapshotCopyGrantName *string
noSmithyDocumentSerde
}
type EnableSnapshotCopyOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationEnableSnapshotCopyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableSnapshotCopy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableSnapshotCopy{}, 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 = addOpEnableSnapshotCopyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSnapshotCopy(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_opEnableSnapshotCopy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "EnableSnapshotCopy",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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"
"time"
)
// Returns a database user name and temporary password with temporary
// authorization to log on to an Amazon Redshift database. The action returns the
// database user name prefixed with IAM: if AutoCreate is False or IAMA: if
// AutoCreate is True . You can optionally specify one or more database user groups
// that the user will join at log on. By default, the temporary credentials expire
// in 900 seconds. You can optionally specify a duration between 900 seconds (15
// minutes) and 3600 seconds (60 minutes). For more information, see Using IAM
// Authentication to Generate Database User Credentials (https://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html)
// in the Amazon Redshift Cluster Management Guide. The Identity and Access
// Management (IAM) user or role that runs GetClusterCredentials must have an IAM
// policy attached that allows access to all necessary actions and resources. For
// more information about permissions, see Resource Policies for
// GetClusterCredentials (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources)
// in the Amazon Redshift Cluster Management Guide. If the DbGroups parameter is
// specified, the IAM policy must allow the redshift:JoinGroup action with access
// to the listed dbgroups . In addition, if the AutoCreate parameter is set to True
// , then the policy must include the redshift:CreateClusterUser permission. If
// the DbName parameter is specified, the IAM policy must allow access to the
// resource dbname for the specified database name.
func (c *Client) GetClusterCredentials(ctx context.Context, params *GetClusterCredentialsInput, optFns ...func(*Options)) (*GetClusterCredentialsOutput, error) {
if params == nil {
params = &GetClusterCredentialsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetClusterCredentials", params, optFns, c.addOperationGetClusterCredentialsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetClusterCredentialsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The request parameters to get cluster credentials.
type GetClusterCredentialsInput struct {
// The name of a database user. If a user name matching DbUser exists in the
// database, the temporary user credentials have the same permissions as the
// existing user. If DbUser doesn't exist in the database and Autocreate is True ,
// a new user is created using the value for DbUser with PUBLIC permissions. If a
// database user matching the value for DbUser doesn't exist and Autocreate is
// False , then the command succeeds but the connection attempt will fail because
// the user doesn't exist in the database. For more information, see CREATE USER (https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html)
// in the Amazon Redshift Database Developer Guide. Constraints:
// - Must be 1 to 64 alphanumeric characters or hyphens. The user name can't be
// PUBLIC .
// - Must contain uppercase or lowercase letters, numbers, underscore, plus
// sign, period (dot), at symbol (@), or hyphen.
// - First character must be a letter.
// - Must not contain a colon ( : ) or slash ( / ).
// - Cannot be a reserved word. A list of reserved words can be found in
// Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html)
// in the Amazon Redshift Database Developer Guide.
//
// This member is required.
DbUser *string
// Create a database user with the name specified for the user named in DbUser if
// one does not exist.
AutoCreate *bool
// The unique identifier of the cluster that contains the database for which you
// are requesting credentials. This parameter is case sensitive.
ClusterIdentifier *string
// The custom domain name for the cluster credentials.
CustomDomainName *string
// A list of the names of existing database groups that the user named in DbUser
// will join for the current session, in addition to any group memberships for an
// existing user. If not specified, a new user is added only to PUBLIC. Database
// group name constraints
// - Must be 1 to 64 alphanumeric characters or hyphens
// - Must contain only lowercase letters, numbers, underscore, plus sign, period
// (dot), at symbol (@), or hyphen.
// - First character must be a letter.
// - Must not contain a colon ( : ) or slash ( / ).
// - Cannot be a reserved word. A list of reserved words can be found in
// Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html)
// in the Amazon Redshift Database Developer Guide.
DbGroups []string
// The name of a database that DbUser is authorized to log on to. If DbName is not
// specified, DbUser can log on to any existing database. Constraints:
// - Must be 1 to 64 alphanumeric characters or hyphens
// - Must contain uppercase or lowercase letters, numbers, underscore, plus
// sign, period (dot), at symbol (@), or hyphen.
// - First character must be a letter.
// - Must not contain a colon ( : ) or slash ( / ).
// - Cannot be a reserved word. A list of reserved words can be found in
// Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html)
// in the Amazon Redshift Database Developer Guide.
DbName *string
// The number of seconds until the returned temporary password expires.
// Constraint: minimum 900, maximum 3600. Default: 900
DurationSeconds *int32
noSmithyDocumentSerde
}
// Temporary credentials with authorization to log on to an Amazon Redshift
// database.
type GetClusterCredentialsOutput struct {
// A temporary password that authorizes the user name returned by DbUser to log on
// to the database DbName .
DbPassword *string
// A database user name that is authorized to log on to the database DbName using
// the password DbPassword . If the specified DbUser exists in the database, the
// new user name has the same database permissions as the the user named in DbUser.
// By default, the user is added to PUBLIC. If the DbGroups parameter is specifed,
// DbUser is added to the listed groups for any sessions created using these
// credentials.
DbUser *string
// The date and time the password in DbPassword expires.
Expiration *time.Time
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetClusterCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetClusterCredentials{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetClusterCredentials{}, 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 = addOpGetClusterCredentialsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClusterCredentials(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_opGetClusterCredentials(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "GetClusterCredentials",
}
}
| 215 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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"
"time"
)
// Returns a database user name and temporary password with temporary
// authorization to log in to an Amazon Redshift database. The database user is
// mapped 1:1 to the source Identity and Access Management (IAM) identity. For more
// information about IAM identities, see IAM Identities (users, user groups, and
// roles) (https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html) in the Amazon
// Web Services Identity and Access Management User Guide. The Identity and Access
// Management (IAM) identity that runs this operation must have an IAM policy
// attached that allows access to all necessary actions and resources. For more
// information about permissions, see Using identity-based policies (IAM policies) (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) GetClusterCredentialsWithIAM(ctx context.Context, params *GetClusterCredentialsWithIAMInput, optFns ...func(*Options)) (*GetClusterCredentialsWithIAMOutput, error) {
if params == nil {
params = &GetClusterCredentialsWithIAMInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetClusterCredentialsWithIAM", params, optFns, c.addOperationGetClusterCredentialsWithIAMMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetClusterCredentialsWithIAMOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetClusterCredentialsWithIAMInput struct {
// The unique identifier of the cluster that contains the database for which you
// are requesting credentials.
ClusterIdentifier *string
// The custom domain name for the IAM message cluster credentials.
CustomDomainName *string
// The name of the database for which you are requesting credentials. If the
// database name is specified, the IAM policy must allow access to the resource
// dbname for the specified database name. If the database name is not specified,
// access to all databases is allowed.
DbName *string
// The number of seconds until the returned temporary password expires. Range:
// 900-3600. Default: 900.
DurationSeconds *int32
noSmithyDocumentSerde
}
type GetClusterCredentialsWithIAMOutput struct {
// A temporary password that you provide when you connect to a database.
DbPassword *string
// A database user name that you provide when you connect to a database. The
// database user is mapped 1:1 to the source IAM identity.
DbUser *string
// The time (UTC) when the temporary password expires. After this timestamp, a log
// in with the temporary password fails.
Expiration *time.Time
// Reserved for future use.
NextRefreshTime *time.Time
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetClusterCredentialsWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetClusterCredentialsWithIAM{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetClusterCredentialsWithIAM{}, 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_opGetClusterCredentialsWithIAM(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_opGetClusterCredentialsWithIAM(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "GetClusterCredentialsWithIAM",
}
}
| 154 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the configuration options for the reserved-node exchange. These options
// include information about the source reserved node and target reserved node
// offering. Details include the node type, the price, the node count, and the
// offering type.
func (c *Client) GetReservedNodeExchangeConfigurationOptions(ctx context.Context, params *GetReservedNodeExchangeConfigurationOptionsInput, optFns ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) {
if params == nil {
params = &GetReservedNodeExchangeConfigurationOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetReservedNodeExchangeConfigurationOptions", params, optFns, c.addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetReservedNodeExchangeConfigurationOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetReservedNodeExchangeConfigurationOptionsInput struct {
// The action type of the reserved-node configuration. The action type can be an
// exchange initiated from either a snapshot or a resize.
//
// This member is required.
ActionType types.ReservedNodeExchangeActionType
// The identifier for the cluster that is the source for a reserved-node exchange.
ClusterIdentifier *string
// An optional pagination token provided by a previous
// GetReservedNodeExchangeConfigurationOptions request. If this parameter is
// specified, the response includes only records beyond the marker, up to the value
// specified by the MaxRecords parameter. You can retrieve the next set of
// response records by providing the returned marker value in the Marker parameter
// and retrying the request.
Marker *string
// The maximum number of response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a Marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker value.
MaxRecords *int32
// The identifier for the snapshot that is the source for the reserved-node
// exchange.
SnapshotIdentifier *string
noSmithyDocumentSerde
}
type GetReservedNodeExchangeConfigurationOptionsOutput struct {
// A pagination token provided by a previous
// GetReservedNodeExchangeConfigurationOptions request.
Marker *string
// the configuration options for the reserved-node exchange. These options include
// information about the source reserved node and target reserved node. Details
// include the node type, the price, the node count, and the offering type.
ReservedNodeConfigurationOptionList []types.ReservedNodeConfigurationOption
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions{}, 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 = addOpGetReservedNodeExchangeConfigurationOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReservedNodeExchangeConfigurationOptions(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
}
// GetReservedNodeExchangeConfigurationOptionsAPIClient is a client that
// implements the GetReservedNodeExchangeConfigurationOptions operation.
type GetReservedNodeExchangeConfigurationOptionsAPIClient interface {
GetReservedNodeExchangeConfigurationOptions(context.Context, *GetReservedNodeExchangeConfigurationOptionsInput, ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error)
}
var _ GetReservedNodeExchangeConfigurationOptionsAPIClient = (*Client)(nil)
// GetReservedNodeExchangeConfigurationOptionsPaginatorOptions is the paginator
// options for GetReservedNodeExchangeConfigurationOptions
type GetReservedNodeExchangeConfigurationOptionsPaginatorOptions struct {
// The maximum number of response records to return in each call. If the number of
// remaining response records exceeds the specified MaxRecords value, a value is
// returned in a Marker field of the response. You can retrieve the next set of
// records by retrying the command with the returned marker 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
}
// GetReservedNodeExchangeConfigurationOptionsPaginator is a paginator for
// GetReservedNodeExchangeConfigurationOptions
type GetReservedNodeExchangeConfigurationOptionsPaginator struct {
options GetReservedNodeExchangeConfigurationOptionsPaginatorOptions
client GetReservedNodeExchangeConfigurationOptionsAPIClient
params *GetReservedNodeExchangeConfigurationOptionsInput
nextToken *string
firstPage bool
}
// NewGetReservedNodeExchangeConfigurationOptionsPaginator returns a new
// GetReservedNodeExchangeConfigurationOptionsPaginator
func NewGetReservedNodeExchangeConfigurationOptionsPaginator(client GetReservedNodeExchangeConfigurationOptionsAPIClient, params *GetReservedNodeExchangeConfigurationOptionsInput, optFns ...func(*GetReservedNodeExchangeConfigurationOptionsPaginatorOptions)) *GetReservedNodeExchangeConfigurationOptionsPaginator {
if params == nil {
params = &GetReservedNodeExchangeConfigurationOptionsInput{}
}
options := GetReservedNodeExchangeConfigurationOptionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &GetReservedNodeExchangeConfigurationOptionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next GetReservedNodeExchangeConfigurationOptions page.
func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxRecords = limit
result, err := p.client.GetReservedNodeExchangeConfigurationOptions(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.Marker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opGetReservedNodeExchangeConfigurationOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "GetReservedNodeExchangeConfigurationOptions",
}
}
| 253 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns an array of DC2 ReservedNodeOfferings that matches the payment type,
// term, and usage price of the given DC1 reserved node.
func (c *Client) GetReservedNodeExchangeOfferings(ctx context.Context, params *GetReservedNodeExchangeOfferingsInput, optFns ...func(*Options)) (*GetReservedNodeExchangeOfferingsOutput, error) {
if params == nil {
params = &GetReservedNodeExchangeOfferingsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetReservedNodeExchangeOfferings", params, optFns, c.addOperationGetReservedNodeExchangeOfferingsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetReservedNodeExchangeOfferingsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetReservedNodeExchangeOfferingsInput struct {
// A string representing the node identifier for the DC1 Reserved Node to be
// exchanged.
//
// This member is required.
ReservedNodeId *string
// A value that indicates the starting point for the next set of
// ReservedNodeOfferings.
Marker *string
// An integer setting the maximum number of ReservedNodeOfferings to retrieve.
MaxRecords *int32
noSmithyDocumentSerde
}
type GetReservedNodeExchangeOfferingsOutput struct {
// An optional parameter that specifies the starting point for returning a set of
// response records. When the results of a GetReservedNodeExchangeOfferings
// request exceed the value specified in MaxRecords, Amazon Redshift returns a
// value in the marker field of the response. You can retrieve the next set of
// response records by providing the returned marker value in the marker parameter
// and retrying the request.
Marker *string
// Returns an array of ReservedNodeOffering objects.
ReservedNodeOfferings []types.ReservedNodeOffering
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetReservedNodeExchangeOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetReservedNodeExchangeOfferings{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings{}, 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 = addOpGetReservedNodeExchangeOfferingsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReservedNodeExchangeOfferings(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
}
// GetReservedNodeExchangeOfferingsAPIClient is a client that implements the
// GetReservedNodeExchangeOfferings operation.
type GetReservedNodeExchangeOfferingsAPIClient interface {
GetReservedNodeExchangeOfferings(context.Context, *GetReservedNodeExchangeOfferingsInput, ...func(*Options)) (*GetReservedNodeExchangeOfferingsOutput, error)
}
var _ GetReservedNodeExchangeOfferingsAPIClient = (*Client)(nil)
// GetReservedNodeExchangeOfferingsPaginatorOptions is the paginator options for
// GetReservedNodeExchangeOfferings
type GetReservedNodeExchangeOfferingsPaginatorOptions struct {
// An integer setting the maximum number of ReservedNodeOfferings to retrieve.
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
}
// GetReservedNodeExchangeOfferingsPaginator is a paginator for
// GetReservedNodeExchangeOfferings
type GetReservedNodeExchangeOfferingsPaginator struct {
options GetReservedNodeExchangeOfferingsPaginatorOptions
client GetReservedNodeExchangeOfferingsAPIClient
params *GetReservedNodeExchangeOfferingsInput
nextToken *string
firstPage bool
}
// NewGetReservedNodeExchangeOfferingsPaginator returns a new
// GetReservedNodeExchangeOfferingsPaginator
func NewGetReservedNodeExchangeOfferingsPaginator(client GetReservedNodeExchangeOfferingsAPIClient, params *GetReservedNodeExchangeOfferingsInput, optFns ...func(*GetReservedNodeExchangeOfferingsPaginatorOptions)) *GetReservedNodeExchangeOfferingsPaginator {
if params == nil {
params = &GetReservedNodeExchangeOfferingsInput{}
}
options := GetReservedNodeExchangeOfferingsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &GetReservedNodeExchangeOfferingsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *GetReservedNodeExchangeOfferingsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next GetReservedNodeExchangeOfferings page.
func (p *GetReservedNodeExchangeOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetReservedNodeExchangeOfferingsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxRecords = limit
result, err := p.client.GetReservedNodeExchangeOfferings(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.Marker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opGetReservedNodeExchangeOfferings(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "GetReservedNodeExchangeOfferings",
}
}
| 236 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation is retired. Calling this operation does not change AQUA
// configuration. Amazon Redshift automatically determines whether to use AQUA
// (Advanced Query Accelerator).
func (c *Client) ModifyAquaConfiguration(ctx context.Context, params *ModifyAquaConfigurationInput, optFns ...func(*Options)) (*ModifyAquaConfigurationOutput, error) {
if params == nil {
params = &ModifyAquaConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyAquaConfiguration", params, optFns, c.addOperationModifyAquaConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyAquaConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyAquaConfigurationInput struct {
// The identifier of the cluster to be modified.
//
// This member is required.
ClusterIdentifier *string
// This parameter is retired. Amazon Redshift automatically determines whether to
// use AQUA (Advanced Query Accelerator).
AquaConfigurationStatus types.AquaConfigurationStatus
noSmithyDocumentSerde
}
type ModifyAquaConfigurationOutput struct {
// This parameter is retired. Amazon Redshift automatically determines whether to
// use AQUA (Advanced Query Accelerator).
AquaConfiguration *types.AquaConfiguration
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyAquaConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyAquaConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyAquaConfiguration{}, 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 = addOpModifyAquaConfigurationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAquaConfiguration(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_opModifyAquaConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyAquaConfiguration",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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"
)
// Modifies an authentication profile.
func (c *Client) ModifyAuthenticationProfile(ctx context.Context, params *ModifyAuthenticationProfileInput, optFns ...func(*Options)) (*ModifyAuthenticationProfileOutput, error) {
if params == nil {
params = &ModifyAuthenticationProfileInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyAuthenticationProfile", params, optFns, c.addOperationModifyAuthenticationProfileMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyAuthenticationProfileOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyAuthenticationProfileInput struct {
// The new content of the authentication profile in JSON format. The maximum
// length of the JSON string is determined by a quota for your account.
//
// This member is required.
AuthenticationProfileContent *string
// The name of the authentication profile to replace.
//
// This member is required.
AuthenticationProfileName *string
noSmithyDocumentSerde
}
type ModifyAuthenticationProfileOutput struct {
// The updated content of the authentication profile in JSON format.
AuthenticationProfileContent *string
// The name of the authentication profile that was replaced.
AuthenticationProfileName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyAuthenticationProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyAuthenticationProfile{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyAuthenticationProfile{}, 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 = addOpModifyAuthenticationProfileValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAuthenticationProfile(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_opModifyAuthenticationProfile(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyAuthenticationProfile",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the settings for a cluster. You can also change node type and the
// number of nodes to scale up or down the cluster. When resizing a cluster, you
// must specify both the number of nodes and the node type even if one of the
// parameters does not change. You can add another security or parameter group, or
// change the admin user password. Resetting a cluster password or modifying the
// security groups associated with a cluster do not need a reboot. However,
// modifying a parameter group requires a reboot for parameters to take effect. For
// more information about managing clusters, go to Amazon Redshift Clusters (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) ModifyCluster(ctx context.Context, params *ModifyClusterInput, optFns ...func(*Options)) (*ModifyClusterOutput, error) {
if params == nil {
params = &ModifyClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyCluster", params, optFns, c.addOperationModifyClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterInput struct {
// The unique identifier of the cluster to be modified. Example: examplecluster
//
// This member is required.
ClusterIdentifier *string
// If true , major version upgrades will be applied automatically to the cluster
// during the maintenance window. Default: false
AllowVersionUpgrade *bool
// The number of days that automated snapshots are retained. If the value is 0,
// automated snapshots are disabled. Even if automated snapshots are disabled, you
// can still create manual snapshots when you want with CreateClusterSnapshot . If
// you decrease the automated snapshot retention period from its current value,
// existing automated snapshots that fall outside of the new retention period will
// be immediately deleted. You can't disable automated snapshots for RA3 node
// types. Set the automated retention period from 1-35 days. Default: Uses existing
// setting. Constraints: Must be a value from 0 to 35.
AutomatedSnapshotRetentionPeriod *int32
// The option to initiate relocation for an Amazon Redshift cluster to the target
// Availability Zone.
AvailabilityZone *string
// The option to enable relocation for an Amazon Redshift cluster between
// Availability Zones after the cluster modification is complete.
AvailabilityZoneRelocation *bool
// The name of the cluster parameter group to apply to this cluster. This change
// is applied only after the cluster is rebooted. To reboot a cluster use
// RebootCluster . Default: Uses existing setting. Constraints: The cluster
// parameter group must be in the same parameter group family that matches the
// cluster version.
ClusterParameterGroupName *string
// A list of cluster security groups to be authorized on this cluster. This change
// is asynchronously applied as soon as possible. Security groups currently
// associated with the cluster, and not in the list of groups to apply, will be
// revoked from the cluster. Constraints:
// - Must be 1 to 255 alphanumeric characters or hyphens
// - First character must be a letter
// - Cannot end with a hyphen or contain two consecutive hyphens
ClusterSecurityGroups []string
// The new cluster type. When you submit your cluster resize request, your
// existing cluster goes into a read-only mode. After Amazon Redshift provisions a
// new cluster based on your resize requirements, there will be outage for a period
// while the old cluster is deleted and your connection is switched to the new
// cluster. You can use DescribeResize to track the progress of the resize
// request. Valid Values: multi-node | single-node
ClusterType *string
// The new version number of the Amazon Redshift engine to upgrade to. For major
// version upgrades, if a non-default cluster parameter group is currently in use,
// a new cluster parameter group in the cluster parameter group family for the new
// version must be specified. The new cluster parameter group can be the default
// for that cluster parameter group family. For more information about parameters
// and parameter groups, go to Amazon Redshift Parameter Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// in the Amazon Redshift Cluster Management Guide. Example: 1.0
ClusterVersion *string
// The Elastic IP (EIP) address for the cluster. Constraints: The cluster must be
// provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For
// more information about provisioning clusters in EC2-VPC, go to Supported
// Platforms to Launch Your Cluster (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms)
// in the Amazon Redshift Cluster Management Guide.
ElasticIp *string
// Indicates whether the cluster is encrypted. If the value is encrypted (true)
// and you provide a value for the KmsKeyId parameter, we encrypt the cluster with
// the provided KmsKeyId . If you don't provide a KmsKeyId , we encrypt with the
// default key. If the value is not encrypted (false), then the cluster is
// decrypted.
Encrypted *bool
// An option that specifies whether to create the cluster with enhanced VPC
// routing enabled. To create a cluster that uses enhanced VPC routing, the cluster
// must be in a VPC. For more information, see Enhanced VPC Routing (https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html)
// in the Amazon Redshift Cluster Management Guide. If this option is true ,
// enhanced VPC routing is enabled. Default: false
EnhancedVpcRouting *bool
// Specifies the name of the HSM client certificate the Amazon Redshift cluster
// uses to retrieve the data encryption keys stored in an HSM.
HsmClientCertificateIdentifier *string
// Specifies the name of the HSM configuration that contains the information the
// Amazon Redshift cluster can use to retrieve and store keys in an HSM.
HsmConfigurationIdentifier *string
// The Key Management Service (KMS) key ID of the encryption key that you want to
// use to encrypt data in the cluster.
KmsKeyId *string
// The name for the maintenance track that you want to assign for the cluster.
// This name change is asynchronous. The new track name stays in the
// PendingModifiedValues for the cluster until the next maintenance window. When
// the maintenance track changes, the cluster is switched to the latest cluster
// release available for the maintenance track. At this point, the maintenance
// track name is applied.
MaintenanceTrackName *string
// The default for number of days that a newly created manual snapshot is
// retained. If the value is -1, the manual snapshot is retained indefinitely. This
// value doesn't retroactively change the retention periods of existing manual
// snapshots. The value must be either -1 or an integer between 1 and 3,653. The
// default value is -1.
ManualSnapshotRetentionPeriod *int32
// The new password for the cluster admin user. This change is asynchronously
// applied as soon as possible. Between the time of the request and the completion
// of the request, the MasterUserPassword element exists in the
// PendingModifiedValues element of the operation response. Operations never return
// the password, so this operation provides a way to regain access to the admin
// user account for a cluster if the password is lost. Default: Uses existing
// setting. Constraints:
// - Must be between 8 and 64 characters in length.
// - Must contain at least one uppercase letter.
// - Must contain at least one lowercase letter.
// - Must contain one number.
// - Can be any printable ASCII character (ASCII code 33-126) except ' (single
// quote), " (double quote), \ , / , or @ .
MasterUserPassword *string
// The new identifier for the cluster. Constraints:
// - Must contain from 1 to 63 alphanumeric characters or hyphens.
// - Alphabetic characters must be lowercase.
// - First character must be a letter.
// - Cannot end with a hyphen or contain two consecutive hyphens.
// - Must be unique for all clusters within an Amazon Web Services account.
// Example: examplecluster
NewClusterIdentifier *string
// The new node type of the cluster. If you specify a new node type, you must also
// specify the number of nodes parameter. For more information about resizing
// clusters, go to Resizing Clusters in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html)
// in the Amazon Redshift Cluster Management Guide. Valid Values: ds2.xlarge |
// ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.xlplus |
// ra3.4xlarge | ra3.16xlarge
NodeType *string
// The new number of nodes of the cluster. If you specify a new number of nodes,
// you must also specify the node type parameter. For more information about
// resizing clusters, go to Resizing Clusters in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html)
// in the Amazon Redshift Cluster Management Guide. Valid Values: Integer greater
// than 0 .
NumberOfNodes *int32
// The option to change the port of an Amazon Redshift cluster.
Port *int32
// The weekly time range (in UTC) during which system maintenance can occur, if
// necessary. If system maintenance is necessary during the window, it may result
// in an outage. This maintenance window change is made immediately. If the new
// maintenance window indicates the current time, there must be at least 120
// minutes between the current time and end of the window in order to ensure that
// pending changes are applied. Default: Uses existing setting. Format:
// ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00 . Valid Days: Mon | Tue
// | Wed | Thu | Fri | Sat | Sun Constraints: Must be at least 30 minutes.
PreferredMaintenanceWindow *string
// If true , the cluster can be accessed from a public network. Only clusters in
// VPCs can be set to be publicly available.
PubliclyAccessible *bool
// A list of virtual private cloud (VPC) security groups to be associated with the
// cluster. This change is asynchronously applied as soon as possible.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type ModifyClusterOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCluster{}, 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 = addOpModifyClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCluster(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_opModifyCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyCluster",
}
}
| 296 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the database revision of a cluster. The database revision is a unique
// revision of the database running in a cluster.
func (c *Client) ModifyClusterDbRevision(ctx context.Context, params *ModifyClusterDbRevisionInput, optFns ...func(*Options)) (*ModifyClusterDbRevisionOutput, error) {
if params == nil {
params = &ModifyClusterDbRevisionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterDbRevision", params, optFns, c.addOperationModifyClusterDbRevisionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterDbRevisionOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterDbRevisionInput struct {
// The unique identifier of a cluster whose database revision you want to modify.
// Example: examplecluster
//
// This member is required.
ClusterIdentifier *string
// The identifier of the database revision. You can retrieve this value from the
// response to the DescribeClusterDbRevisions request.
//
// This member is required.
RevisionTarget *string
noSmithyDocumentSerde
}
type ModifyClusterDbRevisionOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterDbRevisionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterDbRevision{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterDbRevision{}, 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 = addOpModifyClusterDbRevisionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterDbRevision(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_opModifyClusterDbRevision(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterDbRevision",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the list of Identity and Access Management (IAM) roles that can be
// used by the cluster to access other Amazon Web Services services. The maximum
// number of IAM roles that you can associate is subject to a quota. For more
// information, go to Quotas and limits (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) ModifyClusterIamRoles(ctx context.Context, params *ModifyClusterIamRolesInput, optFns ...func(*Options)) (*ModifyClusterIamRolesOutput, error) {
if params == nil {
params = &ModifyClusterIamRolesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterIamRoles", params, optFns, c.addOperationModifyClusterIamRolesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterIamRolesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterIamRolesInput struct {
// The unique identifier of the cluster for which you want to associate or
// disassociate IAM roles.
//
// This member is required.
ClusterIdentifier *string
// Zero or more IAM roles to associate with the cluster. The roles must be in
// their Amazon Resource Name (ARN) format.
AddIamRoles []string
// The Amazon Resource Name (ARN) for the IAM role that was set as default for the
// cluster when the cluster was last modified.
DefaultIamRoleArn *string
// Zero or more IAM roles in ARN format to disassociate from the cluster.
RemoveIamRoles []string
noSmithyDocumentSerde
}
type ModifyClusterIamRolesOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterIamRolesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterIamRoles{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterIamRoles{}, 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 = addOpModifyClusterIamRolesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterIamRoles(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_opModifyClusterIamRoles(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterIamRoles",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Modifies the maintenance settings of a cluster.
func (c *Client) ModifyClusterMaintenance(ctx context.Context, params *ModifyClusterMaintenanceInput, optFns ...func(*Options)) (*ModifyClusterMaintenanceOutput, error) {
if params == nil {
params = &ModifyClusterMaintenanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterMaintenance", params, optFns, c.addOperationModifyClusterMaintenanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterMaintenanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterMaintenanceInput struct {
// A unique identifier for the cluster.
//
// This member is required.
ClusterIdentifier *string
// A boolean indicating whether to enable the deferred maintenance window.
DeferMaintenance *bool
// An integer indicating the duration of the maintenance window in days. If you
// specify a duration, you can't specify an end time. The duration must be 45 days
// or less.
DeferMaintenanceDuration *int32
// A timestamp indicating end time for the deferred maintenance window. If you
// specify an end time, you can't specify a duration.
DeferMaintenanceEndTime *time.Time
// A unique identifier for the deferred maintenance window.
DeferMaintenanceIdentifier *string
// A timestamp indicating the start time for the deferred maintenance window.
DeferMaintenanceStartTime *time.Time
noSmithyDocumentSerde
}
type ModifyClusterMaintenanceOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterMaintenanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterMaintenance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterMaintenance{}, 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 = addOpModifyClusterMaintenanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterMaintenance(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_opModifyClusterMaintenance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterMaintenance",
}
}
| 144 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the parameters of a parameter group. For the parameters parameter, it
// can't contain ASCII characters. For more information about parameters and
// parameter groups, go to Amazon Redshift Parameter Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) ModifyClusterParameterGroup(ctx context.Context, params *ModifyClusterParameterGroupInput, optFns ...func(*Options)) (*ModifyClusterParameterGroupOutput, error) {
if params == nil {
params = &ModifyClusterParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterParameterGroup", params, optFns, c.addOperationModifyClusterParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
// Describes a modify cluster parameter group operation.
type ModifyClusterParameterGroupInput struct {
// The name of the parameter group to be modified.
//
// This member is required.
ParameterGroupName *string
// An array of parameters to be modified. A maximum of 20 parameters can be
// modified in a single request. For each parameter to be modified, you must supply
// at least the parameter name and parameter value; other name-value pairs of the
// parameter are optional. For the workload management (WLM) configuration, you
// must supply all the name-value pairs in the wlm_json_configuration parameter.
//
// This member is required.
Parameters []types.Parameter
noSmithyDocumentSerde
}
type ModifyClusterParameterGroupOutput struct {
// The name of the cluster parameter group.
ParameterGroupName *string
// The status of the parameter group. For example, if you made a change to a
// parameter group name-value pair, then the change could be pending a reboot of an
// associated cluster.
ParameterGroupStatus *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterParameterGroup{}, 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 = addOpModifyClusterParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterParameterGroup(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_opModifyClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterParameterGroup",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the settings for a snapshot. This exanmple modifies the manual
// retention period setting for a cluster snapshot.
func (c *Client) ModifyClusterSnapshot(ctx context.Context, params *ModifyClusterSnapshotInput, optFns ...func(*Options)) (*ModifyClusterSnapshotOutput, error) {
if params == nil {
params = &ModifyClusterSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterSnapshot", params, optFns, c.addOperationModifyClusterSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterSnapshotInput struct {
// The identifier of the snapshot whose setting you want to modify.
//
// This member is required.
SnapshotIdentifier *string
// A Boolean option to override an exception if the retention period has already
// passed.
Force bool
// The number of days that a manual snapshot is retained. If the value is -1, the
// manual snapshot is retained indefinitely. If the manual snapshot falls outside
// of the new retention period, you can specify the force option to immediately
// delete the snapshot. The value must be either -1 or an integer between 1 and
// 3,653.
ManualSnapshotRetentionPeriod *int32
noSmithyDocumentSerde
}
type ModifyClusterSnapshotOutput struct {
// Describes a snapshot.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterSnapshot{}, 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 = addOpModifyClusterSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterSnapshot(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_opModifyClusterSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterSnapshot",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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"
)
// Modifies a snapshot schedule for a cluster.
func (c *Client) ModifyClusterSnapshotSchedule(ctx context.Context, params *ModifyClusterSnapshotScheduleInput, optFns ...func(*Options)) (*ModifyClusterSnapshotScheduleOutput, error) {
if params == nil {
params = &ModifyClusterSnapshotScheduleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterSnapshotSchedule", params, optFns, c.addOperationModifyClusterSnapshotScheduleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterSnapshotScheduleOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterSnapshotScheduleInput struct {
// A unique identifier for the cluster whose snapshot schedule you want to modify.
//
// This member is required.
ClusterIdentifier *string
// A boolean to indicate whether to remove the assoiciation between the cluster
// and the schedule.
DisassociateSchedule *bool
// A unique alphanumeric identifier for the schedule that you want to associate
// with the cluster.
ScheduleIdentifier *string
noSmithyDocumentSerde
}
type ModifyClusterSnapshotScheduleOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterSnapshotScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterSnapshotSchedule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterSnapshotSchedule{}, 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 = addOpModifyClusterSnapshotScheduleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterSnapshotSchedule(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_opModifyClusterSnapshotSchedule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterSnapshotSchedule",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies a cluster subnet group to include the specified list of VPC subnets.
// The operation replaces the existing list of subnets with the new list of
// subnets.
func (c *Client) ModifyClusterSubnetGroup(ctx context.Context, params *ModifyClusterSubnetGroupInput, optFns ...func(*Options)) (*ModifyClusterSubnetGroupOutput, error) {
if params == nil {
params = &ModifyClusterSubnetGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyClusterSubnetGroup", params, optFns, c.addOperationModifyClusterSubnetGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyClusterSubnetGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyClusterSubnetGroupInput struct {
// The name of the subnet group to be modified.
//
// This member is required.
ClusterSubnetGroupName *string
// An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single
// request.
//
// This member is required.
SubnetIds []string
// A text description of the subnet group to be modified.
Description *string
noSmithyDocumentSerde
}
type ModifyClusterSubnetGroupOutput struct {
// Describes a subnet group.
ClusterSubnetGroup *types.ClusterSubnetGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyClusterSubnetGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyClusterSubnetGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyClusterSubnetGroup{}, 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 = addOpModifyClusterSubnetGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClusterSubnetGroup(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_opModifyClusterSubnetGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyClusterSubnetGroup",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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"
)
// Contains information for changing a custom domain association.
func (c *Client) ModifyCustomDomainAssociation(ctx context.Context, params *ModifyCustomDomainAssociationInput, optFns ...func(*Options)) (*ModifyCustomDomainAssociationOutput, error) {
if params == nil {
params = &ModifyCustomDomainAssociationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyCustomDomainAssociation", params, optFns, c.addOperationModifyCustomDomainAssociationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyCustomDomainAssociationOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyCustomDomainAssociationInput struct {
// The identifier of the cluster to change a custom domain association for.
//
// This member is required.
ClusterIdentifier *string
// The certificate Amazon Resource Name (ARN) for the changed custom domain
// association.
CustomDomainCertificateArn *string
// The custom domain name for a changed custom domain association.
CustomDomainName *string
noSmithyDocumentSerde
}
type ModifyCustomDomainAssociationOutput struct {
// The identifier of the cluster associated with the result for the changed custom
// domain association.
ClusterIdentifier *string
// The certificate expiration time associated with the result for the changed
// custom domain association.
CustomDomainCertExpiryTime *string
// The certificate Amazon Resource Name (ARN) associated with the result for the
// changed custom domain association.
CustomDomainCertificateArn *string
// The custom domain name associated with the result for the changed custom domain
// association.
CustomDomainName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyCustomDomainAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCustomDomainAssociation{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCustomDomainAssociation{}, 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 = addOpModifyCustomDomainAssociationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCustomDomainAssociation(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_opModifyCustomDomainAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyCustomDomainAssociation",
}
}
| 144 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Modifies a Redshift-managed VPC endpoint.
func (c *Client) ModifyEndpointAccess(ctx context.Context, params *ModifyEndpointAccessInput, optFns ...func(*Options)) (*ModifyEndpointAccessOutput, error) {
if params == nil {
params = &ModifyEndpointAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyEndpointAccess", params, optFns, c.addOperationModifyEndpointAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyEndpointAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyEndpointAccessInput struct {
// The endpoint to be modified.
//
// This member is required.
EndpointName *string
// The complete list of VPC security groups associated with the endpoint after the
// endpoint is modified.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
// Describes a Redshift-managed VPC endpoint.
type ModifyEndpointAccessOutput struct {
// The DNS address of the endpoint.
Address *string
// The cluster identifier of the cluster associated with the endpoint.
ClusterIdentifier *string
// The time (UTC) that the endpoint was created.
EndpointCreateTime *time.Time
// The name of the endpoint.
EndpointName *string
// The status of the endpoint.
EndpointStatus *string
// The port number on which the cluster accepts incoming connections.
Port int32
// The Amazon Web Services account ID of the owner of the cluster.
ResourceOwner *string
// The subnet group name where Amazon Redshift chooses to deploy the endpoint.
SubnetGroupName *string
// The connection endpoint for connecting to an Amazon Redshift cluster through
// the proxy.
VpcEndpoint *types.VpcEndpoint
// The security groups associated with the endpoint.
VpcSecurityGroups []types.VpcSecurityGroupMembership
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyEndpointAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyEndpointAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyEndpointAccess{}, 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 = addOpModifyEndpointAccessValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEndpointAccess(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_opModifyEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyEndpointAccess",
}
}
| 159 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies an existing Amazon Redshift event notification subscription.
func (c *Client) ModifyEventSubscription(ctx context.Context, params *ModifyEventSubscriptionInput, optFns ...func(*Options)) (*ModifyEventSubscriptionOutput, error) {
if params == nil {
params = &ModifyEventSubscriptionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyEventSubscription", params, optFns, c.addOperationModifyEventSubscriptionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyEventSubscriptionOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyEventSubscriptionInput struct {
// The name of the modified Amazon Redshift event notification subscription.
//
// This member is required.
SubscriptionName *string
// A Boolean value indicating if the subscription is enabled. true indicates the
// subscription is enabled
Enabled *bool
// Specifies the Amazon Redshift event categories to be published by the event
// notification subscription. Values: configuration, management, monitoring,
// security, pending
EventCategories []string
// Specifies the Amazon Redshift event severity to be published by the event
// notification subscription. Values: ERROR, INFO
Severity *string
// The Amazon Resource Name (ARN) of the SNS topic to be used by the event
// notification subscription.
SnsTopicArn *string
// A list of one or more identifiers of Amazon Redshift source objects. All of the
// objects must be of the same type as was specified in the source type parameter.
// The event subscription will return only events generated by the specified
// objects. If not specified, then events are returned for all objects within the
// source type specified. Example: my-cluster-1, my-cluster-2 Example:
// my-snapshot-20131010
SourceIds []string
// The type of source that will be generating the events. For example, if you want
// to be notified of events generated by a cluster, you would set this parameter to
// cluster. If this value is not specified, events are returned for all Amazon
// Redshift objects in your Amazon Web Services account. You must specify a source
// type in order to specify source IDs. Valid values: cluster,
// cluster-parameter-group, cluster-security-group, cluster-snapshot, and
// scheduled-action.
SourceType *string
noSmithyDocumentSerde
}
type ModifyEventSubscriptionOutput struct {
// Describes event subscriptions.
EventSubscription *types.EventSubscription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyEventSubscription{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyEventSubscription{}, 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 = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEventSubscription(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_opModifyEventSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyEventSubscription",
}
}
| 159 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Modifies a scheduled action.
func (c *Client) ModifyScheduledAction(ctx context.Context, params *ModifyScheduledActionInput, optFns ...func(*Options)) (*ModifyScheduledActionOutput, error) {
if params == nil {
params = &ModifyScheduledActionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyScheduledAction", params, optFns, c.addOperationModifyScheduledActionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyScheduledActionOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyScheduledActionInput struct {
// The name of the scheduled action to modify.
//
// This member is required.
ScheduledActionName *string
// A modified enable flag of the scheduled action. If true, the scheduled action
// is active. If false, the scheduled action is disabled.
Enable *bool
// A modified end time of the scheduled action. For more information about this
// parameter, see ScheduledAction .
EndTime *time.Time
// A different IAM role to assume to run the target action. For more information
// about this parameter, see ScheduledAction .
IamRole *string
// A modified schedule in either at( ) or cron( ) format. For more information
// about this parameter, see ScheduledAction .
Schedule *string
// A modified description of the scheduled action.
ScheduledActionDescription *string
// A modified start time of the scheduled action. For more information about this
// parameter, see ScheduledAction .
StartTime *time.Time
// A modified JSON format of the scheduled action. For more information about this
// parameter, see ScheduledAction .
TargetAction *types.ScheduledActionType
noSmithyDocumentSerde
}
// Describes a scheduled action. You can use a scheduled action to trigger some
// Amazon Redshift API operations on a schedule. For information about which API
// operations can be scheduled, see ScheduledActionType .
type ModifyScheduledActionOutput struct {
// The end time in UTC when the schedule is no longer active. After this time, the
// scheduled action does not trigger.
EndTime *time.Time
// The IAM role to assume to run the scheduled action. This IAM role must have
// permission to run the Amazon Redshift API operation in the scheduled action.
// This IAM role must allow the Amazon Redshift scheduler (Principal
// scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more
// information about the IAM role to use with the Amazon Redshift scheduler, see
// Using Identity-Based Policies for Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html)
// in the Amazon Redshift Cluster Management Guide.
IamRole *string
// List of times when the scheduled action will run.
NextInvocations []time.Time
// The schedule for a one-time (at format) or recurring (cron format) scheduled
// action. Schedule invocations must be separated by at least one hour. Format of
// at expressions is " at(yyyy-mm-ddThh:mm:ss) ". For example, "
// at(2016-03-04T17:27:00) ". Format of cron expressions is " cron(Minutes Hours
// Day-of-month Month Day-of-week Year) ". For example, " cron(0 10 ? * MON *) ".
// For more information, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
// in the Amazon CloudWatch Events User Guide.
Schedule *string
// The description of the scheduled action.
ScheduledActionDescription *string
// The name of the scheduled action.
ScheduledActionName *string
// The start time in UTC when the schedule is active. Before this time, the
// scheduled action does not trigger.
StartTime *time.Time
// The state of the scheduled action. For example, DISABLED .
State types.ScheduledActionState
// A JSON format string of the Amazon Redshift API operation with input
// parameters. "
// {\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}
// ".
TargetAction *types.ScheduledActionType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyScheduledActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyScheduledAction{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyScheduledAction{}, 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 = addOpModifyScheduledActionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyScheduledAction(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_opModifyScheduledAction(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyScheduledAction",
}
}
| 197 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the number of days to retain snapshots in the destination Amazon Web
// Services Region after they are copied from the source Amazon Web Services
// Region. By default, this operation only changes the retention period of copied
// automated snapshots. The retention periods for both new and existing copied
// automated snapshots are updated with the new retention period. You can set the
// manual option to change only the retention periods of copied manual snapshots.
// If you set this option, only newly copied manual snapshots have the new
// retention period.
func (c *Client) ModifySnapshotCopyRetentionPeriod(ctx context.Context, params *ModifySnapshotCopyRetentionPeriodInput, optFns ...func(*Options)) (*ModifySnapshotCopyRetentionPeriodOutput, error) {
if params == nil {
params = &ModifySnapshotCopyRetentionPeriodInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotCopyRetentionPeriod", params, optFns, c.addOperationModifySnapshotCopyRetentionPeriodMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifySnapshotCopyRetentionPeriodOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifySnapshotCopyRetentionPeriodInput struct {
// The unique identifier of the cluster for which you want to change the retention
// period for either automated or manual snapshots that are copied to a destination
// Amazon Web Services Region. Constraints: Must be the valid name of an existing
// cluster that has cross-region snapshot copy enabled.
//
// This member is required.
ClusterIdentifier *string
// The number of days to retain automated snapshots in the destination Amazon Web
// Services Region after they are copied from the source Amazon Web Services
// Region. By default, this only changes the retention period of copied automated
// snapshots. If you decrease the retention period for automated snapshots that are
// copied to a destination Amazon Web Services Region, Amazon Redshift deletes any
// existing automated snapshots that were copied to the destination Amazon Web
// Services Region and that fall outside of the new retention period. Constraints:
// Must be at least 1 and no more than 35 for automated snapshots. If you specify
// the manual option, only newly copied manual snapshots will have the new
// retention period. If you specify the value of -1 newly copied manual snapshots
// are retained indefinitely. Constraints: The number of days must be either -1 or
// an integer between 1 and 3,653 for manual snapshots.
//
// This member is required.
RetentionPeriod int32
// Indicates whether to apply the snapshot retention period to newly copied manual
// snapshots instead of automated snapshots.
Manual bool
noSmithyDocumentSerde
}
type ModifySnapshotCopyRetentionPeriodOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifySnapshotCopyRetentionPeriodMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifySnapshotCopyRetentionPeriod{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifySnapshotCopyRetentionPeriod{}, 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 = addOpModifySnapshotCopyRetentionPeriodValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotCopyRetentionPeriod(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_opModifySnapshotCopyRetentionPeriod(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifySnapshotCopyRetentionPeriod",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Modifies a snapshot schedule. Any schedule associated with a cluster is
// modified asynchronously.
func (c *Client) ModifySnapshotSchedule(ctx context.Context, params *ModifySnapshotScheduleInput, optFns ...func(*Options)) (*ModifySnapshotScheduleOutput, error) {
if params == nil {
params = &ModifySnapshotScheduleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotSchedule", params, optFns, c.addOperationModifySnapshotScheduleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifySnapshotScheduleOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifySnapshotScheduleInput struct {
// An updated list of schedule definitions. A schedule definition is made up of
// schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)".
//
// This member is required.
ScheduleDefinitions []string
// A unique alphanumeric identifier of the schedule to modify.
//
// This member is required.
ScheduleIdentifier *string
noSmithyDocumentSerde
}
// Describes a snapshot schedule. You can set a regular interval for creating
// snapshots of a cluster. You can also schedule snapshots for specific dates.
type ModifySnapshotScheduleOutput struct {
// The number of clusters associated with the schedule.
AssociatedClusterCount *int32
// A list of clusters associated with the schedule. A maximum of 100 clusters is
// returned.
AssociatedClusters []types.ClusterAssociatedToSchedule
//
NextInvocations []time.Time
// A list of ScheduleDefinitions.
ScheduleDefinitions []string
// The description of the schedule.
ScheduleDescription *string
// A unique identifier for the schedule.
ScheduleIdentifier *string
// An optional set of tags describing the schedule.
Tags []types.Tag
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifySnapshotScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifySnapshotSchedule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifySnapshotSchedule{}, 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 = addOpModifySnapshotScheduleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotSchedule(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_opModifySnapshotSchedule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifySnapshotSchedule",
}
}
| 154 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies a usage limit in a cluster. You can't modify the feature type or
// period of a usage limit.
func (c *Client) ModifyUsageLimit(ctx context.Context, params *ModifyUsageLimitInput, optFns ...func(*Options)) (*ModifyUsageLimitOutput, error) {
if params == nil {
params = &ModifyUsageLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyUsageLimit", params, optFns, c.addOperationModifyUsageLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyUsageLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyUsageLimitInput struct {
// The identifier of the usage limit to modify.
//
// This member is required.
UsageLimitId *string
// The new limit amount. For more information about this parameter, see UsageLimit .
Amount *int64
// The new action that Amazon Redshift takes when the limit is reached. For more
// information about this parameter, see UsageLimit .
BreachAction types.UsageLimitBreachAction
noSmithyDocumentSerde
}
// Describes a usage limit object for a cluster.
type ModifyUsageLimitOutput struct {
// The limit amount. If time-based, this amount is in minutes. If data-based, this
// amount is in terabytes (TB).
Amount int64
// The action that Amazon Redshift takes when the limit is reached. Possible
// values are:
// - log - To log an event in a system table. The default is log.
// - emit-metric - To emit CloudWatch metrics.
// - disable - To disable the feature until the next usage period begins.
BreachAction types.UsageLimitBreachAction
// The identifier of the cluster with a usage limit.
ClusterIdentifier *string
// The Amazon Redshift feature to which the limit applies.
FeatureType types.UsageLimitFeatureType
// The type of limit. Depending on the feature type, this can be based on a time
// duration or data size.
LimitType types.UsageLimitLimitType
// The time period that the amount applies to. A weekly period begins on Sunday.
// The default is monthly .
Period types.UsageLimitPeriod
// A list of tag instances.
Tags []types.Tag
// The identifier of the usage limit.
UsageLimitId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyUsageLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyUsageLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyUsageLimit{}, 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 = addOpModifyUsageLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyUsageLimit(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_opModifyUsageLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ModifyUsageLimit",
}
}
| 162 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Pauses a cluster.
func (c *Client) PauseCluster(ctx context.Context, params *PauseClusterInput, optFns ...func(*Options)) (*PauseClusterOutput, error) {
if params == nil {
params = &PauseClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PauseCluster", params, optFns, c.addOperationPauseClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PauseClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
// Describes a pause cluster operation. For example, a scheduled action to run the
// PauseCluster API operation.
type PauseClusterInput struct {
// The identifier of the cluster to be paused.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
type PauseClusterOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPauseClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPauseCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPauseCluster{}, 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 = addOpPauseClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPauseCluster(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_opPauseCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "PauseCluster",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Allows you to purchase reserved nodes. Amazon Redshift offers a predefined set
// of reserved node offerings. You can purchase one or more of the offerings. You
// can call the DescribeReservedNodeOfferings API to obtain the available reserved
// node offerings. You can call this API by providing a specific reserved node
// offering and the number of nodes you want to reserve. For more information about
// reserved node offerings, go to Purchasing Reserved Nodes (https://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) PurchaseReservedNodeOffering(ctx context.Context, params *PurchaseReservedNodeOfferingInput, optFns ...func(*Options)) (*PurchaseReservedNodeOfferingOutput, error) {
if params == nil {
params = &PurchaseReservedNodeOfferingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PurchaseReservedNodeOffering", params, optFns, c.addOperationPurchaseReservedNodeOfferingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PurchaseReservedNodeOfferingOutput)
out.ResultMetadata = metadata
return out, nil
}
type PurchaseReservedNodeOfferingInput struct {
// The unique identifier of the reserved node offering you want to purchase.
//
// This member is required.
ReservedNodeOfferingId *string
// The number of reserved nodes that you want to purchase. Default: 1
NodeCount *int32
noSmithyDocumentSerde
}
type PurchaseReservedNodeOfferingOutput struct {
// Describes a reserved node. You can call the DescribeReservedNodeOfferings API
// to obtain the available reserved node offerings.
ReservedNode *types.ReservedNode
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPurchaseReservedNodeOfferingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPurchaseReservedNodeOffering{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPurchaseReservedNodeOffering{}, 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 = addOpPurchaseReservedNodeOfferingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseReservedNodeOffering(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_opPurchaseReservedNodeOffering(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "PurchaseReservedNodeOffering",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Reboots a cluster. This action is taken as soon as possible. It results in a
// momentary outage to the cluster, during which the cluster status is set to
// rebooting . A cluster event is created when the reboot is completed. Any pending
// cluster modifications (see ModifyCluster ) are applied at this reboot. For more
// information about managing clusters, go to Amazon Redshift Clusters (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) RebootCluster(ctx context.Context, params *RebootClusterInput, optFns ...func(*Options)) (*RebootClusterOutput, error) {
if params == nil {
params = &RebootClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RebootCluster", params, optFns, c.addOperationRebootClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RebootClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type RebootClusterInput struct {
// The cluster identifier.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
type RebootClusterOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRebootClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRebootCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRebootCluster{}, 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 = addOpRebootClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootCluster(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_opRebootCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RebootCluster",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// From a datashare consumer account, rejects the specified datashare.
func (c *Client) RejectDataShare(ctx context.Context, params *RejectDataShareInput, optFns ...func(*Options)) (*RejectDataShareOutput, error) {
if params == nil {
params = &RejectDataShareInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RejectDataShare", params, optFns, c.addOperationRejectDataShareMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RejectDataShareOutput)
out.ResultMetadata = metadata
return out, nil
}
type RejectDataShareInput struct {
// The Amazon Resource Name (ARN) of the datashare to reject.
//
// This member is required.
DataShareArn *string
noSmithyDocumentSerde
}
type RejectDataShareOutput struct {
// A value that specifies whether the datashare can be shared to a publicly
// accessible cluster.
AllowPubliclyAccessibleConsumers bool
// An Amazon Resource Name (ARN) that references the datashare that is owned by a
// specific namespace of the producer cluster. A datashare ARN is in the
// arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name}
// format.
DataShareArn *string
// A value that specifies when the datashare has an association between producer
// and data consumers.
DataShareAssociations []types.DataShareAssociation
// The identifier of a datashare to show its managing entity.
ManagedBy *string
// The Amazon Resource Name (ARN) of the producer.
ProducerArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRejectDataShareMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRejectDataShare{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRejectDataShare{}, 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 = addOpRejectDataShareValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectDataShare(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_opRejectDataShare(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RejectDataShare",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets one or more parameters of the specified parameter group to their default
// values and sets the source values of the parameters to "engine-default". To
// reset the entire parameter group specify the ResetAllParameters parameter. For
// parameter changes to take effect you must reboot any associated clusters.
func (c *Client) ResetClusterParameterGroup(ctx context.Context, params *ResetClusterParameterGroupInput, optFns ...func(*Options)) (*ResetClusterParameterGroupOutput, error) {
if params == nil {
params = &ResetClusterParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ResetClusterParameterGroup", params, optFns, c.addOperationResetClusterParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ResetClusterParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ResetClusterParameterGroupInput struct {
// The name of the cluster parameter group to be reset.
//
// This member is required.
ParameterGroupName *string
// An array of names of parameters to be reset. If ResetAllParameters option is
// not used, then at least one parameter name must be supplied. Constraints: A
// maximum of 20 parameters can be reset in a single request.
Parameters []types.Parameter
// If true , all parameters in the specified parameter group will be reset to their
// default values. Default: true
ResetAllParameters bool
noSmithyDocumentSerde
}
type ResetClusterParameterGroupOutput struct {
// The name of the cluster parameter group.
ParameterGroupName *string
// The status of the parameter group. For example, if you made a change to a
// parameter group name-value pair, then the change could be pending a reboot of an
// associated cluster.
ParameterGroupStatus *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationResetClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpResetClusterParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetClusterParameterGroup{}, 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 = addOpResetClusterParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetClusterParameterGroup(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_opResetClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ResetClusterParameterGroup",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Changes the size of the cluster. You can change the cluster's type, or change
// the number or type of nodes. The default behavior is to use the elastic resize
// method. With an elastic resize, your cluster is available for read and write
// operations more quickly than with the classic resize method. Elastic resize
// operations have the following restrictions:
// - You can only resize clusters of the following types:
// - dc1.large (if your cluster is in a VPC)
// - dc1.8xlarge (if your cluster is in a VPC)
// - dc2.large
// - dc2.8xlarge
// - ds2.xlarge
// - ds2.8xlarge
// - ra3.xlplus
// - ra3.4xlarge
// - ra3.16xlarge
// - The type of nodes that you add must match the node type for the cluster.
func (c *Client) ResizeCluster(ctx context.Context, params *ResizeClusterInput, optFns ...func(*Options)) (*ResizeClusterOutput, error) {
if params == nil {
params = &ResizeClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ResizeCluster", params, optFns, c.addOperationResizeClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ResizeClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
// Describes a resize cluster operation. For example, a scheduled action to run
// the ResizeCluster API operation.
type ResizeClusterInput struct {
// The unique identifier for the cluster to resize.
//
// This member is required.
ClusterIdentifier *string
// A boolean value indicating whether the resize operation is using the classic
// resize process. If you don't provide this parameter or set the value to false ,
// the resize type is elastic.
Classic *bool
// The new cluster type for the specified cluster.
ClusterType *string
// The new node type for the nodes you are adding. If not specified, the cluster's
// current node type is used.
NodeType *string
// The new number of nodes for the cluster. If not specified, the cluster's
// current number of nodes is used.
NumberOfNodes *int32
// The identifier of the reserved node.
ReservedNodeId *string
// The identifier of the target reserved node offering.
TargetReservedNodeOfferingId *string
noSmithyDocumentSerde
}
type ResizeClusterOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationResizeClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpResizeCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResizeCluster{}, 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 = addOpResizeClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResizeCluster(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_opResizeCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ResizeCluster",
}
}
| 164 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new cluster from a snapshot. By default, Amazon Redshift creates the
// resulting cluster with the same configuration as the original cluster from which
// the snapshot was created, except that the new cluster is created with the
// default cluster security and parameter groups. After Amazon Redshift creates the
// cluster, you can use the ModifyCluster API to associate a different security
// group and different parameter group with the restored cluster. If you are using
// a DS node type, you can also choose to change to another DS node type of the
// same size during restore. If you restore a cluster into a VPC, you must provide
// a cluster subnet group where you want the cluster restored. For more information
// about working with snapshots, go to Amazon Redshift Snapshots (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) RestoreFromClusterSnapshot(ctx context.Context, params *RestoreFromClusterSnapshotInput, optFns ...func(*Options)) (*RestoreFromClusterSnapshotOutput, error) {
if params == nil {
params = &RestoreFromClusterSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreFromClusterSnapshot", params, optFns, c.addOperationRestoreFromClusterSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreFromClusterSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreFromClusterSnapshotInput struct {
// The identifier of the cluster that will be created from restoring the snapshot.
// Constraints:
// - Must contain from 1 to 63 alphanumeric characters or hyphens.
// - Alphabetic characters must be lowercase.
// - First character must be a letter.
// - Cannot end with a hyphen or contain two consecutive hyphens.
// - Must be unique for all clusters within an Amazon Web Services account.
//
// This member is required.
ClusterIdentifier *string
// Reserved.
AdditionalInfo *string
// If true , major version upgrades can be applied during the maintenance window to
// the Amazon Redshift engine that is running on the cluster. Default: true
AllowVersionUpgrade *bool
// This parameter is retired. It does not set the AQUA configuration status.
// Amazon Redshift automatically determines whether to use AQUA (Advanced Query
// Accelerator).
AquaConfigurationStatus types.AquaConfigurationStatus
// The number of days that automated snapshots are retained. If the value is 0,
// automated snapshots are disabled. Even if automated snapshots are disabled, you
// can still create manual snapshots when you want with CreateClusterSnapshot . You
// can't disable automated snapshots for RA3 node types. Set the automated
// retention period from 1-35 days. Default: The value selected for the cluster
// from which the snapshot was taken. Constraints: Must be a value from 0 to 35.
AutomatedSnapshotRetentionPeriod *int32
// The Amazon EC2 Availability Zone in which to restore the cluster. Default: A
// random, system-chosen Availability Zone. Example: us-east-2a
AvailabilityZone *string
// The option to enable relocation for an Amazon Redshift cluster between
// Availability Zones after the cluster is restored.
AvailabilityZoneRelocation *bool
// The name of the parameter group to be associated with this cluster. Default:
// The default Amazon Redshift cluster parameter group. For information about the
// default parameter group, go to Working with Amazon Redshift Parameter Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// . Constraints:
// - Must be 1 to 255 alphanumeric characters or hyphens.
// - First character must be a letter.
// - Cannot end with a hyphen or contain two consecutive hyphens.
ClusterParameterGroupName *string
// A list of security groups to be associated with this cluster. Default: The
// default cluster security group for Amazon Redshift. Cluster security groups only
// apply to clusters outside of VPCs.
ClusterSecurityGroups []string
// The name of the subnet group where you want to cluster restored. A snapshot of
// cluster in VPC can be restored only in VPC. Therefore, you must provide subnet
// group name where you want the cluster restored.
ClusterSubnetGroupName *string
// The Amazon Resource Name (ARN) for the IAM role that was set as default for the
// cluster when the cluster was last modified while it was restored from a
// snapshot.
DefaultIamRoleArn *string
// The Elastic IP (EIP) address for the cluster. Don't specify the Elastic IP
// address for a publicly accessible cluster with availability zone relocation
// turned on.
ElasticIp *string
// Enables support for restoring an unencrypted snapshot to a cluster encrypted
// with Key Management Service (KMS) and a customer managed key.
Encrypted *bool
// An option that specifies whether to create the cluster with enhanced VPC
// routing enabled. To create a cluster that uses enhanced VPC routing, the cluster
// must be in a VPC. For more information, see Enhanced VPC Routing (https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html)
// in the Amazon Redshift Cluster Management Guide. If this option is true ,
// enhanced VPC routing is enabled. Default: false
EnhancedVpcRouting *bool
// Specifies the name of the HSM client certificate the Amazon Redshift cluster
// uses to retrieve the data encryption keys stored in an HSM.
HsmClientCertificateIdentifier *string
// Specifies the name of the HSM configuration that contains the information the
// Amazon Redshift cluster can use to retrieve and store keys in an HSM.
HsmConfigurationIdentifier *string
// A list of Identity and Access Management (IAM) roles that can be used by the
// cluster to access other Amazon Web Services services. You must supply the IAM
// roles in their Amazon Resource Name (ARN) format. The maximum number of IAM
// roles that you can associate is subject to a quota. For more information, go to
// Quotas and limits (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
IamRoles []string
// The Key Management Service (KMS) key ID of the encryption key that encrypts
// data in the cluster restored from a shared snapshot. You can also provide the
// key ID when you restore from an unencrypted snapshot to an encrypted cluster in
// the same account. Additionally, you can specify a new KMS key ID when you
// restore from an encrypted snapshot in the same account in order to change it. In
// that case, the restored cluster is encrypted with the new KMS key ID.
KmsKeyId *string
// The name of the maintenance track for the restored cluster. When you take a
// snapshot, the snapshot inherits the MaintenanceTrack value from the cluster.
// The snapshot might be on a different track than the cluster that was the source
// for the snapshot. For example, suppose that you take a snapshot of a cluster
// that is on the current track and then change the cluster to be on the trailing
// track. In this case, the snapshot and the source cluster are on different
// tracks.
MaintenanceTrackName *string
// The default number of days to retain a manual snapshot. If the value is -1, the
// snapshot is retained indefinitely. This setting doesn't change the retention
// period of existing snapshots. The value must be either -1 or an integer between
// 1 and 3,653.
ManualSnapshotRetentionPeriod *int32
// The node type that the restored cluster will be provisioned with. Default: The
// node type of the cluster from which the snapshot was taken. You can modify this
// if you are using any DS node type. In that case, you can choose to restore into
// another DS node type of the same size. For example, you can restore ds1.8xlarge
// into ds2.8xlarge, or ds1.xlarge into ds2.xlarge. If you have a DC instance type,
// you must restore into that same instance type and size. In other words, you can
// only restore a dc1.large instance type into another dc1.large instance type or
// dc2.large instance type. You can't restore dc1.8xlarge to dc2.8xlarge. First
// restore to a dc1.8xlarge cluster, then resize to a dc2.8large cluster. For more
// information about node types, see About Clusters and Nodes (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes)
// in the Amazon Redshift Cluster Management Guide.
NodeType *string
// The number of nodes specified when provisioning the restored cluster.
NumberOfNodes *int32
// The Amazon Web Services account used to create or copy the snapshot. Required
// if you are restoring a snapshot you do not own, optional if you own the
// snapshot.
OwnerAccount *string
// The port number on which the cluster accepts connections. Default: The same
// port as the original cluster. Constraints: Must be between 1115 and 65535 .
Port *int32
// The weekly time range (in UTC) during which automated cluster maintenance can
// occur. Format: ddd:hh24:mi-ddd:hh24:mi Default: The value selected for the
// cluster from which the snapshot was taken. For more information about the time
// blocks for each region, see Maintenance Windows (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows)
// in Amazon Redshift Cluster Management Guide. Valid Days: Mon | Tue | Wed | Thu |
// Fri | Sat | Sun Constraints: Minimum 30-minute window.
PreferredMaintenanceWindow *string
// If true , the cluster can be accessed from a public network.
PubliclyAccessible *bool
// The identifier of the target reserved node offering.
ReservedNodeId *string
// The Amazon Resource Name (ARN) of the snapshot associated with the message to
// restore from a cluster. You must specify this parameter or snapshotIdentifier ,
// but not both.
SnapshotArn *string
// The name of the cluster the source snapshot was created from. This parameter is
// required if your IAM user has a policy containing a snapshot resource element
// that specifies anything other than * for the cluster name.
SnapshotClusterIdentifier *string
// The name of the snapshot from which to create the new cluster. This parameter
// isn't case sensitive. You must specify this parameter or snapshotArn , but not
// both. Example: my-snapshot-id
SnapshotIdentifier *string
// A unique identifier for the snapshot schedule.
SnapshotScheduleIdentifier *string
// The identifier of the target reserved node offering.
TargetReservedNodeOfferingId *string
// A list of Virtual Private Cloud (VPC) security groups to be associated with the
// cluster. Default: The default VPC security group is associated with the cluster.
// VPC security groups only apply to clusters in VPCs.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreFromClusterSnapshotOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreFromClusterSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreFromClusterSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreFromClusterSnapshot{}, 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 = addOpRestoreFromClusterSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreFromClusterSnapshot(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_opRestoreFromClusterSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RestoreFromClusterSnapshot",
}
}
| 313 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new table from a table in an Amazon Redshift cluster snapshot. You
// must create the new table within the Amazon Redshift cluster that the snapshot
// was taken from. You cannot use RestoreTableFromClusterSnapshot to restore a
// table with the same name as an existing table in an Amazon Redshift cluster.
// That is, you cannot overwrite an existing table in a cluster with a restored
// table. If you want to replace your original table with a new, restored table,
// then rename or drop your original table before you call
// RestoreTableFromClusterSnapshot . When you have renamed your original table,
// then you can pass the original name of the table as the NewTableName parameter
// value in the call to RestoreTableFromClusterSnapshot . This way, you can replace
// the original table with the table created from the snapshot. You can't use this
// operation to restore tables with interleaved sort keys (https://docs.aws.amazon.com/redshift/latest/dg/t_Sorting_data.html#t_Sorting_data-interleaved)
// .
func (c *Client) RestoreTableFromClusterSnapshot(ctx context.Context, params *RestoreTableFromClusterSnapshotInput, optFns ...func(*Options)) (*RestoreTableFromClusterSnapshotOutput, error) {
if params == nil {
params = &RestoreTableFromClusterSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreTableFromClusterSnapshot", params, optFns, c.addOperationRestoreTableFromClusterSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreTableFromClusterSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreTableFromClusterSnapshotInput struct {
// The identifier of the Amazon Redshift cluster to restore the table to.
//
// This member is required.
ClusterIdentifier *string
// The name of the table to create as a result of the current request.
//
// This member is required.
NewTableName *string
// The identifier of the snapshot to restore the table from. This snapshot must
// have been created from the Amazon Redshift cluster specified by the
// ClusterIdentifier parameter.
//
// This member is required.
SnapshotIdentifier *string
// The name of the source database that contains the table to restore from.
//
// This member is required.
SourceDatabaseName *string
// The name of the source table to restore from.
//
// This member is required.
SourceTableName *string
// Indicates whether name identifiers for database, schema, and table are case
// sensitive. If true , the names are case sensitive. If false (default), the
// names are not case sensitive.
EnableCaseSensitiveIdentifier *bool
// The name of the source schema that contains the table to restore from. If you
// do not specify a SourceSchemaName value, the default is public .
SourceSchemaName *string
// The name of the database to restore the table to.
TargetDatabaseName *string
// The name of the schema to restore the table to.
TargetSchemaName *string
noSmithyDocumentSerde
}
type RestoreTableFromClusterSnapshotOutput struct {
// Describes the status of a RestoreTableFromClusterSnapshot operation.
TableRestoreStatus *types.TableRestoreStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreTableFromClusterSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreTableFromClusterSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreTableFromClusterSnapshot{}, 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 = addOpRestoreTableFromClusterSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreTableFromClusterSnapshot(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_opRestoreTableFromClusterSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RestoreTableFromClusterSnapshot",
}
}
| 174 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Resumes a paused cluster.
func (c *Client) ResumeCluster(ctx context.Context, params *ResumeClusterInput, optFns ...func(*Options)) (*ResumeClusterOutput, error) {
if params == nil {
params = &ResumeClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ResumeCluster", params, optFns, c.addOperationResumeClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ResumeClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
// Describes a resume cluster operation. For example, a scheduled action to run
// the ResumeCluster API operation.
type ResumeClusterInput struct {
// The identifier of the cluster to be resumed.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
type ResumeClusterOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationResumeClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpResumeCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResumeCluster{}, 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 = addOpResumeClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResumeCluster(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_opResumeCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "ResumeCluster",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Revokes an ingress rule in an Amazon Redshift security group for a previously
// authorized IP range or Amazon EC2 security group. To add an ingress rule, see
// AuthorizeClusterSecurityGroupIngress . For information about managing security
// groups, go to Amazon Redshift Cluster Security Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) RevokeClusterSecurityGroupIngress(ctx context.Context, params *RevokeClusterSecurityGroupIngressInput, optFns ...func(*Options)) (*RevokeClusterSecurityGroupIngressOutput, error) {
if params == nil {
params = &RevokeClusterSecurityGroupIngressInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RevokeClusterSecurityGroupIngress", params, optFns, c.addOperationRevokeClusterSecurityGroupIngressMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RevokeClusterSecurityGroupIngressOutput)
out.ResultMetadata = metadata
return out, nil
}
type RevokeClusterSecurityGroupIngressInput struct {
// The name of the security Group from which to revoke the ingress rule.
//
// This member is required.
ClusterSecurityGroupName *string
// The IP range for which to revoke access. This range must be a valid Classless
// Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified,
// EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided.
CIDRIP *string
// The name of the EC2 Security Group whose access is to be revoked. If
// EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be
// provided and CIDRIP cannot be provided.
EC2SecurityGroupName *string
// The Amazon Web Services account number of the owner of the security group
// specified in the EC2SecurityGroupName parameter. The Amazon Web Services access
// key ID is not an acceptable value. If EC2SecurityGroupOwnerId is specified,
// EC2SecurityGroupName must also be provided. and CIDRIP cannot be provided.
// Example: 111122223333
EC2SecurityGroupOwnerId *string
noSmithyDocumentSerde
}
type RevokeClusterSecurityGroupIngressOutput struct {
// Describes a security group.
ClusterSecurityGroup *types.ClusterSecurityGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRevokeClusterSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRevokeClusterSecurityGroupIngress{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRevokeClusterSecurityGroupIngress{}, 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 = addOpRevokeClusterSecurityGroupIngressValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeClusterSecurityGroupIngress(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_opRevokeClusterSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RevokeClusterSecurityGroupIngress",
}
}
| 146 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Revokes access to a cluster.
func (c *Client) RevokeEndpointAccess(ctx context.Context, params *RevokeEndpointAccessInput, optFns ...func(*Options)) (*RevokeEndpointAccessOutput, error) {
if params == nil {
params = &RevokeEndpointAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RevokeEndpointAccess", params, optFns, c.addOperationRevokeEndpointAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RevokeEndpointAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type RevokeEndpointAccessInput struct {
// The Amazon Web Services account ID whose access is to be revoked.
Account *string
// The cluster to revoke access from.
ClusterIdentifier *string
// Indicates whether to force the revoke action. If true, the Redshift-managed VPC
// endpoints associated with the endpoint authorization are also deleted.
Force bool
// The virtual private cloud (VPC) identifiers for which access is to be revoked.
VpcIds []string
noSmithyDocumentSerde
}
// Describes an endpoint authorization for authorizing Redshift-managed VPC
// endpoint access to a cluster across Amazon Web Services accounts.
type RevokeEndpointAccessOutput struct {
// Indicates whether all VPCs in the grantee account are allowed access to the
// cluster.
AllowedAllVPCs bool
// The VPCs allowed access to the cluster.
AllowedVPCs []string
// The time (UTC) when the authorization was created.
AuthorizeTime *time.Time
// The cluster identifier.
ClusterIdentifier *string
// The status of the cluster.
ClusterStatus *string
// The number of Redshift-managed VPC endpoints created for the authorization.
EndpointCount int32
// The Amazon Web Services account ID of the grantee of the cluster.
Grantee *string
// The Amazon Web Services account ID of the cluster owner.
Grantor *string
// The status of the authorization action.
Status types.AuthorizationStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRevokeEndpointAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRevokeEndpointAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRevokeEndpointAccess{}, 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_opRevokeEndpointAccess(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_opRevokeEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RevokeEndpointAccess",
}
}
| 158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes the ability of the specified Amazon Web Services account to restore the
// specified snapshot. If the account is currently restoring the snapshot, the
// restore will run to completion. For more information about working with
// snapshots, go to Amazon Redshift Snapshots (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)
// in the Amazon Redshift Cluster Management Guide.
func (c *Client) RevokeSnapshotAccess(ctx context.Context, params *RevokeSnapshotAccessInput, optFns ...func(*Options)) (*RevokeSnapshotAccessOutput, error) {
if params == nil {
params = &RevokeSnapshotAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RevokeSnapshotAccess", params, optFns, c.addOperationRevokeSnapshotAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RevokeSnapshotAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type RevokeSnapshotAccessInput struct {
// The identifier of the Amazon Web Services account that can no longer restore
// the specified snapshot.
//
// This member is required.
AccountWithRestoreAccess *string
// The Amazon Resource Name (ARN) of the snapshot associated with the message to
// revoke access.
SnapshotArn *string
// The identifier of the cluster the snapshot was created from. This parameter is
// required if your IAM user has a policy containing a snapshot resource element
// that specifies anything other than * for the cluster name.
SnapshotClusterIdentifier *string
// The identifier of the snapshot that the account can no longer access.
SnapshotIdentifier *string
noSmithyDocumentSerde
}
type RevokeSnapshotAccessOutput struct {
// Describes a snapshot.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRevokeSnapshotAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRevokeSnapshotAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRevokeSnapshotAccess{}, 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 = addOpRevokeSnapshotAccessValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeSnapshotAccess(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_opRevokeSnapshotAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RevokeSnapshotAccess",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Rotates the encryption keys for a cluster.
func (c *Client) RotateEncryptionKey(ctx context.Context, params *RotateEncryptionKeyInput, optFns ...func(*Options)) (*RotateEncryptionKeyOutput, error) {
if params == nil {
params = &RotateEncryptionKeyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RotateEncryptionKey", params, optFns, c.addOperationRotateEncryptionKeyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RotateEncryptionKeyOutput)
out.ResultMetadata = metadata
return out, nil
}
type RotateEncryptionKeyInput struct {
// The unique identifier of the cluster that you want to rotate the encryption
// keys for. Constraints: Must be the name of valid cluster that has encryption
// enabled.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
type RotateEncryptionKeyOutput struct {
// Describes a cluster.
Cluster *types.Cluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRotateEncryptionKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRotateEncryptionKey{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRotateEncryptionKey{}, 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 = addOpRotateEncryptionKeyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRotateEncryptionKey(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_opRotateEncryptionKey(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "RotateEncryptionKey",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the status of a partner integration.
func (c *Client) UpdatePartnerStatus(ctx context.Context, params *UpdatePartnerStatusInput, optFns ...func(*Options)) (*UpdatePartnerStatusOutput, error) {
if params == nil {
params = &UpdatePartnerStatusInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdatePartnerStatus", params, optFns, c.addOperationUpdatePartnerStatusMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdatePartnerStatusOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdatePartnerStatusInput struct {
// The Amazon Web Services account ID that owns the cluster.
//
// This member is required.
AccountId *string
// The cluster identifier of the cluster whose partner integration status is being
// updated.
//
// This member is required.
ClusterIdentifier *string
// The name of the database whose partner integration status is being updated.
//
// This member is required.
DatabaseName *string
// The name of the partner whose integration status is being updated.
//
// This member is required.
PartnerName *string
// The value of the updated status.
//
// This member is required.
Status types.PartnerIntegrationStatus
// The status message provided by the partner.
StatusMessage *string
noSmithyDocumentSerde
}
type UpdatePartnerStatusOutput struct {
// The name of the database that receives data from the partner.
DatabaseName *string
// The name of the partner that is authorized to send data.
PartnerName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdatePartnerStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdatePartnerStatus{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdatePartnerStatus{}, 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 = addOpUpdatePartnerStatusValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePartnerStatus(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_opUpdatePartnerStatus(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift",
OperationName: "UpdatePartnerStatus",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package redshift provides the API client, operations, and parameter types for
// Amazon Redshift.
//
// Amazon Redshift Overview This is an interface reference for Amazon Redshift. It
// contains documentation for one of the programming or command line interfaces you
// can use to manage Amazon Redshift clusters. Note that Amazon Redshift is
// asynchronous, which means that some interfaces may require techniques, such as
// polling or asynchronous callback handlers, to determine when a command has been
// applied. In this reference, the parameter descriptions indicate whether a change
// is applied immediately, on the next instance reboot, or during the next
// maintenance window. For a summary of the Amazon Redshift cluster management
// interfaces, go to Using the Amazon Redshift Management Interfaces (https://docs.aws.amazon.com/redshift/latest/mgmt/using-aws-sdk.html)
// . Amazon Redshift manages all the work of setting up, operating, and scaling a
// data warehouse: provisioning capacity, monitoring and backing up the cluster,
// and applying patches and upgrades to the Amazon Redshift engine. You can focus
// on using your data to acquire new insights for your business and customers. If
// you are a first-time user of Amazon Redshift, we recommend that you begin by
// reading the Amazon Redshift Getting Started Guide (https://docs.aws.amazon.com/redshift/latest/gsg/getting-started.html)
// . If you are a database developer, the Amazon Redshift Database Developer Guide (https://docs.aws.amazon.com/redshift/latest/dg/welcome.html)
// explains how to design, build, query, and maintain the databases that make up
// your data warehouse.
package redshift
| 25 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
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/redshift/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 = "redshift"
}
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 redshift
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.28.0"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/query"
"github.com/aws/aws-sdk-go-v2/service/redshift/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/encoding/httpbinding"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
"path"
)
type awsAwsquery_serializeOpAcceptReservedNodeExchange struct {
}
func (*awsAwsquery_serializeOpAcceptReservedNodeExchange) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAcceptReservedNodeExchange) 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.(*AcceptReservedNodeExchangeInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AcceptReservedNodeExchange")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAcceptReservedNodeExchangeInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAddPartner struct {
}
func (*awsAwsquery_serializeOpAddPartner) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAddPartner) 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.(*AddPartnerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AddPartner")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAddPartnerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAssociateDataShareConsumer struct {
}
func (*awsAwsquery_serializeOpAssociateDataShareConsumer) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAssociateDataShareConsumer) 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.(*AssociateDataShareConsumerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AssociateDataShareConsumer")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAssociateDataShareConsumerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAuthorizeClusterSecurityGroupIngress struct {
}
func (*awsAwsquery_serializeOpAuthorizeClusterSecurityGroupIngress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAuthorizeClusterSecurityGroupIngress) 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.(*AuthorizeClusterSecurityGroupIngressInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AuthorizeClusterSecurityGroupIngress")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAuthorizeClusterSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAuthorizeDataShare struct {
}
func (*awsAwsquery_serializeOpAuthorizeDataShare) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAuthorizeDataShare) 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.(*AuthorizeDataShareInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AuthorizeDataShare")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAuthorizeDataShareInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAuthorizeEndpointAccess struct {
}
func (*awsAwsquery_serializeOpAuthorizeEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAuthorizeEndpointAccess) 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.(*AuthorizeEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AuthorizeEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAuthorizeEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpAuthorizeSnapshotAccess struct {
}
func (*awsAwsquery_serializeOpAuthorizeSnapshotAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAuthorizeSnapshotAccess) 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.(*AuthorizeSnapshotAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("AuthorizeSnapshotAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentAuthorizeSnapshotAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpBatchDeleteClusterSnapshots struct {
}
func (*awsAwsquery_serializeOpBatchDeleteClusterSnapshots) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpBatchDeleteClusterSnapshots) 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.(*BatchDeleteClusterSnapshotsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("BatchDeleteClusterSnapshots")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentBatchDeleteClusterSnapshotsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpBatchModifyClusterSnapshots struct {
}
func (*awsAwsquery_serializeOpBatchModifyClusterSnapshots) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpBatchModifyClusterSnapshots) 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.(*BatchModifyClusterSnapshotsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("BatchModifyClusterSnapshots")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentBatchModifyClusterSnapshotsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCancelResize struct {
}
func (*awsAwsquery_serializeOpCancelResize) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCancelResize) 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.(*CancelResizeInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CancelResize")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCancelResizeInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCopyClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpCopyClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyClusterSnapshot) 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.(*CopyClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CopyClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCopyClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateAuthenticationProfile struct {
}
func (*awsAwsquery_serializeOpCreateAuthenticationProfile) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateAuthenticationProfile) 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.(*CreateAuthenticationProfileInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateAuthenticationProfile")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateAuthenticationProfileInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateCluster struct {
}
func (*awsAwsquery_serializeOpCreateCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateCluster) 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.(*CreateClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpCreateClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateClusterParameterGroup) 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.(*CreateClusterParameterGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateClusterParameterGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateClusterParameterGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateClusterSecurityGroup struct {
}
func (*awsAwsquery_serializeOpCreateClusterSecurityGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateClusterSecurityGroup) 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.(*CreateClusterSecurityGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateClusterSecurityGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateClusterSecurityGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpCreateClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateClusterSnapshot) 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.(*CreateClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateClusterSubnetGroup struct {
}
func (*awsAwsquery_serializeOpCreateClusterSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateClusterSubnetGroup) 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.(*CreateClusterSubnetGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateClusterSubnetGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateClusterSubnetGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateCustomDomainAssociation struct {
}
func (*awsAwsquery_serializeOpCreateCustomDomainAssociation) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateCustomDomainAssociation) 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.(*CreateCustomDomainAssociationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateCustomDomainAssociation")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateCustomDomainAssociationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateEndpointAccess struct {
}
func (*awsAwsquery_serializeOpCreateEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateEndpointAccess) 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.(*CreateEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateEventSubscription struct {
}
func (*awsAwsquery_serializeOpCreateEventSubscription) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateEventSubscription) 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.(*CreateEventSubscriptionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateEventSubscription")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateEventSubscriptionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateHsmClientCertificate struct {
}
func (*awsAwsquery_serializeOpCreateHsmClientCertificate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateHsmClientCertificate) 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.(*CreateHsmClientCertificateInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateHsmClientCertificate")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateHsmClientCertificateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateHsmConfiguration struct {
}
func (*awsAwsquery_serializeOpCreateHsmConfiguration) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateHsmConfiguration) 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.(*CreateHsmConfigurationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateHsmConfiguration")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateHsmConfigurationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateScheduledAction struct {
}
func (*awsAwsquery_serializeOpCreateScheduledAction) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateScheduledAction) 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.(*CreateScheduledActionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateScheduledAction")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateScheduledActionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateSnapshotCopyGrant struct {
}
func (*awsAwsquery_serializeOpCreateSnapshotCopyGrant) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateSnapshotCopyGrant) 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.(*CreateSnapshotCopyGrantInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateSnapshotCopyGrant")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateSnapshotCopyGrantInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateSnapshotSchedule struct {
}
func (*awsAwsquery_serializeOpCreateSnapshotSchedule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateSnapshotSchedule) 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.(*CreateSnapshotScheduleInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateSnapshotSchedule")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateSnapshotScheduleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateTags struct {
}
func (*awsAwsquery_serializeOpCreateTags) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateTags) 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.(*CreateTagsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateTags")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateTagsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpCreateUsageLimit struct {
}
func (*awsAwsquery_serializeOpCreateUsageLimit) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateUsageLimit) 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.(*CreateUsageLimitInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateUsageLimit")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentCreateUsageLimitInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeauthorizeDataShare struct {
}
func (*awsAwsquery_serializeOpDeauthorizeDataShare) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeauthorizeDataShare) 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.(*DeauthorizeDataShareInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeauthorizeDataShare")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeauthorizeDataShareInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteAuthenticationProfile struct {
}
func (*awsAwsquery_serializeOpDeleteAuthenticationProfile) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteAuthenticationProfile) 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.(*DeleteAuthenticationProfileInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteAuthenticationProfile")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteAuthenticationProfileInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteCluster struct {
}
func (*awsAwsquery_serializeOpDeleteCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteCluster) 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.(*DeleteClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpDeleteClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteClusterParameterGroup) 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.(*DeleteClusterParameterGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteClusterParameterGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteClusterParameterGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteClusterSecurityGroup struct {
}
func (*awsAwsquery_serializeOpDeleteClusterSecurityGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteClusterSecurityGroup) 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.(*DeleteClusterSecurityGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteClusterSecurityGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteClusterSecurityGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpDeleteClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteClusterSnapshot) 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.(*DeleteClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteClusterSubnetGroup struct {
}
func (*awsAwsquery_serializeOpDeleteClusterSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteClusterSubnetGroup) 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.(*DeleteClusterSubnetGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteClusterSubnetGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteClusterSubnetGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteCustomDomainAssociation struct {
}
func (*awsAwsquery_serializeOpDeleteCustomDomainAssociation) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteCustomDomainAssociation) 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.(*DeleteCustomDomainAssociationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteCustomDomainAssociation")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteCustomDomainAssociationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteEndpointAccess struct {
}
func (*awsAwsquery_serializeOpDeleteEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteEndpointAccess) 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.(*DeleteEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteEventSubscription struct {
}
func (*awsAwsquery_serializeOpDeleteEventSubscription) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteEventSubscription) 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.(*DeleteEventSubscriptionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteEventSubscription")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteEventSubscriptionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteHsmClientCertificate struct {
}
func (*awsAwsquery_serializeOpDeleteHsmClientCertificate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteHsmClientCertificate) 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.(*DeleteHsmClientCertificateInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteHsmClientCertificate")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteHsmClientCertificateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteHsmConfiguration struct {
}
func (*awsAwsquery_serializeOpDeleteHsmConfiguration) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteHsmConfiguration) 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.(*DeleteHsmConfigurationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteHsmConfiguration")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteHsmConfigurationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeletePartner struct {
}
func (*awsAwsquery_serializeOpDeletePartner) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeletePartner) 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.(*DeletePartnerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeletePartner")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeletePartnerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteScheduledAction struct {
}
func (*awsAwsquery_serializeOpDeleteScheduledAction) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteScheduledAction) 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.(*DeleteScheduledActionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteScheduledAction")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteScheduledActionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteSnapshotCopyGrant struct {
}
func (*awsAwsquery_serializeOpDeleteSnapshotCopyGrant) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteSnapshotCopyGrant) 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.(*DeleteSnapshotCopyGrantInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteSnapshotCopyGrant")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteSnapshotCopyGrantInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteSnapshotSchedule struct {
}
func (*awsAwsquery_serializeOpDeleteSnapshotSchedule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteSnapshotSchedule) 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.(*DeleteSnapshotScheduleInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteSnapshotSchedule")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteSnapshotScheduleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteTags struct {
}
func (*awsAwsquery_serializeOpDeleteTags) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteTags) 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.(*DeleteTagsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteTags")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteTagsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDeleteUsageLimit struct {
}
func (*awsAwsquery_serializeOpDeleteUsageLimit) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteUsageLimit) 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.(*DeleteUsageLimitInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteUsageLimit")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteUsageLimitInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeAccountAttributes struct {
}
func (*awsAwsquery_serializeOpDescribeAccountAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeAccountAttributes) 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.(*DescribeAccountAttributesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeAccountAttributes")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeAccountAttributesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeAuthenticationProfiles struct {
}
func (*awsAwsquery_serializeOpDescribeAuthenticationProfiles) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeAuthenticationProfiles) 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.(*DescribeAuthenticationProfilesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeAuthenticationProfiles")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeAuthenticationProfilesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterDbRevisions struct {
}
func (*awsAwsquery_serializeOpDescribeClusterDbRevisions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterDbRevisions) 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.(*DescribeClusterDbRevisionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterDbRevisions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterDbRevisionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterParameterGroups struct {
}
func (*awsAwsquery_serializeOpDescribeClusterParameterGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterParameterGroups) 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.(*DescribeClusterParameterGroupsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterParameterGroups")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterParameterGroupsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterParameters struct {
}
func (*awsAwsquery_serializeOpDescribeClusterParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterParameters) 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.(*DescribeClusterParametersInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterParameters")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterParametersInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusters struct {
}
func (*awsAwsquery_serializeOpDescribeClusters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusters) 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.(*DescribeClustersInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusters")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClustersInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterSecurityGroups struct {
}
func (*awsAwsquery_serializeOpDescribeClusterSecurityGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterSecurityGroups) 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.(*DescribeClusterSecurityGroupsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterSecurityGroups")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterSecurityGroupsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterSnapshots struct {
}
func (*awsAwsquery_serializeOpDescribeClusterSnapshots) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterSnapshots) 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.(*DescribeClusterSnapshotsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterSnapshots")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterSnapshotsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterSubnetGroups struct {
}
func (*awsAwsquery_serializeOpDescribeClusterSubnetGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterSubnetGroups) 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.(*DescribeClusterSubnetGroupsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterSubnetGroups")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterSubnetGroupsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterTracks struct {
}
func (*awsAwsquery_serializeOpDescribeClusterTracks) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterTracks) 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.(*DescribeClusterTracksInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterTracks")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterTracksInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeClusterVersions struct {
}
func (*awsAwsquery_serializeOpDescribeClusterVersions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeClusterVersions) 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.(*DescribeClusterVersionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeClusterVersions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeClusterVersionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeCustomDomainAssociations struct {
}
func (*awsAwsquery_serializeOpDescribeCustomDomainAssociations) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeCustomDomainAssociations) 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.(*DescribeCustomDomainAssociationsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeCustomDomainAssociations")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeCustomDomainAssociationsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeDataShares struct {
}
func (*awsAwsquery_serializeOpDescribeDataShares) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDataShares) 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.(*DescribeDataSharesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeDataShares")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeDataSharesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeDataSharesForConsumer struct {
}
func (*awsAwsquery_serializeOpDescribeDataSharesForConsumer) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDataSharesForConsumer) 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.(*DescribeDataSharesForConsumerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeDataSharesForConsumer")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeDataSharesForConsumerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeDataSharesForProducer struct {
}
func (*awsAwsquery_serializeOpDescribeDataSharesForProducer) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDataSharesForProducer) 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.(*DescribeDataSharesForProducerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeDataSharesForProducer")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeDataSharesForProducerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeDefaultClusterParameters struct {
}
func (*awsAwsquery_serializeOpDescribeDefaultClusterParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDefaultClusterParameters) 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.(*DescribeDefaultClusterParametersInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeDefaultClusterParameters")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeDefaultClusterParametersInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeEndpointAccess struct {
}
func (*awsAwsquery_serializeOpDescribeEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEndpointAccess) 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.(*DescribeEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeEndpointAuthorization struct {
}
func (*awsAwsquery_serializeOpDescribeEndpointAuthorization) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEndpointAuthorization) 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.(*DescribeEndpointAuthorizationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeEndpointAuthorization")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeEndpointAuthorizationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeEventCategories struct {
}
func (*awsAwsquery_serializeOpDescribeEventCategories) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEventCategories) 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.(*DescribeEventCategoriesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeEventCategories")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeEventCategoriesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeEvents struct {
}
func (*awsAwsquery_serializeOpDescribeEvents) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEvents) 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.(*DescribeEventsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeEvents")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeEventsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeEventSubscriptions struct {
}
func (*awsAwsquery_serializeOpDescribeEventSubscriptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) 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.(*DescribeEventSubscriptionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeEventSubscriptions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeEventSubscriptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeHsmClientCertificates struct {
}
func (*awsAwsquery_serializeOpDescribeHsmClientCertificates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeHsmClientCertificates) 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.(*DescribeHsmClientCertificatesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeHsmClientCertificates")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeHsmClientCertificatesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeHsmConfigurations struct {
}
func (*awsAwsquery_serializeOpDescribeHsmConfigurations) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeHsmConfigurations) 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.(*DescribeHsmConfigurationsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeHsmConfigurations")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeHsmConfigurationsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeLoggingStatus struct {
}
func (*awsAwsquery_serializeOpDescribeLoggingStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeLoggingStatus) 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.(*DescribeLoggingStatusInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeLoggingStatus")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeLoggingStatusInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeNodeConfigurationOptions struct {
}
func (*awsAwsquery_serializeOpDescribeNodeConfigurationOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeNodeConfigurationOptions) 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.(*DescribeNodeConfigurationOptionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeNodeConfigurationOptions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeNodeConfigurationOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeOrderableClusterOptions struct {
}
func (*awsAwsquery_serializeOpDescribeOrderableClusterOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeOrderableClusterOptions) 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.(*DescribeOrderableClusterOptionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeOrderableClusterOptions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeOrderableClusterOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribePartners struct {
}
func (*awsAwsquery_serializeOpDescribePartners) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribePartners) 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.(*DescribePartnersInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribePartners")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribePartnersInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus struct {
}
func (*awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus) 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.(*DescribeReservedNodeExchangeStatusInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeReservedNodeExchangeStatus")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeReservedNodeExchangeStatusInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeReservedNodeOfferings struct {
}
func (*awsAwsquery_serializeOpDescribeReservedNodeOfferings) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReservedNodeOfferings) 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.(*DescribeReservedNodeOfferingsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeReservedNodeOfferings")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeReservedNodeOfferingsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeReservedNodes struct {
}
func (*awsAwsquery_serializeOpDescribeReservedNodes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReservedNodes) 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.(*DescribeReservedNodesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeReservedNodes")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeReservedNodesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeResize struct {
}
func (*awsAwsquery_serializeOpDescribeResize) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeResize) 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.(*DescribeResizeInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeResize")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeResizeInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeScheduledActions struct {
}
func (*awsAwsquery_serializeOpDescribeScheduledActions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeScheduledActions) 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.(*DescribeScheduledActionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeScheduledActions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeScheduledActionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeSnapshotCopyGrants struct {
}
func (*awsAwsquery_serializeOpDescribeSnapshotCopyGrants) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeSnapshotCopyGrants) 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.(*DescribeSnapshotCopyGrantsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeSnapshotCopyGrants")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeSnapshotCopyGrantsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeSnapshotSchedules struct {
}
func (*awsAwsquery_serializeOpDescribeSnapshotSchedules) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeSnapshotSchedules) 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.(*DescribeSnapshotSchedulesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeSnapshotSchedules")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeSnapshotSchedulesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeStorage struct {
}
func (*awsAwsquery_serializeOpDescribeStorage) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeStorage) 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.(*DescribeStorageInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeStorage")
body.Key("Version").String("2012-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeTableRestoreStatus struct {
}
func (*awsAwsquery_serializeOpDescribeTableRestoreStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeTableRestoreStatus) 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.(*DescribeTableRestoreStatusInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeTableRestoreStatus")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeTableRestoreStatusInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeTags struct {
}
func (*awsAwsquery_serializeOpDescribeTags) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeTags) 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.(*DescribeTagsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeTags")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeTagsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDescribeUsageLimits struct {
}
func (*awsAwsquery_serializeOpDescribeUsageLimits) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeUsageLimits) 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.(*DescribeUsageLimitsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeUsageLimits")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeUsageLimitsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDisableLogging struct {
}
func (*awsAwsquery_serializeOpDisableLogging) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDisableLogging) 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.(*DisableLoggingInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DisableLogging")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDisableLoggingInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDisableSnapshotCopy struct {
}
func (*awsAwsquery_serializeOpDisableSnapshotCopy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDisableSnapshotCopy) 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.(*DisableSnapshotCopyInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DisableSnapshotCopy")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDisableSnapshotCopyInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpDisassociateDataShareConsumer struct {
}
func (*awsAwsquery_serializeOpDisassociateDataShareConsumer) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDisassociateDataShareConsumer) 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.(*DisassociateDataShareConsumerInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DisassociateDataShareConsumer")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentDisassociateDataShareConsumerInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpEnableLogging struct {
}
func (*awsAwsquery_serializeOpEnableLogging) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpEnableLogging) 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.(*EnableLoggingInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("EnableLogging")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentEnableLoggingInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpEnableSnapshotCopy struct {
}
func (*awsAwsquery_serializeOpEnableSnapshotCopy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpEnableSnapshotCopy) 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.(*EnableSnapshotCopyInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("EnableSnapshotCopy")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentEnableSnapshotCopyInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpGetClusterCredentials struct {
}
func (*awsAwsquery_serializeOpGetClusterCredentials) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetClusterCredentials) 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.(*GetClusterCredentialsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetClusterCredentials")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentGetClusterCredentialsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpGetClusterCredentialsWithIAM struct {
}
func (*awsAwsquery_serializeOpGetClusterCredentialsWithIAM) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetClusterCredentialsWithIAM) 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.(*GetClusterCredentialsWithIAMInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetClusterCredentialsWithIAM")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentGetClusterCredentialsWithIAMInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions struct {
}
func (*awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions) 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.(*GetReservedNodeExchangeConfigurationOptionsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetReservedNodeExchangeConfigurationOptions")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentGetReservedNodeExchangeConfigurationOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpGetReservedNodeExchangeOfferings struct {
}
func (*awsAwsquery_serializeOpGetReservedNodeExchangeOfferings) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetReservedNodeExchangeOfferings) 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.(*GetReservedNodeExchangeOfferingsInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetReservedNodeExchangeOfferings")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentGetReservedNodeExchangeOfferingsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyAquaConfiguration struct {
}
func (*awsAwsquery_serializeOpModifyAquaConfiguration) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyAquaConfiguration) 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.(*ModifyAquaConfigurationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyAquaConfiguration")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyAquaConfigurationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyAuthenticationProfile struct {
}
func (*awsAwsquery_serializeOpModifyAuthenticationProfile) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyAuthenticationProfile) 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.(*ModifyAuthenticationProfileInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyAuthenticationProfile")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyAuthenticationProfileInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyCluster struct {
}
func (*awsAwsquery_serializeOpModifyCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyCluster) 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.(*ModifyClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterDbRevision struct {
}
func (*awsAwsquery_serializeOpModifyClusterDbRevision) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterDbRevision) 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.(*ModifyClusterDbRevisionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterDbRevision")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterDbRevisionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterIamRoles struct {
}
func (*awsAwsquery_serializeOpModifyClusterIamRoles) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterIamRoles) 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.(*ModifyClusterIamRolesInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterIamRoles")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterIamRolesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterMaintenance struct {
}
func (*awsAwsquery_serializeOpModifyClusterMaintenance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterMaintenance) 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.(*ModifyClusterMaintenanceInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterMaintenance")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterMaintenanceInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpModifyClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterParameterGroup) 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.(*ModifyClusterParameterGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterParameterGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterParameterGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpModifyClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterSnapshot) 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.(*ModifyClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterSnapshotSchedule struct {
}
func (*awsAwsquery_serializeOpModifyClusterSnapshotSchedule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterSnapshotSchedule) 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.(*ModifyClusterSnapshotScheduleInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterSnapshotSchedule")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterSnapshotScheduleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyClusterSubnetGroup struct {
}
func (*awsAwsquery_serializeOpModifyClusterSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyClusterSubnetGroup) 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.(*ModifyClusterSubnetGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyClusterSubnetGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyClusterSubnetGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyCustomDomainAssociation struct {
}
func (*awsAwsquery_serializeOpModifyCustomDomainAssociation) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyCustomDomainAssociation) 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.(*ModifyCustomDomainAssociationInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyCustomDomainAssociation")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyCustomDomainAssociationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyEndpointAccess struct {
}
func (*awsAwsquery_serializeOpModifyEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyEndpointAccess) 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.(*ModifyEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyEventSubscription struct {
}
func (*awsAwsquery_serializeOpModifyEventSubscription) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyEventSubscription) 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.(*ModifyEventSubscriptionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyEventSubscription")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyEventSubscriptionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyScheduledAction struct {
}
func (*awsAwsquery_serializeOpModifyScheduledAction) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyScheduledAction) 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.(*ModifyScheduledActionInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyScheduledAction")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyScheduledActionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifySnapshotCopyRetentionPeriod struct {
}
func (*awsAwsquery_serializeOpModifySnapshotCopyRetentionPeriod) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifySnapshotCopyRetentionPeriod) 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.(*ModifySnapshotCopyRetentionPeriodInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifySnapshotCopyRetentionPeriod")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifySnapshotCopyRetentionPeriodInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifySnapshotSchedule struct {
}
func (*awsAwsquery_serializeOpModifySnapshotSchedule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifySnapshotSchedule) 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.(*ModifySnapshotScheduleInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifySnapshotSchedule")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifySnapshotScheduleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpModifyUsageLimit struct {
}
func (*awsAwsquery_serializeOpModifyUsageLimit) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyUsageLimit) 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.(*ModifyUsageLimitInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ModifyUsageLimit")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentModifyUsageLimitInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpPauseCluster struct {
}
func (*awsAwsquery_serializeOpPauseCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPauseCluster) 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.(*PauseClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("PauseCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentPauseClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpPurchaseReservedNodeOffering struct {
}
func (*awsAwsquery_serializeOpPurchaseReservedNodeOffering) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPurchaseReservedNodeOffering) 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.(*PurchaseReservedNodeOfferingInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("PurchaseReservedNodeOffering")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentPurchaseReservedNodeOfferingInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRebootCluster struct {
}
func (*awsAwsquery_serializeOpRebootCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRebootCluster) 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.(*RebootClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RebootCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRebootClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRejectDataShare struct {
}
func (*awsAwsquery_serializeOpRejectDataShare) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRejectDataShare) 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.(*RejectDataShareInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RejectDataShare")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRejectDataShareInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpResetClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpResetClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpResetClusterParameterGroup) 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.(*ResetClusterParameterGroupInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ResetClusterParameterGroup")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentResetClusterParameterGroupInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpResizeCluster struct {
}
func (*awsAwsquery_serializeOpResizeCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpResizeCluster) 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.(*ResizeClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ResizeCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentResizeClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRestoreFromClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpRestoreFromClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreFromClusterSnapshot) 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.(*RestoreFromClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RestoreFromClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRestoreFromClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRestoreTableFromClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpRestoreTableFromClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreTableFromClusterSnapshot) 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.(*RestoreTableFromClusterSnapshotInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RestoreTableFromClusterSnapshot")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRestoreTableFromClusterSnapshotInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpResumeCluster struct {
}
func (*awsAwsquery_serializeOpResumeCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpResumeCluster) 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.(*ResumeClusterInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ResumeCluster")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentResumeClusterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRevokeClusterSecurityGroupIngress struct {
}
func (*awsAwsquery_serializeOpRevokeClusterSecurityGroupIngress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRevokeClusterSecurityGroupIngress) 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.(*RevokeClusterSecurityGroupIngressInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RevokeClusterSecurityGroupIngress")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRevokeClusterSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRevokeEndpointAccess struct {
}
func (*awsAwsquery_serializeOpRevokeEndpointAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRevokeEndpointAccess) 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.(*RevokeEndpointAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RevokeEndpointAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRevokeEndpointAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRevokeSnapshotAccess struct {
}
func (*awsAwsquery_serializeOpRevokeSnapshotAccess) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRevokeSnapshotAccess) 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.(*RevokeSnapshotAccessInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RevokeSnapshotAccess")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRevokeSnapshotAccessInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpRotateEncryptionKey struct {
}
func (*awsAwsquery_serializeOpRotateEncryptionKey) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRotateEncryptionKey) 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.(*RotateEncryptionKeyInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("RotateEncryptionKey")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentRotateEncryptionKeyInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpUpdatePartnerStatus struct {
}
func (*awsAwsquery_serializeOpUpdatePartnerStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdatePartnerStatus) 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.(*UpdatePartnerStatusInput)
_ = 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-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdatePartnerStatus")
body.Key("Version").String("2012-12-01")
if err := awsAwsquery_serializeOpDocumentUpdatePartnerStatusInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeDocumentAttributeNameList(v []string, value query.Value) error {
array := value.Array("AttributeName")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentClusterSecurityGroupNameList(v []string, value query.Value) error {
array := value.Array("ClusterSecurityGroupName")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentDbGroupList(v []string, value query.Value) error {
array := value.Array("DbGroup")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentDeleteClusterSnapshotMessage(v *types.DeleteClusterSnapshotMessage, value query.Value) error {
object := value.Object()
_ = object
if v.SnapshotClusterIdentifier != nil {
objectKey := object.Key("SnapshotClusterIdentifier")
objectKey.String(*v.SnapshotClusterIdentifier)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeDocumentDeleteClusterSnapshotMessageList(v []types.DeleteClusterSnapshotMessage, value query.Value) error {
array := value.Array("DeleteClusterSnapshotMessage")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentDeleteClusterSnapshotMessage(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentEventCategoriesList(v []string, value query.Value) error {
array := value.Array("EventCategory")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentIamRoleArnList(v []string, value query.Value) error {
array := value.Array("IamRoleArn")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentLogTypeList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentNodeConfigurationOptionsFilter(v *types.NodeConfigurationOptionsFilter, value query.Value) error {
object := value.Object()
_ = object
if len(v.Name) > 0 {
objectKey := object.Key("Name")
objectKey.String(string(v.Name))
}
if len(v.Operator) > 0 {
objectKey := object.Key("Operator")
objectKey.String(string(v.Operator))
}
if v.Values != nil {
objectKey := object.Key("Value")
if err := awsAwsquery_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentNodeConfigurationOptionsFilterList(v []types.NodeConfigurationOptionsFilter, value query.Value) error {
array := value.Array("NodeConfigurationOptionsFilter")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentNodeConfigurationOptionsFilter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentParameter(v *types.Parameter, value query.Value) error {
object := value.Object()
_ = object
if v.AllowedValues != nil {
objectKey := object.Key("AllowedValues")
objectKey.String(*v.AllowedValues)
}
if len(v.ApplyType) > 0 {
objectKey := object.Key("ApplyType")
objectKey.String(string(v.ApplyType))
}
if v.DataType != nil {
objectKey := object.Key("DataType")
objectKey.String(*v.DataType)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.IsModifiable {
objectKey := object.Key("IsModifiable")
objectKey.Boolean(v.IsModifiable)
}
if v.MinimumEngineVersion != nil {
objectKey := object.Key("MinimumEngineVersion")
objectKey.String(*v.MinimumEngineVersion)
}
if v.ParameterName != nil {
objectKey := object.Key("ParameterName")
objectKey.String(*v.ParameterName)
}
if v.ParameterValue != nil {
objectKey := object.Key("ParameterValue")
objectKey.String(*v.ParameterValue)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
return nil
}
func awsAwsquery_serializeDocumentParametersList(v []types.Parameter, value query.Value) error {
array := value.Array("Parameter")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentParameter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentPauseClusterMessage(v *types.PauseClusterMessage, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeDocumentResizeClusterMessage(v *types.ResizeClusterMessage, value query.Value) error {
object := value.Object()
_ = object
if v.Classic != nil {
objectKey := object.Key("Classic")
objectKey.Boolean(*v.Classic)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ClusterType != nil {
objectKey := object.Key("ClusterType")
objectKey.String(*v.ClusterType)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
if v.NumberOfNodes != nil {
objectKey := object.Key("NumberOfNodes")
objectKey.Integer(*v.NumberOfNodes)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
if v.TargetReservedNodeOfferingId != nil {
objectKey := object.Key("TargetReservedNodeOfferingId")
objectKey.String(*v.TargetReservedNodeOfferingId)
}
return nil
}
func awsAwsquery_serializeDocumentResumeClusterMessage(v *types.ResumeClusterMessage, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeDocumentScheduledActionFilter(v *types.ScheduledActionFilter, value query.Value) error {
object := value.Object()
_ = object
if len(v.Name) > 0 {
objectKey := object.Key("Name")
objectKey.String(string(v.Name))
}
if v.Values != nil {
objectKey := object.Key("Values")
if err := awsAwsquery_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentScheduledActionFilterList(v []types.ScheduledActionFilter, value query.Value) error {
array := value.Array("ScheduledActionFilter")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentScheduledActionFilter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentScheduledActionType(v *types.ScheduledActionType, value query.Value) error {
object := value.Object()
_ = object
if v.PauseCluster != nil {
objectKey := object.Key("PauseCluster")
if err := awsAwsquery_serializeDocumentPauseClusterMessage(v.PauseCluster, objectKey); err != nil {
return err
}
}
if v.ResizeCluster != nil {
objectKey := object.Key("ResizeCluster")
if err := awsAwsquery_serializeDocumentResizeClusterMessage(v.ResizeCluster, objectKey); err != nil {
return err
}
}
if v.ResumeCluster != nil {
objectKey := object.Key("ResumeCluster")
if err := awsAwsquery_serializeDocumentResumeClusterMessage(v.ResumeCluster, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentScheduleDefinitionList(v []string, value query.Value) error {
array := value.Array("ScheduleDefinition")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentSnapshotIdentifierList(v []string, value query.Value) error {
array := value.Array("String")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentSnapshotSortingEntity(v *types.SnapshotSortingEntity, value query.Value) error {
object := value.Object()
_ = object
if len(v.Attribute) > 0 {
objectKey := object.Key("Attribute")
objectKey.String(string(v.Attribute))
}
if len(v.SortOrder) > 0 {
objectKey := object.Key("SortOrder")
objectKey.String(string(v.SortOrder))
}
return nil
}
func awsAwsquery_serializeDocumentSnapshotSortingEntityList(v []types.SnapshotSortingEntity, value query.Value) error {
array := value.Array("SnapshotSortingEntity")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentSnapshotSortingEntity(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentSourceIdsList(v []string, value query.Value) error {
array := value.Array("SourceId")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentSubnetIdentifierList(v []string, value query.Value) error {
array := value.Array("SubnetIdentifier")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
object := value.Object()
_ = object
if v.Key != nil {
objectKey := object.Key("Key")
objectKey.String(*v.Key)
}
if v.Value != nil {
objectKey := object.Key("Value")
objectKey.String(*v.Value)
}
return nil
}
func awsAwsquery_serializeDocumentTagKeyList(v []string, value query.Value) error {
array := value.Array("TagKey")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentTagList(v []types.Tag, value query.Value) error {
array := value.Array("Tag")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentTagValueList(v []string, value query.Value) error {
array := value.Array("TagValue")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentValueStringList(v []string, value query.Value) error {
array := value.Array("item")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentVpcIdentifierList(v []string, value query.Value) error {
array := value.Array("VpcIdentifier")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v []string, value query.Value) error {
array := value.Array("VpcSecurityGroupId")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeOpDocumentAcceptReservedNodeExchangeInput(v *AcceptReservedNodeExchangeInput, value query.Value) error {
object := value.Object()
_ = object
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
if v.TargetReservedNodeOfferingId != nil {
objectKey := object.Key("TargetReservedNodeOfferingId")
objectKey.String(*v.TargetReservedNodeOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentAddPartnerInput(v *AddPartnerInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountId != nil {
objectKey := object.Key("AccountId")
objectKey.String(*v.AccountId)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.PartnerName != nil {
objectKey := object.Key("PartnerName")
objectKey.String(*v.PartnerName)
}
return nil
}
func awsAwsquery_serializeOpDocumentAssociateDataShareConsumerInput(v *AssociateDataShareConsumerInput, value query.Value) error {
object := value.Object()
_ = object
if v.AssociateEntireAccount != nil {
objectKey := object.Key("AssociateEntireAccount")
objectKey.Boolean(*v.AssociateEntireAccount)
}
if v.ConsumerArn != nil {
objectKey := object.Key("ConsumerArn")
objectKey.String(*v.ConsumerArn)
}
if v.ConsumerRegion != nil {
objectKey := object.Key("ConsumerRegion")
objectKey.String(*v.ConsumerRegion)
}
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentAuthorizeClusterSecurityGroupIngressInput(v *AuthorizeClusterSecurityGroupIngressInput, value query.Value) error {
object := value.Object()
_ = object
if v.CIDRIP != nil {
objectKey := object.Key("CIDRIP")
objectKey.String(*v.CIDRIP)
}
if v.ClusterSecurityGroupName != nil {
objectKey := object.Key("ClusterSecurityGroupName")
objectKey.String(*v.ClusterSecurityGroupName)
}
if v.EC2SecurityGroupName != nil {
objectKey := object.Key("EC2SecurityGroupName")
objectKey.String(*v.EC2SecurityGroupName)
}
if v.EC2SecurityGroupOwnerId != nil {
objectKey := object.Key("EC2SecurityGroupOwnerId")
objectKey.String(*v.EC2SecurityGroupOwnerId)
}
return nil
}
func awsAwsquery_serializeOpDocumentAuthorizeDataShareInput(v *AuthorizeDataShareInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConsumerIdentifier != nil {
objectKey := object.Key("ConsumerIdentifier")
objectKey.String(*v.ConsumerIdentifier)
}
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentAuthorizeEndpointAccessInput(v *AuthorizeEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.Account != nil {
objectKey := object.Key("Account")
objectKey.String(*v.Account)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.VpcIds != nil {
objectKey := object.Key("VpcIds")
if err := awsAwsquery_serializeDocumentVpcIdentifierList(v.VpcIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentAuthorizeSnapshotAccessInput(v *AuthorizeSnapshotAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountWithRestoreAccess != nil {
objectKey := object.Key("AccountWithRestoreAccess")
objectKey.String(*v.AccountWithRestoreAccess)
}
if v.SnapshotArn != nil {
objectKey := object.Key("SnapshotArn")
objectKey.String(*v.SnapshotArn)
}
if v.SnapshotClusterIdentifier != nil {
objectKey := object.Key("SnapshotClusterIdentifier")
objectKey.String(*v.SnapshotClusterIdentifier)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentBatchDeleteClusterSnapshotsInput(v *BatchDeleteClusterSnapshotsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identifiers != nil {
objectKey := object.Key("Identifiers")
if err := awsAwsquery_serializeDocumentDeleteClusterSnapshotMessageList(v.Identifiers, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentBatchModifyClusterSnapshotsInput(v *BatchModifyClusterSnapshotsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Force {
objectKey := object.Key("Force")
objectKey.Boolean(v.Force)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.SnapshotIdentifierList != nil {
objectKey := object.Key("SnapshotIdentifierList")
if err := awsAwsquery_serializeDocumentSnapshotIdentifierList(v.SnapshotIdentifierList, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCancelResizeInput(v *CancelResizeInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyClusterSnapshotInput(v *CopyClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.SourceSnapshotClusterIdentifier != nil {
objectKey := object.Key("SourceSnapshotClusterIdentifier")
objectKey.String(*v.SourceSnapshotClusterIdentifier)
}
if v.SourceSnapshotIdentifier != nil {
objectKey := object.Key("SourceSnapshotIdentifier")
objectKey.String(*v.SourceSnapshotIdentifier)
}
if v.TargetSnapshotIdentifier != nil {
objectKey := object.Key("TargetSnapshotIdentifier")
objectKey.String(*v.TargetSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateAuthenticationProfileInput(v *CreateAuthenticationProfileInput, value query.Value) error {
object := value.Object()
_ = object
if v.AuthenticationProfileContent != nil {
objectKey := object.Key("AuthenticationProfileContent")
objectKey.String(*v.AuthenticationProfileContent)
}
if v.AuthenticationProfileName != nil {
objectKey := object.Key("AuthenticationProfileName")
objectKey.String(*v.AuthenticationProfileName)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.AdditionalInfo != nil {
objectKey := object.Key("AdditionalInfo")
objectKey.String(*v.AdditionalInfo)
}
if v.AllowVersionUpgrade != nil {
objectKey := object.Key("AllowVersionUpgrade")
objectKey.Boolean(*v.AllowVersionUpgrade)
}
if len(v.AquaConfigurationStatus) > 0 {
objectKey := object.Key("AquaConfigurationStatus")
objectKey.String(string(v.AquaConfigurationStatus))
}
if v.AutomatedSnapshotRetentionPeriod != nil {
objectKey := object.Key("AutomatedSnapshotRetentionPeriod")
objectKey.Integer(*v.AutomatedSnapshotRetentionPeriod)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.AvailabilityZoneRelocation != nil {
objectKey := object.Key("AvailabilityZoneRelocation")
objectKey.Boolean(*v.AvailabilityZoneRelocation)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ClusterParameterGroupName != nil {
objectKey := object.Key("ClusterParameterGroupName")
objectKey.String(*v.ClusterParameterGroupName)
}
if v.ClusterSecurityGroups != nil {
objectKey := object.Key("ClusterSecurityGroups")
if err := awsAwsquery_serializeDocumentClusterSecurityGroupNameList(v.ClusterSecurityGroups, objectKey); err != nil {
return err
}
}
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
if v.ClusterType != nil {
objectKey := object.Key("ClusterType")
objectKey.String(*v.ClusterType)
}
if v.ClusterVersion != nil {
objectKey := object.Key("ClusterVersion")
objectKey.String(*v.ClusterVersion)
}
if v.DBName != nil {
objectKey := object.Key("DBName")
objectKey.String(*v.DBName)
}
if v.DefaultIamRoleArn != nil {
objectKey := object.Key("DefaultIamRoleArn")
objectKey.String(*v.DefaultIamRoleArn)
}
if v.ElasticIp != nil {
objectKey := object.Key("ElasticIp")
objectKey.String(*v.ElasticIp)
}
if v.Encrypted != nil {
objectKey := object.Key("Encrypted")
objectKey.Boolean(*v.Encrypted)
}
if v.EnhancedVpcRouting != nil {
objectKey := object.Key("EnhancedVpcRouting")
objectKey.Boolean(*v.EnhancedVpcRouting)
}
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
if v.IamRoles != nil {
objectKey := object.Key("IamRoles")
if err := awsAwsquery_serializeDocumentIamRoleArnList(v.IamRoles, objectKey); err != nil {
return err
}
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.LoadSampleData != nil {
objectKey := object.Key("LoadSampleData")
objectKey.String(*v.LoadSampleData)
}
if v.MaintenanceTrackName != nil {
objectKey := object.Key("MaintenanceTrackName")
objectKey.String(*v.MaintenanceTrackName)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.MasterUsername != nil {
objectKey := object.Key("MasterUsername")
objectKey.String(*v.MasterUsername)
}
if v.MasterUserPassword != nil {
objectKey := object.Key("MasterUserPassword")
objectKey.String(*v.MasterUserPassword)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
if v.NumberOfNodes != nil {
objectKey := object.Key("NumberOfNodes")
objectKey.Integer(*v.NumberOfNodes)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.SnapshotScheduleIdentifier != nil {
objectKey := object.Key("SnapshotScheduleIdentifier")
objectKey.String(*v.SnapshotScheduleIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateClusterParameterGroupInput(v *CreateClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.ParameterGroupFamily != nil {
objectKey := object.Key("ParameterGroupFamily")
objectKey.String(*v.ParameterGroupFamily)
}
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateClusterSecurityGroupInput(v *CreateClusterSecurityGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSecurityGroupName != nil {
objectKey := object.Key("ClusterSecurityGroupName")
objectKey.String(*v.ClusterSecurityGroupName)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateClusterSnapshotInput(v *CreateClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateClusterSubnetGroupInput(v *CreateClusterSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.SubnetIds != nil {
objectKey := object.Key("SubnetIds")
if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, objectKey); err != nil {
return err
}
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateCustomDomainAssociationInput(v *CreateCustomDomainAssociationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.CustomDomainCertificateArn != nil {
objectKey := object.Key("CustomDomainCertificateArn")
objectKey.String(*v.CustomDomainCertificateArn)
}
if v.CustomDomainName != nil {
objectKey := object.Key("CustomDomainName")
objectKey.String(*v.CustomDomainName)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateEndpointAccessInput(v *CreateEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.EndpointName != nil {
objectKey := object.Key("EndpointName")
objectKey.String(*v.EndpointName)
}
if v.ResourceOwner != nil {
objectKey := object.Key("ResourceOwner")
objectKey.String(*v.ResourceOwner)
}
if v.SubnetGroupName != nil {
objectKey := object.Key("SubnetGroupName")
objectKey.String(*v.SubnetGroupName)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateEventSubscriptionInput(v *CreateEventSubscriptionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Enabled != nil {
objectKey := object.Key("Enabled")
objectKey.Boolean(*v.Enabled)
}
if v.EventCategories != nil {
objectKey := object.Key("EventCategories")
if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil {
return err
}
}
if v.Severity != nil {
objectKey := object.Key("Severity")
objectKey.String(*v.Severity)
}
if v.SnsTopicArn != nil {
objectKey := object.Key("SnsTopicArn")
objectKey.String(*v.SnsTopicArn)
}
if v.SourceIds != nil {
objectKey := object.Key("SourceIds")
if err := awsAwsquery_serializeDocumentSourceIdsList(v.SourceIds, objectKey); err != nil {
return err
}
}
if v.SourceType != nil {
objectKey := object.Key("SourceType")
objectKey.String(*v.SourceType)
}
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateHsmClientCertificateInput(v *CreateHsmClientCertificateInput, value query.Value) error {
object := value.Object()
_ = object
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateHsmConfigurationInput(v *CreateHsmConfigurationInput, value query.Value) error {
object := value.Object()
_ = object
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
if v.HsmIpAddress != nil {
objectKey := object.Key("HsmIpAddress")
objectKey.String(*v.HsmIpAddress)
}
if v.HsmPartitionName != nil {
objectKey := object.Key("HsmPartitionName")
objectKey.String(*v.HsmPartitionName)
}
if v.HsmPartitionPassword != nil {
objectKey := object.Key("HsmPartitionPassword")
objectKey.String(*v.HsmPartitionPassword)
}
if v.HsmServerPublicCertificate != nil {
objectKey := object.Key("HsmServerPublicCertificate")
objectKey.String(*v.HsmServerPublicCertificate)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateScheduledActionInput(v *CreateScheduledActionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Enable != nil {
objectKey := object.Key("Enable")
objectKey.Boolean(*v.Enable)
}
if v.EndTime != nil {
objectKey := object.Key("EndTime")
objectKey.String(smithytime.FormatDateTime(*v.EndTime))
}
if v.IamRole != nil {
objectKey := object.Key("IamRole")
objectKey.String(*v.IamRole)
}
if v.Schedule != nil {
objectKey := object.Key("Schedule")
objectKey.String(*v.Schedule)
}
if v.ScheduledActionDescription != nil {
objectKey := object.Key("ScheduledActionDescription")
objectKey.String(*v.ScheduledActionDescription)
}
if v.ScheduledActionName != nil {
objectKey := object.Key("ScheduledActionName")
objectKey.String(*v.ScheduledActionName)
}
if v.StartTime != nil {
objectKey := object.Key("StartTime")
objectKey.String(smithytime.FormatDateTime(*v.StartTime))
}
if v.TargetAction != nil {
objectKey := object.Key("TargetAction")
if err := awsAwsquery_serializeDocumentScheduledActionType(v.TargetAction, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateSnapshotCopyGrantInput(v *CreateSnapshotCopyGrantInput, value query.Value) error {
object := value.Object()
_ = object
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.SnapshotCopyGrantName != nil {
objectKey := object.Key("SnapshotCopyGrantName")
objectKey.String(*v.SnapshotCopyGrantName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateSnapshotScheduleInput(v *CreateSnapshotScheduleInput, value query.Value) error {
object := value.Object()
_ = object
if v.DryRun != nil {
objectKey := object.Key("DryRun")
objectKey.Boolean(*v.DryRun)
}
if v.NextInvocations != nil {
objectKey := object.Key("NextInvocations")
objectKey.Integer(*v.NextInvocations)
}
if v.ScheduleDefinitions != nil {
objectKey := object.Key("ScheduleDefinitions")
if err := awsAwsquery_serializeDocumentScheduleDefinitionList(v.ScheduleDefinitions, objectKey); err != nil {
return err
}
}
if v.ScheduleDescription != nil {
objectKey := object.Key("ScheduleDescription")
objectKey.String(*v.ScheduleDescription)
}
if v.ScheduleIdentifier != nil {
objectKey := object.Key("ScheduleIdentifier")
objectKey.String(*v.ScheduleIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ResourceName != nil {
objectKey := object.Key("ResourceName")
objectKey.String(*v.ResourceName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateUsageLimitInput(v *CreateUsageLimitInput, value query.Value) error {
object := value.Object()
_ = object
{
objectKey := object.Key("Amount")
objectKey.Long(v.Amount)
}
if len(v.BreachAction) > 0 {
objectKey := object.Key("BreachAction")
objectKey.String(string(v.BreachAction))
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if len(v.FeatureType) > 0 {
objectKey := object.Key("FeatureType")
objectKey.String(string(v.FeatureType))
}
if len(v.LimitType) > 0 {
objectKey := object.Key("LimitType")
objectKey.String(string(v.LimitType))
}
if len(v.Period) > 0 {
objectKey := object.Key("Period")
objectKey.String(string(v.Period))
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDeauthorizeDataShareInput(v *DeauthorizeDataShareInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConsumerIdentifier != nil {
objectKey := object.Key("ConsumerIdentifier")
objectKey.String(*v.ConsumerIdentifier)
}
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteAuthenticationProfileInput(v *DeleteAuthenticationProfileInput, value query.Value) error {
object := value.Object()
_ = object
if v.AuthenticationProfileName != nil {
objectKey := object.Key("AuthenticationProfileName")
objectKey.String(*v.AuthenticationProfileName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteClusterInput(v *DeleteClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.FinalClusterSnapshotIdentifier != nil {
objectKey := object.Key("FinalClusterSnapshotIdentifier")
objectKey.String(*v.FinalClusterSnapshotIdentifier)
}
if v.FinalClusterSnapshotRetentionPeriod != nil {
objectKey := object.Key("FinalClusterSnapshotRetentionPeriod")
objectKey.Integer(*v.FinalClusterSnapshotRetentionPeriod)
}
if v.SkipFinalClusterSnapshot {
objectKey := object.Key("SkipFinalClusterSnapshot")
objectKey.Boolean(v.SkipFinalClusterSnapshot)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteClusterParameterGroupInput(v *DeleteClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteClusterSecurityGroupInput(v *DeleteClusterSecurityGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSecurityGroupName != nil {
objectKey := object.Key("ClusterSecurityGroupName")
objectKey.String(*v.ClusterSecurityGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteClusterSnapshotInput(v *DeleteClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.SnapshotClusterIdentifier != nil {
objectKey := object.Key("SnapshotClusterIdentifier")
objectKey.String(*v.SnapshotClusterIdentifier)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteClusterSubnetGroupInput(v *DeleteClusterSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteCustomDomainAssociationInput(v *DeleteCustomDomainAssociationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteEndpointAccessInput(v *DeleteEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.EndpointName != nil {
objectKey := object.Key("EndpointName")
objectKey.String(*v.EndpointName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteEventSubscriptionInput(v *DeleteEventSubscriptionInput, value query.Value) error {
object := value.Object()
_ = object
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteHsmClientCertificateInput(v *DeleteHsmClientCertificateInput, value query.Value) error {
object := value.Object()
_ = object
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteHsmConfigurationInput(v *DeleteHsmConfigurationInput, value query.Value) error {
object := value.Object()
_ = object
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeletePartnerInput(v *DeletePartnerInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountId != nil {
objectKey := object.Key("AccountId")
objectKey.String(*v.AccountId)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.PartnerName != nil {
objectKey := object.Key("PartnerName")
objectKey.String(*v.PartnerName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteScheduledActionInput(v *DeleteScheduledActionInput, value query.Value) error {
object := value.Object()
_ = object
if v.ScheduledActionName != nil {
objectKey := object.Key("ScheduledActionName")
objectKey.String(*v.ScheduledActionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteSnapshotCopyGrantInput(v *DeleteSnapshotCopyGrantInput, value query.Value) error {
object := value.Object()
_ = object
if v.SnapshotCopyGrantName != nil {
objectKey := object.Key("SnapshotCopyGrantName")
objectKey.String(*v.SnapshotCopyGrantName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteSnapshotScheduleInput(v *DeleteSnapshotScheduleInput, value query.Value) error {
object := value.Object()
_ = object
if v.ScheduleIdentifier != nil {
objectKey := object.Key("ScheduleIdentifier")
objectKey.String(*v.ScheduleIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ResourceName != nil {
objectKey := object.Key("ResourceName")
objectKey.String(*v.ResourceName)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteUsageLimitInput(v *DeleteUsageLimitInput, value query.Value) error {
object := value.Object()
_ = object
if v.UsageLimitId != nil {
objectKey := object.Key("UsageLimitId")
objectKey.String(*v.UsageLimitId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.AttributeNames != nil {
objectKey := object.Key("AttributeNames")
if err := awsAwsquery_serializeDocumentAttributeNameList(v.AttributeNames, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeAuthenticationProfilesInput(v *DescribeAuthenticationProfilesInput, value query.Value) error {
object := value.Object()
_ = object
if v.AuthenticationProfileName != nil {
objectKey := object.Key("AuthenticationProfileName")
objectKey.String(*v.AuthenticationProfileName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterDbRevisionsInput(v *DescribeClusterDbRevisionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterParameterGroupsInput(v *DescribeClusterParameterGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterParametersInput(v *DescribeClusterParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterSecurityGroupsInput(v *DescribeClusterSecurityGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSecurityGroupName != nil {
objectKey := object.Key("ClusterSecurityGroupName")
objectKey.String(*v.ClusterSecurityGroupName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClustersInput(v *DescribeClustersInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterSnapshotsInput(v *DescribeClusterSnapshotsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterExists != nil {
objectKey := object.Key("ClusterExists")
objectKey.Boolean(*v.ClusterExists)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.EndTime != nil {
objectKey := object.Key("EndTime")
objectKey.String(smithytime.FormatDateTime(*v.EndTime))
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.OwnerAccount != nil {
objectKey := object.Key("OwnerAccount")
objectKey.String(*v.OwnerAccount)
}
if v.SnapshotArn != nil {
objectKey := object.Key("SnapshotArn")
objectKey.String(*v.SnapshotArn)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
if v.SnapshotType != nil {
objectKey := object.Key("SnapshotType")
objectKey.String(*v.SnapshotType)
}
if v.SortingEntities != nil {
objectKey := object.Key("SortingEntities")
if err := awsAwsquery_serializeDocumentSnapshotSortingEntityList(v.SortingEntities, objectKey); err != nil {
return err
}
}
if v.StartTime != nil {
objectKey := object.Key("StartTime")
objectKey.String(smithytime.FormatDateTime(*v.StartTime))
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterSubnetGroupsInput(v *DescribeClusterSubnetGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterTracksInput(v *DescribeClusterTracksInput, value query.Value) error {
object := value.Object()
_ = object
if v.MaintenanceTrackName != nil {
objectKey := object.Key("MaintenanceTrackName")
objectKey.String(*v.MaintenanceTrackName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeClusterVersionsInput(v *DescribeClusterVersionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterParameterGroupFamily != nil {
objectKey := object.Key("ClusterParameterGroupFamily")
objectKey.String(*v.ClusterParameterGroupFamily)
}
if v.ClusterVersion != nil {
objectKey := object.Key("ClusterVersion")
objectKey.String(*v.ClusterVersion)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeCustomDomainAssociationsInput(v *DescribeCustomDomainAssociationsInput, value query.Value) error {
object := value.Object()
_ = object
if v.CustomDomainCertificateArn != nil {
objectKey := object.Key("CustomDomainCertificateArn")
objectKey.String(*v.CustomDomainCertificateArn)
}
if v.CustomDomainName != nil {
objectKey := object.Key("CustomDomainName")
objectKey.String(*v.CustomDomainName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDataSharesForConsumerInput(v *DescribeDataSharesForConsumerInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConsumerArn != nil {
objectKey := object.Key("ConsumerArn")
objectKey.String(*v.ConsumerArn)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if len(v.Status) > 0 {
objectKey := object.Key("Status")
objectKey.String(string(v.Status))
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDataSharesForProducerInput(v *DescribeDataSharesForProducerInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ProducerArn != nil {
objectKey := object.Key("ProducerArn")
objectKey.String(*v.ProducerArn)
}
if len(v.Status) > 0 {
objectKey := object.Key("Status")
objectKey.String(string(v.Status))
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDataSharesInput(v *DescribeDataSharesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDefaultClusterParametersInput(v *DescribeDefaultClusterParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ParameterGroupFamily != nil {
objectKey := object.Key("ParameterGroupFamily")
objectKey.String(*v.ParameterGroupFamily)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEndpointAccessInput(v *DescribeEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.EndpointName != nil {
objectKey := object.Key("EndpointName")
objectKey.String(*v.EndpointName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ResourceOwner != nil {
objectKey := object.Key("ResourceOwner")
objectKey.String(*v.ResourceOwner)
}
if v.VpcId != nil {
objectKey := object.Key("VpcId")
objectKey.String(*v.VpcId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEndpointAuthorizationInput(v *DescribeEndpointAuthorizationInput, value query.Value) error {
object := value.Object()
_ = object
if v.Account != nil {
objectKey := object.Key("Account")
objectKey.String(*v.Account)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Grantee != nil {
objectKey := object.Key("Grantee")
objectKey.Boolean(*v.Grantee)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEventCategoriesInput(v *DescribeEventCategoriesInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceType != nil {
objectKey := object.Key("SourceType")
objectKey.String(*v.SourceType)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEventsInput(v *DescribeEventsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Duration != nil {
objectKey := object.Key("Duration")
objectKey.Integer(*v.Duration)
}
if v.EndTime != nil {
objectKey := object.Key("EndTime")
objectKey.String(smithytime.FormatDateTime(*v.EndTime))
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.SourceIdentifier != nil {
objectKey := object.Key("SourceIdentifier")
objectKey.String(*v.SourceIdentifier)
}
if len(v.SourceType) > 0 {
objectKey := object.Key("SourceType")
objectKey.String(string(v.SourceType))
}
if v.StartTime != nil {
objectKey := object.Key("StartTime")
objectKey.String(smithytime.FormatDateTime(*v.StartTime))
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEventSubscriptionsInput(v *DescribeEventSubscriptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeHsmClientCertificatesInput(v *DescribeHsmClientCertificatesInput, value query.Value) error {
object := value.Object()
_ = object
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeHsmConfigurationsInput(v *DescribeHsmConfigurationsInput, value query.Value) error {
object := value.Object()
_ = object
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeLoggingStatusInput(v *DescribeLoggingStatusInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeNodeConfigurationOptionsInput(v *DescribeNodeConfigurationOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.ActionType) > 0 {
objectKey := object.Key("ActionType")
objectKey.String(string(v.ActionType))
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filter")
if err := awsAwsquery_serializeDocumentNodeConfigurationOptionsFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.OwnerAccount != nil {
objectKey := object.Key("OwnerAccount")
objectKey.String(*v.OwnerAccount)
}
if v.SnapshotArn != nil {
objectKey := object.Key("SnapshotArn")
objectKey.String(*v.SnapshotArn)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeOrderableClusterOptionsInput(v *DescribeOrderableClusterOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterVersion != nil {
objectKey := object.Key("ClusterVersion")
objectKey.String(*v.ClusterVersion)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribePartnersInput(v *DescribePartnersInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountId != nil {
objectKey := object.Key("AccountId")
objectKey.String(*v.AccountId)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.PartnerName != nil {
objectKey := object.Key("PartnerName")
objectKey.String(*v.PartnerName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReservedNodeExchangeStatusInput(v *DescribeReservedNodeExchangeStatusInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ReservedNodeExchangeRequestId != nil {
objectKey := object.Key("ReservedNodeExchangeRequestId")
objectKey.String(*v.ReservedNodeExchangeRequestId)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReservedNodeOfferingsInput(v *DescribeReservedNodeOfferingsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ReservedNodeOfferingId != nil {
objectKey := object.Key("ReservedNodeOfferingId")
objectKey.String(*v.ReservedNodeOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReservedNodesInput(v *DescribeReservedNodesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeResizeInput(v *DescribeResizeInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeScheduledActionsInput(v *DescribeScheduledActionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Active != nil {
objectKey := object.Key("Active")
objectKey.Boolean(*v.Active)
}
if v.EndTime != nil {
objectKey := object.Key("EndTime")
objectKey.String(smithytime.FormatDateTime(*v.EndTime))
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentScheduledActionFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ScheduledActionName != nil {
objectKey := object.Key("ScheduledActionName")
objectKey.String(*v.ScheduledActionName)
}
if v.StartTime != nil {
objectKey := object.Key("StartTime")
objectKey.String(smithytime.FormatDateTime(*v.StartTime))
}
if len(v.TargetActionType) > 0 {
objectKey := object.Key("TargetActionType")
objectKey.String(string(v.TargetActionType))
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeSnapshotCopyGrantsInput(v *DescribeSnapshotCopyGrantsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.SnapshotCopyGrantName != nil {
objectKey := object.Key("SnapshotCopyGrantName")
objectKey.String(*v.SnapshotCopyGrantName)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeSnapshotSchedulesInput(v *DescribeSnapshotSchedulesInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ScheduleIdentifier != nil {
objectKey := object.Key("ScheduleIdentifier")
objectKey.String(*v.ScheduleIdentifier)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeTableRestoreStatusInput(v *DescribeTableRestoreStatusInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TableRestoreRequestId != nil {
objectKey := object.Key("TableRestoreRequestId")
objectKey.String(*v.TableRestoreRequestId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ResourceName != nil {
objectKey := object.Key("ResourceName")
objectKey.String(*v.ResourceName)
}
if v.ResourceType != nil {
objectKey := object.Key("ResourceType")
objectKey.String(*v.ResourceType)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeUsageLimitsInput(v *DescribeUsageLimitsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if len(v.FeatureType) > 0 {
objectKey := object.Key("FeatureType")
objectKey.String(string(v.FeatureType))
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.TagKeys != nil {
objectKey := object.Key("TagKeys")
if err := awsAwsquery_serializeDocumentTagKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
if v.TagValues != nil {
objectKey := object.Key("TagValues")
if err := awsAwsquery_serializeDocumentTagValueList(v.TagValues, objectKey); err != nil {
return err
}
}
if v.UsageLimitId != nil {
objectKey := object.Key("UsageLimitId")
objectKey.String(*v.UsageLimitId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDisableLoggingInput(v *DisableLoggingInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDisableSnapshotCopyInput(v *DisableSnapshotCopyInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDisassociateDataShareConsumerInput(v *DisassociateDataShareConsumerInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConsumerArn != nil {
objectKey := object.Key("ConsumerArn")
objectKey.String(*v.ConsumerArn)
}
if v.ConsumerRegion != nil {
objectKey := object.Key("ConsumerRegion")
objectKey.String(*v.ConsumerRegion)
}
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
if v.DisassociateEntireAccount != nil {
objectKey := object.Key("DisassociateEntireAccount")
objectKey.Boolean(*v.DisassociateEntireAccount)
}
return nil
}
func awsAwsquery_serializeOpDocumentEnableLoggingInput(v *EnableLoggingInput, value query.Value) error {
object := value.Object()
_ = object
if v.BucketName != nil {
objectKey := object.Key("BucketName")
objectKey.String(*v.BucketName)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if len(v.LogDestinationType) > 0 {
objectKey := object.Key("LogDestinationType")
objectKey.String(string(v.LogDestinationType))
}
if v.LogExports != nil {
objectKey := object.Key("LogExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.LogExports, objectKey); err != nil {
return err
}
}
if v.S3KeyPrefix != nil {
objectKey := object.Key("S3KeyPrefix")
objectKey.String(*v.S3KeyPrefix)
}
return nil
}
func awsAwsquery_serializeOpDocumentEnableSnapshotCopyInput(v *EnableSnapshotCopyInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DestinationRegion != nil {
objectKey := object.Key("DestinationRegion")
objectKey.String(*v.DestinationRegion)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.RetentionPeriod != nil {
objectKey := object.Key("RetentionPeriod")
objectKey.Integer(*v.RetentionPeriod)
}
if v.SnapshotCopyGrantName != nil {
objectKey := object.Key("SnapshotCopyGrantName")
objectKey.String(*v.SnapshotCopyGrantName)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetClusterCredentialsInput(v *GetClusterCredentialsInput, value query.Value) error {
object := value.Object()
_ = object
if v.AutoCreate != nil {
objectKey := object.Key("AutoCreate")
objectKey.Boolean(*v.AutoCreate)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.CustomDomainName != nil {
objectKey := object.Key("CustomDomainName")
objectKey.String(*v.CustomDomainName)
}
if v.DbGroups != nil {
objectKey := object.Key("DbGroups")
if err := awsAwsquery_serializeDocumentDbGroupList(v.DbGroups, objectKey); err != nil {
return err
}
}
if v.DbName != nil {
objectKey := object.Key("DbName")
objectKey.String(*v.DbName)
}
if v.DbUser != nil {
objectKey := object.Key("DbUser")
objectKey.String(*v.DbUser)
}
if v.DurationSeconds != nil {
objectKey := object.Key("DurationSeconds")
objectKey.Integer(*v.DurationSeconds)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetClusterCredentialsWithIAMInput(v *GetClusterCredentialsWithIAMInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.CustomDomainName != nil {
objectKey := object.Key("CustomDomainName")
objectKey.String(*v.CustomDomainName)
}
if v.DbName != nil {
objectKey := object.Key("DbName")
objectKey.String(*v.DbName)
}
if v.DurationSeconds != nil {
objectKey := object.Key("DurationSeconds")
objectKey.Integer(*v.DurationSeconds)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetReservedNodeExchangeConfigurationOptionsInput(v *GetReservedNodeExchangeConfigurationOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.ActionType) > 0 {
objectKey := object.Key("ActionType")
objectKey.String(string(v.ActionType))
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetReservedNodeExchangeOfferingsInput(v *GetReservedNodeExchangeOfferingsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.MaxRecords != nil {
objectKey := object.Key("MaxRecords")
objectKey.Integer(*v.MaxRecords)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyAquaConfigurationInput(v *ModifyAquaConfigurationInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.AquaConfigurationStatus) > 0 {
objectKey := object.Key("AquaConfigurationStatus")
objectKey.String(string(v.AquaConfigurationStatus))
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyAuthenticationProfileInput(v *ModifyAuthenticationProfileInput, value query.Value) error {
object := value.Object()
_ = object
if v.AuthenticationProfileContent != nil {
objectKey := object.Key("AuthenticationProfileContent")
objectKey.String(*v.AuthenticationProfileContent)
}
if v.AuthenticationProfileName != nil {
objectKey := object.Key("AuthenticationProfileName")
objectKey.String(*v.AuthenticationProfileName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterDbRevisionInput(v *ModifyClusterDbRevisionInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.RevisionTarget != nil {
objectKey := object.Key("RevisionTarget")
objectKey.String(*v.RevisionTarget)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterIamRolesInput(v *ModifyClusterIamRolesInput, value query.Value) error {
object := value.Object()
_ = object
if v.AddIamRoles != nil {
objectKey := object.Key("AddIamRoles")
if err := awsAwsquery_serializeDocumentIamRoleArnList(v.AddIamRoles, objectKey); err != nil {
return err
}
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DefaultIamRoleArn != nil {
objectKey := object.Key("DefaultIamRoleArn")
objectKey.String(*v.DefaultIamRoleArn)
}
if v.RemoveIamRoles != nil {
objectKey := object.Key("RemoveIamRoles")
if err := awsAwsquery_serializeDocumentIamRoleArnList(v.RemoveIamRoles, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterInput(v *ModifyClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllowVersionUpgrade != nil {
objectKey := object.Key("AllowVersionUpgrade")
objectKey.Boolean(*v.AllowVersionUpgrade)
}
if v.AutomatedSnapshotRetentionPeriod != nil {
objectKey := object.Key("AutomatedSnapshotRetentionPeriod")
objectKey.Integer(*v.AutomatedSnapshotRetentionPeriod)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.AvailabilityZoneRelocation != nil {
objectKey := object.Key("AvailabilityZoneRelocation")
objectKey.Boolean(*v.AvailabilityZoneRelocation)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ClusterParameterGroupName != nil {
objectKey := object.Key("ClusterParameterGroupName")
objectKey.String(*v.ClusterParameterGroupName)
}
if v.ClusterSecurityGroups != nil {
objectKey := object.Key("ClusterSecurityGroups")
if err := awsAwsquery_serializeDocumentClusterSecurityGroupNameList(v.ClusterSecurityGroups, objectKey); err != nil {
return err
}
}
if v.ClusterType != nil {
objectKey := object.Key("ClusterType")
objectKey.String(*v.ClusterType)
}
if v.ClusterVersion != nil {
objectKey := object.Key("ClusterVersion")
objectKey.String(*v.ClusterVersion)
}
if v.ElasticIp != nil {
objectKey := object.Key("ElasticIp")
objectKey.String(*v.ElasticIp)
}
if v.Encrypted != nil {
objectKey := object.Key("Encrypted")
objectKey.Boolean(*v.Encrypted)
}
if v.EnhancedVpcRouting != nil {
objectKey := object.Key("EnhancedVpcRouting")
objectKey.Boolean(*v.EnhancedVpcRouting)
}
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.MaintenanceTrackName != nil {
objectKey := object.Key("MaintenanceTrackName")
objectKey.String(*v.MaintenanceTrackName)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.MasterUserPassword != nil {
objectKey := object.Key("MasterUserPassword")
objectKey.String(*v.MasterUserPassword)
}
if v.NewClusterIdentifier != nil {
objectKey := object.Key("NewClusterIdentifier")
objectKey.String(*v.NewClusterIdentifier)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
if v.NumberOfNodes != nil {
objectKey := object.Key("NumberOfNodes")
objectKey.Integer(*v.NumberOfNodes)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterMaintenanceInput(v *ModifyClusterMaintenanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DeferMaintenance != nil {
objectKey := object.Key("DeferMaintenance")
objectKey.Boolean(*v.DeferMaintenance)
}
if v.DeferMaintenanceDuration != nil {
objectKey := object.Key("DeferMaintenanceDuration")
objectKey.Integer(*v.DeferMaintenanceDuration)
}
if v.DeferMaintenanceEndTime != nil {
objectKey := object.Key("DeferMaintenanceEndTime")
objectKey.String(smithytime.FormatDateTime(*v.DeferMaintenanceEndTime))
}
if v.DeferMaintenanceIdentifier != nil {
objectKey := object.Key("DeferMaintenanceIdentifier")
objectKey.String(*v.DeferMaintenanceIdentifier)
}
if v.DeferMaintenanceStartTime != nil {
objectKey := object.Key("DeferMaintenanceStartTime")
objectKey.String(smithytime.FormatDateTime(*v.DeferMaintenanceStartTime))
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterParameterGroupInput(v *ModifyClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
if v.Parameters != nil {
objectKey := object.Key("Parameters")
if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterSnapshotInput(v *ModifyClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.Force {
objectKey := object.Key("Force")
objectKey.Boolean(v.Force)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterSnapshotScheduleInput(v *ModifyClusterSnapshotScheduleInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DisassociateSchedule != nil {
objectKey := object.Key("DisassociateSchedule")
objectKey.Boolean(*v.DisassociateSchedule)
}
if v.ScheduleIdentifier != nil {
objectKey := object.Key("ScheduleIdentifier")
objectKey.String(*v.ScheduleIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyClusterSubnetGroupInput(v *ModifyClusterSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.SubnetIds != nil {
objectKey := object.Key("SubnetIds")
if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyCustomDomainAssociationInput(v *ModifyCustomDomainAssociationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.CustomDomainCertificateArn != nil {
objectKey := object.Key("CustomDomainCertificateArn")
objectKey.String(*v.CustomDomainCertificateArn)
}
if v.CustomDomainName != nil {
objectKey := object.Key("CustomDomainName")
objectKey.String(*v.CustomDomainName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyEndpointAccessInput(v *ModifyEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.EndpointName != nil {
objectKey := object.Key("EndpointName")
objectKey.String(*v.EndpointName)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyEventSubscriptionInput(v *ModifyEventSubscriptionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Enabled != nil {
objectKey := object.Key("Enabled")
objectKey.Boolean(*v.Enabled)
}
if v.EventCategories != nil {
objectKey := object.Key("EventCategories")
if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil {
return err
}
}
if v.Severity != nil {
objectKey := object.Key("Severity")
objectKey.String(*v.Severity)
}
if v.SnsTopicArn != nil {
objectKey := object.Key("SnsTopicArn")
objectKey.String(*v.SnsTopicArn)
}
if v.SourceIds != nil {
objectKey := object.Key("SourceIds")
if err := awsAwsquery_serializeDocumentSourceIdsList(v.SourceIds, objectKey); err != nil {
return err
}
}
if v.SourceType != nil {
objectKey := object.Key("SourceType")
objectKey.String(*v.SourceType)
}
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyScheduledActionInput(v *ModifyScheduledActionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Enable != nil {
objectKey := object.Key("Enable")
objectKey.Boolean(*v.Enable)
}
if v.EndTime != nil {
objectKey := object.Key("EndTime")
objectKey.String(smithytime.FormatDateTime(*v.EndTime))
}
if v.IamRole != nil {
objectKey := object.Key("IamRole")
objectKey.String(*v.IamRole)
}
if v.Schedule != nil {
objectKey := object.Key("Schedule")
objectKey.String(*v.Schedule)
}
if v.ScheduledActionDescription != nil {
objectKey := object.Key("ScheduledActionDescription")
objectKey.String(*v.ScheduledActionDescription)
}
if v.ScheduledActionName != nil {
objectKey := object.Key("ScheduledActionName")
objectKey.String(*v.ScheduledActionName)
}
if v.StartTime != nil {
objectKey := object.Key("StartTime")
objectKey.String(smithytime.FormatDateTime(*v.StartTime))
}
if v.TargetAction != nil {
objectKey := object.Key("TargetAction")
if err := awsAwsquery_serializeDocumentScheduledActionType(v.TargetAction, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifySnapshotCopyRetentionPeriodInput(v *ModifySnapshotCopyRetentionPeriodInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Manual {
objectKey := object.Key("Manual")
objectKey.Boolean(v.Manual)
}
{
objectKey := object.Key("RetentionPeriod")
objectKey.Integer(v.RetentionPeriod)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifySnapshotScheduleInput(v *ModifySnapshotScheduleInput, value query.Value) error {
object := value.Object()
_ = object
if v.ScheduleDefinitions != nil {
objectKey := object.Key("ScheduleDefinitions")
if err := awsAwsquery_serializeDocumentScheduleDefinitionList(v.ScheduleDefinitions, objectKey); err != nil {
return err
}
}
if v.ScheduleIdentifier != nil {
objectKey := object.Key("ScheduleIdentifier")
objectKey.String(*v.ScheduleIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyUsageLimitInput(v *ModifyUsageLimitInput, value query.Value) error {
object := value.Object()
_ = object
if v.Amount != nil {
objectKey := object.Key("Amount")
objectKey.Long(*v.Amount)
}
if len(v.BreachAction) > 0 {
objectKey := object.Key("BreachAction")
objectKey.String(string(v.BreachAction))
}
if v.UsageLimitId != nil {
objectKey := object.Key("UsageLimitId")
objectKey.String(*v.UsageLimitId)
}
return nil
}
func awsAwsquery_serializeOpDocumentPauseClusterInput(v *PauseClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentPurchaseReservedNodeOfferingInput(v *PurchaseReservedNodeOfferingInput, value query.Value) error {
object := value.Object()
_ = object
if v.NodeCount != nil {
objectKey := object.Key("NodeCount")
objectKey.Integer(*v.NodeCount)
}
if v.ReservedNodeOfferingId != nil {
objectKey := object.Key("ReservedNodeOfferingId")
objectKey.String(*v.ReservedNodeOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentRebootClusterInput(v *RebootClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentRejectDataShareInput(v *RejectDataShareInput, value query.Value) error {
object := value.Object()
_ = object
if v.DataShareArn != nil {
objectKey := object.Key("DataShareArn")
objectKey.String(*v.DataShareArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentResetClusterParameterGroupInput(v *ResetClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ParameterGroupName != nil {
objectKey := object.Key("ParameterGroupName")
objectKey.String(*v.ParameterGroupName)
}
if v.Parameters != nil {
objectKey := object.Key("Parameters")
if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil {
return err
}
}
if v.ResetAllParameters {
objectKey := object.Key("ResetAllParameters")
objectKey.Boolean(v.ResetAllParameters)
}
return nil
}
func awsAwsquery_serializeOpDocumentResizeClusterInput(v *ResizeClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.Classic != nil {
objectKey := object.Key("Classic")
objectKey.Boolean(*v.Classic)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ClusterType != nil {
objectKey := object.Key("ClusterType")
objectKey.String(*v.ClusterType)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
if v.NumberOfNodes != nil {
objectKey := object.Key("NumberOfNodes")
objectKey.Integer(*v.NumberOfNodes)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
if v.TargetReservedNodeOfferingId != nil {
objectKey := object.Key("TargetReservedNodeOfferingId")
objectKey.String(*v.TargetReservedNodeOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentRestoreFromClusterSnapshotInput(v *RestoreFromClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.AdditionalInfo != nil {
objectKey := object.Key("AdditionalInfo")
objectKey.String(*v.AdditionalInfo)
}
if v.AllowVersionUpgrade != nil {
objectKey := object.Key("AllowVersionUpgrade")
objectKey.Boolean(*v.AllowVersionUpgrade)
}
if len(v.AquaConfigurationStatus) > 0 {
objectKey := object.Key("AquaConfigurationStatus")
objectKey.String(string(v.AquaConfigurationStatus))
}
if v.AutomatedSnapshotRetentionPeriod != nil {
objectKey := object.Key("AutomatedSnapshotRetentionPeriod")
objectKey.Integer(*v.AutomatedSnapshotRetentionPeriod)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.AvailabilityZoneRelocation != nil {
objectKey := object.Key("AvailabilityZoneRelocation")
objectKey.Boolean(*v.AvailabilityZoneRelocation)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.ClusterParameterGroupName != nil {
objectKey := object.Key("ClusterParameterGroupName")
objectKey.String(*v.ClusterParameterGroupName)
}
if v.ClusterSecurityGroups != nil {
objectKey := object.Key("ClusterSecurityGroups")
if err := awsAwsquery_serializeDocumentClusterSecurityGroupNameList(v.ClusterSecurityGroups, objectKey); err != nil {
return err
}
}
if v.ClusterSubnetGroupName != nil {
objectKey := object.Key("ClusterSubnetGroupName")
objectKey.String(*v.ClusterSubnetGroupName)
}
if v.DefaultIamRoleArn != nil {
objectKey := object.Key("DefaultIamRoleArn")
objectKey.String(*v.DefaultIamRoleArn)
}
if v.ElasticIp != nil {
objectKey := object.Key("ElasticIp")
objectKey.String(*v.ElasticIp)
}
if v.Encrypted != nil {
objectKey := object.Key("Encrypted")
objectKey.Boolean(*v.Encrypted)
}
if v.EnhancedVpcRouting != nil {
objectKey := object.Key("EnhancedVpcRouting")
objectKey.Boolean(*v.EnhancedVpcRouting)
}
if v.HsmClientCertificateIdentifier != nil {
objectKey := object.Key("HsmClientCertificateIdentifier")
objectKey.String(*v.HsmClientCertificateIdentifier)
}
if v.HsmConfigurationIdentifier != nil {
objectKey := object.Key("HsmConfigurationIdentifier")
objectKey.String(*v.HsmConfigurationIdentifier)
}
if v.IamRoles != nil {
objectKey := object.Key("IamRoles")
if err := awsAwsquery_serializeDocumentIamRoleArnList(v.IamRoles, objectKey); err != nil {
return err
}
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.MaintenanceTrackName != nil {
objectKey := object.Key("MaintenanceTrackName")
objectKey.String(*v.MaintenanceTrackName)
}
if v.ManualSnapshotRetentionPeriod != nil {
objectKey := object.Key("ManualSnapshotRetentionPeriod")
objectKey.Integer(*v.ManualSnapshotRetentionPeriod)
}
if v.NodeType != nil {
objectKey := object.Key("NodeType")
objectKey.String(*v.NodeType)
}
if v.NumberOfNodes != nil {
objectKey := object.Key("NumberOfNodes")
objectKey.Integer(*v.NumberOfNodes)
}
if v.OwnerAccount != nil {
objectKey := object.Key("OwnerAccount")
objectKey.String(*v.OwnerAccount)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.ReservedNodeId != nil {
objectKey := object.Key("ReservedNodeId")
objectKey.String(*v.ReservedNodeId)
}
if v.SnapshotArn != nil {
objectKey := object.Key("SnapshotArn")
objectKey.String(*v.SnapshotArn)
}
if v.SnapshotClusterIdentifier != nil {
objectKey := object.Key("SnapshotClusterIdentifier")
objectKey.String(*v.SnapshotClusterIdentifier)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
if v.SnapshotScheduleIdentifier != nil {
objectKey := object.Key("SnapshotScheduleIdentifier")
objectKey.String(*v.SnapshotScheduleIdentifier)
}
if v.TargetReservedNodeOfferingId != nil {
objectKey := object.Key("TargetReservedNodeOfferingId")
objectKey.String(*v.TargetReservedNodeOfferingId)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRestoreTableFromClusterSnapshotInput(v *RestoreTableFromClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.EnableCaseSensitiveIdentifier != nil {
objectKey := object.Key("EnableCaseSensitiveIdentifier")
objectKey.Boolean(*v.EnableCaseSensitiveIdentifier)
}
if v.NewTableName != nil {
objectKey := object.Key("NewTableName")
objectKey.String(*v.NewTableName)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
if v.SourceDatabaseName != nil {
objectKey := object.Key("SourceDatabaseName")
objectKey.String(*v.SourceDatabaseName)
}
if v.SourceSchemaName != nil {
objectKey := object.Key("SourceSchemaName")
objectKey.String(*v.SourceSchemaName)
}
if v.SourceTableName != nil {
objectKey := object.Key("SourceTableName")
objectKey.String(*v.SourceTableName)
}
if v.TargetDatabaseName != nil {
objectKey := object.Key("TargetDatabaseName")
objectKey.String(*v.TargetDatabaseName)
}
if v.TargetSchemaName != nil {
objectKey := object.Key("TargetSchemaName")
objectKey.String(*v.TargetSchemaName)
}
return nil
}
func awsAwsquery_serializeOpDocumentResumeClusterInput(v *ResumeClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentRevokeClusterSecurityGroupIngressInput(v *RevokeClusterSecurityGroupIngressInput, value query.Value) error {
object := value.Object()
_ = object
if v.CIDRIP != nil {
objectKey := object.Key("CIDRIP")
objectKey.String(*v.CIDRIP)
}
if v.ClusterSecurityGroupName != nil {
objectKey := object.Key("ClusterSecurityGroupName")
objectKey.String(*v.ClusterSecurityGroupName)
}
if v.EC2SecurityGroupName != nil {
objectKey := object.Key("EC2SecurityGroupName")
objectKey.String(*v.EC2SecurityGroupName)
}
if v.EC2SecurityGroupOwnerId != nil {
objectKey := object.Key("EC2SecurityGroupOwnerId")
objectKey.String(*v.EC2SecurityGroupOwnerId)
}
return nil
}
func awsAwsquery_serializeOpDocumentRevokeEndpointAccessInput(v *RevokeEndpointAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.Account != nil {
objectKey := object.Key("Account")
objectKey.String(*v.Account)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.Force {
objectKey := object.Key("Force")
objectKey.Boolean(v.Force)
}
if v.VpcIds != nil {
objectKey := object.Key("VpcIds")
if err := awsAwsquery_serializeDocumentVpcIdentifierList(v.VpcIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRevokeSnapshotAccessInput(v *RevokeSnapshotAccessInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountWithRestoreAccess != nil {
objectKey := object.Key("AccountWithRestoreAccess")
objectKey.String(*v.AccountWithRestoreAccess)
}
if v.SnapshotArn != nil {
objectKey := object.Key("SnapshotArn")
objectKey.String(*v.SnapshotArn)
}
if v.SnapshotClusterIdentifier != nil {
objectKey := object.Key("SnapshotClusterIdentifier")
objectKey.String(*v.SnapshotClusterIdentifier)
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentRotateEncryptionKeyInput(v *RotateEncryptionKeyInput, value query.Value) error {
object := value.Object()
_ = object
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdatePartnerStatusInput(v *UpdatePartnerStatusInput, value query.Value) error {
object := value.Object()
_ = object
if v.AccountId != nil {
objectKey := object.Key("AccountId")
objectKey.String(*v.AccountId)
}
if v.ClusterIdentifier != nil {
objectKey := object.Key("ClusterIdentifier")
objectKey.String(*v.ClusterIdentifier)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.PartnerName != nil {
objectKey := object.Key("PartnerName")
objectKey.String(*v.PartnerName)
}
if len(v.Status) > 0 {
objectKey := object.Key("Status")
objectKey.String(string(v.Status))
}
if v.StatusMessage != nil {
objectKey := object.Key("StatusMessage")
objectKey.String(*v.StatusMessage)
}
return nil
}
| 11,933 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshift
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/redshift/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpAcceptReservedNodeExchange struct {
}
func (*validateOpAcceptReservedNodeExchange) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAcceptReservedNodeExchange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AcceptReservedNodeExchangeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAcceptReservedNodeExchangeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAddPartner struct {
}
func (*validateOpAddPartner) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAddPartner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AddPartnerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAddPartnerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAssociateDataShareConsumer struct {
}
func (*validateOpAssociateDataShareConsumer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAssociateDataShareConsumer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AssociateDataShareConsumerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAssociateDataShareConsumerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAuthorizeClusterSecurityGroupIngress struct {
}
func (*validateOpAuthorizeClusterSecurityGroupIngress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAuthorizeClusterSecurityGroupIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AuthorizeClusterSecurityGroupIngressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAuthorizeClusterSecurityGroupIngressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAuthorizeDataShare struct {
}
func (*validateOpAuthorizeDataShare) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAuthorizeDataShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AuthorizeDataShareInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAuthorizeDataShareInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAuthorizeEndpointAccess struct {
}
func (*validateOpAuthorizeEndpointAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAuthorizeEndpointAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AuthorizeEndpointAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAuthorizeEndpointAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAuthorizeSnapshotAccess struct {
}
func (*validateOpAuthorizeSnapshotAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAuthorizeSnapshotAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AuthorizeSnapshotAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAuthorizeSnapshotAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpBatchDeleteClusterSnapshots struct {
}
func (*validateOpBatchDeleteClusterSnapshots) ID() string {
return "OperationInputValidation"
}
func (m *validateOpBatchDeleteClusterSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*BatchDeleteClusterSnapshotsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpBatchDeleteClusterSnapshotsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpBatchModifyClusterSnapshots struct {
}
func (*validateOpBatchModifyClusterSnapshots) ID() string {
return "OperationInputValidation"
}
func (m *validateOpBatchModifyClusterSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*BatchModifyClusterSnapshotsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpBatchModifyClusterSnapshotsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelResize struct {
}
func (*validateOpCancelResize) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelResize) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelResizeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelResizeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyClusterSnapshot struct {
}
func (*validateOpCopyClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateAuthenticationProfile struct {
}
func (*validateOpCreateAuthenticationProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateAuthenticationProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateAuthenticationProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateAuthenticationProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCluster struct {
}
func (*validateOpCreateCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateClusterParameterGroup struct {
}
func (*validateOpCreateClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateClusterSecurityGroup struct {
}
func (*validateOpCreateClusterSecurityGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateClusterSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateClusterSecurityGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateClusterSecurityGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateClusterSnapshot struct {
}
func (*validateOpCreateClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateClusterSubnetGroup struct {
}
func (*validateOpCreateClusterSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateClusterSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateClusterSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateClusterSubnetGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCustomDomainAssociation struct {
}
func (*validateOpCreateCustomDomainAssociation) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCustomDomainAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCustomDomainAssociationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCustomDomainAssociationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEndpointAccess struct {
}
func (*validateOpCreateEndpointAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEndpointAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEndpointAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEndpointAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEventSubscription struct {
}
func (*validateOpCreateEventSubscription) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEventSubscriptionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEventSubscriptionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateHsmClientCertificate struct {
}
func (*validateOpCreateHsmClientCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateHsmClientCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateHsmClientCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateHsmClientCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateHsmConfiguration struct {
}
func (*validateOpCreateHsmConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateHsmConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateHsmConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateHsmConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateScheduledAction struct {
}
func (*validateOpCreateScheduledAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateScheduledActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateScheduledActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateSnapshotCopyGrant struct {
}
func (*validateOpCreateSnapshotCopyGrant) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateSnapshotCopyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateSnapshotCopyGrantInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateSnapshotCopyGrantInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTags struct {
}
func (*validateOpCreateTags) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTagsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTagsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateUsageLimit struct {
}
func (*validateOpCreateUsageLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateUsageLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateUsageLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateUsageLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeauthorizeDataShare struct {
}
func (*validateOpDeauthorizeDataShare) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeauthorizeDataShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeauthorizeDataShareInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeauthorizeDataShareInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteAuthenticationProfile struct {
}
func (*validateOpDeleteAuthenticationProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteAuthenticationProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteAuthenticationProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteAuthenticationProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCluster struct {
}
func (*validateOpDeleteCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteClusterParameterGroup struct {
}
func (*validateOpDeleteClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteClusterSecurityGroup struct {
}
func (*validateOpDeleteClusterSecurityGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteClusterSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteClusterSecurityGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteClusterSecurityGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteClusterSnapshot struct {
}
func (*validateOpDeleteClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteClusterSubnetGroup struct {
}
func (*validateOpDeleteClusterSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteClusterSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteClusterSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteClusterSubnetGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCustomDomainAssociation struct {
}
func (*validateOpDeleteCustomDomainAssociation) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCustomDomainAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCustomDomainAssociationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCustomDomainAssociationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEndpointAccess struct {
}
func (*validateOpDeleteEndpointAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEndpointAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEndpointAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEndpointAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEventSubscription struct {
}
func (*validateOpDeleteEventSubscription) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEventSubscriptionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEventSubscriptionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteHsmClientCertificate struct {
}
func (*validateOpDeleteHsmClientCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteHsmClientCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteHsmClientCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteHsmClientCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteHsmConfiguration struct {
}
func (*validateOpDeleteHsmConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteHsmConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteHsmConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteHsmConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeletePartner struct {
}
func (*validateOpDeletePartner) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeletePartner) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeletePartnerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeletePartnerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteScheduledAction struct {
}
func (*validateOpDeleteScheduledAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteScheduledActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteScheduledActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteSnapshotCopyGrant struct {
}
func (*validateOpDeleteSnapshotCopyGrant) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteSnapshotCopyGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteSnapshotCopyGrantInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteSnapshotCopyGrantInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteSnapshotSchedule struct {
}
func (*validateOpDeleteSnapshotSchedule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteSnapshotSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteSnapshotScheduleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteSnapshotScheduleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTags struct {
}
func (*validateOpDeleteTags) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTagsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTagsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteUsageLimit struct {
}
func (*validateOpDeleteUsageLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteUsageLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteUsageLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteUsageLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeClusterParameters struct {
}
func (*validateOpDescribeClusterParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeClusterParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeClusterParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeClusterSnapshots struct {
}
func (*validateOpDescribeClusterSnapshots) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeClusterSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeClusterSnapshotsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeClusterSnapshotsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDefaultClusterParameters struct {
}
func (*validateOpDescribeDefaultClusterParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDefaultClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDefaultClusterParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDefaultClusterParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeLoggingStatus struct {
}
func (*validateOpDescribeLoggingStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeLoggingStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeLoggingStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeLoggingStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeNodeConfigurationOptions struct {
}
func (*validateOpDescribeNodeConfigurationOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeNodeConfigurationOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeNodeConfigurationOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeNodeConfigurationOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribePartners struct {
}
func (*validateOpDescribePartners) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribePartners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribePartnersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribePartnersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeResize struct {
}
func (*validateOpDescribeResize) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeResize) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeResizeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeResizeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeScheduledActions struct {
}
func (*validateOpDescribeScheduledActions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeScheduledActions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeScheduledActionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeScheduledActionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisableLogging struct {
}
func (*validateOpDisableLogging) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisableLogging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisableLoggingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisableLoggingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisableSnapshotCopy struct {
}
func (*validateOpDisableSnapshotCopy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisableSnapshotCopy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisableSnapshotCopyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisableSnapshotCopyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisassociateDataShareConsumer struct {
}
func (*validateOpDisassociateDataShareConsumer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisassociateDataShareConsumer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisassociateDataShareConsumerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisassociateDataShareConsumerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpEnableLogging struct {
}
func (*validateOpEnableLogging) ID() string {
return "OperationInputValidation"
}
func (m *validateOpEnableLogging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*EnableLoggingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpEnableLoggingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpEnableSnapshotCopy struct {
}
func (*validateOpEnableSnapshotCopy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpEnableSnapshotCopy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*EnableSnapshotCopyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpEnableSnapshotCopyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetClusterCredentials struct {
}
func (*validateOpGetClusterCredentials) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetClusterCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetClusterCredentialsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetClusterCredentialsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetReservedNodeExchangeConfigurationOptions struct {
}
func (*validateOpGetReservedNodeExchangeConfigurationOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetReservedNodeExchangeConfigurationOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetReservedNodeExchangeConfigurationOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetReservedNodeExchangeConfigurationOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetReservedNodeExchangeOfferings struct {
}
func (*validateOpGetReservedNodeExchangeOfferings) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetReservedNodeExchangeOfferings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetReservedNodeExchangeOfferingsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetReservedNodeExchangeOfferingsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyAquaConfiguration struct {
}
func (*validateOpModifyAquaConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyAquaConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyAquaConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyAquaConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyAuthenticationProfile struct {
}
func (*validateOpModifyAuthenticationProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyAuthenticationProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyAuthenticationProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyAuthenticationProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterDbRevision struct {
}
func (*validateOpModifyClusterDbRevision) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterDbRevision) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterDbRevisionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterDbRevisionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterIamRoles struct {
}
func (*validateOpModifyClusterIamRoles) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterIamRoles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterIamRolesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterIamRolesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyCluster struct {
}
func (*validateOpModifyCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterMaintenance struct {
}
func (*validateOpModifyClusterMaintenance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterMaintenance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterMaintenanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterMaintenanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterParameterGroup struct {
}
func (*validateOpModifyClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterSnapshot struct {
}
func (*validateOpModifyClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterSnapshotSchedule struct {
}
func (*validateOpModifyClusterSnapshotSchedule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterSnapshotSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterSnapshotScheduleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterSnapshotScheduleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyClusterSubnetGroup struct {
}
func (*validateOpModifyClusterSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyClusterSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyClusterSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyClusterSubnetGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyCustomDomainAssociation struct {
}
func (*validateOpModifyCustomDomainAssociation) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyCustomDomainAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyCustomDomainAssociationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyCustomDomainAssociationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyEndpointAccess struct {
}
func (*validateOpModifyEndpointAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyEndpointAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyEndpointAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyEndpointAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyEventSubscription struct {
}
func (*validateOpModifyEventSubscription) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyEventSubscriptionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyEventSubscriptionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyScheduledAction struct {
}
func (*validateOpModifyScheduledAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyScheduledActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyScheduledActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifySnapshotCopyRetentionPeriod struct {
}
func (*validateOpModifySnapshotCopyRetentionPeriod) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifySnapshotCopyRetentionPeriod) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifySnapshotCopyRetentionPeriodInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifySnapshotCopyRetentionPeriodInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifySnapshotSchedule struct {
}
func (*validateOpModifySnapshotSchedule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifySnapshotSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifySnapshotScheduleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifySnapshotScheduleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyUsageLimit struct {
}
func (*validateOpModifyUsageLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyUsageLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyUsageLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyUsageLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPauseCluster struct {
}
func (*validateOpPauseCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPauseCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PauseClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPauseClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPurchaseReservedNodeOffering struct {
}
func (*validateOpPurchaseReservedNodeOffering) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPurchaseReservedNodeOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PurchaseReservedNodeOfferingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPurchaseReservedNodeOfferingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRebootCluster struct {
}
func (*validateOpRebootCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRebootCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RebootClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRebootClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRejectDataShare struct {
}
func (*validateOpRejectDataShare) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRejectDataShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RejectDataShareInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRejectDataShareInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpResetClusterParameterGroup struct {
}
func (*validateOpResetClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpResetClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ResetClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpResetClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpResizeCluster struct {
}
func (*validateOpResizeCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpResizeCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ResizeClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpResizeClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreFromClusterSnapshot struct {
}
func (*validateOpRestoreFromClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreFromClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreFromClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreFromClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreTableFromClusterSnapshot struct {
}
func (*validateOpRestoreTableFromClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreTableFromClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreTableFromClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreTableFromClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpResumeCluster struct {
}
func (*validateOpResumeCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpResumeCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ResumeClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpResumeClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRevokeClusterSecurityGroupIngress struct {
}
func (*validateOpRevokeClusterSecurityGroupIngress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRevokeClusterSecurityGroupIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RevokeClusterSecurityGroupIngressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRevokeClusterSecurityGroupIngressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRevokeSnapshotAccess struct {
}
func (*validateOpRevokeSnapshotAccess) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRevokeSnapshotAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RevokeSnapshotAccessInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRevokeSnapshotAccessInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRotateEncryptionKey struct {
}
func (*validateOpRotateEncryptionKey) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRotateEncryptionKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RotateEncryptionKeyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRotateEncryptionKeyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdatePartnerStatus struct {
}
func (*validateOpUpdatePartnerStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdatePartnerStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdatePartnerStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdatePartnerStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpAcceptReservedNodeExchangeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAcceptReservedNodeExchange{}, middleware.After)
}
func addOpAddPartnerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddPartner{}, middleware.After)
}
func addOpAssociateDataShareConsumerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAssociateDataShareConsumer{}, middleware.After)
}
func addOpAuthorizeClusterSecurityGroupIngressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAuthorizeClusterSecurityGroupIngress{}, middleware.After)
}
func addOpAuthorizeDataShareValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAuthorizeDataShare{}, middleware.After)
}
func addOpAuthorizeEndpointAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAuthorizeEndpointAccess{}, middleware.After)
}
func addOpAuthorizeSnapshotAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAuthorizeSnapshotAccess{}, middleware.After)
}
func addOpBatchDeleteClusterSnapshotsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpBatchDeleteClusterSnapshots{}, middleware.After)
}
func addOpBatchModifyClusterSnapshotsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpBatchModifyClusterSnapshots{}, middleware.After)
}
func addOpCancelResizeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelResize{}, middleware.After)
}
func addOpCopyClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyClusterSnapshot{}, middleware.After)
}
func addOpCreateAuthenticationProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateAuthenticationProfile{}, middleware.After)
}
func addOpCreateClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCluster{}, middleware.After)
}
func addOpCreateClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateClusterParameterGroup{}, middleware.After)
}
func addOpCreateClusterSecurityGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateClusterSecurityGroup{}, middleware.After)
}
func addOpCreateClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateClusterSnapshot{}, middleware.After)
}
func addOpCreateClusterSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateClusterSubnetGroup{}, middleware.After)
}
func addOpCreateCustomDomainAssociationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCustomDomainAssociation{}, middleware.After)
}
func addOpCreateEndpointAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEndpointAccess{}, middleware.After)
}
func addOpCreateEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEventSubscription{}, middleware.After)
}
func addOpCreateHsmClientCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateHsmClientCertificate{}, middleware.After)
}
func addOpCreateHsmConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateHsmConfiguration{}, middleware.After)
}
func addOpCreateScheduledActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateScheduledAction{}, middleware.After)
}
func addOpCreateSnapshotCopyGrantValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateSnapshotCopyGrant{}, middleware.After)
}
func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After)
}
func addOpCreateUsageLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateUsageLimit{}, middleware.After)
}
func addOpDeauthorizeDataShareValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeauthorizeDataShare{}, middleware.After)
}
func addOpDeleteAuthenticationProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteAuthenticationProfile{}, middleware.After)
}
func addOpDeleteClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCluster{}, middleware.After)
}
func addOpDeleteClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteClusterParameterGroup{}, middleware.After)
}
func addOpDeleteClusterSecurityGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteClusterSecurityGroup{}, middleware.After)
}
func addOpDeleteClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteClusterSnapshot{}, middleware.After)
}
func addOpDeleteClusterSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteClusterSubnetGroup{}, middleware.After)
}
func addOpDeleteCustomDomainAssociationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCustomDomainAssociation{}, middleware.After)
}
func addOpDeleteEndpointAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEndpointAccess{}, middleware.After)
}
func addOpDeleteEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEventSubscription{}, middleware.After)
}
func addOpDeleteHsmClientCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteHsmClientCertificate{}, middleware.After)
}
func addOpDeleteHsmConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteHsmConfiguration{}, middleware.After)
}
func addOpDeletePartnerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeletePartner{}, middleware.After)
}
func addOpDeleteScheduledActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteScheduledAction{}, middleware.After)
}
func addOpDeleteSnapshotCopyGrantValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteSnapshotCopyGrant{}, middleware.After)
}
func addOpDeleteSnapshotScheduleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteSnapshotSchedule{}, middleware.After)
}
func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After)
}
func addOpDeleteUsageLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteUsageLimit{}, middleware.After)
}
func addOpDescribeClusterParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeClusterParameters{}, middleware.After)
}
func addOpDescribeClusterSnapshotsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeClusterSnapshots{}, middleware.After)
}
func addOpDescribeDefaultClusterParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDefaultClusterParameters{}, middleware.After)
}
func addOpDescribeLoggingStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeLoggingStatus{}, middleware.After)
}
func addOpDescribeNodeConfigurationOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeNodeConfigurationOptions{}, middleware.After)
}
func addOpDescribePartnersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribePartners{}, middleware.After)
}
func addOpDescribeResizeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeResize{}, middleware.After)
}
func addOpDescribeScheduledActionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeScheduledActions{}, middleware.After)
}
func addOpDisableLoggingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisableLogging{}, middleware.After)
}
func addOpDisableSnapshotCopyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisableSnapshotCopy{}, middleware.After)
}
func addOpDisassociateDataShareConsumerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisassociateDataShareConsumer{}, middleware.After)
}
func addOpEnableLoggingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpEnableLogging{}, middleware.After)
}
func addOpEnableSnapshotCopyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpEnableSnapshotCopy{}, middleware.After)
}
func addOpGetClusterCredentialsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetClusterCredentials{}, middleware.After)
}
func addOpGetReservedNodeExchangeConfigurationOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetReservedNodeExchangeConfigurationOptions{}, middleware.After)
}
func addOpGetReservedNodeExchangeOfferingsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetReservedNodeExchangeOfferings{}, middleware.After)
}
func addOpModifyAquaConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyAquaConfiguration{}, middleware.After)
}
func addOpModifyAuthenticationProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyAuthenticationProfile{}, middleware.After)
}
func addOpModifyClusterDbRevisionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterDbRevision{}, middleware.After)
}
func addOpModifyClusterIamRolesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterIamRoles{}, middleware.After)
}
func addOpModifyClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyCluster{}, middleware.After)
}
func addOpModifyClusterMaintenanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterMaintenance{}, middleware.After)
}
func addOpModifyClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterParameterGroup{}, middleware.After)
}
func addOpModifyClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterSnapshot{}, middleware.After)
}
func addOpModifyClusterSnapshotScheduleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterSnapshotSchedule{}, middleware.After)
}
func addOpModifyClusterSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyClusterSubnetGroup{}, middleware.After)
}
func addOpModifyCustomDomainAssociationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyCustomDomainAssociation{}, middleware.After)
}
func addOpModifyEndpointAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyEndpointAccess{}, middleware.After)
}
func addOpModifyEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyEventSubscription{}, middleware.After)
}
func addOpModifyScheduledActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyScheduledAction{}, middleware.After)
}
func addOpModifySnapshotCopyRetentionPeriodValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifySnapshotCopyRetentionPeriod{}, middleware.After)
}
func addOpModifySnapshotScheduleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifySnapshotSchedule{}, middleware.After)
}
func addOpModifyUsageLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyUsageLimit{}, middleware.After)
}
func addOpPauseClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPauseCluster{}, middleware.After)
}
func addOpPurchaseReservedNodeOfferingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPurchaseReservedNodeOffering{}, middleware.After)
}
func addOpRebootClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRebootCluster{}, middleware.After)
}
func addOpRejectDataShareValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRejectDataShare{}, middleware.After)
}
func addOpResetClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpResetClusterParameterGroup{}, middleware.After)
}
func addOpResizeClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpResizeCluster{}, middleware.After)
}
func addOpRestoreFromClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreFromClusterSnapshot{}, middleware.After)
}
func addOpRestoreTableFromClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreTableFromClusterSnapshot{}, middleware.After)
}
func addOpResumeClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpResumeCluster{}, middleware.After)
}
func addOpRevokeClusterSecurityGroupIngressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRevokeClusterSecurityGroupIngress{}, middleware.After)
}
func addOpRevokeSnapshotAccessValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRevokeSnapshotAccess{}, middleware.After)
}
func addOpRotateEncryptionKeyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRotateEncryptionKey{}, middleware.After)
}
func addOpUpdatePartnerStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdatePartnerStatus{}, middleware.After)
}
func validateDeleteClusterSnapshotMessage(v *types.DeleteClusterSnapshotMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterSnapshotMessage"}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateDeleteClusterSnapshotMessageList(v []types.DeleteClusterSnapshotMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterSnapshotMessageList"}
for i := range v {
if err := validateDeleteClusterSnapshotMessage(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validatePauseClusterMessage(v *types.PauseClusterMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PauseClusterMessage"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateResizeClusterMessage(v *types.ResizeClusterMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResizeClusterMessage"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateResumeClusterMessage(v *types.ResumeClusterMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResumeClusterMessage"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateScheduledActionFilter(v *types.ScheduledActionFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ScheduledActionFilter"}
if len(v.Name) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Values == nil {
invalidParams.Add(smithy.NewErrParamRequired("Values"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateScheduledActionFilterList(v []types.ScheduledActionFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ScheduledActionFilterList"}
for i := range v {
if err := validateScheduledActionFilter(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateScheduledActionType(v *types.ScheduledActionType) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ScheduledActionType"}
if v.ResizeCluster != nil {
if err := validateResizeClusterMessage(v.ResizeCluster); err != nil {
invalidParams.AddNested("ResizeCluster", err.(smithy.InvalidParamsError))
}
}
if v.PauseCluster != nil {
if err := validatePauseClusterMessage(v.PauseCluster); err != nil {
invalidParams.AddNested("PauseCluster", err.(smithy.InvalidParamsError))
}
}
if v.ResumeCluster != nil {
if err := validateResumeClusterMessage(v.ResumeCluster); err != nil {
invalidParams.AddNested("ResumeCluster", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSnapshotSortingEntity(v *types.SnapshotSortingEntity) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SnapshotSortingEntity"}
if len(v.Attribute) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Attribute"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSnapshotSortingEntityList(v []types.SnapshotSortingEntity) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SnapshotSortingEntityList"}
for i := range v {
if err := validateSnapshotSortingEntity(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAcceptReservedNodeExchangeInput(v *AcceptReservedNodeExchangeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AcceptReservedNodeExchangeInput"}
if v.ReservedNodeId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ReservedNodeId"))
}
if v.TargetReservedNodeOfferingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetReservedNodeOfferingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAddPartnerInput(v *AddPartnerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddPartnerInput"}
if v.AccountId == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.DatabaseName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DatabaseName"))
}
if v.PartnerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PartnerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAssociateDataShareConsumerInput(v *AssociateDataShareConsumerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssociateDataShareConsumerInput"}
if v.DataShareArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DataShareArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAuthorizeClusterSecurityGroupIngressInput(v *AuthorizeClusterSecurityGroupIngressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthorizeClusterSecurityGroupIngressInput"}
if v.ClusterSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAuthorizeDataShareInput(v *AuthorizeDataShareInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthorizeDataShareInput"}
if v.DataShareArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DataShareArn"))
}
if v.ConsumerIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConsumerIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAuthorizeEndpointAccessInput(v *AuthorizeEndpointAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthorizeEndpointAccessInput"}
if v.Account == nil {
invalidParams.Add(smithy.NewErrParamRequired("Account"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAuthorizeSnapshotAccessInput(v *AuthorizeSnapshotAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthorizeSnapshotAccessInput"}
if v.AccountWithRestoreAccess == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountWithRestoreAccess"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpBatchDeleteClusterSnapshotsInput(v *BatchDeleteClusterSnapshotsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteClusterSnapshotsInput"}
if v.Identifiers == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identifiers"))
} else if v.Identifiers != nil {
if err := validateDeleteClusterSnapshotMessageList(v.Identifiers); err != nil {
invalidParams.AddNested("Identifiers", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpBatchModifyClusterSnapshotsInput(v *BatchModifyClusterSnapshotsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BatchModifyClusterSnapshotsInput"}
if v.SnapshotIdentifierList == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifierList"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelResizeInput(v *CancelResizeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelResizeInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyClusterSnapshotInput(v *CopyClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyClusterSnapshotInput"}
if v.SourceSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceSnapshotIdentifier"))
}
if v.TargetSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateAuthenticationProfileInput(v *CreateAuthenticationProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateAuthenticationProfileInput"}
if v.AuthenticationProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthenticationProfileName"))
}
if v.AuthenticationProfileContent == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthenticationProfileContent"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateClusterInput(v *CreateClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.NodeType == nil {
invalidParams.Add(smithy.NewErrParamRequired("NodeType"))
}
if v.MasterUsername == nil {
invalidParams.Add(smithy.NewErrParamRequired("MasterUsername"))
}
if v.MasterUserPassword == nil {
invalidParams.Add(smithy.NewErrParamRequired("MasterUserPassword"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateClusterParameterGroupInput(v *CreateClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateClusterParameterGroupInput"}
if v.ParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
}
if v.ParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupFamily"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateClusterSecurityGroupInput(v *CreateClusterSecurityGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateClusterSecurityGroupInput"}
if v.ClusterSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSecurityGroupName"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateClusterSnapshotInput(v *CreateClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateClusterSnapshotInput"}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateClusterSubnetGroupInput(v *CreateClusterSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateClusterSubnetGroupInput"}
if v.ClusterSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSubnetGroupName"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if v.SubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetIds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCustomDomainAssociationInput(v *CreateCustomDomainAssociationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCustomDomainAssociationInput"}
if v.CustomDomainName == nil {
invalidParams.Add(smithy.NewErrParamRequired("CustomDomainName"))
}
if v.CustomDomainCertificateArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("CustomDomainCertificateArn"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEndpointAccessInput(v *CreateEndpointAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEndpointAccessInput"}
if v.EndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndpointName"))
}
if v.SubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEventSubscriptionInput(v *CreateEventSubscriptionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEventSubscriptionInput"}
if v.SubscriptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName"))
}
if v.SnsTopicArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnsTopicArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateHsmClientCertificateInput(v *CreateHsmClientCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateHsmClientCertificateInput"}
if v.HsmClientCertificateIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmClientCertificateIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateHsmConfigurationInput(v *CreateHsmConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateHsmConfigurationInput"}
if v.HsmConfigurationIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmConfigurationIdentifier"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if v.HsmIpAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmIpAddress"))
}
if v.HsmPartitionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmPartitionName"))
}
if v.HsmPartitionPassword == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmPartitionPassword"))
}
if v.HsmServerPublicCertificate == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmServerPublicCertificate"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateScheduledActionInput(v *CreateScheduledActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateScheduledActionInput"}
if v.ScheduledActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
}
if v.TargetAction == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetAction"))
} else if v.TargetAction != nil {
if err := validateScheduledActionType(v.TargetAction); err != nil {
invalidParams.AddNested("TargetAction", err.(smithy.InvalidParamsError))
}
}
if v.Schedule == nil {
invalidParams.Add(smithy.NewErrParamRequired("Schedule"))
}
if v.IamRole == nil {
invalidParams.Add(smithy.NewErrParamRequired("IamRole"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateSnapshotCopyGrantInput(v *CreateSnapshotCopyGrantInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateSnapshotCopyGrantInput"}
if v.SnapshotCopyGrantName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotCopyGrantName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTagsInput(v *CreateTagsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTagsInput"}
if v.ResourceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceName"))
}
if v.Tags == nil {
invalidParams.Add(smithy.NewErrParamRequired("Tags"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateUsageLimitInput(v *CreateUsageLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateUsageLimitInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if len(v.FeatureType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("FeatureType"))
}
if len(v.LimitType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("LimitType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeauthorizeDataShareInput(v *DeauthorizeDataShareInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeauthorizeDataShareInput"}
if v.DataShareArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DataShareArn"))
}
if v.ConsumerIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConsumerIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteAuthenticationProfileInput(v *DeleteAuthenticationProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteAuthenticationProfileInput"}
if v.AuthenticationProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthenticationProfileName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteClusterInput(v *DeleteClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteClusterParameterGroupInput(v *DeleteClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterParameterGroupInput"}
if v.ParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteClusterSecurityGroupInput(v *DeleteClusterSecurityGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterSecurityGroupInput"}
if v.ClusterSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteClusterSnapshotInput(v *DeleteClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterSnapshotInput"}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteClusterSubnetGroupInput(v *DeleteClusterSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterSubnetGroupInput"}
if v.ClusterSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSubnetGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCustomDomainAssociationInput(v *DeleteCustomDomainAssociationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomDomainAssociationInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEndpointAccessInput(v *DeleteEndpointAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEndpointAccessInput"}
if v.EndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndpointName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEventSubscriptionInput(v *DeleteEventSubscriptionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEventSubscriptionInput"}
if v.SubscriptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteHsmClientCertificateInput(v *DeleteHsmClientCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteHsmClientCertificateInput"}
if v.HsmClientCertificateIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmClientCertificateIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteHsmConfigurationInput(v *DeleteHsmConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteHsmConfigurationInput"}
if v.HsmConfigurationIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("HsmConfigurationIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeletePartnerInput(v *DeletePartnerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeletePartnerInput"}
if v.AccountId == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.DatabaseName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DatabaseName"))
}
if v.PartnerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PartnerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteScheduledActionInput(v *DeleteScheduledActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduledActionInput"}
if v.ScheduledActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteSnapshotCopyGrantInput(v *DeleteSnapshotCopyGrantInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteSnapshotCopyGrantInput"}
if v.SnapshotCopyGrantName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotCopyGrantName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteSnapshotScheduleInput(v *DeleteSnapshotScheduleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteSnapshotScheduleInput"}
if v.ScheduleIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduleIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTagsInput(v *DeleteTagsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"}
if v.ResourceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceName"))
}
if v.TagKeys == nil {
invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteUsageLimitInput(v *DeleteUsageLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteUsageLimitInput"}
if v.UsageLimitId == nil {
invalidParams.Add(smithy.NewErrParamRequired("UsageLimitId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeClusterParametersInput(v *DescribeClusterParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeClusterParametersInput"}
if v.ParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeClusterSnapshotsInput(v *DescribeClusterSnapshotsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeClusterSnapshotsInput"}
if v.SortingEntities != nil {
if err := validateSnapshotSortingEntityList(v.SortingEntities); err != nil {
invalidParams.AddNested("SortingEntities", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDefaultClusterParametersInput(v *DescribeDefaultClusterParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDefaultClusterParametersInput"}
if v.ParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupFamily"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeLoggingStatusInput(v *DescribeLoggingStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeLoggingStatusInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeNodeConfigurationOptionsInput(v *DescribeNodeConfigurationOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeNodeConfigurationOptionsInput"}
if len(v.ActionType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ActionType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribePartnersInput(v *DescribePartnersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribePartnersInput"}
if v.AccountId == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeResizeInput(v *DescribeResizeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeResizeInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeScheduledActionsInput(v *DescribeScheduledActionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeScheduledActionsInput"}
if v.Filters != nil {
if err := validateScheduledActionFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisableLoggingInput(v *DisableLoggingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisableLoggingInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisableSnapshotCopyInput(v *DisableSnapshotCopyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisableSnapshotCopyInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisassociateDataShareConsumerInput(v *DisassociateDataShareConsumerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisassociateDataShareConsumerInput"}
if v.DataShareArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DataShareArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpEnableLoggingInput(v *EnableLoggingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnableLoggingInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpEnableSnapshotCopyInput(v *EnableSnapshotCopyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnableSnapshotCopyInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.DestinationRegion == nil {
invalidParams.Add(smithy.NewErrParamRequired("DestinationRegion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetClusterCredentialsInput(v *GetClusterCredentialsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetClusterCredentialsInput"}
if v.DbUser == nil {
invalidParams.Add(smithy.NewErrParamRequired("DbUser"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetReservedNodeExchangeConfigurationOptionsInput(v *GetReservedNodeExchangeConfigurationOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetReservedNodeExchangeConfigurationOptionsInput"}
if len(v.ActionType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ActionType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetReservedNodeExchangeOfferingsInput(v *GetReservedNodeExchangeOfferingsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetReservedNodeExchangeOfferingsInput"}
if v.ReservedNodeId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ReservedNodeId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyAquaConfigurationInput(v *ModifyAquaConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyAquaConfigurationInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyAuthenticationProfileInput(v *ModifyAuthenticationProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyAuthenticationProfileInput"}
if v.AuthenticationProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthenticationProfileName"))
}
if v.AuthenticationProfileContent == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthenticationProfileContent"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterDbRevisionInput(v *ModifyClusterDbRevisionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterDbRevisionInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.RevisionTarget == nil {
invalidParams.Add(smithy.NewErrParamRequired("RevisionTarget"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterIamRolesInput(v *ModifyClusterIamRolesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterIamRolesInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterInput(v *ModifyClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterMaintenanceInput(v *ModifyClusterMaintenanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterMaintenanceInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterParameterGroupInput(v *ModifyClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterParameterGroupInput"}
if v.ParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
}
if v.Parameters == nil {
invalidParams.Add(smithy.NewErrParamRequired("Parameters"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterSnapshotInput(v *ModifyClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterSnapshotInput"}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterSnapshotScheduleInput(v *ModifyClusterSnapshotScheduleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterSnapshotScheduleInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyClusterSubnetGroupInput(v *ModifyClusterSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyClusterSubnetGroupInput"}
if v.ClusterSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSubnetGroupName"))
}
if v.SubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetIds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyCustomDomainAssociationInput(v *ModifyCustomDomainAssociationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyCustomDomainAssociationInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyEndpointAccessInput(v *ModifyEndpointAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyEndpointAccessInput"}
if v.EndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndpointName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyEventSubscriptionInput(v *ModifyEventSubscriptionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyEventSubscriptionInput"}
if v.SubscriptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyScheduledActionInput(v *ModifyScheduledActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyScheduledActionInput"}
if v.ScheduledActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
}
if v.TargetAction != nil {
if err := validateScheduledActionType(v.TargetAction); err != nil {
invalidParams.AddNested("TargetAction", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifySnapshotCopyRetentionPeriodInput(v *ModifySnapshotCopyRetentionPeriodInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifySnapshotCopyRetentionPeriodInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifySnapshotScheduleInput(v *ModifySnapshotScheduleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifySnapshotScheduleInput"}
if v.ScheduleIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduleIdentifier"))
}
if v.ScheduleDefinitions == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduleDefinitions"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyUsageLimitInput(v *ModifyUsageLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyUsageLimitInput"}
if v.UsageLimitId == nil {
invalidParams.Add(smithy.NewErrParamRequired("UsageLimitId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPauseClusterInput(v *PauseClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PauseClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPurchaseReservedNodeOfferingInput(v *PurchaseReservedNodeOfferingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PurchaseReservedNodeOfferingInput"}
if v.ReservedNodeOfferingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ReservedNodeOfferingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRebootClusterInput(v *RebootClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RebootClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRejectDataShareInput(v *RejectDataShareInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RejectDataShareInput"}
if v.DataShareArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DataShareArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpResetClusterParameterGroupInput(v *ResetClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResetClusterParameterGroupInput"}
if v.ParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpResizeClusterInput(v *ResizeClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResizeClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreFromClusterSnapshotInput(v *RestoreFromClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreFromClusterSnapshotInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreTableFromClusterSnapshotInput(v *RestoreTableFromClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreTableFromClusterSnapshotInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if v.SourceDatabaseName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDatabaseName"))
}
if v.SourceTableName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceTableName"))
}
if v.NewTableName == nil {
invalidParams.Add(smithy.NewErrParamRequired("NewTableName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpResumeClusterInput(v *ResumeClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResumeClusterInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRevokeClusterSecurityGroupIngressInput(v *RevokeClusterSecurityGroupIngressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RevokeClusterSecurityGroupIngressInput"}
if v.ClusterSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRevokeSnapshotAccessInput(v *RevokeSnapshotAccessInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RevokeSnapshotAccessInput"}
if v.AccountWithRestoreAccess == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountWithRestoreAccess"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRotateEncryptionKeyInput(v *RotateEncryptionKeyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RotateEncryptionKeyInput"}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdatePartnerStatusInput(v *UpdatePartnerStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdatePartnerStatusInput"}
if v.AccountId == nil {
invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
}
if v.ClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClusterIdentifier"))
}
if v.DatabaseName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DatabaseName"))
}
if v.PartnerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PartnerName"))
}
if len(v.Status) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Status"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 3,863 |
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 Redshift 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: "redshift.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.Aws,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "af-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-south-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-4",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.ca-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "fips-ca-central-1",
}: endpoints.Endpoint{
Hostname: "redshift-fips.ca-central-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
Hostname: "redshift-fips.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-2",
}: endpoints.Endpoint{
Hostname: "redshift-fips.us-east-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-west-1",
}: endpoints.Endpoint{
Hostname: "redshift-fips.us-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-west-2",
}: endpoints.Endpoint{
Hostname: "redshift-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "me-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "sa-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.us-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.us-west-2.amazonaws.com",
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "redshift.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "cn-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "cn-northwest-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "us-iso-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-iso-west-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso-b",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "us-isob-east-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso-e",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{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: "redshift-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{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: "redshift.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "us-gov-east-1",
}: endpoints.Endpoint{
Hostname: "redshift.us-gov-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-east-1",
},
},
endpoints.EndpointKey{
Region: "us-gov-west-1",
}: endpoints.Endpoint{
Hostname: "redshift.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
},
},
},
}
| 494 |
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 ActionType string
// Enum values for ActionType
const (
ActionTypeRestoreCluster ActionType = "restore-cluster"
ActionTypeRecommendNodeConfig ActionType = "recommend-node-config"
ActionTypeResizeCluster ActionType = "resize-cluster"
)
// Values returns all known values for ActionType. 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 (ActionType) Values() []ActionType {
return []ActionType{
"restore-cluster",
"recommend-node-config",
"resize-cluster",
}
}
type AquaConfigurationStatus string
// Enum values for AquaConfigurationStatus
const (
AquaConfigurationStatusEnabled AquaConfigurationStatus = "enabled"
AquaConfigurationStatusDisabled AquaConfigurationStatus = "disabled"
AquaConfigurationStatusAuto AquaConfigurationStatus = "auto"
)
// Values returns all known values for AquaConfigurationStatus. 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 (AquaConfigurationStatus) Values() []AquaConfigurationStatus {
return []AquaConfigurationStatus{
"enabled",
"disabled",
"auto",
}
}
type AquaStatus string
// Enum values for AquaStatus
const (
AquaStatusEnabled AquaStatus = "enabled"
AquaStatusDisabled AquaStatus = "disabled"
AquaStatusApplying AquaStatus = "applying"
)
// Values returns all known values for AquaStatus. 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 (AquaStatus) Values() []AquaStatus {
return []AquaStatus{
"enabled",
"disabled",
"applying",
}
}
type AuthorizationStatus string
// Enum values for AuthorizationStatus
const (
AuthorizationStatusAuthorized AuthorizationStatus = "Authorized"
AuthorizationStatusRevoking AuthorizationStatus = "Revoking"
)
// Values returns all known values for AuthorizationStatus. 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 (AuthorizationStatus) Values() []AuthorizationStatus {
return []AuthorizationStatus{
"Authorized",
"Revoking",
}
}
type DataShareStatus string
// Enum values for DataShareStatus
const (
DataShareStatusActive DataShareStatus = "ACTIVE"
DataShareStatusPendingAuthorization DataShareStatus = "PENDING_AUTHORIZATION"
DataShareStatusAuthorized DataShareStatus = "AUTHORIZED"
DataShareStatusDeauthorized DataShareStatus = "DEAUTHORIZED"
DataShareStatusRejected DataShareStatus = "REJECTED"
DataShareStatusAvailable DataShareStatus = "AVAILABLE"
)
// Values returns all known values for DataShareStatus. 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 (DataShareStatus) Values() []DataShareStatus {
return []DataShareStatus{
"ACTIVE",
"PENDING_AUTHORIZATION",
"AUTHORIZED",
"DEAUTHORIZED",
"REJECTED",
"AVAILABLE",
}
}
type DataShareStatusForConsumer string
// Enum values for DataShareStatusForConsumer
const (
DataShareStatusForConsumerActive DataShareStatusForConsumer = "ACTIVE"
DataShareStatusForConsumerAvailable DataShareStatusForConsumer = "AVAILABLE"
)
// Values returns all known values for DataShareStatusForConsumer. 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 (DataShareStatusForConsumer) Values() []DataShareStatusForConsumer {
return []DataShareStatusForConsumer{
"ACTIVE",
"AVAILABLE",
}
}
type DataShareStatusForProducer string
// Enum values for DataShareStatusForProducer
const (
DataShareStatusForProducerActive DataShareStatusForProducer = "ACTIVE"
DataShareStatusForProducerAuthorized DataShareStatusForProducer = "AUTHORIZED"
DataShareStatusForProducerPendingAuthorization DataShareStatusForProducer = "PENDING_AUTHORIZATION"
DataShareStatusForProducerDeauthorized DataShareStatusForProducer = "DEAUTHORIZED"
DataShareStatusForProducerRejected DataShareStatusForProducer = "REJECTED"
)
// Values returns all known values for DataShareStatusForProducer. 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 (DataShareStatusForProducer) Values() []DataShareStatusForProducer {
return []DataShareStatusForProducer{
"ACTIVE",
"AUTHORIZED",
"PENDING_AUTHORIZATION",
"DEAUTHORIZED",
"REJECTED",
}
}
type LogDestinationType string
// Enum values for LogDestinationType
const (
LogDestinationTypeS3 LogDestinationType = "s3"
LogDestinationTypeCloudwatch LogDestinationType = "cloudwatch"
)
// Values returns all known values for LogDestinationType. 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 (LogDestinationType) Values() []LogDestinationType {
return []LogDestinationType{
"s3",
"cloudwatch",
}
}
type Mode string
// Enum values for Mode
const (
ModeStandard Mode = "standard"
ModeHighPerformance Mode = "high-performance"
)
// Values returns all known values for Mode. 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 (Mode) Values() []Mode {
return []Mode{
"standard",
"high-performance",
}
}
type NodeConfigurationOptionsFilterName string
// Enum values for NodeConfigurationOptionsFilterName
const (
NodeConfigurationOptionsFilterNameNodeType NodeConfigurationOptionsFilterName = "NodeType"
NodeConfigurationOptionsFilterNameNumNodes NodeConfigurationOptionsFilterName = "NumberOfNodes"
NodeConfigurationOptionsFilterNameEstimatedDiskUtilizationPercent NodeConfigurationOptionsFilterName = "EstimatedDiskUtilizationPercent"
NodeConfigurationOptionsFilterNameMode NodeConfigurationOptionsFilterName = "Mode"
)
// Values returns all known values for NodeConfigurationOptionsFilterName. 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 (NodeConfigurationOptionsFilterName) Values() []NodeConfigurationOptionsFilterName {
return []NodeConfigurationOptionsFilterName{
"NodeType",
"NumberOfNodes",
"EstimatedDiskUtilizationPercent",
"Mode",
}
}
type OperatorType string
// Enum values for OperatorType
const (
OperatorTypeEq OperatorType = "eq"
OperatorTypeLt OperatorType = "lt"
OperatorTypeGt OperatorType = "gt"
OperatorTypeLe OperatorType = "le"
OperatorTypeGe OperatorType = "ge"
OperatorTypeIn OperatorType = "in"
OperatorTypeBetween OperatorType = "between"
)
// Values returns all known values for OperatorType. 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 (OperatorType) Values() []OperatorType {
return []OperatorType{
"eq",
"lt",
"gt",
"le",
"ge",
"in",
"between",
}
}
type ParameterApplyType string
// Enum values for ParameterApplyType
const (
ParameterApplyTypeStatic ParameterApplyType = "static"
ParameterApplyTypeDynamic ParameterApplyType = "dynamic"
)
// Values returns all known values for ParameterApplyType. 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 (ParameterApplyType) Values() []ParameterApplyType {
return []ParameterApplyType{
"static",
"dynamic",
}
}
type PartnerIntegrationStatus string
// Enum values for PartnerIntegrationStatus
const (
PartnerIntegrationStatusActive PartnerIntegrationStatus = "Active"
PartnerIntegrationStatusInactive PartnerIntegrationStatus = "Inactive"
PartnerIntegrationStatusRuntimeFailure PartnerIntegrationStatus = "RuntimeFailure"
PartnerIntegrationStatusConnectionFailure PartnerIntegrationStatus = "ConnectionFailure"
)
// Values returns all known values for PartnerIntegrationStatus. 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 (PartnerIntegrationStatus) Values() []PartnerIntegrationStatus {
return []PartnerIntegrationStatus{
"Active",
"Inactive",
"RuntimeFailure",
"ConnectionFailure",
}
}
type ReservedNodeExchangeActionType string
// Enum values for ReservedNodeExchangeActionType
const (
ReservedNodeExchangeActionTypeRestoreCluster ReservedNodeExchangeActionType = "restore-cluster"
ReservedNodeExchangeActionTypeResizeCluster ReservedNodeExchangeActionType = "resize-cluster"
)
// Values returns all known values for ReservedNodeExchangeActionType. 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 (ReservedNodeExchangeActionType) Values() []ReservedNodeExchangeActionType {
return []ReservedNodeExchangeActionType{
"restore-cluster",
"resize-cluster",
}
}
type ReservedNodeExchangeStatusType string
// Enum values for ReservedNodeExchangeStatusType
const (
ReservedNodeExchangeStatusTypeRequested ReservedNodeExchangeStatusType = "REQUESTED"
ReservedNodeExchangeStatusTypePending ReservedNodeExchangeStatusType = "PENDING"
ReservedNodeExchangeStatusTypeInProgress ReservedNodeExchangeStatusType = "IN_PROGRESS"
ReservedNodeExchangeStatusTypeRetrying ReservedNodeExchangeStatusType = "RETRYING"
ReservedNodeExchangeStatusTypeSucceeded ReservedNodeExchangeStatusType = "SUCCEEDED"
ReservedNodeExchangeStatusTypeFailed ReservedNodeExchangeStatusType = "FAILED"
)
// Values returns all known values for ReservedNodeExchangeStatusType. 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 (ReservedNodeExchangeStatusType) Values() []ReservedNodeExchangeStatusType {
return []ReservedNodeExchangeStatusType{
"REQUESTED",
"PENDING",
"IN_PROGRESS",
"RETRYING",
"SUCCEEDED",
"FAILED",
}
}
type ReservedNodeOfferingType string
// Enum values for ReservedNodeOfferingType
const (
ReservedNodeOfferingTypeRegular ReservedNodeOfferingType = "Regular"
ReservedNodeOfferingTypeUpgradable ReservedNodeOfferingType = "Upgradable"
)
// Values returns all known values for ReservedNodeOfferingType. 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 (ReservedNodeOfferingType) Values() []ReservedNodeOfferingType {
return []ReservedNodeOfferingType{
"Regular",
"Upgradable",
}
}
type ScheduledActionFilterName string
// Enum values for ScheduledActionFilterName
const (
ScheduledActionFilterNameClusterIdentifier ScheduledActionFilterName = "cluster-identifier"
ScheduledActionFilterNameIamRole ScheduledActionFilterName = "iam-role"
)
// Values returns all known values for ScheduledActionFilterName. 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 (ScheduledActionFilterName) Values() []ScheduledActionFilterName {
return []ScheduledActionFilterName{
"cluster-identifier",
"iam-role",
}
}
type ScheduledActionState string
// Enum values for ScheduledActionState
const (
ScheduledActionStateActive ScheduledActionState = "ACTIVE"
ScheduledActionStateDisabled ScheduledActionState = "DISABLED"
)
// Values returns all known values for ScheduledActionState. 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 (ScheduledActionState) Values() []ScheduledActionState {
return []ScheduledActionState{
"ACTIVE",
"DISABLED",
}
}
type ScheduledActionTypeValues string
// Enum values for ScheduledActionTypeValues
const (
ScheduledActionTypeValuesResizeCluster ScheduledActionTypeValues = "ResizeCluster"
ScheduledActionTypeValuesPauseCluster ScheduledActionTypeValues = "PauseCluster"
ScheduledActionTypeValuesResumeCluster ScheduledActionTypeValues = "ResumeCluster"
)
// Values returns all known values for ScheduledActionTypeValues. 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 (ScheduledActionTypeValues) Values() []ScheduledActionTypeValues {
return []ScheduledActionTypeValues{
"ResizeCluster",
"PauseCluster",
"ResumeCluster",
}
}
type ScheduleState string
// Enum values for ScheduleState
const (
ScheduleStateModifying ScheduleState = "MODIFYING"
ScheduleStateActive ScheduleState = "ACTIVE"
ScheduleStateFailed ScheduleState = "FAILED"
)
// Values returns all known values for ScheduleState. 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 (ScheduleState) Values() []ScheduleState {
return []ScheduleState{
"MODIFYING",
"ACTIVE",
"FAILED",
}
}
type SnapshotAttributeToSortBy string
// Enum values for SnapshotAttributeToSortBy
const (
SnapshotAttributeToSortBySourceType SnapshotAttributeToSortBy = "SOURCE_TYPE"
SnapshotAttributeToSortByTotalSize SnapshotAttributeToSortBy = "TOTAL_SIZE"
SnapshotAttributeToSortByCreateTime SnapshotAttributeToSortBy = "CREATE_TIME"
)
// Values returns all known values for SnapshotAttributeToSortBy. 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 (SnapshotAttributeToSortBy) Values() []SnapshotAttributeToSortBy {
return []SnapshotAttributeToSortBy{
"SOURCE_TYPE",
"TOTAL_SIZE",
"CREATE_TIME",
}
}
type SortByOrder string
// Enum values for SortByOrder
const (
SortByOrderAscending SortByOrder = "ASC"
SortByOrderDescending SortByOrder = "DESC"
)
// Values returns all known values for SortByOrder. 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 (SortByOrder) Values() []SortByOrder {
return []SortByOrder{
"ASC",
"DESC",
}
}
type SourceType string
// Enum values for SourceType
const (
SourceTypeCluster SourceType = "cluster"
SourceTypeClusterParameterGroup SourceType = "cluster-parameter-group"
SourceTypeClusterSecurityGroup SourceType = "cluster-security-group"
SourceTypeClusterSnapshot SourceType = "cluster-snapshot"
SourceTypeScheduledAction SourceType = "scheduled-action"
)
// Values returns all known values for SourceType. 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 (SourceType) Values() []SourceType {
return []SourceType{
"cluster",
"cluster-parameter-group",
"cluster-security-group",
"cluster-snapshot",
"scheduled-action",
}
}
type TableRestoreStatusType string
// Enum values for TableRestoreStatusType
const (
TableRestoreStatusTypePending TableRestoreStatusType = "PENDING"
TableRestoreStatusTypeInProgress TableRestoreStatusType = "IN_PROGRESS"
TableRestoreStatusTypeSucceeded TableRestoreStatusType = "SUCCEEDED"
TableRestoreStatusTypeFailed TableRestoreStatusType = "FAILED"
TableRestoreStatusTypeCanceled TableRestoreStatusType = "CANCELED"
)
// Values returns all known values for TableRestoreStatusType. 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 (TableRestoreStatusType) Values() []TableRestoreStatusType {
return []TableRestoreStatusType{
"PENDING",
"IN_PROGRESS",
"SUCCEEDED",
"FAILED",
"CANCELED",
}
}
type UsageLimitBreachAction string
// Enum values for UsageLimitBreachAction
const (
UsageLimitBreachActionLog UsageLimitBreachAction = "log"
UsageLimitBreachActionEmitMetric UsageLimitBreachAction = "emit-metric"
UsageLimitBreachActionDisable UsageLimitBreachAction = "disable"
)
// Values returns all known values for UsageLimitBreachAction. 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 (UsageLimitBreachAction) Values() []UsageLimitBreachAction {
return []UsageLimitBreachAction{
"log",
"emit-metric",
"disable",
}
}
type UsageLimitFeatureType string
// Enum values for UsageLimitFeatureType
const (
UsageLimitFeatureTypeSpectrum UsageLimitFeatureType = "spectrum"
UsageLimitFeatureTypeConcurrencyScaling UsageLimitFeatureType = "concurrency-scaling"
UsageLimitFeatureTypeCrossRegionDatasharing UsageLimitFeatureType = "cross-region-datasharing"
)
// Values returns all known values for UsageLimitFeatureType. 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 (UsageLimitFeatureType) Values() []UsageLimitFeatureType {
return []UsageLimitFeatureType{
"spectrum",
"concurrency-scaling",
"cross-region-datasharing",
}
}
type UsageLimitLimitType string
// Enum values for UsageLimitLimitType
const (
UsageLimitLimitTypeTime UsageLimitLimitType = "time"
UsageLimitLimitTypeDataScanned UsageLimitLimitType = "data-scanned"
)
// Values returns all known values for UsageLimitLimitType. 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 (UsageLimitLimitType) Values() []UsageLimitLimitType {
return []UsageLimitLimitType{
"time",
"data-scanned",
}
}
type UsageLimitPeriod string
// Enum values for UsageLimitPeriod
const (
UsageLimitPeriodDaily UsageLimitPeriod = "daily"
UsageLimitPeriodWeekly UsageLimitPeriod = "weekly"
UsageLimitPeriodMonthly UsageLimitPeriod = "monthly"
)
// Values returns all known values for UsageLimitPeriod. 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 (UsageLimitPeriod) Values() []UsageLimitPeriod {
return []UsageLimitPeriod{
"daily",
"weekly",
"monthly",
}
}
| 581 |
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"
)
// You are not authorized to access the cluster.
type AccessToClusterDeniedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AccessToClusterDeniedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AccessToClusterDeniedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AccessToClusterDeniedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AccessToClusterDenied"
}
return *e.ErrorCodeOverride
}
func (e *AccessToClusterDeniedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The owner of the specified snapshot has not authorized your account to access
// the snapshot.
type AccessToSnapshotDeniedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AccessToSnapshotDeniedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AccessToSnapshotDeniedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AccessToSnapshotDeniedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AccessToSnapshotDenied"
}
return *e.ErrorCodeOverride
}
func (e *AccessToSnapshotDeniedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The authentication profile already exists.
type AuthenticationProfileAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthenticationProfileAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthenticationProfileAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthenticationProfileAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthenticationProfileAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *AuthenticationProfileAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The authentication profile can't be found.
type AuthenticationProfileNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthenticationProfileNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthenticationProfileNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthenticationProfileNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthenticationProfileNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *AuthenticationProfileNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The size or number of authentication profiles has exceeded the quota. The
// maximum length of the JSON string and maximum number of authentication profiles
// is determined by a quota for your account.
type AuthenticationProfileQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthenticationProfileQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthenticationProfileQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthenticationProfileQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthenticationProfileQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *AuthenticationProfileQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified CIDR block or EC2 security group is already authorized for the
// specified cluster security group.
type AuthorizationAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthorizationAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthorizationAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthorizationAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthorizationAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *AuthorizationAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified CIDR IP range or EC2 security group is not authorized for the
// specified cluster security group.
type AuthorizationNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthorizationNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthorizationNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthorizationNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthorizationNotFound"
}
return *e.ErrorCodeOverride
}
func (e *AuthorizationNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The authorization quota for the cluster security group has been reached.
type AuthorizationQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AuthorizationQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AuthorizationQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AuthorizationQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AuthorizationQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *AuthorizationQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The maximum number for a batch delete of snapshots has been reached. The limit
// is 100.
type BatchDeleteRequestSizeExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BatchDeleteRequestSizeExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BatchDeleteRequestSizeExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BatchDeleteRequestSizeExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BatchDeleteRequestSizeExceeded"
}
return *e.ErrorCodeOverride
}
func (e *BatchDeleteRequestSizeExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The maximum number for snapshot identifiers has been reached. The limit is 100.
type BatchModifyClusterSnapshotsLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BatchModifyClusterSnapshotsLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BatchModifyClusterSnapshotsLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BatchModifyClusterSnapshotsLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BatchModifyClusterSnapshotsLimitExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *BatchModifyClusterSnapshotsLimitExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Could not find the specified S3 bucket.
type BucketNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BucketNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BucketNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BucketNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BucketNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *BucketNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The account already has a cluster with the given identifier.
type ClusterAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The ClusterIdentifier parameter does not refer to an existing cluster.
type ClusterNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Cluster is already on the latest database revision.
type ClusterOnLatestRevisionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterOnLatestRevisionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterOnLatestRevisionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterOnLatestRevisionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterOnLatestRevision"
}
return *e.ErrorCodeOverride
}
func (e *ClusterOnLatestRevisionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A cluster parameter group with the same name already exists.
type ClusterParameterGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterParameterGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterParameterGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterParameterGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterParameterGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ClusterParameterGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The parameter group name does not refer to an existing parameter group.
type ClusterParameterGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterParameterGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterParameterGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterParameterGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterParameterGroupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ClusterParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The request would result in the user exceeding the allowed number of cluster
// parameter groups. For information about increasing your quota, go to Limits in
// Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ClusterParameterGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterParameterGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterParameterGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterParameterGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterParameterGroupQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ClusterParameterGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The request would exceed the allowed number of cluster instances for this
// account. For information about increasing your quota, go to Limits in Amazon
// Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ClusterQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A cluster security group with the same name already exists.
type ClusterSecurityGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSecurityGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSecurityGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSecurityGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSecurityGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSecurityGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The cluster security group name does not refer to an existing cluster security
// group.
type ClusterSecurityGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSecurityGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSecurityGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSecurityGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSecurityGroupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSecurityGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of cluster
// security groups. For information about increasing your quota, go to Limits in
// Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ClusterSecurityGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSecurityGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSecurityGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSecurityGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "QuotaExceeded.ClusterSecurityGroup"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSecurityGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The value specified as a snapshot identifier is already used by an existing
// snapshot.
type ClusterSnapshotAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSnapshotAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSnapshotAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSnapshotAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSnapshotAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The snapshot identifier does not refer to an existing cluster snapshot.
type ClusterSnapshotNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSnapshotNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSnapshotNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSnapshotNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSnapshotNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of cluster
// snapshots.
type ClusterSnapshotQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSnapshotQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSnapshotQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSnapshotQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSnapshotQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A ClusterSubnetGroupName is already used by an existing cluster subnet group.
type ClusterSubnetGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSubnetGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSubnetGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSubnetGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSubnetGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSubnetGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The cluster subnet group name does not refer to an existing cluster subnet
// group.
type ClusterSubnetGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSubnetGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSubnetGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSubnetGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSubnetGroupNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSubnetGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in user exceeding the allowed number of cluster subnet
// groups. For information about increasing your quota, go to Limits in Amazon
// Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ClusterSubnetGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSubnetGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSubnetGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSubnetGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSubnetGroupQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSubnetGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The request would result in user exceeding the allowed number of subnets in a
// cluster subnet groups. For information about increasing your quota, go to
// Limits in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ClusterSubnetQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ClusterSubnetQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ClusterSubnetQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ClusterSubnetQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ClusterSubnetQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *ClusterSubnetQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Cross-region snapshot copy was temporarily disabled. Try your request again.
type CopyToRegionDisabledFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CopyToRegionDisabledFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CopyToRegionDisabledFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CopyToRegionDisabledFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CopyToRegionDisabledFault"
}
return *e.ErrorCodeOverride
}
func (e *CopyToRegionDisabledFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An error occurred when an attempt was made to change the custom domain
// association.
type CustomCnameAssociationFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomCnameAssociationFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomCnameAssociationFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomCnameAssociationFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomCnameAssociationFault"
}
return *e.ErrorCodeOverride
}
func (e *CustomCnameAssociationFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An error occurred. The custom domain name couldn't be found.
type CustomDomainAssociationNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomDomainAssociationNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomDomainAssociationNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomDomainAssociationNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomDomainAssociationNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *CustomDomainAssociationNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The request cannot be completed because a dependent service is throttling
// requests made by Amazon Redshift on your behalf. Wait and retry the request.
type DependentServiceRequestThrottlingFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DependentServiceRequestThrottlingFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DependentServiceRequestThrottlingFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DependentServiceRequestThrottlingFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DependentServiceRequestThrottlingFault"
}
return *e.ErrorCodeOverride
}
func (e *DependentServiceRequestThrottlingFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Your request cannot be completed because a dependent internal service is
// temporarily unavailable. Wait 30 to 60 seconds and try again.
type DependentServiceUnavailableFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DependentServiceUnavailableFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DependentServiceUnavailableFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DependentServiceUnavailableFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DependentServiceUnavailableFault"
}
return *e.ErrorCodeOverride
}
func (e *DependentServiceUnavailableFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The account already has a Redshift-managed VPC endpoint with the given
// identifier.
type EndpointAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *EndpointAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The authorization already exists for this endpoint.
type EndpointAuthorizationAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointAuthorizationAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointAuthorizationAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointAuthorizationAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointAuthorizationAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *EndpointAuthorizationAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The authorization for this endpoint can't be found.
type EndpointAuthorizationNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointAuthorizationNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointAuthorizationNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointAuthorizationNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointAuthorizationNotFound"
}
return *e.ErrorCodeOverride
}
func (e *EndpointAuthorizationNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The number of endpoint authorizations per cluster has exceeded its limit.
type EndpointAuthorizationsPerClusterLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointAuthorizationsPerClusterLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointAuthorizationsPerClusterLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointAuthorizationsPerClusterLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointAuthorizationsPerClusterLimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *EndpointAuthorizationsPerClusterLimitExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The endpoint name doesn't refer to an existing endpoint.
type EndpointNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointNotFound"
}
return *e.ErrorCodeOverride
}
func (e *EndpointNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The number of Redshift-managed VPC endpoints per authorization has exceeded its
// limit.
type EndpointsPerAuthorizationLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointsPerAuthorizationLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointsPerAuthorizationLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointsPerAuthorizationLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointsPerAuthorizationLimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *EndpointsPerAuthorizationLimitExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The number of Redshift-managed VPC endpoints per cluster has exceeded its limit.
type EndpointsPerClusterLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EndpointsPerClusterLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EndpointsPerClusterLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EndpointsPerClusterLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EndpointsPerClusterLimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *EndpointsPerClusterLimitExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The request would exceed the allowed number of event subscriptions for this
// account. For information about increasing your quota, go to Limits in Amazon
// Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type EventSubscriptionQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *EventSubscriptionQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EventSubscriptionQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EventSubscriptionQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EventSubscriptionQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *EventSubscriptionQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// There is already an existing Amazon Redshift HSM client certificate with the
// specified identifier.
type HsmClientCertificateAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmClientCertificateAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmClientCertificateAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmClientCertificateAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmClientCertificateAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmClientCertificateAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// There is no Amazon Redshift HSM client certificate with the specified
// identifier.
type HsmClientCertificateNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmClientCertificateNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmClientCertificateNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmClientCertificateNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmClientCertificateNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmClientCertificateNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The quota for HSM client certificates has been reached. For information about
// increasing your quota, go to Limits in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type HsmClientCertificateQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmClientCertificateQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmClientCertificateQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmClientCertificateQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmClientCertificateQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmClientCertificateQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// There is already an existing Amazon Redshift HSM configuration with the
// specified identifier.
type HsmConfigurationAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmConfigurationAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmConfigurationAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmConfigurationAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmConfigurationAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmConfigurationAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// There is no Amazon Redshift HSM configuration with the specified identifier.
type HsmConfigurationNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmConfigurationNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmConfigurationNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmConfigurationNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmConfigurationNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmConfigurationNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The quota for HSM configurations has been reached. For information about
// increasing your quota, go to Limits in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type HsmConfigurationQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HsmConfigurationQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HsmConfigurationQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HsmConfigurationQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HsmConfigurationQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *HsmConfigurationQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified options are incompatible.
type IncompatibleOrderableOptions struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IncompatibleOrderableOptions) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IncompatibleOrderableOptions) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IncompatibleOrderableOptions) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IncompatibleOrderableOptions"
}
return *e.ErrorCodeOverride
}
func (e *IncompatibleOrderableOptions) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have exceeded the allowed number of table restore requests. Wait for your
// current table restore requests to complete before making a new request.
type InProgressTableRestoreQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InProgressTableRestoreQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InProgressTableRestoreQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InProgressTableRestoreQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InProgressTableRestoreQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *InProgressTableRestoreQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The number of nodes specified exceeds the allotted capacity of the cluster.
type InsufficientClusterCapacityFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientClusterCapacityFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientClusterCapacityFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientClusterCapacityFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientClusterCapacity"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientClusterCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster does not have read bucket or put object permissions on the S3
// bucket specified when enabling logging.
type InsufficientS3BucketPolicyFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientS3BucketPolicyFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientS3BucketPolicyFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientS3BucketPolicyFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientS3BucketPolicyFault"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientS3BucketPolicyFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The authentication profile request is not valid. The profile name can't be null
// or empty. The authentication profile API operation must be available in the
// Amazon Web Services Region.
type InvalidAuthenticationProfileRequestFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidAuthenticationProfileRequestFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidAuthenticationProfileRequestFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidAuthenticationProfileRequestFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidAuthenticationProfileRequestFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidAuthenticationProfileRequestFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The status of the authorization is not valid.
type InvalidAuthorizationStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidAuthorizationStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidAuthorizationStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidAuthorizationStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidAuthorizationState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidAuthorizationStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster parameter group action can not be completed because another task is
// in progress that involves the parameter group. Wait a few moments and try the
// operation again.
type InvalidClusterParameterGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterParameterGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterParameterGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterParameterGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterParameterGroupState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterParameterGroupStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The state of the cluster security group is not available .
type InvalidClusterSecurityGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterSecurityGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterSecurityGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterSecurityGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterSecurityGroupState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterSecurityGroupStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The cluster snapshot schedule state is not valid.
type InvalidClusterSnapshotScheduleStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterSnapshotScheduleStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterSnapshotScheduleStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterSnapshotScheduleStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterSnapshotScheduleState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterSnapshotScheduleStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified cluster snapshot is not in the available state, or other accounts
// are authorized to access the snapshot.
type InvalidClusterSnapshotStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterSnapshotStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterSnapshotStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterSnapshotStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterSnapshotState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterSnapshotStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified cluster is not in the available state.
type InvalidClusterStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster subnet group cannot be deleted because it is in use.
type InvalidClusterSubnetGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterSubnetGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterSubnetGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterSubnetGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterSubnetGroupStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterSubnetGroupStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The state of the subnet is invalid.
type InvalidClusterSubnetStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterSubnetStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterSubnetStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterSubnetStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterSubnetStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterSubnetStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The provided cluster track name is not valid.
type InvalidClusterTrackFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidClusterTrackFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidClusterTrackFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidClusterTrackFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidClusterTrack"
}
return *e.ErrorCodeOverride
}
func (e *InvalidClusterTrackFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There is an error with the datashare.
type InvalidDataShareFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDataShareFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDataShareFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDataShareFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDataShareFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDataShareFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The Elastic IP (EIP) is invalid or cannot be found.
type InvalidElasticIpFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidElasticIpFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidElasticIpFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidElasticIpFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidElasticIpFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidElasticIpFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The status of the endpoint is not valid.
type InvalidEndpointStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidEndpointStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidEndpointStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidEndpointStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidEndpointState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidEndpointStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified HSM client certificate is not in the available state, or it is
// still in use by one or more Amazon Redshift clusters.
type InvalidHsmClientCertificateStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidHsmClientCertificateStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidHsmClientCertificateStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidHsmClientCertificateStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidHsmClientCertificateStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidHsmClientCertificateStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified HSM configuration is not in the available state, or it is still
// in use by one or more Amazon Redshift clusters.
type InvalidHsmConfigurationStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidHsmConfigurationStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidHsmConfigurationStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidHsmConfigurationStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidHsmConfigurationStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidHsmConfigurationStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The namespace isn't valid because the namespace doesn't exist. Provide a valid
// namespace.
type InvalidNamespaceFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidNamespaceFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidNamespaceFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidNamespaceFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidNamespaceFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidNamespaceFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the Reserved Node being exchanged is not in an active state.
type InvalidReservedNodeStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidReservedNodeStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidReservedNodeStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidReservedNodeStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidReservedNodeState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidReservedNodeStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The restore is invalid.
type InvalidRestoreFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidRestoreFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidRestoreFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidRestoreFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidRestore"
}
return *e.ErrorCodeOverride
}
func (e *InvalidRestoreFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The retention period specified is either in the past or is not a valid value.
// The value must be either -1 or an integer between 1 and 3,653.
type InvalidRetentionPeriodFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidRetentionPeriodFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidRetentionPeriodFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidRetentionPeriodFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidRetentionPeriodFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidRetentionPeriodFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The S3 bucket name is invalid. For more information about naming rules, go to
// Bucket Restrictions and Limitations (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html)
// in the Amazon Simple Storage Service (S3) Developer Guide.
type InvalidS3BucketNameFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidS3BucketNameFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidS3BucketNameFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidS3BucketNameFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidS3BucketNameFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidS3BucketNameFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The string specified for the logging S3 key prefix does not comply with the
// documented constraints.
type InvalidS3KeyPrefixFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidS3KeyPrefixFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidS3KeyPrefixFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidS3KeyPrefixFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidS3KeyPrefixFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidS3KeyPrefixFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The scheduled action is not valid.
type InvalidScheduledActionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidScheduledActionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidScheduledActionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidScheduledActionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidScheduledAction"
}
return *e.ErrorCodeOverride
}
func (e *InvalidScheduledActionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The schedule you submitted isn't valid.
type InvalidScheduleFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidScheduleFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidScheduleFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidScheduleFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSchedule"
}
return *e.ErrorCodeOverride
}
func (e *InvalidScheduleFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The snapshot copy grant can't be deleted because it is used by one or more
// clusters.
type InvalidSnapshotCopyGrantStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidSnapshotCopyGrantStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSnapshotCopyGrantStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSnapshotCopyGrantStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSnapshotCopyGrantStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSnapshotCopyGrantStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The requested subnet is not valid, or not all of the subnets are in the same
// VPC.
type InvalidSubnet struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidSubnet) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSubnet) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSubnet) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSubnet"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSubnet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The subscription request is invalid because it is a duplicate request. This
// subscription request is already in progress.
type InvalidSubscriptionStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidSubscriptionStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSubscriptionStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSubscriptionStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSubscriptionStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSubscriptionStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The value specified for the sourceDatabaseName , sourceSchemaName , or
// sourceTableName parameter, or a combination of these, doesn't exist in the
// snapshot.
type InvalidTableRestoreArgumentFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidTableRestoreArgumentFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidTableRestoreArgumentFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidTableRestoreArgumentFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidTableRestoreArgument"
}
return *e.ErrorCodeOverride
}
func (e *InvalidTableRestoreArgumentFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The tag is invalid.
type InvalidTagFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidTagFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidTagFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidTagFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidTagFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidTagFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The usage limit is not valid.
type InvalidUsageLimitFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidUsageLimitFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidUsageLimitFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidUsageLimitFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidUsageLimit"
}
return *e.ErrorCodeOverride
}
func (e *InvalidUsageLimitFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster subnet group does not cover all Availability Zones.
type InvalidVPCNetworkStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidVPCNetworkStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidVPCNetworkStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidVPCNetworkStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidVPCNetworkStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidVPCNetworkStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The encryption key has exceeded its grant limit in Amazon Web Services KMS.
type LimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The operation would exceed the number of nodes allowed for a cluster.
type NumberOfNodesPerClusterLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NumberOfNodesPerClusterLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NumberOfNodesPerClusterLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NumberOfNodesPerClusterLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NumberOfNodesPerClusterLimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *NumberOfNodesPerClusterLimitExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The operation would exceed the number of nodes allotted to the account. For
// information about increasing your quota, go to Limits in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type NumberOfNodesQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NumberOfNodesQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NumberOfNodesQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NumberOfNodesQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NumberOfNodesQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *NumberOfNodesQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The name of the partner was not found.
type PartnerNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *PartnerNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PartnerNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PartnerNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "PartnerNotFound"
}
return *e.ErrorCodeOverride
}
func (e *PartnerNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// User already has a reservation with the given identifier.
type ReservedNodeAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the reserved node has already been exchanged.
type ReservedNodeAlreadyMigratedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeAlreadyMigratedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeAlreadyMigratedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeAlreadyMigratedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeAlreadyMigrated"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeAlreadyMigratedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The reserved-node exchange status wasn't found.
type ReservedNodeExchangeNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeExchangeNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeExchangeNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeExchangeNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeExchangeNotFond"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeExchangeNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified reserved compute node not found.
type ReservedNodeNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Specified offering does not exist.
type ReservedNodeOfferingNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeOfferingNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeOfferingNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeOfferingNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeOfferingNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeOfferingNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Request would exceed the user's compute node quota. For information about
// increasing your quota, go to Limits in Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html)
// in the Amazon Redshift Cluster Management Guide.
type ReservedNodeQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedNodeQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedNodeQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedNodeQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedNodeQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ReservedNodeQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A resize operation for the specified cluster is not found.
type ResizeNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResizeNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResizeNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResizeNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResizeNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ResizeNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The resource could not be found.
type ResourceNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResourceNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *ResourceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The scheduled action already exists.
type ScheduledActionAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScheduledActionAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScheduledActionAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScheduledActionAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScheduledActionAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ScheduledActionAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The scheduled action cannot be found.
type ScheduledActionNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScheduledActionNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScheduledActionNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScheduledActionNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScheduledActionNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ScheduledActionNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The quota for scheduled actions exceeded.
type ScheduledActionQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScheduledActionQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScheduledActionQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScheduledActionQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScheduledActionQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ScheduledActionQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The action type specified for a scheduled action is not supported.
type ScheduledActionTypeUnsupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScheduledActionTypeUnsupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScheduledActionTypeUnsupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScheduledActionTypeUnsupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScheduledActionTypeUnsupported"
}
return *e.ErrorCodeOverride
}
func (e *ScheduledActionTypeUnsupportedFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The definition you submitted is not supported.
type ScheduleDefinitionTypeUnsupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ScheduleDefinitionTypeUnsupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ScheduleDefinitionTypeUnsupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ScheduleDefinitionTypeUnsupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ScheduleDefinitionTypeUnsupported"
}
return *e.ErrorCodeOverride
}
func (e *ScheduleDefinitionTypeUnsupportedFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The cluster already has cross-region snapshot copy disabled.
type SnapshotCopyAlreadyDisabledFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyAlreadyDisabledFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyAlreadyDisabledFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyAlreadyDisabledFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyAlreadyDisabledFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyAlreadyDisabledFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster already has cross-region snapshot copy enabled.
type SnapshotCopyAlreadyEnabledFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyAlreadyEnabledFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyAlreadyEnabledFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyAlreadyEnabledFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyAlreadyEnabledFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyAlreadyEnabledFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Cross-region snapshot copy was temporarily disabled. Try your request again.
type SnapshotCopyDisabledFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyDisabledFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyDisabledFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyDisabledFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyDisabledFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyDisabledFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The snapshot copy grant can't be created because a grant with the same name
// already exists.
type SnapshotCopyGrantAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyGrantAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyGrantAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyGrantAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyGrantAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyGrantAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified snapshot copy grant can't be found. Make sure that the name is
// typed correctly and that the grant exists in the destination region.
type SnapshotCopyGrantNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyGrantNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyGrantNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyGrantNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyGrantNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyGrantNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The Amazon Web Services account has exceeded the maximum number of snapshot
// copy grants in this region.
type SnapshotCopyGrantQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotCopyGrantQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotCopyGrantQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotCopyGrantQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotCopyGrantQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotCopyGrantQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified snapshot schedule already exists.
type SnapshotScheduleAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotScheduleAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotScheduleAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotScheduleAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotScheduleAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotScheduleAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// We could not find the specified snapshot schedule.
type SnapshotScheduleNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotScheduleNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotScheduleNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotScheduleNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotScheduleNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotScheduleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have exceeded the quota of snapshot schedules.
type SnapshotScheduleQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotScheduleQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotScheduleQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotScheduleQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotScheduleQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotScheduleQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified snapshot schedule is already being updated.
type SnapshotScheduleUpdateInProgressFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotScheduleUpdateInProgressFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotScheduleUpdateInProgressFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotScheduleUpdateInProgressFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotScheduleUpdateInProgress"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotScheduleUpdateInProgressFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Amazon SNS has responded that there is a problem with the specified Amazon SNS
// topic.
type SNSInvalidTopicFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SNSInvalidTopicFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SNSInvalidTopicFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SNSInvalidTopicFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SNSInvalidTopic"
}
return *e.ErrorCodeOverride
}
func (e *SNSInvalidTopicFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You do not have permission to publish to the specified Amazon SNS topic.
type SNSNoAuthorizationFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SNSNoAuthorizationFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SNSNoAuthorizationFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SNSNoAuthorizationFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SNSNoAuthorization"
}
return *e.ErrorCodeOverride
}
func (e *SNSNoAuthorizationFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not
// exist.
type SNSTopicArnNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SNSTopicArnNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SNSTopicArnNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SNSTopicArnNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SNSTopicArnNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SNSTopicArnNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified Amazon Redshift event source could not be found.
type SourceNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SourceNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SourceNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SourceNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SourceNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SourceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A specified subnet is already in use by another cluster.
type SubnetAlreadyInUse struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubnetAlreadyInUse) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubnetAlreadyInUse) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubnetAlreadyInUse) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubnetAlreadyInUse"
}
return *e.ErrorCodeOverride
}
func (e *SubnetAlreadyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There is already an existing event notification subscription with the specified
// name.
type SubscriptionAlreadyExistFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubscriptionAlreadyExistFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubscriptionAlreadyExistFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubscriptionAlreadyExistFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubscriptionAlreadyExist"
}
return *e.ErrorCodeOverride
}
func (e *SubscriptionAlreadyExistFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The value specified for the event category was not one of the allowed values,
// or it specified a category that does not apply to the specified source type. The
// allowed values are Configuration, Management, Monitoring, and Security.
type SubscriptionCategoryNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubscriptionCategoryNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubscriptionCategoryNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubscriptionCategoryNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubscriptionCategoryNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SubscriptionCategoryNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An Amazon Redshift event with the specified event ID does not exist.
type SubscriptionEventIdNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubscriptionEventIdNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubscriptionEventIdNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubscriptionEventIdNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubscriptionEventIdNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SubscriptionEventIdNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An Amazon Redshift event notification subscription with the specified name does
// not exist.
type SubscriptionNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubscriptionNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubscriptionNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubscriptionNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubscriptionNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SubscriptionNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The value specified for the event severity was not one of the allowed values,
// or it specified a severity that does not apply to the specified source type. The
// allowed values are ERROR and INFO.
type SubscriptionSeverityNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SubscriptionSeverityNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SubscriptionSeverityNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SubscriptionSeverityNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SubscriptionSeverityNotFound"
}
return *e.ErrorCodeOverride
}
func (e *SubscriptionSeverityNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The number of tables in the cluster exceeds the limit for the requested new
// cluster node type.
type TableLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TableLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TableLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TableLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TableLimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *TableLimitExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified TableRestoreRequestId value was not found.
type TableRestoreNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TableRestoreNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TableRestoreNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TableRestoreNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TableRestoreNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *TableRestoreNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have exceeded the number of tags allowed.
type TagLimitExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TagLimitExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TagLimitExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TagLimitExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TagLimitExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *TagLimitExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Your account is not authorized to perform the requested operation.
type UnauthorizedOperation struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnauthorizedOperation) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnauthorizedOperation) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnauthorizedOperation) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnauthorizedOperation"
}
return *e.ErrorCodeOverride
}
func (e *UnauthorizedOperation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The partner integration is not authorized.
type UnauthorizedPartnerIntegrationFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnauthorizedPartnerIntegrationFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnauthorizedPartnerIntegrationFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnauthorizedPartnerIntegrationFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnauthorizedPartnerIntegration"
}
return *e.ErrorCodeOverride
}
func (e *UnauthorizedPartnerIntegrationFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified region is incorrect or does not exist.
type UnknownSnapshotCopyRegionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnknownSnapshotCopyRegionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnknownSnapshotCopyRegionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnknownSnapshotCopyRegionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnknownSnapshotCopyRegionFault"
}
return *e.ErrorCodeOverride
}
func (e *UnknownSnapshotCopyRegionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested operation isn't supported.
type UnsupportedOperationFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnsupportedOperationFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnsupportedOperationFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnsupportedOperationFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnsupportedOperation"
}
return *e.ErrorCodeOverride
}
func (e *UnsupportedOperationFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A request option was specified that is not supported.
type UnsupportedOptionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnsupportedOptionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnsupportedOptionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnsupportedOptionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnsupportedOptionFault"
}
return *e.ErrorCodeOverride
}
func (e *UnsupportedOptionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The usage limit already exists.
type UsageLimitAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UsageLimitAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UsageLimitAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UsageLimitAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UsageLimitAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *UsageLimitAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The usage limit identifier can't be found.
type UsageLimitNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UsageLimitNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UsageLimitNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UsageLimitNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UsageLimitNotFound"
}
return *e.ErrorCodeOverride
}
func (e *UsageLimitNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
| 3,494 |
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"
)
// A name value pair that describes an aspect of an account.
type AccountAttribute struct {
// The name of the attribute.
AttributeName *string
// A list of attribute values.
AttributeValues []AttributeValueTarget
noSmithyDocumentSerde
}
// Describes an Amazon Web Services account authorized to restore a snapshot.
type AccountWithRestoreAccess struct {
// The identifier of an Amazon Web Services support account authorized to restore
// a snapshot. For Amazon Web Services Support, the identifier is
// amazon-redshift-support .
AccountAlias *string
// The identifier of an Amazon Web Services account authorized to restore a
// snapshot.
AccountId *string
noSmithyDocumentSerde
}
// The operation that uses this structure is retired. Amazon Redshift
// automatically determines whether to use AQUA (Advanced Query Accelerator).
type AquaConfiguration struct {
// This field is retired. Amazon Redshift automatically determines whether to use
// AQUA (Advanced Query Accelerator).
AquaConfigurationStatus AquaConfigurationStatus
// This field is retired. Amazon Redshift automatically determines whether to use
// AQUA (Advanced Query Accelerator).
AquaStatus AquaStatus
noSmithyDocumentSerde
}
// Contains information about the custom domain name association.
type Association struct {
// A list of all associated clusters and domain names tied to a specific
// certificate.
CertificateAssociations []CertificateAssociation
// The Amazon Resource Name (ARN) for the certificate associated with the custom
// domain.
CustomDomainCertificateArn *string
// The expiration date for the certificate.
CustomDomainCertificateExpiryDate *time.Time
noSmithyDocumentSerde
}
// Describes an attribute value.
type AttributeValueTarget struct {
// The value of the attribute.
AttributeValue *string
noSmithyDocumentSerde
}
// Describes an authentication profile.
type AuthenticationProfile struct {
// The content of the authentication profile in JSON format. The maximum length of
// the JSON string is determined by a quota for your account.
AuthenticationProfileContent *string
// The name of the authentication profile.
AuthenticationProfileName *string
noSmithyDocumentSerde
}
// Describes an availability zone.
type AvailabilityZone struct {
// The name of the availability zone.
Name *string
//
SupportedPlatforms []SupportedPlatform
noSmithyDocumentSerde
}
// A cluster ID and custom domain name tied to a specific certificate. These are
// typically returned in a list.
type CertificateAssociation struct {
// The cluster identifier for the certificate association.
ClusterIdentifier *string
// The custom domain name for the certificate association.
CustomDomainName *string
noSmithyDocumentSerde
}
// Describes a cluster.
type Cluster struct {
// A boolean value that, if true , indicates that major version upgrades will be
// applied automatically to the cluster during the maintenance window.
AllowVersionUpgrade bool
// This field is retired. Amazon Redshift automatically determines whether to use
// AQUA (Advanced Query Accelerator).
AquaConfiguration *AquaConfiguration
// The number of days that automatic cluster snapshots are retained.
AutomatedSnapshotRetentionPeriod int32
// The name of the Availability Zone in which the cluster is located.
AvailabilityZone *string
// Describes the status of the Availability Zone relocation operation.
AvailabilityZoneRelocationStatus *string
// The availability status of the cluster for queries. Possible values are the
// following:
// - Available - The cluster is available for queries.
// - Unavailable - The cluster is not available for queries.
// - Maintenance - The cluster is intermittently available for queries due to
// maintenance activities.
// - Modifying - The cluster is intermittently available for queries due to
// changes that modify the cluster.
// - Failed - The cluster failed and is not available for queries.
ClusterAvailabilityStatus *string
// The date and time that the cluster was created.
ClusterCreateTime *time.Time
// The unique identifier of the cluster.
ClusterIdentifier *string
// The namespace Amazon Resource Name (ARN) of the cluster.
ClusterNamespaceArn *string
// The nodes in the cluster.
ClusterNodes []ClusterNode
// The list of cluster parameter groups that are associated with this cluster.
// Each parameter group in the list is returned with its status.
ClusterParameterGroups []ClusterParameterGroupStatus
// The public key for the cluster.
ClusterPublicKey *string
// The specific revision number of the database in the cluster.
ClusterRevisionNumber *string
// A list of cluster security group that are associated with the cluster. Each
// security group is represented by an element that contains
// ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster
// security groups are used when the cluster is not created in an Amazon Virtual
// Private Cloud (VPC). Clusters that are created in a VPC use VPC security groups,
// which are listed by the VpcSecurityGroups parameter.
ClusterSecurityGroups []ClusterSecurityGroupMembership
// A value that returns the destination region and retention period that are
// configured for cross-region snapshot copy.
ClusterSnapshotCopyStatus *ClusterSnapshotCopyStatus
// The current state of the cluster. Possible values are the following:
// - available
// - available, prep-for-resize
// - available, resize-cleanup
// - cancelling-resize
// - creating
// - deleting
// - final-snapshot
// - hardware-failure
// - incompatible-hsm
// - incompatible-network
// - incompatible-parameters
// - incompatible-restore
// - modifying
// - paused
// - rebooting
// - renaming
// - resizing
// - rotating-keys
// - storage-full
// - updating-hsm
ClusterStatus *string
// The name of the subnet group that is associated with the cluster. This
// parameter is valid only when the cluster is in a VPC.
ClusterSubnetGroupName *string
// The version ID of the Amazon Redshift engine that is running on the cluster.
ClusterVersion *string
// The certificate Amazon Resource Name (ARN) for the custom domain name.
CustomDomainCertificateArn *string
// The expiration date for the certificate associated with the custom domain name.
CustomDomainCertificateExpiryDate *time.Time
// The custom domain name associated with the cluster.
CustomDomainName *string
// The name of the initial database that was created when the cluster was created.
// This same name is returned for the life of the cluster. If an initial database
// was not specified, a database named dev dev was created by default.
DBName *string
//
DataTransferProgress *DataTransferProgress
// The Amazon Resource Name (ARN) for the IAM role set as default for the cluster.
DefaultIamRoleArn *string
// Describes a group of DeferredMaintenanceWindow objects.
DeferredMaintenanceWindows []DeferredMaintenanceWindow
// The status of the elastic IP (EIP) address.
ElasticIpStatus *ElasticIpStatus
// The number of nodes that you can resize the cluster to with the elastic resize
// method.
ElasticResizeNumberOfNodeOptions *string
// A boolean value that, if true , indicates that data in the cluster is encrypted
// at rest.
Encrypted bool
// The connection endpoint.
Endpoint *Endpoint
// An option that specifies whether to create the cluster with enhanced VPC
// routing enabled. To create a cluster that uses enhanced VPC routing, the cluster
// must be in a VPC. For more information, see Enhanced VPC Routing (https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html)
// in the Amazon Redshift Cluster Management Guide. If this option is true ,
// enhanced VPC routing is enabled. Default: false
EnhancedVpcRouting bool
// The date and time when the next snapshot is expected to be taken for clusters
// with a valid snapshot schedule and backups enabled.
ExpectedNextSnapshotScheduleTime *time.Time
// The status of next expected snapshot for clusters having a valid snapshot
// schedule and backups enabled. Possible values are the following:
// - OnTrack - The next snapshot is expected to be taken on time.
// - Pending - The next snapshot is pending to be taken.
ExpectedNextSnapshotScheduleTimeStatus *string
// A value that reports whether the Amazon Redshift cluster has finished applying
// any hardware security module (HSM) settings changes specified in a modify
// cluster command. Values: active, applying
HsmStatus *HsmStatus
// A list of Identity and Access Management (IAM) roles that can be used by the
// cluster to access other Amazon Web Services services.
IamRoles []ClusterIamRole
// The Key Management Service (KMS) key ID of the encryption key used to encrypt
// data in the cluster.
KmsKeyId *string
// The name of the maintenance track for the cluster.
MaintenanceTrackName *string
// The default number of days to retain a manual snapshot. If the value is -1, the
// snapshot is retained indefinitely. This setting doesn't change the retention
// period of existing snapshots. The value must be either -1 or an integer between
// 1 and 3,653.
ManualSnapshotRetentionPeriod int32
// The admin user name for the cluster. This name is used to connect to the
// database that is specified in the DBName parameter.
MasterUsername *string
// The status of a modify operation, if any, initiated for the cluster.
ModifyStatus *string
// The date and time in UTC when system maintenance can begin.
NextMaintenanceWindowStartTime *time.Time
// The node type for the nodes in the cluster.
NodeType *string
// The number of compute nodes in the cluster.
NumberOfNodes int32
// Cluster operations that are waiting to be started.
PendingActions []string
// A value that, if present, indicates that changes to the cluster are pending.
// Specific pending changes are identified by subelements.
PendingModifiedValues *PendingModifiedValues
// The weekly time range, in Universal Coordinated Time (UTC), during which system
// maintenance can occur.
PreferredMaintenanceWindow *string
// A boolean value that, if true , indicates that the cluster can be accessed from
// a public network.
PubliclyAccessible bool
// The status of the reserved-node exchange request. Statuses include in-progress
// and requested.
ReservedNodeExchangeStatus *ReservedNodeExchangeStatus
// Returns the following:
// - AllowCancelResize: a boolean value indicating if the resize operation can
// be cancelled.
// - ResizeType: Returns ClassicResize
ResizeInfo *ResizeInfo
// A value that describes the status of a cluster restore action. This parameter
// returns null if the cluster was not created by restoring a snapshot.
RestoreStatus *RestoreStatus
// A unique identifier for the cluster snapshot schedule.
SnapshotScheduleIdentifier *string
// The current state of the cluster snapshot schedule.
SnapshotScheduleState ScheduleState
// The list of tags for the cluster.
Tags []Tag
// The total storage capacity of the cluster in megabytes.
TotalStorageCapacityInMegaBytes *int64
// The identifier of the VPC the cluster is in, if the cluster is in a VPC.
VpcId *string
// A list of Amazon Virtual Private Cloud (Amazon VPC) security groups that are
// associated with the cluster. This parameter is returned only if the cluster is
// in a VPC.
VpcSecurityGroups []VpcSecurityGroupMembership
noSmithyDocumentSerde
}
type ClusterAssociatedToSchedule struct {
//
ClusterIdentifier *string
//
ScheduleAssociationState ScheduleState
noSmithyDocumentSerde
}
// Describes a ClusterDbRevision .
type ClusterDbRevision struct {
// The unique identifier of the cluster.
ClusterIdentifier *string
// A string representing the current cluster version.
CurrentDatabaseRevision *string
// The date on which the database revision was released.
DatabaseRevisionReleaseDate *time.Time
// A list of RevisionTarget objects, where each object describes the database
// revision that a cluster can be updated to.
RevisionTargets []RevisionTarget
noSmithyDocumentSerde
}
// An Identity and Access Management (IAM) role that can be used by the associated
// Amazon Redshift cluster to access other Amazon Web Services services.
type ClusterIamRole struct {
// A value that describes the status of the IAM role's association with an Amazon
// Redshift cluster. The following are possible statuses and descriptions.
// - in-sync : The role is available for use by the cluster.
// - adding : The role is in the process of being associated with the cluster.
// - removing : The role is in the process of being disassociated with the
// cluster.
ApplyStatus *string
// The Amazon Resource Name (ARN) of the IAM role, for example,
// arn:aws:iam::123456789012:role/RedshiftCopyUnload .
IamRoleArn *string
noSmithyDocumentSerde
}
// The identifier of a node in a cluster.
type ClusterNode struct {
// Whether the node is a leader node or a compute node.
NodeRole *string
// The private IP address of a node within a cluster.
PrivateIPAddress *string
// The public IP address of a node within a cluster.
PublicIPAddress *string
noSmithyDocumentSerde
}
// Describes a parameter group.
type ClusterParameterGroup struct {
// The description of the parameter group.
Description *string
// The name of the cluster parameter group family that this cluster parameter
// group is compatible with.
ParameterGroupFamily *string
// The name of the cluster parameter group.
ParameterGroupName *string
// The list of tags for the cluster parameter group.
Tags []Tag
noSmithyDocumentSerde
}
// Describes the status of a parameter group.
type ClusterParameterGroupStatus struct {
// The list of parameter statuses. For more information about parameters and
// parameter groups, go to Amazon Redshift Parameter Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// in the Amazon Redshift Cluster Management Guide.
ClusterParameterStatusList []ClusterParameterStatus
// The status of parameter updates.
ParameterApplyStatus *string
// The name of the cluster parameter group.
ParameterGroupName *string
noSmithyDocumentSerde
}
// Describes the status of a parameter group.
type ClusterParameterStatus struct {
// The error that prevented the parameter from being applied to the database.
ParameterApplyErrorDescription *string
// The status of the parameter that indicates whether the parameter is in sync
// with the database, waiting for a cluster reboot, or encountered an error when
// being applied. The following are possible statuses and descriptions.
// - in-sync : The parameter value is in sync with the database.
// - pending-reboot : The parameter value will be applied after the cluster
// reboots.
// - applying : The parameter value is being applied to the database.
// - invalid-parameter : Cannot apply the parameter value because it has an
// invalid value or syntax.
// - apply-deferred : The parameter contains static property changes. The changes
// are deferred until the cluster reboots.
// - apply-error : Cannot connect to the cluster. The parameter change will be
// applied after the cluster reboots.
// - unknown-error : Cannot apply the parameter change right now. The change will
// be applied after the cluster reboots.
ParameterApplyStatus *string
// The name of the parameter.
ParameterName *string
noSmithyDocumentSerde
}
// Describes a security group.
type ClusterSecurityGroup struct {
// The name of the cluster security group to which the operation was applied.
ClusterSecurityGroupName *string
// A description of the security group.
Description *string
// A list of EC2 security groups that are permitted to access clusters associated
// with this cluster security group.
EC2SecurityGroups []EC2SecurityGroup
// A list of IP ranges (CIDR blocks) that are permitted to access clusters
// associated with this cluster security group.
IPRanges []IPRange
// The list of tags for the cluster security group.
Tags []Tag
noSmithyDocumentSerde
}
// Describes a cluster security group.
type ClusterSecurityGroupMembership struct {
// The name of the cluster security group.
ClusterSecurityGroupName *string
// The status of the cluster security group.
Status *string
noSmithyDocumentSerde
}
// Returns the destination region and retention period that are configured for
// cross-region snapshot copy.
type ClusterSnapshotCopyStatus struct {
// The destination region that snapshots are automatically copied to when
// cross-region snapshot copy is enabled.
DestinationRegion *string
// The number of days that automated snapshots are retained in the destination
// region after they are copied from a source region. If the value is -1, the
// manual snapshot is retained indefinitely. The value must be either -1 or an
// integer between 1 and 3,653.
ManualSnapshotRetentionPeriod int32
// The number of days that automated snapshots are retained in the destination
// region after they are copied from a source region.
RetentionPeriod int64
// The name of the snapshot copy grant.
SnapshotCopyGrantName *string
noSmithyDocumentSerde
}
// Describes a subnet group.
type ClusterSubnetGroup struct {
// The name of the cluster subnet group.
ClusterSubnetGroupName *string
// The description of the cluster subnet group.
Description *string
// The status of the cluster subnet group. Possible values are Complete ,
// Incomplete and Invalid .
SubnetGroupStatus *string
// A list of the VPC Subnet elements.
Subnets []Subnet
// The list of tags for the cluster subnet group.
Tags []Tag
// The VPC ID of the cluster subnet group.
VpcId *string
noSmithyDocumentSerde
}
// Describes a cluster version, including the parameter group family and
// description of the version.
type ClusterVersion struct {
// The name of the cluster parameter group family for the cluster.
ClusterParameterGroupFamily *string
// The version number used by the cluster.
ClusterVersion *string
// The description of the cluster version.
Description *string
noSmithyDocumentSerde
}
type DataShare struct {
// A value that specifies whether the datashare can be shared to a publicly
// accessible cluster.
AllowPubliclyAccessibleConsumers bool
// An Amazon Resource Name (ARN) that references the datashare that is owned by a
// specific namespace of the producer cluster. A datashare ARN is in the
// arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name}
// format.
DataShareArn *string
// A value that specifies when the datashare has an association between producer
// and data consumers.
DataShareAssociations []DataShareAssociation
// The identifier of a datashare to show its managing entity.
ManagedBy *string
// The Amazon Resource Name (ARN) of the producer.
ProducerArn *string
noSmithyDocumentSerde
}
// The association of a datashare from a producer account with a data consumer.
type DataShareAssociation struct {
// The name of the consumer accounts that have an association with a producer
// datashare.
ConsumerIdentifier *string
// The Amazon Web Services Region of the consumer accounts that have an
// association with a producer datashare.
ConsumerRegion *string
// The creation date of the datashare that is associated.
CreatedDate *time.Time
// The status of the datashare that is associated.
Status DataShareStatus
// The status change data of the datashare that is associated.
StatusChangeDate *time.Time
noSmithyDocumentSerde
}
// Describes the status of a cluster while it is in the process of resizing with
// an incremental resize.
type DataTransferProgress struct {
// Describes the data transfer rate in MB's per second.
CurrentRateInMegaBytesPerSecond *float64
// Describes the total amount of data that has been transfered in MB's.
DataTransferredInMegaBytes int64
// Describes the number of seconds that have elapsed during the data transfer.
ElapsedTimeInSeconds *int64
// Describes the estimated number of seconds remaining to complete the transfer.
EstimatedTimeToCompletionInSeconds *int64
// Describes the status of the cluster. While the transfer is in progress the
// status is transferringdata .
Status *string
// Describes the total amount of data to be transfered in megabytes.
TotalDataInMegaBytes int64
noSmithyDocumentSerde
}
// Describes the default cluster parameters for a parameter group family.
type DefaultClusterParameters struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned marker value in the Marker
// parameter and retrying the command. If the Marker field is empty, all response
// records have been retrieved for the request.
Marker *string
// The name of the cluster parameter group family to which the engine default
// parameters apply.
ParameterGroupFamily *string
// The list of cluster default parameters.
Parameters []Parameter
noSmithyDocumentSerde
}
// Describes a deferred maintenance window
type DeferredMaintenanceWindow struct {
// A timestamp for the end of the time period when we defer maintenance.
DeferMaintenanceEndTime *time.Time
// A unique identifier for the maintenance window.
DeferMaintenanceIdentifier *string
// A timestamp for the beginning of the time period when we defer maintenance.
DeferMaintenanceStartTime *time.Time
noSmithyDocumentSerde
}
type DeleteClusterSnapshotMessage struct {
// The unique identifier of the manual snapshot to be deleted. Constraints: Must
// be the name of an existing snapshot that is in the available , failed , or
// cancelled state.
//
// This member is required.
SnapshotIdentifier *string
// The unique identifier of the cluster the snapshot was created from. This
// parameter is required if your IAM user has a policy containing a snapshot
// resource element that specifies anything other than * for the cluster name.
// Constraints: Must be the name of valid cluster.
SnapshotClusterIdentifier *string
noSmithyDocumentSerde
}
// Describes an Amazon EC2 security group.
type EC2SecurityGroup struct {
// The name of the EC2 Security Group.
EC2SecurityGroupName *string
// The Amazon Web Services account ID of the owner of the EC2 security group
// specified in the EC2SecurityGroupName field.
EC2SecurityGroupOwnerId *string
// The status of the EC2 security group.
Status *string
// The list of tags for the EC2 security group.
Tags []Tag
noSmithyDocumentSerde
}
// Describes the status of the elastic IP (EIP) address.
type ElasticIpStatus struct {
// The elastic IP (EIP) address for the cluster.
ElasticIp *string
// The status of the elastic IP (EIP) address.
Status *string
noSmithyDocumentSerde
}
// Describes a connection endpoint.
type Endpoint struct {
// The DNS address of the Cluster.
Address *string
// The port that the database engine is listening on.
Port int32
// Describes a connection endpoint.
VpcEndpoints []VpcEndpoint
noSmithyDocumentSerde
}
// Describes a Redshift-managed VPC endpoint.
type EndpointAccess struct {
// The DNS address of the endpoint.
Address *string
// The cluster identifier of the cluster associated with the endpoint.
ClusterIdentifier *string
// The time (UTC) that the endpoint was created.
EndpointCreateTime *time.Time
// The name of the endpoint.
EndpointName *string
// The status of the endpoint.
EndpointStatus *string
// The port number on which the cluster accepts incoming connections.
Port int32
// The Amazon Web Services account ID of the owner of the cluster.
ResourceOwner *string
// The subnet group name where Amazon Redshift chooses to deploy the endpoint.
SubnetGroupName *string
// The connection endpoint for connecting to an Amazon Redshift cluster through
// the proxy.
VpcEndpoint *VpcEndpoint
// The security groups associated with the endpoint.
VpcSecurityGroups []VpcSecurityGroupMembership
noSmithyDocumentSerde
}
// Describes an endpoint authorization for authorizing Redshift-managed VPC
// endpoint access to a cluster across Amazon Web Services accounts.
type EndpointAuthorization struct {
// Indicates whether all VPCs in the grantee account are allowed access to the
// cluster.
AllowedAllVPCs bool
// The VPCs allowed access to the cluster.
AllowedVPCs []string
// The time (UTC) when the authorization was created.
AuthorizeTime *time.Time
// The cluster identifier.
ClusterIdentifier *string
// The status of the cluster.
ClusterStatus *string
// The number of Redshift-managed VPC endpoints created for the authorization.
EndpointCount int32
// The Amazon Web Services account ID of the grantee of the cluster.
Grantee *string
// The Amazon Web Services account ID of the cluster owner.
Grantor *string
// The status of the authorization action.
Status AuthorizationStatus
noSmithyDocumentSerde
}
// Describes an event.
type Event struct {
// The date and time of the event.
Date *time.Time
// A list of the event categories. Values: Configuration, Management, Monitoring,
// Security, Pending
EventCategories []string
// The identifier of the event.
EventId *string
// The text of this event.
Message *string
// The severity of the event. Values: ERROR, INFO
Severity *string
// The identifier for the source of the event.
SourceIdentifier *string
// The source type for this event.
SourceType SourceType
noSmithyDocumentSerde
}
// Describes event categories.
type EventCategoriesMap struct {
// The events in the event category.
Events []EventInfoMap
// The source type, such as cluster or cluster-snapshot, that the returned
// categories belong to.
SourceType *string
noSmithyDocumentSerde
}
// Describes event information.
type EventInfoMap struct {
// The category of an Amazon Redshift event.
EventCategories []string
// The description of an Amazon Redshift event.
EventDescription *string
// The identifier of an Amazon Redshift event.
EventId *string
// The severity of the event. Values: ERROR, INFO
Severity *string
noSmithyDocumentSerde
}
// Describes event subscriptions.
type EventSubscription struct {
// The name of the Amazon Redshift event notification subscription.
CustSubscriptionId *string
// The Amazon Web Services account associated with the Amazon Redshift event
// notification subscription.
CustomerAwsId *string
// A boolean value indicating whether the subscription is enabled; true indicates
// that the subscription is enabled.
Enabled bool
// The list of Amazon Redshift event categories specified in the event
// notification subscription. Values: Configuration, Management, Monitoring,
// Security, Pending
EventCategoriesList []string
// The event severity specified in the Amazon Redshift event notification
// subscription. Values: ERROR, INFO
Severity *string
// The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event
// notification subscription.
SnsTopicArn *string
// A list of the sources that publish events to the Amazon Redshift event
// notification subscription.
SourceIdsList []string
// The source type of the events returned by the Amazon Redshift event
// notification, such as cluster, cluster-snapshot, cluster-parameter-group,
// cluster-security-group, or scheduled-action.
SourceType *string
// The status of the Amazon Redshift event notification subscription. Constraints:
// - Can be one of the following: active | no-permission | topic-not-exist
// - The status "no-permission" indicates that Amazon Redshift no longer has
// permission to post to the Amazon SNS topic. The status "topic-not-exist"
// indicates that the topic was deleted after the subscription was created.
Status *string
// The date and time the Amazon Redshift event notification subscription was
// created.
SubscriptionCreationTime *time.Time
// The list of tags for the event subscription.
Tags []Tag
noSmithyDocumentSerde
}
// Returns information about an HSM client certificate. The certificate is stored
// in a secure Hardware Storage Module (HSM), and used by the Amazon Redshift
// cluster to encrypt data files.
type HsmClientCertificate struct {
// The identifier of the HSM client certificate.
HsmClientCertificateIdentifier *string
// The public key that the Amazon Redshift cluster will use to connect to the HSM.
// You must register the public key in the HSM.
HsmClientCertificatePublicKey *string
// The list of tags for the HSM client certificate.
Tags []Tag
noSmithyDocumentSerde
}
// Returns information about an HSM configuration, which is an object that
// describes to Amazon Redshift clusters the information they require to connect to
// an HSM where they can store database encryption keys.
type HsmConfiguration struct {
// A text description of the HSM configuration.
Description *string
// The name of the Amazon Redshift HSM configuration.
HsmConfigurationIdentifier *string
// The IP address that the Amazon Redshift cluster must use to access the HSM.
HsmIpAddress *string
// The name of the partition in the HSM where the Amazon Redshift clusters will
// store their database encryption keys.
HsmPartitionName *string
// The list of tags for the HSM configuration.
Tags []Tag
noSmithyDocumentSerde
}
// Describes the status of changes to HSM settings.
type HsmStatus struct {
// Specifies the name of the HSM client certificate the Amazon Redshift cluster
// uses to retrieve the data encryption keys stored in an HSM.
HsmClientCertificateIdentifier *string
// Specifies the name of the HSM configuration that contains the information the
// Amazon Redshift cluster can use to retrieve and store keys in an HSM.
HsmConfigurationIdentifier *string
// Reports whether the Amazon Redshift cluster has finished applying any HSM
// settings changes specified in a modify cluster command. Values: active, applying
Status *string
noSmithyDocumentSerde
}
// Describes an IP range used in a security group.
type IPRange struct {
// The IP range in Classless Inter-Domain Routing (CIDR) notation.
CIDRIP *string
// The status of the IP range, for example, "authorized".
Status *string
// The list of tags for the IP range.
Tags []Tag
noSmithyDocumentSerde
}
// Defines a maintenance track that determines which Amazon Redshift version to
// apply during a maintenance window. If the value for MaintenanceTrack is current
// , the cluster is updated to the most recently certified maintenance release. If
// the value is trailing , the cluster is updated to the previously certified
// maintenance release.
type MaintenanceTrack struct {
// The version number for the cluster release.
DatabaseVersion *string
// The name of the maintenance track. Possible values are current and trailing .
MaintenanceTrackName *string
// An array of UpdateTarget objects to update with the maintenance track.
UpdateTargets []UpdateTarget
noSmithyDocumentSerde
}
// Describes a network interface.
type NetworkInterface struct {
// The Availability Zone.
AvailabilityZone *string
// The network interface identifier.
NetworkInterfaceId *string
// The IPv4 address of the network interface within the subnet.
PrivateIpAddress *string
// The subnet identifier.
SubnetId *string
noSmithyDocumentSerde
}
// A list of node configurations.
type NodeConfigurationOption struct {
// The estimated disk utilizaton percentage.
EstimatedDiskUtilizationPercent *float64
// The category of the node configuration recommendation.
Mode Mode
// The node type, such as, "ds2.8xlarge".
NodeType *string
// The number of nodes.
NumberOfNodes int32
noSmithyDocumentSerde
}
// A set of elements to filter the returned node configurations.
type NodeConfigurationOptionsFilter struct {
// The name of the element to filter.
Name NodeConfigurationOptionsFilterName
// The filter operator. If filter Name is NodeType only the 'in' operator is
// supported. Provide one value to evaluate for 'eq', 'lt', 'le', 'gt', and 'ge'.
// Provide two values to evaluate for 'between'. Provide a list of values for 'in'.
Operator OperatorType
// List of values. Compare Name using Operator to Values. If filter Name is
// NumberOfNodes, then values can range from 0 to 200. If filter Name is
// EstimatedDiskUtilizationPercent, then values can range from 0 to 100. For
// example, filter NumberOfNodes (name) GT (operator) 3 (values).
Values []string
noSmithyDocumentSerde
}
// Describes an orderable cluster option.
type OrderableClusterOption struct {
// A list of availability zones for the orderable cluster.
AvailabilityZones []AvailabilityZone
// The cluster type, for example multi-node .
ClusterType *string
// The version of the orderable cluster.
ClusterVersion *string
// The node type for the orderable cluster.
NodeType *string
noSmithyDocumentSerde
}
// Describes a parameter in a cluster parameter group.
type Parameter struct {
// The valid range of values for the parameter.
AllowedValues *string
// Specifies how to apply the WLM configuration parameter. Some properties can be
// applied dynamically, while other properties require that any associated clusters
// be rebooted for the configuration changes to be applied. For more information
// about parameters and parameter groups, go to Amazon Redshift Parameter Groups (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html)
// in the Amazon Redshift Cluster Management Guide.
ApplyType ParameterApplyType
// The data type of the parameter.
DataType *string
// A description of the parameter.
Description *string
// If true , the parameter can be modified. Some parameters have security or
// operational implications that prevent them from being changed.
IsModifiable bool
// The earliest engine version to which the parameter can apply.
MinimumEngineVersion *string
// The name of the parameter.
ParameterName *string
// The value of the parameter. If ParameterName is wlm_json_configuration , then
// the maximum size of ParameterValue is 8000 characters.
ParameterValue *string
// The source of the parameter value, such as "engine-default" or "user".
Source *string
noSmithyDocumentSerde
}
// Describes a partner integration.
type PartnerIntegrationInfo struct {
// The date (UTC) that the partner integration was created.
CreatedAt *time.Time
// The name of the database that receives data from a partner.
DatabaseName *string
// The name of the partner.
PartnerName *string
// The partner integration status.
Status PartnerIntegrationStatus
// The status message provided by the partner.
StatusMessage *string
// The date (UTC) that the partner integration status was last updated by the
// partner.
UpdatedAt *time.Time
noSmithyDocumentSerde
}
// Describes a pause cluster operation. For example, a scheduled action to run the
// PauseCluster API operation.
type PauseClusterMessage struct {
// The identifier of the cluster to be paused.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
// Describes cluster attributes that are in a pending state. A change to one or
// more the attributes was requested and is in progress or will be applied.
type PendingModifiedValues struct {
// The pending or in-progress change of the automated snapshot retention period.
AutomatedSnapshotRetentionPeriod *int32
// The pending or in-progress change of the new identifier for the cluster.
ClusterIdentifier *string
// The pending or in-progress change of the cluster type.
ClusterType *string
// The pending or in-progress change of the service version.
ClusterVersion *string
// The encryption type for a cluster. Possible values are: KMS and None.
EncryptionType *string
// An option that specifies whether to create the cluster with enhanced VPC
// routing enabled. To create a cluster that uses enhanced VPC routing, the cluster
// must be in a VPC. For more information, see Enhanced VPC Routing (https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html)
// in the Amazon Redshift Cluster Management Guide. If this option is true ,
// enhanced VPC routing is enabled. Default: false
EnhancedVpcRouting *bool
// The name of the maintenance track that the cluster will change to during the
// next maintenance window.
MaintenanceTrackName *string
// The pending or in-progress change of the admin user password for the cluster.
MasterUserPassword *string
// The pending or in-progress change of the cluster's node type.
NodeType *string
// The pending or in-progress change of the number of nodes in the cluster.
NumberOfNodes *int32
// The pending or in-progress change of the ability to connect to the cluster from
// the public network.
PubliclyAccessible *bool
noSmithyDocumentSerde
}
// Describes a recurring charge.
type RecurringCharge struct {
// The amount charged per the period of time specified by the recurring charge
// frequency.
RecurringChargeAmount float64
// The frequency at which the recurring charge amount is applied.
RecurringChargeFrequency *string
noSmithyDocumentSerde
}
// Describes a reserved node. You can call the DescribeReservedNodeOfferings API
// to obtain the available reserved node offerings.
type ReservedNode struct {
// The currency code for the reserved cluster.
CurrencyCode *string
// The duration of the node reservation in seconds.
Duration int32
// The fixed cost Amazon Redshift charges you for this reserved node.
FixedPrice float64
// The number of reserved compute nodes.
NodeCount int32
// The node type of the reserved node.
NodeType *string
// The anticipated utilization of the reserved node, as defined in the reserved
// node offering.
OfferingType *string
// The recurring charges for the reserved node.
RecurringCharges []RecurringCharge
// The unique identifier for the reservation.
ReservedNodeId *string
// The identifier for the reserved node offering.
ReservedNodeOfferingId *string
//
ReservedNodeOfferingType ReservedNodeOfferingType
// The time the reservation started. You purchase a reserved node offering for a
// duration. This is the start time of that duration.
StartTime *time.Time
// The state of the reserved compute node. Possible Values:
// - pending-payment-This reserved node has recently been purchased, and the
// sale has been approved, but payment has not yet been confirmed.
// - active-This reserved node is owned by the caller and is available for use.
// - payment-failed-Payment failed for the purchase attempt.
// - retired-The reserved node is no longer available.
// - exchanging-The owner is exchanging the reserved node for another reserved
// node.
State *string
// The hourly rate Amazon Redshift charges you for this reserved node.
UsagePrice float64
noSmithyDocumentSerde
}
// Details for a reserved-node exchange. Examples include the node type for a
// reserved node, the price for a node, the node's state, and other details.
type ReservedNodeConfigurationOption struct {
// Describes a reserved node. You can call the DescribeReservedNodeOfferings API
// to obtain the available reserved node offerings.
SourceReservedNode *ReservedNode
// The target reserved-node count.
TargetReservedNodeCount int32
// Describes a reserved node offering.
TargetReservedNodeOffering *ReservedNodeOffering
noSmithyDocumentSerde
}
// Reserved-node status details, such as the source reserved-node identifier, the
// target reserved-node identifier, the node type, the node count, and other
// details.
type ReservedNodeExchangeStatus struct {
// A date and time that indicate when the reserved-node exchange was requested.
RequestTime *time.Time
// The identifier of the reserved-node exchange request.
ReservedNodeExchangeRequestId *string
// The source reserved-node count in the cluster.
SourceReservedNodeCount int32
// The identifier of the source reserved node.
SourceReservedNodeId *string
// The source reserved-node type, for example ds2.xlarge.
SourceReservedNodeType *string
// The status of the reserved-node exchange request. Statuses include in-progress
// and requested.
Status ReservedNodeExchangeStatusType
// The count of target reserved nodes in the cluster.
TargetReservedNodeCount int32
// The identifier of the target reserved node offering.
TargetReservedNodeOfferingId *string
// The node type of the target reserved node, for example ra3.4xlarge.
TargetReservedNodeType *string
noSmithyDocumentSerde
}
// Describes a reserved node offering.
type ReservedNodeOffering struct {
// The currency code for the compute nodes offering.
CurrencyCode *string
// The duration, in seconds, for which the offering will reserve the node.
Duration int32
// The upfront fixed charge you will pay to purchase the specific reserved node
// offering.
FixedPrice float64
// The node type offered by the reserved node offering.
NodeType *string
// The anticipated utilization of the reserved node, as defined in the reserved
// node offering.
OfferingType *string
// The charge to your account regardless of whether you are creating any clusters
// using the node offering. Recurring charges are only in effect for
// heavy-utilization reserved nodes.
RecurringCharges []RecurringCharge
// The offering identifier.
ReservedNodeOfferingId *string
//
ReservedNodeOfferingType ReservedNodeOfferingType
// The rate you are charged for each hour the cluster that is using the offering
// is running.
UsagePrice float64
noSmithyDocumentSerde
}
// Describes a resize cluster operation. For example, a scheduled action to run
// the ResizeCluster API operation.
type ResizeClusterMessage struct {
// The unique identifier for the cluster to resize.
//
// This member is required.
ClusterIdentifier *string
// A boolean value indicating whether the resize operation is using the classic
// resize process. If you don't provide this parameter or set the value to false ,
// the resize type is elastic.
Classic *bool
// The new cluster type for the specified cluster.
ClusterType *string
// The new node type for the nodes you are adding. If not specified, the cluster's
// current node type is used.
NodeType *string
// The new number of nodes for the cluster. If not specified, the cluster's
// current number of nodes is used.
NumberOfNodes *int32
// The identifier of the reserved node.
ReservedNodeId *string
// The identifier of the target reserved node offering.
TargetReservedNodeOfferingId *string
noSmithyDocumentSerde
}
// Describes a resize operation.
type ResizeInfo struct {
// A boolean value indicating if the resize operation can be cancelled.
AllowCancelResize bool
// Returns the value ClassicResize .
ResizeType *string
noSmithyDocumentSerde
}
// Describes the status of a cluster restore action. Returns null if the cluster
// was not created by restoring a snapshot.
type RestoreStatus struct {
// The number of megabytes per second being transferred from the backup storage.
// Returns the average rate for a completed backup. This field is only updated when
// you restore to DC2 and DS2 node types.
CurrentRestoreRateInMegaBytesPerSecond float64
// The amount of time an in-progress restore has been running, or the amount of
// time it took a completed restore to finish. This field is only updated when you
// restore to DC2 and DS2 node types.
ElapsedTimeInSeconds int64
// The estimate of the time remaining before the restore will complete. Returns 0
// for a completed restore. This field is only updated when you restore to DC2 and
// DS2 node types.
EstimatedTimeToCompletionInSeconds int64
// The number of megabytes that have been transferred from snapshot storage. This
// field is only updated when you restore to DC2 and DS2 node types.
ProgressInMegaBytes int64
// The size of the set of snapshot data used to restore the cluster. This field is
// only updated when you restore to DC2 and DS2 node types.
SnapshotSizeInMegaBytes int64
// The status of the restore action. Returns starting, restoring, completed, or
// failed.
Status *string
noSmithyDocumentSerde
}
// Describes a resume cluster operation. For example, a scheduled action to run
// the ResumeCluster API operation.
type ResumeClusterMessage struct {
// The identifier of the cluster to be resumed.
//
// This member is required.
ClusterIdentifier *string
noSmithyDocumentSerde
}
// Describes a RevisionTarget .
type RevisionTarget struct {
// A unique string that identifies the version to update the cluster to. You can
// use this value in ModifyClusterDbRevision .
DatabaseRevision *string
// The date on which the database revision was released.
DatabaseRevisionReleaseDate *time.Time
// A string that describes the changes and features that will be applied to the
// cluster when it is updated to the corresponding ClusterDbRevision .
Description *string
noSmithyDocumentSerde
}
// Describes a scheduled action. You can use a scheduled action to trigger some
// Amazon Redshift API operations on a schedule. For information about which API
// operations can be scheduled, see ScheduledActionType .
type ScheduledAction struct {
// The end time in UTC when the schedule is no longer active. After this time, the
// scheduled action does not trigger.
EndTime *time.Time
// The IAM role to assume to run the scheduled action. This IAM role must have
// permission to run the Amazon Redshift API operation in the scheduled action.
// This IAM role must allow the Amazon Redshift scheduler (Principal
// scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more
// information about the IAM role to use with the Amazon Redshift scheduler, see
// Using Identity-Based Policies for Amazon Redshift (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html)
// in the Amazon Redshift Cluster Management Guide.
IamRole *string
// List of times when the scheduled action will run.
NextInvocations []time.Time
// The schedule for a one-time (at format) or recurring (cron format) scheduled
// action. Schedule invocations must be separated by at least one hour. Format of
// at expressions is " at(yyyy-mm-ddThh:mm:ss) ". For example, "
// at(2016-03-04T17:27:00) ". Format of cron expressions is " cron(Minutes Hours
// Day-of-month Month Day-of-week Year) ". For example, " cron(0 10 ? * MON *) ".
// For more information, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
// in the Amazon CloudWatch Events User Guide.
Schedule *string
// The description of the scheduled action.
ScheduledActionDescription *string
// The name of the scheduled action.
ScheduledActionName *string
// The start time in UTC when the schedule is active. Before this time, the
// scheduled action does not trigger.
StartTime *time.Time
// The state of the scheduled action. For example, DISABLED .
State ScheduledActionState
// A JSON format string of the Amazon Redshift API operation with input
// parameters. "
// {\"ResizeCluster\":{\"NodeType\":\"ds2.8xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}}
// ".
TargetAction *ScheduledActionType
noSmithyDocumentSerde
}
// A set of elements to filter the returned scheduled actions.
type ScheduledActionFilter struct {
// The type of element to filter.
//
// This member is required.
Name ScheduledActionFilterName
// List of values. Compare if the value (of type defined by Name ) equals an item
// in the list of scheduled actions.
//
// This member is required.
Values []string
noSmithyDocumentSerde
}
// The action type that specifies an Amazon Redshift API operation that is
// supported by the Amazon Redshift scheduler.
type ScheduledActionType struct {
// An action that runs a PauseCluster API operation.
PauseCluster *PauseClusterMessage
// An action that runs a ResizeCluster API operation.
ResizeCluster *ResizeClusterMessage
// An action that runs a ResumeCluster API operation.
ResumeCluster *ResumeClusterMessage
noSmithyDocumentSerde
}
// Describes a snapshot.
type Snapshot struct {
// A list of the Amazon Web Services accounts authorized to restore the snapshot.
// Returns null if no accounts are authorized. Visible only to the snapshot owner.
AccountsWithRestoreAccess []AccountWithRestoreAccess
// The size of the incremental backup.
ActualIncrementalBackupSizeInMegaBytes float64
// The Availability Zone in which the cluster was created.
AvailabilityZone *string
// The number of megabytes that have been transferred to the snapshot backup.
BackupProgressInMegaBytes float64
// The time (UTC) when the cluster was originally created.
ClusterCreateTime *time.Time
// The identifier of the cluster for which the snapshot was taken.
ClusterIdentifier *string
// The version ID of the Amazon Redshift engine that is running on the cluster.
ClusterVersion *string
// The number of megabytes per second being transferred to the snapshot backup.
// Returns 0 for a completed backup.
CurrentBackupRateInMegaBytesPerSecond float64
// The name of the database that was created when the cluster was created.
DBName *string
// The amount of time an in-progress snapshot backup has been running, or the
// amount of time it took a completed backup to finish.
ElapsedTimeInSeconds int64
// If true , the data in the snapshot is encrypted at rest.
Encrypted bool
// A boolean that indicates whether the snapshot data is encrypted using the HSM
// keys of the source cluster. true indicates that the data is encrypted using HSM
// keys.
EncryptedWithHSM bool
// The cluster version of the cluster used to create the snapshot. For example,
// 1.0.15503.
EngineFullVersion *string
// An option that specifies whether to create the cluster with enhanced VPC
// routing enabled. To create a cluster that uses enhanced VPC routing, the cluster
// must be in a VPC. For more information, see Enhanced VPC Routing (https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html)
// in the Amazon Redshift Cluster Management Guide. If this option is true ,
// enhanced VPC routing is enabled. Default: false
EnhancedVpcRouting bool
// The estimate of the time remaining before the snapshot backup will complete.
// Returns 0 for a completed backup.
EstimatedSecondsToCompletion int64
// The Key Management Service (KMS) key ID of the encryption key that was used to
// encrypt data in the cluster from which the snapshot was taken.
KmsKeyId *string
// The name of the maintenance track for the snapshot.
MaintenanceTrackName *string
// The number of days until a manual snapshot will pass its retention period.
ManualSnapshotRemainingDays *int32
// The number of days that a manual snapshot is retained. If the value is -1, the
// manual snapshot is retained indefinitely. The value must be either -1 or an
// integer between 1 and 3,653.
ManualSnapshotRetentionPeriod *int32
// The admin user name for the cluster.
MasterUsername *string
// The node type of the nodes in the cluster.
NodeType *string
// The number of nodes in the cluster.
NumberOfNodes int32
// For manual snapshots, the Amazon Web Services account used to create or copy
// the snapshot. For automatic snapshots, the owner of the cluster. The owner can
// perform all snapshot actions, such as sharing a manual snapshot.
OwnerAccount *string
// The port that the cluster is listening on.
Port int32
// The list of node types that this cluster snapshot is able to restore into.
RestorableNodeTypes []string
// The time (in UTC format) when Amazon Redshift began the snapshot. A snapshot
// contains a copy of the cluster data as of this exact time.
SnapshotCreateTime *time.Time
// The snapshot identifier that is provided in the request.
SnapshotIdentifier *string
// A timestamp representing the start of the retention period for the snapshot.
SnapshotRetentionStartTime *time.Time
// The snapshot type. Snapshots created using CreateClusterSnapshot and
// CopyClusterSnapshot are of type "manual".
SnapshotType *string
// The source region from which the snapshot was copied.
SourceRegion *string
// The snapshot status. The value of the status depends on the API operation used:
// - CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
// - DescribeClusterSnapshots returns status as "creating", "available", "final
// snapshot", or "failed".
// - DeleteClusterSnapshot returns status as "deleted".
Status *string
// The list of tags for the cluster snapshot.
Tags []Tag
// The size of the complete set of backup data that would be used to restore the
// cluster.
TotalBackupSizeInMegaBytes float64
// The VPC identifier of the cluster if the snapshot is from a cluster in a VPC.
// Otherwise, this field is not in the output.
VpcId *string
noSmithyDocumentSerde
}
// The snapshot copy grant that grants Amazon Redshift permission to encrypt
// copied snapshots with the specified encrypted symmetric key from Amazon Web
// Services KMS in the destination region. For more information about managing
// snapshot copy grants, go to Amazon Redshift Database Encryption (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html)
// in the Amazon Redshift Cluster Management Guide.
type SnapshotCopyGrant struct {
// The unique identifier of the encrypted symmetric key in Amazon Web Services KMS
// to which Amazon Redshift is granted permission.
KmsKeyId *string
// The name of the snapshot copy grant.
SnapshotCopyGrantName *string
// A list of tag instances.
Tags []Tag
noSmithyDocumentSerde
}
// Describes the errors returned by a snapshot.
type SnapshotErrorMessage struct {
// The failure code for the error.
FailureCode *string
// The text message describing the error.
FailureReason *string
// A unique identifier for the cluster.
SnapshotClusterIdentifier *string
// A unique identifier for the snapshot returning the error.
SnapshotIdentifier *string
noSmithyDocumentSerde
}
// Describes a snapshot schedule. You can set a regular interval for creating
// snapshots of a cluster. You can also schedule snapshots for specific dates.
type SnapshotSchedule struct {
// The number of clusters associated with the schedule.
AssociatedClusterCount *int32
// A list of clusters associated with the schedule. A maximum of 100 clusters is
// returned.
AssociatedClusters []ClusterAssociatedToSchedule
//
NextInvocations []time.Time
// A list of ScheduleDefinitions.
ScheduleDefinitions []string
// The description of the schedule.
ScheduleDescription *string
// A unique identifier for the schedule.
ScheduleIdentifier *string
// An optional set of tags describing the schedule.
Tags []Tag
noSmithyDocumentSerde
}
// Describes a sorting entity
type SnapshotSortingEntity struct {
// The category for sorting the snapshots.
//
// This member is required.
Attribute SnapshotAttributeToSortBy
// The order for listing the attributes.
SortOrder SortByOrder
noSmithyDocumentSerde
}
// Describes a subnet.
type Subnet struct {
//
SubnetAvailabilityZone *AvailabilityZone
// The identifier of the subnet.
SubnetIdentifier *string
// The status of the subnet.
SubnetStatus *string
noSmithyDocumentSerde
}
// Describes the operations that are allowed on a maintenance track.
type SupportedOperation struct {
// A list of the supported operations.
OperationName *string
noSmithyDocumentSerde
}
// A list of supported platforms for orderable clusters.
type SupportedPlatform struct {
//
Name *string
noSmithyDocumentSerde
}
// Describes the status of a RestoreTableFromClusterSnapshot operation.
type TableRestoreStatus struct {
// The identifier of the Amazon Redshift cluster that the table is being restored
// to.
ClusterIdentifier *string
// A description of the status of the table restore request. Status values include
// SUCCEEDED , FAILED , CANCELED , PENDING , IN_PROGRESS .
Message *string
// The name of the table to create as a result of the table restore request.
NewTableName *string
// The amount of data restored to the new table so far, in megabytes (MB).
ProgressInMegaBytes *int64
// The time that the table restore request was made, in Universal Coordinated Time
// (UTC).
RequestTime *time.Time
// The identifier of the snapshot that the table is being restored from.
SnapshotIdentifier *string
// The name of the source database that contains the table being restored.
SourceDatabaseName *string
// The name of the source schema that contains the table being restored.
SourceSchemaName *string
// The name of the source table being restored.
SourceTableName *string
// A value that describes the current state of the table restore request. Valid
// Values: SUCCEEDED , FAILED , CANCELED , PENDING , IN_PROGRESS
Status TableRestoreStatusType
// The unique identifier for the table restore request.
TableRestoreRequestId *string
// The name of the database to restore the table to.
TargetDatabaseName *string
// The name of the schema to restore the table to.
TargetSchemaName *string
// The total amount of data to restore to the new table, in megabytes (MB).
TotalDataInMegaBytes *int64
noSmithyDocumentSerde
}
// A tag consisting of a name/value pair for a resource.
type Tag struct {
// The key, or name, for the resource tag.
Key *string
// The value for the resource tag.
Value *string
noSmithyDocumentSerde
}
// A tag and its associated resource.
type TaggedResource struct {
// The Amazon Resource Name (ARN) with which the tag is associated, for example:
// arn:aws:redshift:us-east-2:123456789:cluster:t1 .
ResourceName *string
// The type of resource with which the tag is associated. Valid resource types
// are:
// - Cluster
// - CIDR/IP
// - EC2 security group
// - Snapshot
// - Cluster security group
// - Subnet group
// - HSM connection
// - HSM certificate
// - Parameter group
// For more information about Amazon Redshift resource types and constructing
// ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) (https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions)
// in the Amazon Redshift Cluster Management Guide.
ResourceType *string
// The tag for the resource.
Tag *Tag
noSmithyDocumentSerde
}
// A maintenance track that you can switch the current track to.
type UpdateTarget struct {
// The cluster version for the new maintenance track.
DatabaseVersion *string
// The name of the new maintenance track.
MaintenanceTrackName *string
// A list of operations supported by the maintenance track.
SupportedOperations []SupportedOperation
noSmithyDocumentSerde
}
// Describes a usage limit object for a cluster.
type UsageLimit struct {
// The limit amount. If time-based, this amount is in minutes. If data-based, this
// amount is in terabytes (TB).
Amount int64
// The action that Amazon Redshift takes when the limit is reached. Possible
// values are:
// - log - To log an event in a system table. The default is log.
// - emit-metric - To emit CloudWatch metrics.
// - disable - To disable the feature until the next usage period begins.
BreachAction UsageLimitBreachAction
// The identifier of the cluster with a usage limit.
ClusterIdentifier *string
// The Amazon Redshift feature to which the limit applies.
FeatureType UsageLimitFeatureType
// The type of limit. Depending on the feature type, this can be based on a time
// duration or data size.
LimitType UsageLimitLimitType
// The time period that the amount applies to. A weekly period begins on Sunday.
// The default is monthly .
Period UsageLimitPeriod
// A list of tag instances.
Tags []Tag
// The identifier of the usage limit.
UsageLimitId *string
noSmithyDocumentSerde
}
// The connection endpoint for connecting to an Amazon Redshift cluster through
// the proxy.
type VpcEndpoint struct {
// One or more network interfaces of the endpoint. Also known as an interface
// endpoint.
NetworkInterfaces []NetworkInterface
// The connection endpoint ID for connecting an Amazon Redshift cluster through
// the proxy.
VpcEndpointId *string
// The VPC identifier that the endpoint is associated.
VpcId *string
noSmithyDocumentSerde
}
// Describes the members of a VPC security group.
type VpcSecurityGroupMembership struct {
// The status of the VPC security group.
Status *string
// The identifier of the VPC security group.
VpcSecurityGroupId *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
| 2,006 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
import (
"context"
cryptorand "crypto/rand"
"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"
smithyrand "github.com/aws/smithy-go/rand"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net"
"net/http"
"time"
)
const ServiceID = "Redshift Data"
const ServiceAPIVersion = "2019-12-20"
// Client provides the API client to make operations call for Redshift Data API
// Service.
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)
resolveIdempotencyTokenProvider(&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
// Provides idempotency tokens values that will be automatically populated into
// idempotent API operations.
IdempotencyTokenProvider IdempotencyTokenProvider
// 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, "redshiftdata", 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 resolveIdempotencyTokenProvider(o *Options) {
if o.IdempotencyTokenProvider != nil {
return
}
o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader)
}
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
}
// IdempotencyTokenProvider interface for providing idempotency token
type IdempotencyTokenProvider interface {
GetIdempotencyToken() (string, error)
}
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)
}
| 455 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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 redshiftdata
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/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Runs one or more SQL statements, which can be data manipulation language (DML)
// or data definition language (DDL). Depending on the authorization method, use
// one of the following combinations of request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) BatchExecuteStatement(ctx context.Context, params *BatchExecuteStatementInput, optFns ...func(*Options)) (*BatchExecuteStatementOutput, error) {
if params == nil {
params = &BatchExecuteStatementInput{}
}
result, metadata, err := c.invokeOperation(ctx, "BatchExecuteStatement", params, optFns, c.addOperationBatchExecuteStatementMiddlewares)
if err != nil {
return nil, err
}
out := result.(*BatchExecuteStatementOutput)
out.ResultMetadata = metadata
return out, nil
}
type BatchExecuteStatementInput struct {
// The name of the database. This parameter is required when authenticating using
// either Secrets Manager or temporary credentials.
//
// This member is required.
Database *string
// One or more SQL statements to run. The SQL statements are run as a single
// transaction. They run serially in the order of the array. Subsequent SQL
// statements don't start until the previous statement in the array completes. If
// any SQL statement fails, then because they are run as one transaction, all work
// is rolled back.
//
// This member is required.
Sqls []string
// A unique, case-sensitive identifier that you provide to ensure the idempotency
// of the request.
ClientToken *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// The name of the SQL statements. You can name the SQL statements when you create
// them to identify the query.
StatementName *string
// A value that indicates whether to send an event to the Amazon EventBridge event
// bus after the SQL statements run.
WithEvent *bool
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type BatchExecuteStatementOutput struct {
// The cluster identifier. This element is not returned when connecting to a
// serverless workgroup.
ClusterIdentifier *string
// The date and time (UTC) the statement was created.
CreatedAt *time.Time
// The name of the database.
Database *string
// The database user name.
DbUser *string
// The identifier of the SQL statement whose results are to be fetched. This value
// is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
// This identifier is returned by BatchExecuteStatment .
Id *string
// The name or ARN of the secret that enables access to the database.
SecretArn *string
// The serverless workgroup name or Amazon Resource Name (ARN). This element is
// not returned when connecting to a provisioned cluster.
WorkgroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchExecuteStatement{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchExecuteStatement{}, 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_opBatchExecuteStatementMiddleware(stack, options); err != nil {
return err
}
if err = addOpBatchExecuteStatementValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchExecuteStatement(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_initializeOpBatchExecuteStatement struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpBatchExecuteStatement) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpBatchExecuteStatement) 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.(*BatchExecuteStatementInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *BatchExecuteStatementInput ")
}
if input.ClientToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opBatchExecuteStatementMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpBatchExecuteStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opBatchExecuteStatement(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "BatchExecuteStatement",
}
}
| 251 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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 running query. To be canceled, a query must be running. For more
// information about the Amazon Redshift Data API and CLI usage examples, see
// Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
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 identifier of the SQL statement to cancel. This value is a universally
// unique identifier (UUID) generated by Amazon Redshift Data API. This identifier
// is returned by BatchExecuteStatment , ExecuteStatment , and ListStatements .
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type CancelStatementOutput struct {
// A value that indicates whether the cancel statement succeeded (true).
Status *bool
// 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: "redshift-data",
OperationName: "CancelStatement",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Describes the details about a specific instance when a query was run by the
// Amazon Redshift Data API. The information includes when the query started, when
// it finished, the query status, the number of rows returned, and the SQL
// statement. For more information about the Amazon Redshift Data API and CLI usage
// examples, see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) DescribeStatement(ctx context.Context, params *DescribeStatementInput, optFns ...func(*Options)) (*DescribeStatementOutput, error) {
if params == nil {
params = &DescribeStatementInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeStatement", params, optFns, c.addOperationDescribeStatementMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeStatementOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeStatementInput struct {
// The identifier of the SQL statement to describe. This value is a universally
// unique identifier (UUID) generated by Amazon Redshift Data API. A suffix
// indicates the number of the SQL statement. For example,
// d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the
// second SQL statement of a batch query. This identifier is returned by
// BatchExecuteStatment , ExecuteStatement , and ListStatements .
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type DescribeStatementOutput struct {
// The identifier of the SQL statement described. This value is a universally
// unique identifier (UUID) generated by Amazon Redshift Data API.
//
// This member is required.
Id *string
// The cluster identifier.
ClusterIdentifier *string
// The date and time (UTC) when the SQL statement was submitted to run.
CreatedAt *time.Time
// The name of the database.
Database *string
// The database user name.
DbUser *string
// The amount of time in nanoseconds that the statement ran.
Duration int64
// The error message from the cluster if the SQL statement encountered an error
// while running.
Error *string
// A value that indicates whether the statement has a result set. The result set
// can be empty. The value is true for an empty result set. The value is true if
// any substatement returns a result set.
HasResultSet *bool
// The parameters for the SQL statement.
QueryParameters []types.SqlParameter
// The SQL statement text.
QueryString *string
// The process identifier from Amazon Redshift.
RedshiftPid int64
// The identifier of the query generated by Amazon Redshift. These identifiers are
// also available in the query column of the STL_QUERY system view.
RedshiftQueryId int64
// Either the number of rows returned from the SQL statement or the number of rows
// affected. If result size is greater than zero, the result rows can be the number
// of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and
// others. A -1 indicates the value is null.
ResultRows int64
// The size in bytes of the returned results. A -1 indicates the value is null.
ResultSize int64
// The name or Amazon Resource Name (ARN) of the secret that enables access to the
// database.
SecretArn *string
// The status of the SQL statement being described. Status values are defined as
// follows:
// - ABORTED - The query run was stopped by the user.
// - ALL - A status value that includes all query statuses. This value can be
// used to filter results.
// - FAILED - The query run failed.
// - FINISHED - The query has finished running.
// - PICKED - The query has been chosen to be run.
// - STARTED - The query run has started.
// - SUBMITTED - The query was submitted, but not yet processed.
Status types.StatusString
// The SQL statements from a multiple statement run.
SubStatements []types.SubStatementData
// The date and time (UTC) that the metadata for the SQL statement was last
// updated. An example is the time the status last changed.
UpdatedAt *time.Time
// The serverless workgroup name or Amazon Resource Name (ARN).
WorkgroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeStatementMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeStatement{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeStatement{}, 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 = addOpDescribeStatementValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStatement(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_opDescribeStatement(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "DescribeStatement",
}
}
| 211 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Describes the detailed information about a table from metadata in the cluster.
// The information includes its columns. A token is returned to page through the
// column list. Depending on the authorization method, use one of the following
// combinations of request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) DescribeTable(ctx context.Context, params *DescribeTableInput, optFns ...func(*Options)) (*DescribeTableOutput, error) {
if params == nil {
params = &DescribeTableInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeTable", params, optFns, c.addOperationDescribeTableMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeTableOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeTableInput struct {
// The name of the database that contains the tables to be described. If
// ConnectedDatabase is not specified, this is also the database to connect to with
// your authentication credentials.
//
// This member is required.
Database *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// A database name. The connected database is specified when you connect with your
// authentication credentials.
ConnectedDatabase *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The maximum number of tables to return in the response. If more tables exist
// than fit in one response, then NextToken is returned to page through the
// results.
MaxResults int32
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The schema that contains the table. If no schema is specified, then matching
// tables for all schemas are returned.
Schema *string
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// The table name. If no table is specified, then all tables for all matching
// schemas are returned. If no table and no schema is specified, then all tables
// for all schemas in the database are returned
Table *string
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type DescribeTableOutput struct {
// A list of columns in the table.
ColumnList []types.ColumnMetadata
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The table name.
TableName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeTable{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeTable{}, 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 = addOpDescribeTableValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTable(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
}
// DescribeTableAPIClient is a client that implements the DescribeTable operation.
type DescribeTableAPIClient interface {
DescribeTable(context.Context, *DescribeTableInput, ...func(*Options)) (*DescribeTableOutput, error)
}
var _ DescribeTableAPIClient = (*Client)(nil)
// DescribeTablePaginatorOptions is the paginator options for DescribeTable
type DescribeTablePaginatorOptions struct {
// The maximum number of tables to return in the response. If more tables exist
// than fit in one response, then NextToken is returned to page through the
// results.
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
}
// DescribeTablePaginator is a paginator for DescribeTable
type DescribeTablePaginator struct {
options DescribeTablePaginatorOptions
client DescribeTableAPIClient
params *DescribeTableInput
nextToken *string
firstPage bool
}
// NewDescribeTablePaginator returns a new DescribeTablePaginator
func NewDescribeTablePaginator(client DescribeTableAPIClient, params *DescribeTableInput, optFns ...func(*DescribeTablePaginatorOptions)) *DescribeTablePaginator {
if params == nil {
params = &DescribeTableInput{}
}
options := DescribeTablePaginatorOptions{}
if params.MaxResults != 0 {
options.Limit = params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeTablePaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeTablePaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeTable page.
func (p *DescribeTablePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTableOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
params.MaxResults = p.options.Limit
result, err := p.client.DescribeTable(ctx, ¶ms, 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_opDescribeTable(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "DescribeTable",
}
}
| 296 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Runs an SQL statement, which can be data manipulation language (DML) or data
// definition language (DDL). This statement must be a single SQL statement.
// Depending on the authorization method, use one of the following combinations of
// request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) ExecuteStatement(ctx context.Context, params *ExecuteStatementInput, optFns ...func(*Options)) (*ExecuteStatementOutput, error) {
if params == nil {
params = &ExecuteStatementInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ExecuteStatement", params, optFns, c.addOperationExecuteStatementMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ExecuteStatementOutput)
out.ResultMetadata = metadata
return out, nil
}
type ExecuteStatementInput struct {
// The name of the database. This parameter is required when authenticating using
// either Secrets Manager or temporary credentials.
//
// This member is required.
Database *string
// The SQL statement text to run.
//
// This member is required.
Sql *string
// A unique, case-sensitive identifier that you provide to ensure the idempotency
// of the request.
ClientToken *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The parameters for the SQL statement.
Parameters []types.SqlParameter
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// The name of the SQL statement. You can name the SQL statement when you create
// it to identify the query.
StatementName *string
// A value that indicates whether to send an event to the Amazon EventBridge event
// bus after the SQL statement runs.
WithEvent *bool
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type ExecuteStatementOutput struct {
// The cluster identifier. This element is not returned when connecting to a
// serverless workgroup.
ClusterIdentifier *string
// The date and time (UTC) the statement was created.
CreatedAt *time.Time
// The name of the database.
Database *string
// The database user name.
DbUser *string
// The identifier of the SQL statement whose results are to be fetched. This value
// is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
Id *string
// The name or ARN of the secret that enables access to the database.
SecretArn *string
// The serverless workgroup name or Amazon Resource Name (ARN). This element is
// not returned when connecting to a provisioned cluster.
WorkgroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpExecuteStatement{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpExecuteStatement{}, 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_opExecuteStatementMiddleware(stack, options); err != nil {
return err
}
if err = addOpExecuteStatementValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExecuteStatement(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_initializeOpExecuteStatement struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpExecuteStatement) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpExecuteStatement) 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.(*ExecuteStatementInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *ExecuteStatementInput ")
}
if input.ClientToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opExecuteStatementMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpExecuteStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opExecuteStatement(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "ExecuteStatement",
}
}
| 251 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Fetches the temporarily cached result of an SQL statement. A token is returned
// to page through the statement results. For more information about the Amazon
// Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) GetStatementResult(ctx context.Context, params *GetStatementResultInput, optFns ...func(*Options)) (*GetStatementResultOutput, error) {
if params == nil {
params = &GetStatementResultInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetStatementResult", params, optFns, c.addOperationGetStatementResultMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetStatementResultOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetStatementResultInput struct {
// The identifier of the SQL statement whose results are to be fetched. This value
// is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
// A suffix indicates then number of the SQL statement. For example,
// d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the
// second SQL statement of a batch query. This identifier is returned by
// BatchExecuteStatment , ExecuteStatment , and ListStatements .
//
// This member is required.
Id *string
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
noSmithyDocumentSerde
}
type GetStatementResultOutput struct {
// The results of the SQL statement.
//
// This member is required.
Records [][]types.Field
// The properties (metadata) of a column.
ColumnMetadata []types.ColumnMetadata
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The total number of rows in the result set returned from a query. You can use
// this number to estimate the number of calls to the GetStatementResult operation
// needed to page through the results.
TotalNumRows int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetStatementResultMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetStatementResult{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetStatementResult{}, 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 = addOpGetStatementResultValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStatementResult(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
}
// GetStatementResultAPIClient is a client that implements the GetStatementResult
// operation.
type GetStatementResultAPIClient interface {
GetStatementResult(context.Context, *GetStatementResultInput, ...func(*Options)) (*GetStatementResultOutput, error)
}
var _ GetStatementResultAPIClient = (*Client)(nil)
// GetStatementResultPaginatorOptions is the paginator options for
// GetStatementResult
type GetStatementResultPaginatorOptions struct {
// 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
}
// GetStatementResultPaginator is a paginator for GetStatementResult
type GetStatementResultPaginator struct {
options GetStatementResultPaginatorOptions
client GetStatementResultAPIClient
params *GetStatementResultInput
nextToken *string
firstPage bool
}
// NewGetStatementResultPaginator returns a new GetStatementResultPaginator
func NewGetStatementResultPaginator(client GetStatementResultAPIClient, params *GetStatementResultInput, optFns ...func(*GetStatementResultPaginatorOptions)) *GetStatementResultPaginator {
if params == nil {
params = &GetStatementResultInput{}
}
options := GetStatementResultPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &GetStatementResultPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *GetStatementResultPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next GetStatementResult page.
func (p *GetStatementResultPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetStatementResultOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.GetStatementResult(ctx, ¶ms, 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_opGetStatementResult(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "GetStatementResult",
}
}
| 237 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the databases in a cluster. A token is returned to page through the
// database list. Depending on the authorization method, use one of the following
// combinations of request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) ListDatabases(ctx context.Context, params *ListDatabasesInput, optFns ...func(*Options)) (*ListDatabasesOutput, error) {
if params == nil {
params = &ListDatabasesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListDatabases", params, optFns, c.addOperationListDatabasesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListDatabasesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListDatabasesInput struct {
// The name of the database. This parameter is required when authenticating using
// either Secrets Manager or temporary credentials.
//
// This member is required.
Database *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The maximum number of databases to return in the response. If more databases
// exist than fit in one response, then NextToken is returned to page through the
// results.
MaxResults int32
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type ListDatabasesOutput struct {
// The names of databases.
Databases []string
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDatabases{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDatabases{}, 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 = addOpListDatabasesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatabases(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
}
// ListDatabasesAPIClient is a client that implements the ListDatabases operation.
type ListDatabasesAPIClient interface {
ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error)
}
var _ ListDatabasesAPIClient = (*Client)(nil)
// ListDatabasesPaginatorOptions is the paginator options for ListDatabases
type ListDatabasesPaginatorOptions struct {
// The maximum number of databases to return in the response. If more databases
// exist than fit in one response, then NextToken is returned to page through the
// results.
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
}
// ListDatabasesPaginator is a paginator for ListDatabases
type ListDatabasesPaginator struct {
options ListDatabasesPaginatorOptions
client ListDatabasesAPIClient
params *ListDatabasesInput
nextToken *string
firstPage bool
}
// NewListDatabasesPaginator returns a new ListDatabasesPaginator
func NewListDatabasesPaginator(client ListDatabasesAPIClient, params *ListDatabasesInput, optFns ...func(*ListDatabasesPaginatorOptions)) *ListDatabasesPaginator {
if params == nil {
params = &ListDatabasesInput{}
}
options := ListDatabasesPaginatorOptions{}
if params.MaxResults != 0 {
options.Limit = params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListDatabasesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListDatabasesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListDatabases page.
func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDatabasesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
params.MaxResults = p.options.Limit
result, err := p.client.ListDatabases(ctx, ¶ms, 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_opListDatabases(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "ListDatabases",
}
}
| 277 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the schemas in a database. A token is returned to page through the schema
// list. Depending on the authorization method, use one of the following
// combinations of request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) ListSchemas(ctx context.Context, params *ListSchemasInput, optFns ...func(*Options)) (*ListSchemasOutput, error) {
if params == nil {
params = &ListSchemasInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListSchemas", params, optFns, c.addOperationListSchemasMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListSchemasOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListSchemasInput struct {
// The name of the database that contains the schemas to list. If ConnectedDatabase
// is not specified, this is also the database to connect to with your
// authentication credentials.
//
// This member is required.
Database *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// A database name. The connected database is specified when you connect with your
// authentication credentials.
ConnectedDatabase *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The maximum number of schemas to return in the response. If more schemas exist
// than fit in one response, then NextToken is returned to page through the
// results.
MaxResults int32
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// A pattern to filter results by schema name. Within a schema pattern, "%" means
// match any substring of 0 or more characters and "_" means match any one
// character. Only schema name entries matching the search pattern are returned.
SchemaPattern *string
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type ListSchemasOutput struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The schemas that match the request pattern.
Schemas []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSchemas{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSchemas{}, 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 = addOpListSchemasValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchemas(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
}
// ListSchemasAPIClient is a client that implements the ListSchemas operation.
type ListSchemasAPIClient interface {
ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error)
}
var _ ListSchemasAPIClient = (*Client)(nil)
// ListSchemasPaginatorOptions is the paginator options for ListSchemas
type ListSchemasPaginatorOptions struct {
// The maximum number of schemas to return in the response. If more schemas exist
// than fit in one response, then NextToken is returned to page through the
// results.
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
}
// ListSchemasPaginator is a paginator for ListSchemas
type ListSchemasPaginator struct {
options ListSchemasPaginatorOptions
client ListSchemasAPIClient
params *ListSchemasInput
nextToken *string
firstPage bool
}
// NewListSchemasPaginator returns a new ListSchemasPaginator
func NewListSchemasPaginator(client ListSchemasAPIClient, params *ListSchemasInput, optFns ...func(*ListSchemasPaginatorOptions)) *ListSchemasPaginator {
if params == nil {
params = &ListSchemasInput{}
}
options := ListSchemasPaginatorOptions{}
if params.MaxResults != 0 {
options.Limit = params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListSchemasPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListSchemasPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListSchemas page.
func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSchemasOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
params.MaxResults = p.options.Limit
result, err := p.client.ListSchemas(ctx, ¶ms, 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_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "ListSchemas",
}
}
| 287 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List of SQL statements. By default, only finished statements are shown. A token
// is returned to page through the statement list. For more information about the
// Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift
// Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the
// Amazon Redshift Management Guide.
func (c *Client) ListStatements(ctx context.Context, params *ListStatementsInput, optFns ...func(*Options)) (*ListStatementsOutput, error) {
if params == nil {
params = &ListStatementsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListStatements", params, optFns, c.addOperationListStatementsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListStatementsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListStatementsInput struct {
// The maximum number of SQL statements to return in the response. If more SQL
// statements exist than fit in one response, then NextToken is returned to page
// through the results.
MaxResults int32
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// A value that filters which statements to return in the response. If true, all
// statements run by the caller's IAM role are returned. If false, only statements
// run by the caller's IAM role in the current IAM session are returned. The
// default is true.
RoleLevel *bool
// The name of the SQL statement specified as input to BatchExecuteStatement or
// ExecuteStatement to identify the query. You can list multiple statements by
// providing a prefix that matches the beginning of the statement name. For
// example, to list myStatement1, myStatement2, myStatement3, and so on, then
// provide the a value of myStatement . Data API does a case-sensitive match of SQL
// statement names to the prefix value you provide.
StatementName *string
// The status of the SQL statement to list. Status values are defined as follows:
// - ABORTED - The query run was stopped by the user.
// - ALL - A status value that includes all query statuses. This value can be
// used to filter results.
// - FAILED - The query run failed.
// - FINISHED - The query has finished running.
// - PICKED - The query has been chosen to be run.
// - STARTED - The query run has started.
// - SUBMITTED - The query was submitted, but not yet processed.
Status types.StatusString
noSmithyDocumentSerde
}
type ListStatementsOutput struct {
// The SQL statements.
//
// This member is required.
Statements []types.StatementData
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListStatementsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListStatements{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListStatements{}, 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_opListStatements(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
}
// ListStatementsAPIClient is a client that implements the ListStatements
// operation.
type ListStatementsAPIClient interface {
ListStatements(context.Context, *ListStatementsInput, ...func(*Options)) (*ListStatementsOutput, error)
}
var _ ListStatementsAPIClient = (*Client)(nil)
// ListStatementsPaginatorOptions is the paginator options for ListStatements
type ListStatementsPaginatorOptions struct {
// The maximum number of SQL statements to return in the response. If more SQL
// statements exist than fit in one response, then NextToken is returned to page
// through the results.
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
}
// ListStatementsPaginator is a paginator for ListStatements
type ListStatementsPaginator struct {
options ListStatementsPaginatorOptions
client ListStatementsAPIClient
params *ListStatementsInput
nextToken *string
firstPage bool
}
// NewListStatementsPaginator returns a new ListStatementsPaginator
func NewListStatementsPaginator(client ListStatementsAPIClient, params *ListStatementsInput, optFns ...func(*ListStatementsPaginatorOptions)) *ListStatementsPaginator {
if params == nil {
params = &ListStatementsInput{}
}
options := ListStatementsPaginatorOptions{}
if params.MaxResults != 0 {
options.Limit = params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListStatementsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListStatementsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListStatements page.
func (p *ListStatementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStatementsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
params.MaxResults = p.options.Limit
result, err := p.client.ListStatements(ctx, ¶ms, 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_opListStatements(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "ListStatements",
}
}
| 256 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the tables in a database. If neither SchemaPattern nor TablePattern are
// specified, then all tables in the database are returned. A token is returned to
// page through the table list. Depending on the authorization method, use one of
// the following combinations of request parameters:
// - Secrets Manager - when connecting to a cluster, provide the secret-arn of a
// secret stored in Secrets Manager which has username and password . The
// specified secret contains credentials to connect to the database you specify.
// When you are connecting to a cluster, you also supply the database name, If you
// provide a cluster identifier ( dbClusterIdentifier ), it must match the
// cluster identifier stored in the secret. When you are connecting to a serverless
// workgroup, you also supply the database name.
// - Temporary credentials - when connecting to your data warehouse, choose one
// of the following options:
// - When connecting to a serverless workgroup, specify the workgroup name and
// database name. The database user name is derived from the IAM identity. For
// example, arn:iam::123456789012:user:foo has the database user name IAM:foo .
// Also, permission to call the redshift-serverless:GetCredentials operation is
// required.
// - When connecting to a cluster as an IAM identity, specify the cluster
// identifier and the database name. The database user name is derived from the IAM
// identity. For example, arn:iam::123456789012:user:foo has the database user
// name IAM:foo . Also, permission to call the
// redshift:GetClusterCredentialsWithIAM operation is required.
// - When connecting to a cluster as a database user, specify the cluster
// identifier, the database name, and the database user name. Also, permission to
// call the redshift:GetClusterCredentials operation is required.
//
// For more information about the Amazon Redshift Data API and CLI usage examples,
// see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) {
if params == nil {
params = &ListTablesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTables", params, optFns, c.addOperationListTablesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTablesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListTablesInput struct {
// The name of the database that contains the tables to list. If ConnectedDatabase
// is not specified, this is also the database to connect to with your
// authentication credentials.
//
// This member is required.
Database *string
// The cluster identifier. This parameter is required when connecting to a cluster
// and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier *string
// A database name. The connected database is specified when you connect with your
// authentication credentials.
ConnectedDatabase *string
// The database user name. This parameter is required when connecting to a cluster
// as a database user and authenticating using temporary credentials.
DbUser *string
// The maximum number of tables to return in the response. If more tables exist
// than fit in one response, then NextToken is returned to page through the
// results.
MaxResults int32
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// A pattern to filter results by schema name. Within a schema pattern, "%" means
// match any substring of 0 or more characters and "_" means match any one
// character. Only schema name entries matching the search pattern are returned. If
// SchemaPattern is not specified, then all tables that match TablePattern are
// returned. If neither SchemaPattern or TablePattern are specified, then all
// tables are returned.
SchemaPattern *string
// The name or ARN of the secret that enables access to the database. This
// parameter is required when authenticating using Secrets Manager.
SecretArn *string
// A pattern to filter results by table name. Within a table pattern, "%" means
// match any substring of 0 or more characters and "_" means match any one
// character. Only table name entries matching the search pattern are returned. If
// TablePattern is not specified, then all tables that match SchemaPattern are
// returned. If neither SchemaPattern or TablePattern are specified, then all
// tables are returned.
TablePattern *string
// The serverless workgroup name or Amazon Resource Name (ARN). This parameter is
// required when connecting to a serverless workgroup and authenticating using
// either Secrets Manager or temporary credentials.
WorkgroupName *string
noSmithyDocumentSerde
}
type ListTablesOutput struct {
// A value that indicates the starting point for the next set of response records
// in a subsequent request. If a value is returned in a response, you can retrieve
// the next set of records by providing this returned NextToken value in the next
// NextToken parameter and retrying the command. If the NextToken field is empty,
// all response records have been retrieved for the request.
NextToken *string
// The tables that match the request pattern.
Tables []types.TableMember
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTables{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTables{}, 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 = addOpListTablesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(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
}
// ListTablesAPIClient is a client that implements the ListTables operation.
type ListTablesAPIClient interface {
ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error)
}
var _ ListTablesAPIClient = (*Client)(nil)
// ListTablesPaginatorOptions is the paginator options for ListTables
type ListTablesPaginatorOptions struct {
// The maximum number of tables to return in the response. If more tables exist
// than fit in one response, then NextToken is returned to page through the
// results.
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
}
// ListTablesPaginator is a paginator for ListTables
type ListTablesPaginator struct {
options ListTablesPaginatorOptions
client ListTablesAPIClient
params *ListTablesInput
nextToken *string
firstPage bool
}
// NewListTablesPaginator returns a new ListTablesPaginator
func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, optFns ...func(*ListTablesPaginatorOptions)) *ListTablesPaginator {
if params == nil {
params = &ListTablesInput{}
}
options := ListTablesPaginatorOptions{}
if params.MaxResults != 0 {
options.Limit = params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListTablesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListTablesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListTables page.
func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTablesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
params.MaxResults = p.options.Limit
result, err := p.client.ListTables(ctx, ¶ms, 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_opListTables(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-data",
OperationName: "ListTables",
}
}
| 300 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
"github.com/aws/aws-sdk-go-v2/service/redshiftdata/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"
"math"
"strings"
)
type awsAwsjson11_deserializeOpBatchExecuteStatement struct {
}
func (*awsAwsjson11_deserializeOpBatchExecuteStatement) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpBatchExecuteStatement) 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_deserializeOpErrorBatchExecuteStatement(response, &metadata)
}
output := &BatchExecuteStatementOutput{}
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_deserializeOpDocumentBatchExecuteStatementOutput(&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_deserializeOpErrorBatchExecuteStatement(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("ActiveStatementsExceededException", errorCode):
return awsAwsjson11_deserializeErrorActiveStatementsExceededException(response, errorBody)
case strings.EqualFold("BatchExecuteStatementException", errorCode):
return awsAwsjson11_deserializeErrorBatchExecuteStatementException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpCancelStatement struct {
}
func (*awsAwsjson11_deserializeOpCancelStatement) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpCancelStatement) 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_deserializeOpErrorCancelStatement(response, &metadata)
}
output := &CancelStatementOutput{}
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_deserializeOpDocumentCancelStatementOutput(&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_deserializeOpErrorCancelStatement(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("DatabaseConnectionException", errorCode):
return awsAwsjson11_deserializeErrorDatabaseConnectionException(response, errorBody)
case strings.EqualFold("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpDescribeStatement struct {
}
func (*awsAwsjson11_deserializeOpDescribeStatement) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpDescribeStatement) 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_deserializeOpErrorDescribeStatement(response, &metadata)
}
output := &DescribeStatementOutput{}
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_deserializeOpDocumentDescribeStatementOutput(&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_deserializeOpErrorDescribeStatement(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("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpDescribeTable struct {
}
func (*awsAwsjson11_deserializeOpDescribeTable) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpDescribeTable) 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_deserializeOpErrorDescribeTable(response, &metadata)
}
output := &DescribeTableOutput{}
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_deserializeOpDocumentDescribeTableOutput(&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_deserializeOpErrorDescribeTable(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("DatabaseConnectionException", errorCode):
return awsAwsjson11_deserializeErrorDatabaseConnectionException(response, errorBody)
case strings.EqualFold("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpExecuteStatement struct {
}
func (*awsAwsjson11_deserializeOpExecuteStatement) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpExecuteStatement) 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_deserializeOpErrorExecuteStatement(response, &metadata)
}
output := &ExecuteStatementOutput{}
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_deserializeOpDocumentExecuteStatementOutput(&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_deserializeOpErrorExecuteStatement(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("ActiveStatementsExceededException", errorCode):
return awsAwsjson11_deserializeErrorActiveStatementsExceededException(response, errorBody)
case strings.EqualFold("ExecuteStatementException", errorCode):
return awsAwsjson11_deserializeErrorExecuteStatementException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpGetStatementResult struct {
}
func (*awsAwsjson11_deserializeOpGetStatementResult) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpGetStatementResult) 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_deserializeOpErrorGetStatementResult(response, &metadata)
}
output := &GetStatementResultOutput{}
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_deserializeOpDocumentGetStatementResultOutput(&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_deserializeOpErrorGetStatementResult(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("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpListDatabases struct {
}
func (*awsAwsjson11_deserializeOpListDatabases) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpListDatabases) 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_deserializeOpErrorListDatabases(response, &metadata)
}
output := &ListDatabasesOutput{}
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_deserializeOpDocumentListDatabasesOutput(&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_deserializeOpErrorListDatabases(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("DatabaseConnectionException", errorCode):
return awsAwsjson11_deserializeErrorDatabaseConnectionException(response, errorBody)
case strings.EqualFold("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpListSchemas struct {
}
func (*awsAwsjson11_deserializeOpListSchemas) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpListSchemas) 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_deserializeOpErrorListSchemas(response, &metadata)
}
output := &ListSchemasOutput{}
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_deserializeOpDocumentListSchemasOutput(&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_deserializeOpErrorListSchemas(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("DatabaseConnectionException", errorCode):
return awsAwsjson11_deserializeErrorDatabaseConnectionException(response, errorBody)
case strings.EqualFold("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpListStatements struct {
}
func (*awsAwsjson11_deserializeOpListStatements) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpListStatements) 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_deserializeOpErrorListStatements(response, &metadata)
}
output := &ListStatementsOutput{}
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_deserializeOpDocumentListStatementsOutput(&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_deserializeOpErrorListStatements(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("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsjson11_deserializeOpListTables struct {
}
func (*awsAwsjson11_deserializeOpListTables) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson11_deserializeOpListTables) 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_deserializeOpErrorListTables(response, &metadata)
}
output := &ListTablesOutput{}
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_deserializeOpDocumentListTablesOutput(&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_deserializeOpErrorListTables(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("DatabaseConnectionException", errorCode):
return awsAwsjson11_deserializeErrorDatabaseConnectionException(response, errorBody)
case strings.EqualFold("InternalServerException", errorCode):
return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
case strings.EqualFold("ValidationException", errorCode):
return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsAwsjson11_deserializeErrorActiveStatementsExceededException(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.ActiveStatementsExceededException{}
err := awsAwsjson11_deserializeDocumentActiveStatementsExceededException(&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_deserializeErrorBatchExecuteStatementException(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.BatchExecuteStatementException{}
err := awsAwsjson11_deserializeDocumentBatchExecuteStatementException(&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_deserializeErrorDatabaseConnectionException(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.DatabaseConnectionException{}
err := awsAwsjson11_deserializeDocumentDatabaseConnectionException(&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_deserializeErrorExecuteStatementException(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.ExecuteStatementException{}
err := awsAwsjson11_deserializeDocumentExecuteStatementException(&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_deserializeErrorInternalServerException(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.InternalServerException{}
err := awsAwsjson11_deserializeDocumentInternalServerException(&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_deserializeErrorResourceNotFoundException(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.ResourceNotFoundException{}
err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&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_deserializeErrorValidationException(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.ValidationException{}
err := awsAwsjson11_deserializeDocumentValidationException(&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_deserializeDocumentActiveStatementsExceededException(v **types.ActiveStatementsExceededException, 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.ActiveStatementsExceededException
if *v == nil {
sv = &types.ActiveStatementsExceededException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentBatchExecuteStatementException(v **types.BatchExecuteStatementException, 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.BatchExecuteStatementException
if *v == nil {
sv = &types.BatchExecuteStatementException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "StatementId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.StatementId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentColumnList(v *[]types.ColumnMetadata, 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.ColumnMetadata
if *v == nil {
cv = []types.ColumnMetadata{}
} else {
cv = *v
}
for _, value := range shape {
var col types.ColumnMetadata
destAddr := &col
if err := awsAwsjson11_deserializeDocumentColumnMetadata(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentColumnMetadata(v **types.ColumnMetadata, 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.ColumnMetadata
if *v == nil {
sv = &types.ColumnMetadata{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "columnDefault":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.ColumnDefault = ptr.String(jtv)
}
case "isCaseSensitive":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected bool to be of type *bool, got %T instead", value)
}
sv.IsCaseSensitive = jtv
}
case "isCurrency":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected bool to be of type *bool, got %T instead", value)
}
sv.IsCurrency = jtv
}
case "isSigned":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected bool to be of type *bool, got %T instead", value)
}
sv.IsSigned = jtv
}
case "label":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Label = ptr.String(jtv)
}
case "length":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Length = int32(i64)
}
case "name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "nullable":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Nullable = int32(i64)
}
case "precision":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Precision = int32(i64)
}
case "scale":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Scale = int32(i64)
}
case "schemaName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.SchemaName = ptr.String(jtv)
}
case "tableName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.TableName = ptr.String(jtv)
}
case "typeName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.TypeName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentColumnMetadataList(v *[]types.ColumnMetadata, 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.ColumnMetadata
if *v == nil {
cv = []types.ColumnMetadata{}
} else {
cv = *v
}
for _, value := range shape {
var col types.ColumnMetadata
destAddr := &col
if err := awsAwsjson11_deserializeDocumentColumnMetadata(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentDatabaseConnectionException(v **types.DatabaseConnectionException, 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.DatabaseConnectionException
if *v == nil {
sv = &types.DatabaseConnectionException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentDatabaseList(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 String to be of type string, got %T instead", value)
}
col = jtv
}
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentExecuteStatementException(v **types.ExecuteStatementException, 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.ExecuteStatementException
if *v == nil {
sv = &types.ExecuteStatementException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "StatementId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.StatementId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentField(v *types.Field, 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 uv types.Field
loop:
for key, value := range shape {
if value == nil {
continue
}
switch key {
case "blobValue":
var mv []byte
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Blob to be []byte, got %T instead", value)
}
dv, err := base64.StdEncoding.DecodeString(jtv)
if err != nil {
return fmt.Errorf("failed to base64 decode Blob, %w", err)
}
mv = dv
}
uv = &types.FieldMemberBlobValue{Value: mv}
break loop
case "booleanValue":
var mv bool
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
}
mv = jtv
}
uv = &types.FieldMemberBooleanValue{Value: mv}
break loop
case "doubleValue":
var mv float64
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
mv = 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)
}
mv = f64
default:
return fmt.Errorf("expected BoxedDouble to be a JSON Number, got %T instead", value)
}
}
uv = &types.FieldMemberDoubleValue{Value: mv}
break loop
case "isNull":
var mv bool
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
}
mv = jtv
}
uv = &types.FieldMemberIsNull{Value: mv}
break loop
case "longValue":
var mv int64
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected BoxedLong to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
mv = i64
}
uv = &types.FieldMemberLongValue{Value: mv}
break loop
case "stringValue":
var mv string
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
mv = jtv
}
uv = &types.FieldMemberStringValue{Value: mv}
break loop
default:
uv = &types.UnknownUnionMember{Tag: key}
break loop
}
}
*v = uv
return nil
}
func awsAwsjson11_deserializeDocumentFieldList(v *[]types.Field, 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.Field
if *v == nil {
cv = []types.Field{}
} else {
cv = *v
}
for _, value := range shape {
var col types.Field
if err := awsAwsjson11_deserializeDocumentField(&col, value); err != nil {
return err
}
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException
if *v == nil {
sv = &types.InternalServerException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, 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.ResourceNotFoundException
if *v == nil {
sv = &types.ResourceNotFoundException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.ResourceId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentSchemaList(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 String to be of type string, got %T instead", value)
}
col = jtv
}
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentSqlParameter(v **types.SqlParameter, 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.SqlParameter
if *v == nil {
sv = &types.SqlParameter{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ParameterName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "value":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
}
sv.Value = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentSqlParametersList(v *[]types.SqlParameter, 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.SqlParameter
if *v == nil {
cv = []types.SqlParameter{}
} else {
cv = *v
}
for _, value := range shape {
var col types.SqlParameter
destAddr := &col
if err := awsAwsjson11_deserializeDocumentSqlParameter(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentSqlRecords(v *[][]types.Field, 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.Field
if *v == nil {
cv = [][]types.Field{}
} else {
cv = *v
}
for _, value := range shape {
var col []types.Field
if err := awsAwsjson11_deserializeDocumentFieldList(&col, value); err != nil {
return err
}
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentStatementData(v **types.StatementData, 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.StatementData
if *v == nil {
sv = &types.StatementData{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "CreatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Id":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementId to be of type string, got %T instead", value)
}
sv.Id = ptr.String(jtv)
}
case "IsBatchStatement":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
}
sv.IsBatchStatement = ptr.Bool(jtv)
}
case "QueryParameters":
if err := awsAwsjson11_deserializeDocumentSqlParametersList(&sv.QueryParameters, value); err != nil {
return err
}
case "QueryString":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementString to be of type string, got %T instead", value)
}
sv.QueryString = ptr.String(jtv)
}
case "QueryStrings":
if err := awsAwsjson11_deserializeDocumentStatementStringList(&sv.QueryStrings, value); err != nil {
return err
}
case "SecretArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value)
}
sv.SecretArn = ptr.String(jtv)
}
case "StatementName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementNameString to be of type string, got %T instead", value)
}
sv.StatementName = ptr.String(jtv)
}
case "Status":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatusString to be of type string, got %T instead", value)
}
sv.Status = types.StatusString(jtv)
}
case "UpdatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.UpdatedAt = 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_deserializeDocumentStatementList(v *[]types.StatementData, 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.StatementData
if *v == nil {
cv = []types.StatementData{}
} else {
cv = *v
}
for _, value := range shape {
var col types.StatementData
destAddr := &col
if err := awsAwsjson11_deserializeDocumentStatementData(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentStatementStringList(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 StatementString to be of type string, got %T instead", value)
}
col = jtv
}
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentSubStatementData(v **types.SubStatementData, 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.SubStatementData
if *v == nil {
sv = &types.SubStatementData{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "CreatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Duration":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Duration = i64
}
case "Error":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Error = ptr.String(jtv)
}
case "HasResultSet":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
}
sv.HasResultSet = ptr.Bool(jtv)
}
case "Id":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementId to be of type string, got %T instead", value)
}
sv.Id = ptr.String(jtv)
}
case "QueryString":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementString to be of type string, got %T instead", value)
}
sv.QueryString = ptr.String(jtv)
}
case "RedshiftQueryId":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.RedshiftQueryId = i64
}
case "ResultRows":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ResultRows = i64
}
case "ResultSize":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ResultSize = i64
}
case "Status":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementStatusString to be of type string, got %T instead", value)
}
sv.Status = types.StatementStatusString(jtv)
}
case "UpdatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.UpdatedAt = 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_deserializeDocumentSubStatementList(v *[]types.SubStatementData, 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.SubStatementData
if *v == nil {
cv = []types.SubStatementData{}
} else {
cv = *v
}
for _, value := range shape {
var col types.SubStatementData
destAddr := &col
if err := awsAwsjson11_deserializeDocumentSubStatementData(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentTableList(v *[]types.TableMember, 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.TableMember
if *v == nil {
cv = []types.TableMember{}
} else {
cv = *v
}
for _, value := range shape {
var col types.TableMember
destAddr := &col
if err := awsAwsjson11_deserializeDocumentTableMember(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson11_deserializeDocumentTableMember(v **types.TableMember, 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.TableMember
if *v == nil {
sv = &types.TableMember{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "schema":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Schema = ptr.String(jtv)
}
case "type":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Type = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException
if *v == nil {
sv = &types.ValidationException{}
} 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 String to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExecuteStatementOutput, 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 *BatchExecuteStatementOutput
if *v == nil {
sv = &BatchExecuteStatementOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ClusterIdentifier":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Location to be of type string, got %T instead", value)
}
sv.ClusterIdentifier = ptr.String(jtv)
}
case "CreatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Database":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Database = ptr.String(jtv)
}
case "DbUser":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.DbUser = ptr.String(jtv)
}
case "Id":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementId to be of type string, got %T instead", value)
}
sv.Id = ptr.String(jtv)
}
case "SecretArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value)
}
sv.SecretArn = ptr.String(jtv)
}
case "WorkgroupName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected WorkgroupNameString to be of type string, got %T instead", value)
}
sv.WorkgroupName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentCancelStatementOutput(v **CancelStatementOutput, 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 *CancelStatementOutput
if *v == nil {
sv = &CancelStatementOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Status":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
}
sv.Status = ptr.Bool(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentDescribeStatementOutput(v **DescribeStatementOutput, 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 *DescribeStatementOutput
if *v == nil {
sv = &DescribeStatementOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ClusterIdentifier":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.ClusterIdentifier = ptr.String(jtv)
}
case "CreatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Database":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Database = ptr.String(jtv)
}
case "DbUser":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.DbUser = ptr.String(jtv)
}
case "Duration":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.Duration = i64
}
case "Error":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Error = ptr.String(jtv)
}
case "HasResultSet":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
}
sv.HasResultSet = ptr.Bool(jtv)
}
case "Id":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementId to be of type string, got %T instead", value)
}
sv.Id = ptr.String(jtv)
}
case "QueryParameters":
if err := awsAwsjson11_deserializeDocumentSqlParametersList(&sv.QueryParameters, value); err != nil {
return err
}
case "QueryString":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementString to be of type string, got %T instead", value)
}
sv.QueryString = ptr.String(jtv)
}
case "RedshiftPid":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.RedshiftPid = i64
}
case "RedshiftQueryId":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.RedshiftQueryId = i64
}
case "ResultRows":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ResultRows = i64
}
case "ResultSize":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ResultSize = i64
}
case "SecretArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value)
}
sv.SecretArn = ptr.String(jtv)
}
case "Status":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatusString to be of type string, got %T instead", value)
}
sv.Status = types.StatusString(jtv)
}
case "SubStatements":
if err := awsAwsjson11_deserializeDocumentSubStatementList(&sv.SubStatements, value); err != nil {
return err
}
case "UpdatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "WorkgroupName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected WorkgroupNameString to be of type string, got %T instead", value)
}
sv.WorkgroupName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentDescribeTableOutput(v **DescribeTableOutput, 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 *DescribeTableOutput
if *v == nil {
sv = &DescribeTableOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ColumnList":
if err := awsAwsjson11_deserializeDocumentColumnList(&sv.ColumnList, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "TableName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.TableName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStatementOutput, 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 *ExecuteStatementOutput
if *v == nil {
sv = &ExecuteStatementOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ClusterIdentifier":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Location to be of type string, got %T instead", value)
}
sv.ClusterIdentifier = ptr.String(jtv)
}
case "CreatedAt":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Database":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.Database = ptr.String(jtv)
}
case "DbUser":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.DbUser = ptr.String(jtv)
}
case "Id":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StatementId to be of type string, got %T instead", value)
}
sv.Id = ptr.String(jtv)
}
case "SecretArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value)
}
sv.SecretArn = ptr.String(jtv)
}
case "WorkgroupName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected WorkgroupNameString to be of type string, got %T instead", value)
}
sv.WorkgroupName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentGetStatementResultOutput(v **GetStatementResultOutput, 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 *GetStatementResultOutput
if *v == nil {
sv = &GetStatementResultOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ColumnMetadata":
if err := awsAwsjson11_deserializeDocumentColumnMetadataList(&sv.ColumnMetadata, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "Records":
if err := awsAwsjson11_deserializeDocumentSqlRecords(&sv.Records, value); err != nil {
return err
}
case "TotalNumRows":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.TotalNumRows = i64
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentListDatabasesOutput(v **ListDatabasesOutput, 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 *ListDatabasesOutput
if *v == nil {
sv = &ListDatabasesOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Databases":
if err := awsAwsjson11_deserializeDocumentDatabaseList(&sv.Databases, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentListSchemasOutput(v **ListSchemasOutput, 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 *ListSchemasOutput
if *v == nil {
sv = &ListSchemasOutput{}
} 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 String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "Schemas":
if err := awsAwsjson11_deserializeDocumentSchemaList(&sv.Schemas, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentListStatementsOutput(v **ListStatementsOutput, 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 *ListStatementsOutput
if *v == nil {
sv = &ListStatementsOutput{}
} 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 String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "Statements":
if err := awsAwsjson11_deserializeDocumentStatementList(&sv.Statements, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson11_deserializeOpDocumentListTablesOutput(v **ListTablesOutput, 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 *ListTablesOutput
if *v == nil {
sv = &ListTablesOutput{}
} 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 String to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "Tables":
if err := awsAwsjson11_deserializeDocumentTableList(&sv.Tables, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
| 3,581 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package redshiftdata provides the API client, operations, and parameter types
// for Redshift Data API Service.
//
// You can use the Amazon Redshift Data API to run queries on Amazon Redshift
// tables. You can run SQL statements, which are committed if the statement
// succeeds. For more information about the Amazon Redshift Data API and CLI usage
// examples, see Using the Amazon Redshift Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)
// in the Amazon Redshift Management Guide.
package redshiftdata
| 12 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
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/redshiftdata/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 = "redshift-data"
}
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 redshiftdata
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.19.8"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/redshiftdata/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"
"path"
)
type awsAwsjson11_serializeOpBatchExecuteStatement struct {
}
func (*awsAwsjson11_serializeOpBatchExecuteStatement) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpBatchExecuteStatement) 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.(*BatchExecuteStatementInput)
_ = 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("RedshiftData.BatchExecuteStatement")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(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_serializeOpCancelStatement struct {
}
func (*awsAwsjson11_serializeOpCancelStatement) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpCancelStatement) 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.(*CancelStatementInput)
_ = 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("RedshiftData.CancelStatement")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentCancelStatementInput(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_serializeOpDescribeStatement struct {
}
func (*awsAwsjson11_serializeOpDescribeStatement) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpDescribeStatement) 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.(*DescribeStatementInput)
_ = 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("RedshiftData.DescribeStatement")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentDescribeStatementInput(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_serializeOpDescribeTable struct {
}
func (*awsAwsjson11_serializeOpDescribeTable) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpDescribeTable) 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.(*DescribeTableInput)
_ = 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("RedshiftData.DescribeTable")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentDescribeTableInput(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_serializeOpExecuteStatement struct {
}
func (*awsAwsjson11_serializeOpExecuteStatement) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpExecuteStatement) 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.(*ExecuteStatementInput)
_ = 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("RedshiftData.ExecuteStatement")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentExecuteStatementInput(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_serializeOpGetStatementResult struct {
}
func (*awsAwsjson11_serializeOpGetStatementResult) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpGetStatementResult) 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.(*GetStatementResultInput)
_ = 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("RedshiftData.GetStatementResult")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentGetStatementResultInput(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_serializeOpListDatabases struct {
}
func (*awsAwsjson11_serializeOpListDatabases) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpListDatabases) 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.(*ListDatabasesInput)
_ = 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("RedshiftData.ListDatabases")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentListDatabasesInput(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_serializeOpListSchemas struct {
}
func (*awsAwsjson11_serializeOpListSchemas) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpListSchemas) 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.(*ListSchemasInput)
_ = 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("RedshiftData.ListSchemas")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentListSchemasInput(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_serializeOpListStatements struct {
}
func (*awsAwsjson11_serializeOpListStatements) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpListStatements) 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.(*ListStatementsInput)
_ = 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("RedshiftData.ListStatements")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentListStatementsInput(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_serializeOpListTables struct {
}
func (*awsAwsjson11_serializeOpListTables) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson11_serializeOpListTables) 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.(*ListTablesInput)
_ = 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("RedshiftData.ListTables")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson11_serializeOpDocumentListTablesInput(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_serializeDocumentSqlList(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_serializeDocumentSqlParameter(v *types.SqlParameter, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.Value != nil {
ok := object.Key("value")
ok.String(*v.Value)
}
return nil
}
func awsAwsjson11_serializeDocumentSqlParametersList(v []types.SqlParameter, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson11_serializeDocumentSqlParameter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteStatementInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("ClientToken")
ok.String(*v.ClientToken)
}
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.Sqls != nil {
ok := object.Key("Sqls")
if err := awsAwsjson11_serializeDocumentSqlList(v.Sqls, ok); err != nil {
return err
}
}
if v.StatementName != nil {
ok := object.Key("StatementName")
ok.String(*v.StatementName)
}
if v.WithEvent != nil {
ok := object.Key("WithEvent")
ok.Boolean(*v.WithEvent)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
func awsAwsjson11_serializeOpDocumentCancelStatementInput(v *CancelStatementInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("Id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson11_serializeOpDocumentDescribeStatementInput(v *DescribeStatementInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("Id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson11_serializeOpDocumentDescribeTableInput(v *DescribeTableInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.ConnectedDatabase != nil {
ok := object.Key("ConnectedDatabase")
ok.String(*v.ConnectedDatabase)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.MaxResults != 0 {
ok := object.Key("MaxResults")
ok.Integer(v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
if v.Schema != nil {
ok := object.Key("Schema")
ok.String(*v.Schema)
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.Table != nil {
ok := object.Key("Table")
ok.String(*v.Table)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
func awsAwsjson11_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("ClientToken")
ok.String(*v.ClientToken)
}
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.Parameters != nil {
ok := object.Key("Parameters")
if err := awsAwsjson11_serializeDocumentSqlParametersList(v.Parameters, ok); err != nil {
return err
}
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.Sql != nil {
ok := object.Key("Sql")
ok.String(*v.Sql)
}
if v.StatementName != nil {
ok := object.Key("StatementName")
ok.String(*v.StatementName)
}
if v.WithEvent != nil {
ok := object.Key("WithEvent")
ok.Boolean(*v.WithEvent)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
func awsAwsjson11_serializeOpDocumentGetStatementResultInput(v *GetStatementResultInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("Id")
ok.String(*v.Id)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson11_serializeOpDocumentListDatabasesInput(v *ListDatabasesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.MaxResults != 0 {
ok := object.Key("MaxResults")
ok.Integer(v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
func awsAwsjson11_serializeOpDocumentListSchemasInput(v *ListSchemasInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.ConnectedDatabase != nil {
ok := object.Key("ConnectedDatabase")
ok.String(*v.ConnectedDatabase)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.MaxResults != 0 {
ok := object.Key("MaxResults")
ok.Integer(v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
if v.SchemaPattern != nil {
ok := object.Key("SchemaPattern")
ok.String(*v.SchemaPattern)
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
func awsAwsjson11_serializeOpDocumentListStatementsInput(v *ListStatementsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != 0 {
ok := object.Key("MaxResults")
ok.Integer(v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
if v.RoleLevel != nil {
ok := object.Key("RoleLevel")
ok.Boolean(*v.RoleLevel)
}
if v.StatementName != nil {
ok := object.Key("StatementName")
ok.String(*v.StatementName)
}
if len(v.Status) > 0 {
ok := object.Key("Status")
ok.String(string(v.Status))
}
return nil
}
func awsAwsjson11_serializeOpDocumentListTablesInput(v *ListTablesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClusterIdentifier != nil {
ok := object.Key("ClusterIdentifier")
ok.String(*v.ClusterIdentifier)
}
if v.ConnectedDatabase != nil {
ok := object.Key("ConnectedDatabase")
ok.String(*v.ConnectedDatabase)
}
if v.Database != nil {
ok := object.Key("Database")
ok.String(*v.Database)
}
if v.DbUser != nil {
ok := object.Key("DbUser")
ok.String(*v.DbUser)
}
if v.MaxResults != 0 {
ok := object.Key("MaxResults")
ok.Integer(v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("NextToken")
ok.String(*v.NextToken)
}
if v.SchemaPattern != nil {
ok := object.Key("SchemaPattern")
ok.String(*v.SchemaPattern)
}
if v.SecretArn != nil {
ok := object.Key("SecretArn")
ok.String(*v.SecretArn)
}
if v.TablePattern != nil {
ok := object.Key("TablePattern")
ok.String(*v.TablePattern)
}
if v.WorkgroupName != nil {
ok := object.Key("WorkgroupName")
ok.String(*v.WorkgroupName)
}
return nil
}
| 1,001 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftdata
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/redshiftdata/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpBatchExecuteStatement struct {
}
func (*validateOpBatchExecuteStatement) ID() string {
return "OperationInputValidation"
}
func (m *validateOpBatchExecuteStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*BatchExecuteStatementInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpBatchExecuteStatementInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelStatement struct {
}
func (*validateOpCancelStatement) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelStatementInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelStatementInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeStatement struct {
}
func (*validateOpDescribeStatement) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeStatementInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeStatementInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeTable struct {
}
func (*validateOpDescribeTable) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeTableInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeTableInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpExecuteStatement struct {
}
func (*validateOpExecuteStatement) ID() string {
return "OperationInputValidation"
}
func (m *validateOpExecuteStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ExecuteStatementInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpExecuteStatementInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetStatementResult struct {
}
func (*validateOpGetStatementResult) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetStatementResult) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetStatementResultInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetStatementResultInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListDatabases struct {
}
func (*validateOpListDatabases) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListDatabases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListDatabasesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListDatabasesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListSchemas struct {
}
func (*validateOpListSchemas) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListSchemas) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListSchemasInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListSchemasInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTables struct {
}
func (*validateOpListTables) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTables) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTablesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTablesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpBatchExecuteStatementValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpBatchExecuteStatement{}, middleware.After)
}
func addOpCancelStatementValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelStatement{}, middleware.After)
}
func addOpDescribeStatementValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeStatement{}, middleware.After)
}
func addOpDescribeTableValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeTable{}, middleware.After)
}
func addOpExecuteStatementValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpExecuteStatement{}, middleware.After)
}
func addOpGetStatementResultValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetStatementResult{}, middleware.After)
}
func addOpListDatabasesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListDatabases{}, middleware.After)
}
func addOpListSchemasValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListSchemas{}, middleware.After)
}
func addOpListTablesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTables{}, middleware.After)
}
func validateSqlParameter(v *types.SqlParameter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SqlParameter"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSqlParametersList(v []types.SqlParameter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SqlParametersList"}
for i := range v {
if err := validateSqlParameter(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpBatchExecuteStatementInput(v *BatchExecuteStatementInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BatchExecuteStatementInput"}
if v.Sqls == nil {
invalidParams.Add(smithy.NewErrParamRequired("Sqls"))
}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelStatementInput(v *CancelStatementInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelStatementInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeStatementInput(v *DescribeStatementInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeStatementInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeTableInput(v *DescribeTableInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeTableInput"}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpExecuteStatementInput(v *ExecuteStatementInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExecuteStatementInput"}
if v.Sql == nil {
invalidParams.Add(smithy.NewErrParamRequired("Sql"))
}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if v.Parameters != nil {
if err := validateSqlParametersList(v.Parameters); err != nil {
invalidParams.AddNested("Parameters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetStatementResultInput(v *GetStatementResultInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetStatementResultInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListDatabasesInput(v *ListDatabasesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListDatabasesInput"}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListSchemasInput(v *ListSchemasInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListSchemasInput"}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTablesInput(v *ListTablesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTablesInput"}
if v.Database == nil {
invalidParams.Add(smithy.NewErrParamRequired("Database"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 409 |
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 Redshift Data 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: "redshift-data.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-data-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-data-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-data-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-data-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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: "redshift-data.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "redshift-data-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "redshift-data-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "redshift-data.{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 StatementStatusString string
// Enum values for StatementStatusString
const (
StatementStatusStringSubmitted StatementStatusString = "SUBMITTED"
StatementStatusStringPicked StatementStatusString = "PICKED"
StatementStatusStringStarted StatementStatusString = "STARTED"
StatementStatusStringFinished StatementStatusString = "FINISHED"
StatementStatusStringAborted StatementStatusString = "ABORTED"
StatementStatusStringFailed StatementStatusString = "FAILED"
)
// Values returns all known values for StatementStatusString. 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 (StatementStatusString) Values() []StatementStatusString {
return []StatementStatusString{
"SUBMITTED",
"PICKED",
"STARTED",
"FINISHED",
"ABORTED",
"FAILED",
}
}
type StatusString string
// Enum values for StatusString
const (
StatusStringSubmitted StatusString = "SUBMITTED"
StatusStringPicked StatusString = "PICKED"
StatusStringStarted StatusString = "STARTED"
StatusStringFinished StatusString = "FINISHED"
StatusStringAborted StatusString = "ABORTED"
StatusStringFailed StatusString = "FAILED"
StatusStringAll StatusString = "ALL"
)
// Values returns all known values for StatusString. 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 (StatusString) Values() []StatusString {
return []StatusString{
"SUBMITTED",
"PICKED",
"STARTED",
"FINISHED",
"ABORTED",
"FAILED",
"ALL",
}
}
| 58 |
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 number of active statements exceeds the limit.
type ActiveStatementsExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ActiveStatementsExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ActiveStatementsExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ActiveStatementsExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ActiveStatementsExceededException"
}
return *e.ErrorCodeOverride
}
func (e *ActiveStatementsExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An SQL statement encountered an environmental error while running.
type BatchExecuteStatementException struct {
Message *string
ErrorCodeOverride *string
StatementId *string
noSmithyDocumentSerde
}
func (e *BatchExecuteStatementException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BatchExecuteStatementException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BatchExecuteStatementException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BatchExecuteStatementException"
}
return *e.ErrorCodeOverride
}
func (e *BatchExecuteStatementException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// Connection to a database failed.
type DatabaseConnectionException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DatabaseConnectionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DatabaseConnectionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DatabaseConnectionException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DatabaseConnectionException"
}
return *e.ErrorCodeOverride
}
func (e *DatabaseConnectionException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The SQL statement encountered an environmental error while running.
type ExecuteStatementException struct {
Message *string
ErrorCodeOverride *string
StatementId *string
noSmithyDocumentSerde
}
func (e *ExecuteStatementException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ExecuteStatementException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ExecuteStatementException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ExecuteStatementException"
}
return *e.ErrorCodeOverride
}
func (e *ExecuteStatementException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The Amazon Redshift Data API operation failed due to invalid input.
type InternalServerException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InternalServerException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InternalServerException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InternalServerException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InternalServerException"
}
return *e.ErrorCodeOverride
}
func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The Amazon Redshift Data API operation failed due to a missing resource.
type ResourceNotFoundException struct {
Message *string
ErrorCodeOverride *string
ResourceId *string
noSmithyDocumentSerde
}
func (e *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceNotFoundException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceNotFoundException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The Amazon Redshift Data API operation failed due to invalid input.
type ValidationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ValidationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ValidationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ValidationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ValidationException"
}
return *e.ErrorCodeOverride
}
func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
| 197 |
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"
)
// The properties (metadata) of a column.
type ColumnMetadata struct {
// The default value of the column.
ColumnDefault *string
// A value that indicates whether the column is case-sensitive.
IsCaseSensitive bool
// A value that indicates whether the column contains currency values.
IsCurrency bool
// A value that indicates whether an integer column is signed.
IsSigned bool
// The label for the column.
Label *string
// The length of the column.
Length int32
// The name of the column.
Name *string
// A value that indicates whether the column is nullable.
Nullable int32
// The precision value of a decimal number column.
Precision int32
// The scale value of a decimal number column.
Scale int32
// The name of the schema that contains the table that includes the column.
SchemaName *string
// The name of the table that includes the column.
TableName *string
// The database-specific data type of the column.
TypeName *string
noSmithyDocumentSerde
}
// A data value in a column.
//
// The following types satisfy this interface:
//
// FieldMemberBlobValue
// FieldMemberBooleanValue
// FieldMemberDoubleValue
// FieldMemberIsNull
// FieldMemberLongValue
// FieldMemberStringValue
type Field interface {
isField()
}
// A value of the BLOB data type.
type FieldMemberBlobValue struct {
Value []byte
noSmithyDocumentSerde
}
func (*FieldMemberBlobValue) isField() {}
// A value of the Boolean data type.
type FieldMemberBooleanValue struct {
Value bool
noSmithyDocumentSerde
}
func (*FieldMemberBooleanValue) isField() {}
// A value of the double data type.
type FieldMemberDoubleValue struct {
Value float64
noSmithyDocumentSerde
}
func (*FieldMemberDoubleValue) isField() {}
// A value that indicates whether the data is NULL.
type FieldMemberIsNull struct {
Value bool
noSmithyDocumentSerde
}
func (*FieldMemberIsNull) isField() {}
// A value of the long data type.
type FieldMemberLongValue struct {
Value int64
noSmithyDocumentSerde
}
func (*FieldMemberLongValue) isField() {}
// A value of the string data type.
type FieldMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*FieldMemberStringValue) isField() {}
// A parameter used in a SQL statement.
type SqlParameter struct {
// The name of the parameter.
//
// This member is required.
Name *string
// The value of the parameter. Amazon Redshift implicitly converts to the proper
// data type. For more information, see Data types (https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html)
// in the Amazon Redshift Database Developer Guide.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// The SQL statement to run.
type StatementData struct {
// The SQL statement identifier. This value is a universally unique identifier
// (UUID) generated by Amazon Redshift Data API.
//
// This member is required.
Id *string
// The date and time (UTC) the statement was created.
CreatedAt *time.Time
// A value that indicates whether the statement is a batch query request.
IsBatchStatement *bool
// The parameters used in a SQL statement.
QueryParameters []SqlParameter
// The SQL statement.
QueryString *string
// One or more SQL statements. Each query string in the array corresponds to one
// of the queries in a batch query request.
QueryStrings []string
// The name or Amazon Resource Name (ARN) of the secret that enables access to the
// database.
SecretArn *string
// The name of the SQL statement.
StatementName *string
// The status of the SQL statement. An example is the that the SQL statement
// finished.
Status StatusString
// The date and time (UTC) that the statement metadata was last updated.
UpdatedAt *time.Time
noSmithyDocumentSerde
}
// Information about an SQL statement.
type SubStatementData struct {
// The identifier of the SQL statement. This value is a universally unique
// identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the
// number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2
// has a suffix of :2 that indicates the second SQL statement of a batch query.
//
// This member is required.
Id *string
// The date and time (UTC) the statement was created.
CreatedAt *time.Time
// The amount of time in nanoseconds that the statement ran.
Duration int64
// The error message from the cluster if the SQL statement encountered an error
// while running.
Error *string
// A value that indicates whether the statement has a result set. The result set
// can be empty. The value is true for an empty result set.
HasResultSet *bool
// The SQL statement text.
QueryString *string
// The SQL statement identifier. This value is a universally unique identifier
// (UUID) generated by Amazon Redshift Data API.
RedshiftQueryId int64
// Either the number of rows returned from the SQL statement or the number of rows
// affected. If result size is greater than zero, the result rows can be the number
// of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and
// others. A -1 indicates the value is null.
ResultRows int64
// The size in bytes of the returned results. A -1 indicates the value is null.
ResultSize int64
// The status of the SQL statement. An example is the that the SQL statement
// finished.
Status StatementStatusString
// The date and time (UTC) that the statement metadata was last updated.
UpdatedAt *time.Time
noSmithyDocumentSerde
}
// The properties of a table.
type TableMember struct {
// The name of the table.
Name *string
// The schema containing the table.
Schema *string
// The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE,
// GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.
Type *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
// UnknownUnionMember is returned when a union member is returned over the wire,
// but has an unknown tag.
type UnknownUnionMember struct {
Tag string
Value []byte
noSmithyDocumentSerde
}
func (*UnknownUnionMember) isField() {}
| 262 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types_test
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/redshiftdata/types"
)
func ExampleField_outputUsage() {
var union types.Field
// type switches can be used to check the union value
switch v := union.(type) {
case *types.FieldMemberBlobValue:
_ = v.Value // Value is []byte
case *types.FieldMemberBooleanValue:
_ = v.Value // Value is bool
case *types.FieldMemberDoubleValue:
_ = v.Value // Value is float64
case *types.FieldMemberIsNull:
_ = v.Value // Value is bool
case *types.FieldMemberLongValue:
_ = v.Value // Value is int64
case *types.FieldMemberStringValue:
_ = v.Value // Value is string
case *types.UnknownUnionMember:
fmt.Println("unknown tag:", v.Tag)
default:
fmt.Println("union is nil or unknown type")
}
}
var _ *string
var _ *bool
var _ *int64
var _ *float64
var _ []byte
| 46 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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 = "Redshift Serverless"
const ServiceAPIVersion = "2021-04-21"
// Client provides the API client to make operations call for Redshift Serverless.
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, "redshiftserverless", 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 redshiftserverless
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 redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Converts a recovery point to a snapshot. For more information about recovery
// points and snapshots, see Working with snapshots and recovery points (https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html)
// .
func (c *Client) ConvertRecoveryPointToSnapshot(ctx context.Context, params *ConvertRecoveryPointToSnapshotInput, optFns ...func(*Options)) (*ConvertRecoveryPointToSnapshotOutput, error) {
if params == nil {
params = &ConvertRecoveryPointToSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ConvertRecoveryPointToSnapshot", params, optFns, c.addOperationConvertRecoveryPointToSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ConvertRecoveryPointToSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type ConvertRecoveryPointToSnapshotInput struct {
// The unique identifier of the recovery point.
//
// This member is required.
RecoveryPointId *string
// The name of the snapshot.
//
// This member is required.
SnapshotName *string
// How long to retain the snapshot.
RetentionPeriod *int32
// An array of Tag objects (https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html)
// to associate with the created snapshot.
Tags []types.Tag
noSmithyDocumentSerde
}
type ConvertRecoveryPointToSnapshotOutput struct {
// The snapshot converted from the recovery point.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationConvertRecoveryPointToSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpConvertRecoveryPointToSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpConvertRecoveryPointToSnapshot{}, 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 = addOpConvertRecoveryPointToSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConvertRecoveryPointToSnapshot(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_opConvertRecoveryPointToSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "ConvertRecoveryPointToSnapshot",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates an Amazon Redshift Serverless managed VPC endpoint.
func (c *Client) CreateEndpointAccess(ctx context.Context, params *CreateEndpointAccessInput, optFns ...func(*Options)) (*CreateEndpointAccessOutput, error) {
if params == nil {
params = &CreateEndpointAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateEndpointAccess", params, optFns, c.addOperationCreateEndpointAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateEndpointAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateEndpointAccessInput struct {
// The name of the VPC endpoint. An endpoint name must contain 1-30 characters.
// Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first character must be a
// letter. The name can't contain two consecutive hyphens or end with a hyphen.
//
// This member is required.
EndpointName *string
// The unique identifers of subnets from which Amazon Redshift Serverless chooses
// one to deploy a VPC endpoint.
//
// This member is required.
SubnetIds []string
// The name of the workgroup to associate with the VPC endpoint.
//
// This member is required.
WorkgroupName *string
// The unique identifiers of the security group that defines the ports, protocols,
// and sources for inbound traffic that you are authorizing into your endpoint.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type CreateEndpointAccessOutput struct {
// The created VPC endpoint.
Endpoint *types.EndpointAccess
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateEndpointAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateEndpointAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateEndpointAccess{}, 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 = addOpCreateEndpointAccessValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEndpointAccess(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_opCreateEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "CreateEndpointAccess",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a namespace in Amazon Redshift Serverless.
func (c *Client) CreateNamespace(ctx context.Context, params *CreateNamespaceInput, optFns ...func(*Options)) (*CreateNamespaceOutput, error) {
if params == nil {
params = &CreateNamespaceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateNamespace", params, optFns, c.addOperationCreateNamespaceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateNamespaceOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateNamespaceInput struct {
// The name of the namespace.
//
// This member is required.
NamespaceName *string
// The password of the administrator for the first database created in the
// namespace.
AdminUserPassword *string
// The username of the administrator for the first database created in the
// namespace.
AdminUsername *string
// The name of the first database created in the namespace.
DbName *string
// The Amazon Resource Name (ARN) of the IAM role to set as a default in the
// namespace.
DefaultIamRoleArn *string
// A list of IAM roles to associate with the namespace.
IamRoles []string
// The ID of the Amazon Web Services Key Management Service key used to encrypt
// your data.
KmsKeyId *string
// The types of logs the namespace can export. Available export types are userlog ,
// connectionlog , and useractivitylog .
LogExports []types.LogExport
// A list of tag instances.
Tags []types.Tag
noSmithyDocumentSerde
}
type CreateNamespaceOutput struct {
// The created namespace object.
Namespace *types.Namespace
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateNamespace{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateNamespace{}, 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 = addOpCreateNamespaceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNamespace(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_opCreateNamespace(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "CreateNamespace",
}
}
| 154 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a snapshot of all databases in a namespace. For more information about
// snapshots, see Working with snapshots and recovery points (https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html)
// .
func (c *Client) CreateSnapshot(ctx context.Context, params *CreateSnapshotInput, optFns ...func(*Options)) (*CreateSnapshotOutput, error) {
if params == nil {
params = &CreateSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateSnapshot", params, optFns, c.addOperationCreateSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateSnapshotInput struct {
// The namespace to create a snapshot for.
//
// This member is required.
NamespaceName *string
// The name of the snapshot.
//
// This member is required.
SnapshotName *string
// How long to retain the created snapshot.
RetentionPeriod *int32
// An array of Tag objects (https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html)
// to associate with the snapshot.
Tags []types.Tag
noSmithyDocumentSerde
}
type CreateSnapshotOutput struct {
// The created snapshot object.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSnapshot{}, 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 = addOpCreateSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshot(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_opCreateSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "CreateSnapshot",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a usage limit for a specified Amazon Redshift Serverless usage type.
// The usage limit is identified by the returned usage limit identifier.
func (c *Client) CreateUsageLimit(ctx context.Context, params *CreateUsageLimitInput, optFns ...func(*Options)) (*CreateUsageLimitOutput, error) {
if params == nil {
params = &CreateUsageLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateUsageLimit", params, optFns, c.addOperationCreateUsageLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateUsageLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateUsageLimitInput struct {
// The limit amount. If time-based, this amount is in Redshift Processing Units
// (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data
// transferred between Regions in cross-account sharing. The value must be a
// positive number.
//
// This member is required.
Amount *int64
// The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to
// create the usage limit for.
//
// This member is required.
ResourceArn *string
// The type of Amazon Redshift Serverless usage to create a usage limit for.
//
// This member is required.
UsageType types.UsageLimitUsageType
// The action that Amazon Redshift Serverless takes when the limit is reached. The
// default is log.
BreachAction types.UsageLimitBreachAction
// The time period that the amount applies to. A weekly period begins on Sunday.
// The default is monthly.
Period types.UsageLimitPeriod
noSmithyDocumentSerde
}
type CreateUsageLimitOutput struct {
// The returned usage limit object.
UsageLimit *types.UsageLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateUsageLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUsageLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUsageLimit{}, 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 = addOpCreateUsageLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUsageLimit(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_opCreateUsageLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "CreateUsageLimit",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates an workgroup in Amazon Redshift Serverless.
func (c *Client) CreateWorkgroup(ctx context.Context, params *CreateWorkgroupInput, optFns ...func(*Options)) (*CreateWorkgroupOutput, error) {
if params == nil {
params = &CreateWorkgroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateWorkgroup", params, optFns, c.addOperationCreateWorkgroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateWorkgroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateWorkgroupInput struct {
// The name of the namespace to associate with the workgroup.
//
// This member is required.
NamespaceName *string
// The name of the created workgroup.
//
// This member is required.
WorkgroupName *string
// The base data warehouse capacity of the workgroup in Redshift Processing Units
// (RPUs).
BaseCapacity *int32
// An array of parameters to set for advanced control over a database. The options
// are auto_mv , datestyle , enable_case_sensitivity_identifier ,
// enable_user_activity_logging , query_group , search_path , and query monitoring
// metrics that let you define performance boundaries. For more information about
// query monitoring rules and available metrics, see Query monitoring metrics for
// Amazon Redshift Serverless (https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless)
// .
ConfigParameters []types.ConfigParameter
// The value that specifies whether to turn on enhanced virtual private cloud
// (VPC) routing, which forces Amazon Redshift Serverless to route traffic through
// your VPC instead of over the internet.
EnhancedVpcRouting *bool
// The custom port to use when connecting to a workgroup. Valid port ranges are
// 5431-5455 and 8191-8215. The default is 5439.
Port *int32
// A value that specifies whether the workgroup can be accessed from a public
// network.
PubliclyAccessible *bool
// An array of security group IDs to associate with the workgroup.
SecurityGroupIds []string
// An array of VPC subnet IDs to associate with the workgroup.
SubnetIds []string
// A array of tag instances.
Tags []types.Tag
noSmithyDocumentSerde
}
type CreateWorkgroupOutput struct {
// The created workgroup object.
Workgroup *types.Workgroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateWorkgroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWorkgroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWorkgroup{}, 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 = addOpCreateWorkgroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkgroup(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_opCreateWorkgroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "CreateWorkgroup",
}
}
| 165 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an Amazon Redshift Serverless managed VPC endpoint.
func (c *Client) DeleteEndpointAccess(ctx context.Context, params *DeleteEndpointAccessInput, optFns ...func(*Options)) (*DeleteEndpointAccessOutput, error) {
if params == nil {
params = &DeleteEndpointAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteEndpointAccess", params, optFns, c.addOperationDeleteEndpointAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteEndpointAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteEndpointAccessInput struct {
// The name of the VPC endpoint to delete.
//
// This member is required.
EndpointName *string
noSmithyDocumentSerde
}
type DeleteEndpointAccessOutput struct {
// The deleted VPC endpoint.
Endpoint *types.EndpointAccess
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteEndpointAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteEndpointAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteEndpointAccess{}, 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 = addOpDeleteEndpointAccessValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEndpointAccess(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_opDeleteEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteEndpointAccess",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a namespace from Amazon Redshift Serverless. Before you delete the
// namespace, you can create a final snapshot that has all of the data within the
// namespace.
func (c *Client) DeleteNamespace(ctx context.Context, params *DeleteNamespaceInput, optFns ...func(*Options)) (*DeleteNamespaceOutput, error) {
if params == nil {
params = &DeleteNamespaceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteNamespace", params, optFns, c.addOperationDeleteNamespaceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteNamespaceOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteNamespaceInput struct {
// The name of the namespace to delete.
//
// This member is required.
NamespaceName *string
// The name of the snapshot to be created before the namespace is deleted.
FinalSnapshotName *string
// How long to retain the final snapshot.
FinalSnapshotRetentionPeriod *int32
noSmithyDocumentSerde
}
type DeleteNamespaceOutput struct {
// The deleted namespace object.
//
// This member is required.
Namespace *types.Namespace
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteNamespace{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteNamespace{}, 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 = addOpDeleteNamespaceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNamespace(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_opDeleteNamespace(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteNamespace",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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"
)
// Deletes the specified resource policy.
func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) {
if params == nil {
params = &DeleteResourcePolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteResourcePolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteResourcePolicyInput struct {
// The Amazon Resource Name (ARN) of the policy to delete.
//
// This member is required.
ResourceArn *string
noSmithyDocumentSerde
}
type DeleteResourcePolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, 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 = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(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_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteResourcePolicy",
}
}
| 120 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a snapshot from Amazon Redshift Serverless.
func (c *Client) DeleteSnapshot(ctx context.Context, params *DeleteSnapshotInput, optFns ...func(*Options)) (*DeleteSnapshotOutput, error) {
if params == nil {
params = &DeleteSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteSnapshot", params, optFns, c.addOperationDeleteSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteSnapshotInput struct {
// The name of the snapshot to be deleted.
//
// This member is required.
SnapshotName *string
noSmithyDocumentSerde
}
type DeleteSnapshotOutput struct {
// The deleted snapshot object.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSnapshot{}, 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 = addOpDeleteSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSnapshot(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_opDeleteSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteSnapshot",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a usage limit from Amazon Redshift Serverless.
func (c *Client) DeleteUsageLimit(ctx context.Context, params *DeleteUsageLimitInput, optFns ...func(*Options)) (*DeleteUsageLimitOutput, error) {
if params == nil {
params = &DeleteUsageLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteUsageLimit", params, optFns, c.addOperationDeleteUsageLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteUsageLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteUsageLimitInput struct {
// The unique identifier of the usage limit to delete.
//
// This member is required.
UsageLimitId *string
noSmithyDocumentSerde
}
type DeleteUsageLimitOutput struct {
// The deleted usage limit object.
UsageLimit *types.UsageLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteUsageLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUsageLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUsageLimit{}, 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 = addOpDeleteUsageLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUsageLimit(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_opDeleteUsageLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteUsageLimit",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a workgroup.
func (c *Client) DeleteWorkgroup(ctx context.Context, params *DeleteWorkgroupInput, optFns ...func(*Options)) (*DeleteWorkgroupOutput, error) {
if params == nil {
params = &DeleteWorkgroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteWorkgroup", params, optFns, c.addOperationDeleteWorkgroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteWorkgroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteWorkgroupInput struct {
// The name of the workgroup to be deleted.
//
// This member is required.
WorkgroupName *string
noSmithyDocumentSerde
}
type DeleteWorkgroupOutput struct {
// The deleted workgroup object.
//
// This member is required.
Workgroup *types.Workgroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteWorkgroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWorkgroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWorkgroup{}, 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 = addOpDeleteWorkgroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWorkgroup(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_opDeleteWorkgroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "DeleteWorkgroup",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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"
"time"
)
// Returns a database user name and temporary password with temporary
// authorization to log in to Amazon Redshift Serverless. By default, the temporary
// credentials expire in 900 seconds. You can optionally specify a duration between
// 900 seconds (15 minutes) and 3600 seconds (60 minutes). The Identity and Access
// Management (IAM) user or role that runs GetCredentials must have an IAM policy
// attached that allows access to all necessary actions and resources. If the
// DbName parameter is specified, the IAM policy must allow access to the resource
// dbname for the specified database name.
func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput, optFns ...func(*Options)) (*GetCredentialsOutput, error) {
if params == nil {
params = &GetCredentialsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetCredentials", params, optFns, c.addOperationGetCredentialsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetCredentialsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetCredentialsInput struct {
// The name of the workgroup associated with the database.
//
// This member is required.
WorkgroupName *string
// The name of the database to get temporary authorization to log on to.
// Constraints:
// - Must be 1 to 64 alphanumeric characters or hyphens.
// - Must contain only uppercase or lowercase letters, numbers, underscore, plus
// sign, period (dot), at symbol (@), or hyphen.
// - The first character must be a letter.
// - Must not contain a colon ( : ) or slash ( / ).
// - Cannot be a reserved word. A list of reserved words can be found in
// Reserved Words (https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html)
// in the Amazon Redshift Database Developer Guide
DbName *string
// The number of seconds until the returned temporary password expires. The
// minimum is 900 seconds, and the maximum is 3600 seconds.
DurationSeconds *int32
noSmithyDocumentSerde
}
type GetCredentialsOutput struct {
// A temporary password that authorizes the user name returned by DbUser to log on
// to the database DbName .
DbPassword *string
// A database user name that is authorized to log on to the database DbName using
// the password DbPassword . If the specified DbUser exists in the database, the
// new user name has the same database privileges as the the user named in DbUser .
// By default, the user is added to PUBLIC.
DbUser *string
// The date and time the password in DbPassword expires.
Expiration *time.Time
// The date and time of when the DbUser and DbPassword authorization refreshes.
NextRefreshTime *time.Time
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetCredentials{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetCredentials{}, 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 = addOpGetCredentialsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentials(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_opGetCredentials(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetCredentials",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information, such as the name, about a VPC endpoint.
func (c *Client) GetEndpointAccess(ctx context.Context, params *GetEndpointAccessInput, optFns ...func(*Options)) (*GetEndpointAccessOutput, error) {
if params == nil {
params = &GetEndpointAccessInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetEndpointAccess", params, optFns, c.addOperationGetEndpointAccessMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetEndpointAccessOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetEndpointAccessInput struct {
// The name of the VPC endpoint to return information for.
//
// This member is required.
EndpointName *string
noSmithyDocumentSerde
}
type GetEndpointAccessOutput struct {
// The returned VPC endpoint.
Endpoint *types.EndpointAccess
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetEndpointAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetEndpointAccess{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetEndpointAccess{}, 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 = addOpGetEndpointAccessValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEndpointAccess(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_opGetEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetEndpointAccess",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a namespace in Amazon Redshift Serverless.
func (c *Client) GetNamespace(ctx context.Context, params *GetNamespaceInput, optFns ...func(*Options)) (*GetNamespaceOutput, error) {
if params == nil {
params = &GetNamespaceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetNamespace", params, optFns, c.addOperationGetNamespaceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetNamespaceOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetNamespaceInput struct {
// The name of the namespace to retrieve information for.
//
// This member is required.
NamespaceName *string
noSmithyDocumentSerde
}
type GetNamespaceOutput struct {
// The returned namespace object.
//
// This member is required.
Namespace *types.Namespace
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetNamespace{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetNamespace{}, 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 = addOpGetNamespaceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNamespace(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_opGetNamespace(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetNamespace",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a recovery point.
func (c *Client) GetRecoveryPoint(ctx context.Context, params *GetRecoveryPointInput, optFns ...func(*Options)) (*GetRecoveryPointOutput, error) {
if params == nil {
params = &GetRecoveryPointInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetRecoveryPoint", params, optFns, c.addOperationGetRecoveryPointMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetRecoveryPointOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetRecoveryPointInput struct {
// The unique identifier of the recovery point to return information for.
//
// This member is required.
RecoveryPointId *string
noSmithyDocumentSerde
}
type GetRecoveryPointOutput struct {
// The returned recovery point object.
RecoveryPoint *types.RecoveryPoint
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetRecoveryPointMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRecoveryPoint{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRecoveryPoint{}, 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 = addOpGetRecoveryPointValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecoveryPoint(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_opGetRecoveryPoint(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetRecoveryPoint",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a resource policy.
func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) {
if params == nil {
params = &GetResourcePolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetResourcePolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetResourcePolicyInput struct {
// The Amazon Resource Name (ARN) of the resource to return.
//
// This member is required.
ResourceArn *string
noSmithyDocumentSerde
}
type GetResourcePolicyOutput struct {
// The returned resource policy.
ResourcePolicy *types.ResourcePolicy
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicy{}, 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 = addOpGetResourcePolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(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_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetResourcePolicy",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a specific snapshot.
func (c *Client) GetSnapshot(ctx context.Context, params *GetSnapshotInput, optFns ...func(*Options)) (*GetSnapshotOutput, error) {
if params == nil {
params = &GetSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetSnapshot", params, optFns, c.addOperationGetSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetSnapshotInput struct {
// The owner Amazon Web Services account of a snapshot shared with another user.
OwnerAccount *string
// The Amazon Resource Name (ARN) of the snapshot to return.
SnapshotArn *string
// The name of the snapshot to return.
SnapshotName *string
noSmithyDocumentSerde
}
type GetSnapshotOutput struct {
// The returned snapshot object.
Snapshot *types.Snapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSnapshot{}, 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_opGetSnapshot(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_opGetSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetSnapshot",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a TableRestoreStatus object.
func (c *Client) GetTableRestoreStatus(ctx context.Context, params *GetTableRestoreStatusInput, optFns ...func(*Options)) (*GetTableRestoreStatusOutput, error) {
if params == nil {
params = &GetTableRestoreStatusInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetTableRestoreStatus", params, optFns, c.addOperationGetTableRestoreStatusMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetTableRestoreStatusOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetTableRestoreStatusInput struct {
// The ID of the RestoreTableFromSnapshot request to return status for.
//
// This member is required.
TableRestoreRequestId *string
noSmithyDocumentSerde
}
type GetTableRestoreStatusOutput struct {
// The returned TableRestoreStatus object that contains information about the
// status of your RestoreTableFromSnapshot request.
TableRestoreStatus *types.TableRestoreStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetTableRestoreStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetTableRestoreStatus{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetTableRestoreStatus{}, 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 = addOpGetTableRestoreStatusValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTableRestoreStatus(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_opGetTableRestoreStatus(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetTableRestoreStatus",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package redshiftserverless
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/redshiftserverless/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a usage limit.
func (c *Client) GetUsageLimit(ctx context.Context, params *GetUsageLimitInput, optFns ...func(*Options)) (*GetUsageLimitOutput, error) {
if params == nil {
params = &GetUsageLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetUsageLimit", params, optFns, c.addOperationGetUsageLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetUsageLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetUsageLimitInput struct {
// The unique identifier of the usage limit to return information for.
//
// This member is required.
UsageLimitId *string
noSmithyDocumentSerde
}
type GetUsageLimitOutput struct {
// The returned usage limit object.
UsageLimit *types.UsageLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetUsageLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetUsageLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetUsageLimit{}, 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 = addOpGetUsageLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUsageLimit(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_opGetUsageLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "redshift-serverless",
OperationName: "GetUsageLimit",
}
}
| 125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.