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 rds
import (
"context"
"errors"
"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/rds/types"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"strconv"
"time"
)
// Describes existing Amazon Aurora DB clusters and Multi-AZ DB clusters. This API
// supports pagination. For more information on Amazon Aurora DB clusters, see
// What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide. This operation can also return information for
// Amazon Neptune DB instances and Amazon DocumentDB instances.
func (c *Client) DescribeDBClusters(ctx context.Context, params *DescribeDBClustersInput, optFns ...func(*Options)) (*DescribeDBClustersOutput, error) {
if params == nil {
params = &DescribeDBClustersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBClusters", params, optFns, c.addOperationDescribeDBClustersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBClustersOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBClustersInput struct {
// The user-supplied DB cluster identifier or the Amazon Resource Name (ARN) of
// the DB cluster. If this parameter is specified, information for only the
// specific DB cluster is returned. This parameter isn't case-sensitive.
// Constraints:
// - If supplied, must match an existing DB cluster identifier.
DBClusterIdentifier *string
// A filter that specifies one or more DB clusters to describe. Supported Filters:
// - clone-group-id - Accepts clone group identifiers. The results list only
// includes information about the DB clusters associated with these clone groups.
// - db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon
// Resource Names (ARNs). The results list only includes information about the DB
// clusters identified by these ARNs.
// - db-cluster-resource-id - Accepts DB cluster resource identifiers. The
// results list will only include information about the DB clusters identified by
// these DB cluster resource identifiers.
// - domain - Accepts Active Directory directory IDs. The results list only
// includes information about the DB clusters associated with these domains.
// - engine - Accepts engine names. The results list only includes information
// about the DB clusters for these engines.
Filters []types.Filter
// Specifies whether the output includes information about clusters shared from
// other Amazon Web Services accounts.
IncludeShared bool
// An optional pagination token provided by a previous DescribeDBClusters request.
// If this parameter is specified, the response includes only records beyond the
// marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBClusters action.
type DescribeDBClustersOutput struct {
// Contains a list of DB clusters for the user.
DBClusters []types.DBCluster
// A pagination token that can be used in a later DescribeDBClusters request.
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBClusters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBClusters{}, 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 = addOpDescribeDBClustersValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBClusters(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
}
// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters
// operation.
type DescribeDBClustersAPIClient interface {
DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error)
}
var _ DescribeDBClustersAPIClient = (*Client)(nil)
// DescribeDBClustersPaginatorOptions is the paginator options for
// DescribeDBClusters
type DescribeDBClustersPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. 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
}
// DescribeDBClustersPaginator is a paginator for DescribeDBClusters
type DescribeDBClustersPaginator struct {
options DescribeDBClustersPaginatorOptions
client DescribeDBClustersAPIClient
params *DescribeDBClustersInput
nextToken *string
firstPage bool
}
// NewDescribeDBClustersPaginator returns a new DescribeDBClustersPaginator
func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params *DescribeDBClustersInput, optFns ...func(*DescribeDBClustersPaginatorOptions)) *DescribeDBClustersPaginator {
if params == nil {
params = &DescribeDBClustersInput{}
}
options := DescribeDBClustersPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBClustersPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBClustersPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBClusters page.
func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClustersOutput, 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.DescribeDBClusters(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
}
// DBClusterAvailableWaiterOptions are waiter options for DBClusterAvailableWaiter
type DBClusterAvailableWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBClusterAvailableWaiter will use default minimum delay of 30 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBClusterAvailableWaiter will use default max delay of 120 seconds.
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBClustersInput, *DescribeDBClustersOutput, error) (bool, error)
}
// DBClusterAvailableWaiter defines the waiters for DBClusterAvailable
type DBClusterAvailableWaiter struct {
client DescribeDBClustersAPIClient
options DBClusterAvailableWaiterOptions
}
// NewDBClusterAvailableWaiter constructs a DBClusterAvailableWaiter.
func NewDBClusterAvailableWaiter(client DescribeDBClustersAPIClient, optFns ...func(*DBClusterAvailableWaiterOptions)) *DBClusterAvailableWaiter {
options := DBClusterAvailableWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBClusterAvailableStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBClusterAvailableWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBClusterAvailable waiter. The maxWaitDur is
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *DBClusterAvailableWaiter) Wait(ctx context.Context, params *DescribeDBClustersInput, maxWaitDur time.Duration, optFns ...func(*DBClusterAvailableWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBClusterAvailable waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBClusterAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeDBClustersInput, maxWaitDur time.Duration, optFns ...func(*DBClusterAvailableWaiterOptions)) (*DescribeDBClustersOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBClusters(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBClusterAvailable waiter")
}
func dBClusterAvailableStateRetryable(ctx context.Context, input *DescribeDBClustersInput, output *DescribeDBClustersOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "available"
var match = true
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
if len(listOfValues) == 0 {
match = false
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) != expectedValue {
match = false
}
}
if match {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleted"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "failed"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-restore"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-parameters"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
// DBClusterDeletedWaiterOptions are waiter options for DBClusterDeletedWaiter
type DBClusterDeletedWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBClusterDeletedWaiter will use default minimum delay of 30 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBClusterDeletedWaiter will use default max delay of 120 seconds.
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBClustersInput, *DescribeDBClustersOutput, error) (bool, error)
}
// DBClusterDeletedWaiter defines the waiters for DBClusterDeleted
type DBClusterDeletedWaiter struct {
client DescribeDBClustersAPIClient
options DBClusterDeletedWaiterOptions
}
// NewDBClusterDeletedWaiter constructs a DBClusterDeletedWaiter.
func NewDBClusterDeletedWaiter(client DescribeDBClustersAPIClient, optFns ...func(*DBClusterDeletedWaiterOptions)) *DBClusterDeletedWaiter {
options := DBClusterDeletedWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBClusterDeletedStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBClusterDeletedWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBClusterDeleted waiter. The maxWaitDur is
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *DBClusterDeletedWaiter) Wait(ctx context.Context, params *DescribeDBClustersInput, maxWaitDur time.Duration, optFns ...func(*DBClusterDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBClusterDeleted waiter and returns
// the output of the successful operation. The maxWaitDur is the maximum wait
// duration the waiter will wait. The maxWaitDur is required and must be greater
// than zero.
func (w *DBClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeDBClustersInput, maxWaitDur time.Duration, optFns ...func(*DBClusterDeletedWaiterOptions)) (*DescribeDBClustersOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBClusters(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBClusterDeleted waiter")
}
func dBClusterDeletedStateRetryable(ctx context.Context, input *DescribeDBClustersInput, output *DescribeDBClustersOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("length(DBClusters) == `0`", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "true"
bv, err := strconv.ParseBool(expectedValue)
if err != nil {
return false, fmt.Errorf("error parsing boolean from string %w", err)
}
value, ok := pathValue.(bool)
if !ok {
return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
}
if value == bv {
return false, nil
}
}
if err != nil {
var errorType *types.DBClusterNotFoundFault
if errors.As(err, &errorType) {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "creating"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "modifying"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "rebooting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusters[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "resetting-master-credentials"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
func newServiceMetadataMiddleware_opDescribeDBClusters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBClusters",
}
}
| 830 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DB cluster snapshot attribute names and values for a manual
// DB cluster snapshot. When sharing snapshots with other Amazon Web Services
// accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and
// a list of IDs for the Amazon Web Services accounts that are authorized to copy
// or restore the manual DB cluster snapshot. If all is included in the list of
// values for the restore attribute, then the manual DB cluster snapshot is public
// and can be copied or restored by all Amazon Web Services accounts. To add or
// remove access for an Amazon Web Services account to copy or restore a manual DB
// cluster snapshot, or to make the manual DB cluster snapshot public or private,
// use the ModifyDBClusterSnapshotAttribute API action.
func (c *Client) DescribeDBClusterSnapshotAttributes(ctx context.Context, params *DescribeDBClusterSnapshotAttributesInput, optFns ...func(*Options)) (*DescribeDBClusterSnapshotAttributesOutput, error) {
if params == nil {
params = &DescribeDBClusterSnapshotAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBClusterSnapshotAttributes", params, optFns, c.addOperationDescribeDBClusterSnapshotAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBClusterSnapshotAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBClusterSnapshotAttributesInput struct {
// The identifier for the DB cluster snapshot to describe the attributes for.
//
// This member is required.
DBClusterSnapshotIdentifier *string
noSmithyDocumentSerde
}
type DescribeDBClusterSnapshotAttributesOutput struct {
// Contains the results of a successful call to the
// DescribeDBClusterSnapshotAttributes API action. Manual DB cluster snapshot
// attributes are used to authorize other Amazon Web Services accounts to copy or
// restore a manual DB cluster snapshot. For more information, see the
// ModifyDBClusterSnapshotAttribute API action.
DBClusterSnapshotAttributesResult *types.DBClusterSnapshotAttributesResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBClusterSnapshotAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBClusterSnapshotAttributes{}, 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 = addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBClusterSnapshotAttributes(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_opDescribeDBClusterSnapshotAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBClusterSnapshotAttributes",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
import (
"context"
"errors"
"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/rds/types"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"strconv"
"time"
)
// Returns information about DB cluster snapshots. This API action supports
// pagination. For more information on Amazon Aurora DB clusters, see What is
// Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) DescribeDBClusterSnapshots(ctx context.Context, params *DescribeDBClusterSnapshotsInput, optFns ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) {
if params == nil {
params = &DescribeDBClusterSnapshotsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBClusterSnapshots", params, optFns, c.addOperationDescribeDBClusterSnapshotsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBClusterSnapshotsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBClusterSnapshotsInput struct {
// The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This
// parameter can't be used in conjunction with the DBClusterSnapshotIdentifier
// parameter. This parameter isn't case-sensitive. Constraints:
// - If supplied, must match the identifier of an existing DBCluster.
DBClusterIdentifier *string
// A specific DB cluster snapshot identifier to describe. This parameter can't be
// used in conjunction with the DBClusterIdentifier parameter. This value is
// stored as a lowercase string. Constraints:
// - If supplied, must match the identifier of an existing DBClusterSnapshot.
// - If this identifier is for an automated snapshot, the SnapshotType parameter
// must also be specified.
DBClusterSnapshotIdentifier *string
// A filter that specifies one or more DB cluster snapshots to describe. Supported
// filters:
// - db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon
// Resource Names (ARNs).
// - db-cluster-snapshot-id - Accepts DB cluster snapshot identifiers.
// - snapshot-type - Accepts types of DB cluster snapshots.
// - engine - Accepts names of database engines.
Filters []types.Filter
// A value that indicates whether to include manual DB cluster snapshots that are
// public and can be copied or restored by any Amazon Web Services account. By
// default, the public snapshots are not included. You can share a manual DB
// cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute API
// action.
IncludePublic bool
// A value that indicates whether to include shared manual DB cluster snapshots
// from other Amazon Web Services accounts that this Amazon Web Services account
// has been given permission to copy or restore. By default, these snapshots are
// not included. You can give an Amazon Web Services account permission to restore
// a manual DB cluster snapshot from another Amazon Web Services account by the
// ModifyDBClusterSnapshotAttribute API action.
IncludeShared bool
// An optional pagination token provided by a previous DescribeDBClusterSnapshots
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The type of DB cluster snapshots to be returned. You can specify one of the
// following values:
// - automated - Return all DB cluster snapshots that have been automatically
// taken by Amazon RDS for my Amazon Web Services account.
// - manual - Return all DB cluster snapshots that have been taken by my Amazon
// Web Services account.
// - shared - Return all manual DB cluster snapshots that have been shared to my
// Amazon Web Services account.
// - public - Return all DB cluster snapshots that have been marked as public.
// If you don't specify a SnapshotType value, then both automated and manual DB
// cluster snapshots are returned. You can include shared DB cluster snapshots with
// these results by enabling the IncludeShared parameter. You can include public
// DB cluster snapshots with these results by enabling the IncludePublic
// parameter. The IncludeShared and IncludePublic parameters don't apply for
// SnapshotType values of manual or automated . The IncludePublic parameter
// doesn't apply when SnapshotType is set to shared . The IncludeShared parameter
// doesn't apply when SnapshotType is set to public .
SnapshotType *string
noSmithyDocumentSerde
}
// Provides a list of DB cluster snapshots for the user as the result of a call to
// the DescribeDBClusterSnapshots action.
type DescribeDBClusterSnapshotsOutput struct {
// Provides a list of DB cluster snapshots for the user.
DBClusterSnapshots []types.DBClusterSnapshot
// An optional pagination token provided by a previous DescribeDBClusterSnapshots
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBClusterSnapshots{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBClusterSnapshots{}, 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 = addOpDescribeDBClusterSnapshotsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBClusterSnapshots(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
}
// DescribeDBClusterSnapshotsAPIClient is a client that implements the
// DescribeDBClusterSnapshots operation.
type DescribeDBClusterSnapshotsAPIClient interface {
DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error)
}
var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil)
// DescribeDBClusterSnapshotsPaginatorOptions is the paginator options for
// DescribeDBClusterSnapshots
type DescribeDBClusterSnapshotsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. 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
}
// DescribeDBClusterSnapshotsPaginator is a paginator for
// DescribeDBClusterSnapshots
type DescribeDBClusterSnapshotsPaginator struct {
options DescribeDBClusterSnapshotsPaginatorOptions
client DescribeDBClusterSnapshotsAPIClient
params *DescribeDBClusterSnapshotsInput
nextToken *string
firstPage bool
}
// NewDescribeDBClusterSnapshotsPaginator returns a new
// DescribeDBClusterSnapshotsPaginator
func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPIClient, params *DescribeDBClusterSnapshotsInput, optFns ...func(*DescribeDBClusterSnapshotsPaginatorOptions)) *DescribeDBClusterSnapshotsPaginator {
if params == nil {
params = &DescribeDBClusterSnapshotsInput{}
}
options := DescribeDBClusterSnapshotsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBClusterSnapshotsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBClusterSnapshots page.
func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, 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.DescribeDBClusterSnapshots(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
}
// DBClusterSnapshotAvailableWaiterOptions are waiter options for
// DBClusterSnapshotAvailableWaiter
type DBClusterSnapshotAvailableWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBClusterSnapshotAvailableWaiter will use default minimum delay of 30 seconds.
// Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBClusterSnapshotAvailableWaiter will use default max delay of 120
// seconds. Note that MaxDelay must resolve to value greater than or equal to the
// MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBClusterSnapshotsInput, *DescribeDBClusterSnapshotsOutput, error) (bool, error)
}
// DBClusterSnapshotAvailableWaiter defines the waiters for
// DBClusterSnapshotAvailable
type DBClusterSnapshotAvailableWaiter struct {
client DescribeDBClusterSnapshotsAPIClient
options DBClusterSnapshotAvailableWaiterOptions
}
// NewDBClusterSnapshotAvailableWaiter constructs a
// DBClusterSnapshotAvailableWaiter.
func NewDBClusterSnapshotAvailableWaiter(client DescribeDBClusterSnapshotsAPIClient, optFns ...func(*DBClusterSnapshotAvailableWaiterOptions)) *DBClusterSnapshotAvailableWaiter {
options := DBClusterSnapshotAvailableWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBClusterSnapshotAvailableStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBClusterSnapshotAvailableWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBClusterSnapshotAvailable waiter. The
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *DBClusterSnapshotAvailableWaiter) Wait(ctx context.Context, params *DescribeDBClusterSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBClusterSnapshotAvailableWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBClusterSnapshotAvailable waiter
// and returns the output of the successful operation. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *DBClusterSnapshotAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeDBClusterSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBClusterSnapshotAvailableWaiterOptions)) (*DescribeDBClusterSnapshotsOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBClusterSnapshots(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBClusterSnapshotAvailable waiter")
}
func dBClusterSnapshotAvailableStateRetryable(ctx context.Context, input *DescribeDBClusterSnapshotsInput, output *DescribeDBClusterSnapshotsOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "available"
var match = true
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
if len(listOfValues) == 0 {
match = false
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) != expectedValue {
match = false
}
}
if match {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleted"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "failed"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-restore"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-parameters"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
// DBClusterSnapshotDeletedWaiterOptions are waiter options for
// DBClusterSnapshotDeletedWaiter
type DBClusterSnapshotDeletedWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBClusterSnapshotDeletedWaiter will use default minimum delay of 30 seconds.
// Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBClusterSnapshotDeletedWaiter will use default max delay of 120
// seconds. Note that MaxDelay must resolve to value greater than or equal to the
// MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBClusterSnapshotsInput, *DescribeDBClusterSnapshotsOutput, error) (bool, error)
}
// DBClusterSnapshotDeletedWaiter defines the waiters for DBClusterSnapshotDeleted
type DBClusterSnapshotDeletedWaiter struct {
client DescribeDBClusterSnapshotsAPIClient
options DBClusterSnapshotDeletedWaiterOptions
}
// NewDBClusterSnapshotDeletedWaiter constructs a DBClusterSnapshotDeletedWaiter.
func NewDBClusterSnapshotDeletedWaiter(client DescribeDBClusterSnapshotsAPIClient, optFns ...func(*DBClusterSnapshotDeletedWaiterOptions)) *DBClusterSnapshotDeletedWaiter {
options := DBClusterSnapshotDeletedWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBClusterSnapshotDeletedStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBClusterSnapshotDeletedWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBClusterSnapshotDeleted waiter. The
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *DBClusterSnapshotDeletedWaiter) Wait(ctx context.Context, params *DescribeDBClusterSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBClusterSnapshotDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBClusterSnapshotDeleted waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBClusterSnapshotDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeDBClusterSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBClusterSnapshotDeletedWaiterOptions)) (*DescribeDBClusterSnapshotsOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBClusterSnapshots(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBClusterSnapshotDeleted waiter")
}
func dBClusterSnapshotDeletedStateRetryable(ctx context.Context, input *DescribeDBClusterSnapshotsInput, output *DescribeDBClusterSnapshotsOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("length(DBClusterSnapshots) == `0`", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "true"
bv, err := strconv.ParseBool(expectedValue)
if err != nil {
return false, fmt.Errorf("error parsing boolean from string %w", err)
}
value, ok := pathValue.(bool)
if !ok {
return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
}
if value == bv {
return false, nil
}
}
if err != nil {
var errorType *types.DBClusterSnapshotNotFoundFault
if errors.As(err, &errorType) {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "creating"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "modifying"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "rebooting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBClusterSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "resetting-master-credentials"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
func newServiceMetadataMiddleware_opDescribeDBClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBClusterSnapshots",
}
}
| 871 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of the available DB engines.
func (c *Client) DescribeDBEngineVersions(ctx context.Context, params *DescribeDBEngineVersionsInput, optFns ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) {
if params == nil {
params = &DescribeDBEngineVersionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBEngineVersions", params, optFns, c.addOperationDescribeDBEngineVersionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBEngineVersionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBEngineVersionsInput struct {
// The name of a specific DB parameter group family to return details for.
// Constraints:
// - If supplied, must match an existing DBParameterGroupFamily.
DBParameterGroupFamily *string
// A value that indicates whether only the default version of the specified engine
// or engine and major version combination is returned.
DefaultOnly bool
// The database engine to return. Valid Values:
// - aurora-mysql
// - aurora-postgresql
// - custom-oracle-ee
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
Engine *string
// The database engine version to return. Example: 5.1.49
EngineVersion *string
// A filter that specifies one or more DB engine versions to describe. Supported
// filters:
// - db-parameter-group-family - Accepts parameter groups family names. The
// results list only includes information about the DB engine versions for these
// parameter group families.
// - engine - Accepts engine names. The results list only includes information
// about the DB engine versions for these engines.
// - engine-mode - Accepts DB engine modes. The results list only includes
// information about the DB engine versions for these engine modes. Valid DB engine
// modes are the following:
// - global
// - multimaster
// - parallelquery
// - provisioned
// - serverless
// - engine-version - Accepts engine versions. The results list only includes
// information about the DB engine versions for these engine versions.
// - status - Accepts engine version statuses. The results list only includes
// information about the DB engine versions for these statuses. Valid statuses are
// the following:
// - available
// - deprecated
Filters []types.Filter
// A value that indicates whether to include engine versions that aren't available
// in the list. The default is to list only available engine versions.
IncludeAll *bool
// A value that indicates whether to list the supported character sets for each
// engine version. If this parameter is enabled and the requested engine supports
// the CharacterSetName parameter for CreateDBInstance , the response includes a
// list of supported character sets for each engine version. For RDS Custom, the
// default is not to list supported character sets. If you set
// ListSupportedCharacterSets to true , RDS Custom returns no results.
ListSupportedCharacterSets *bool
// A value that indicates whether to list the supported time zones for each engine
// version. If this parameter is enabled and the requested engine supports the
// TimeZone parameter for CreateDBInstance , the response includes a list of
// supported time zones for each engine version. For RDS Custom, the default is not
// to list supported time zones. If you set ListSupportedTimezones to true , RDS
// Custom returns no results.
ListSupportedTimezones *bool
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBEngineVersions
// action.
type DescribeDBEngineVersionsOutput struct {
// A list of DBEngineVersion elements.
DBEngineVersions []types.DBEngineVersion
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBEngineVersions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBEngineVersions{}, 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 = addOpDescribeDBEngineVersionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBEngineVersions(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
}
// DescribeDBEngineVersionsAPIClient is a client that implements the
// DescribeDBEngineVersions operation.
type DescribeDBEngineVersionsAPIClient interface {
DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error)
}
var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil)
// DescribeDBEngineVersionsPaginatorOptions is the paginator options for
// DescribeDBEngineVersions
type DescribeDBEngineVersionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. 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
}
// DescribeDBEngineVersionsPaginator is a paginator for DescribeDBEngineVersions
type DescribeDBEngineVersionsPaginator struct {
options DescribeDBEngineVersionsPaginatorOptions
client DescribeDBEngineVersionsAPIClient
params *DescribeDBEngineVersionsInput
nextToken *string
firstPage bool
}
// NewDescribeDBEngineVersionsPaginator returns a new
// DescribeDBEngineVersionsPaginator
func NewDescribeDBEngineVersionsPaginator(client DescribeDBEngineVersionsAPIClient, params *DescribeDBEngineVersionsInput, optFns ...func(*DescribeDBEngineVersionsPaginatorOptions)) *DescribeDBEngineVersionsPaginator {
if params == nil {
params = &DescribeDBEngineVersionsInput{}
}
options := DescribeDBEngineVersionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBEngineVersionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBEngineVersionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBEngineVersions page.
func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBEngineVersionsOutput, 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.DescribeDBEngineVersions(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_opDescribeDBEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBEngineVersions",
}
}
| 307 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Displays backups for both current and deleted instances. For example, use this
// operation to find details about automated backups for previously deleted
// instances. Current instances with retention periods greater than zero (0) are
// returned for both the DescribeDBInstanceAutomatedBackups and DescribeDBInstances
// operations. All parameters are optional.
func (c *Client) DescribeDBInstanceAutomatedBackups(ctx context.Context, params *DescribeDBInstanceAutomatedBackupsInput, optFns ...func(*Options)) (*DescribeDBInstanceAutomatedBackupsOutput, error) {
if params == nil {
params = &DescribeDBInstanceAutomatedBackupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBInstanceAutomatedBackups", params, optFns, c.addOperationDescribeDBInstanceAutomatedBackupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBInstanceAutomatedBackupsOutput)
out.ResultMetadata = metadata
return out, nil
}
// Parameter input for DescribeDBInstanceAutomatedBackups.
type DescribeDBInstanceAutomatedBackupsInput struct {
// The Amazon Resource Name (ARN) of the replicated automated backups, for
// example,
// arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE .
// This setting doesn't apply to RDS Custom.
DBInstanceAutomatedBackupsArn *string
// (Optional) The user-supplied instance identifier. If this parameter is
// specified, it must match the identifier of an existing DB instance. It returns
// information from the specific DB instance' automated backup. This parameter
// isn't case-sensitive.
DBInstanceIdentifier *string
// The resource ID of the DB instance that is the source of the automated backup.
// This parameter isn't case-sensitive.
DbiResourceId *string
// A filter that specifies which resources to return based on status. Supported
// filters are the following:
// - status
// - active - automated backups for current instances
// - retained - automated backups for deleted instances and after backup
// replication is stopped
// - creating - automated backups that are waiting for the first automated
// snapshot to be available
// - db-instance-id - Accepts DB instance identifiers and Amazon Resource Names
// (ARNs). The results list includes only information about the DB instance
// automated backups identified by these ARNs.
// - dbi-resource-id - Accepts DB resource identifiers and Amazon Resource Names
// (ARNs). The results list includes only information about the DB instance
// resources identified by these ARNs.
// Returns all resources by default. The status for each resource is specified in
// the response.
Filters []types.Filter
// The pagination token provided in the previous request. If this parameter is
// specified the response includes only records beyond the marker, up to MaxRecords
// .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the
// DescribeDBInstanceAutomatedBackups action.
type DescribeDBInstanceAutomatedBackupsOutput struct {
// A list of DBInstanceAutomatedBackup instances.
DBInstanceAutomatedBackups []types.DBInstanceAutomatedBackup
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBInstanceAutomatedBackupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBInstanceAutomatedBackups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBInstanceAutomatedBackups{}, 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 = addOpDescribeDBInstanceAutomatedBackupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBInstanceAutomatedBackups(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
}
// DescribeDBInstanceAutomatedBackupsAPIClient is a client that implements the
// DescribeDBInstanceAutomatedBackups operation.
type DescribeDBInstanceAutomatedBackupsAPIClient interface {
DescribeDBInstanceAutomatedBackups(context.Context, *DescribeDBInstanceAutomatedBackupsInput, ...func(*Options)) (*DescribeDBInstanceAutomatedBackupsOutput, error)
}
var _ DescribeDBInstanceAutomatedBackupsAPIClient = (*Client)(nil)
// DescribeDBInstanceAutomatedBackupsPaginatorOptions is the paginator options for
// DescribeDBInstanceAutomatedBackups
type DescribeDBInstanceAutomatedBackupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining 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
}
// DescribeDBInstanceAutomatedBackupsPaginator is a paginator for
// DescribeDBInstanceAutomatedBackups
type DescribeDBInstanceAutomatedBackupsPaginator struct {
options DescribeDBInstanceAutomatedBackupsPaginatorOptions
client DescribeDBInstanceAutomatedBackupsAPIClient
params *DescribeDBInstanceAutomatedBackupsInput
nextToken *string
firstPage bool
}
// NewDescribeDBInstanceAutomatedBackupsPaginator returns a new
// DescribeDBInstanceAutomatedBackupsPaginator
func NewDescribeDBInstanceAutomatedBackupsPaginator(client DescribeDBInstanceAutomatedBackupsAPIClient, params *DescribeDBInstanceAutomatedBackupsInput, optFns ...func(*DescribeDBInstanceAutomatedBackupsPaginatorOptions)) *DescribeDBInstanceAutomatedBackupsPaginator {
if params == nil {
params = &DescribeDBInstanceAutomatedBackupsInput{}
}
options := DescribeDBInstanceAutomatedBackupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBInstanceAutomatedBackupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBInstanceAutomatedBackupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBInstanceAutomatedBackups page.
func (p *DescribeDBInstanceAutomatedBackupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstanceAutomatedBackupsOutput, 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.DescribeDBInstanceAutomatedBackups(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_opDescribeDBInstanceAutomatedBackups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBInstanceAutomatedBackups",
}
}
| 272 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
import (
"context"
"errors"
"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/rds/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"strconv"
"time"
)
// Describes provisioned RDS instances. This API supports pagination. This
// operation can also return information for Amazon Neptune DB instances and Amazon
// DocumentDB instances.
func (c *Client) DescribeDBInstances(ctx context.Context, params *DescribeDBInstancesInput, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) {
if params == nil {
params = &DescribeDBInstancesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBInstances", params, optFns, c.addOperationDescribeDBInstancesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBInstancesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBInstancesInput struct {
// The user-supplied instance identifier or the Amazon Resource Name (ARN) of the
// DB instance. If this parameter is specified, information from only the specific
// DB instance is returned. This parameter isn't case-sensitive. Constraints:
// - If supplied, must match the identifier of an existing DB instance.
DBInstanceIdentifier *string
// A filter that specifies one or more DB instances to describe. Supported
// Filters:
// - db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon
// Resource Names (ARNs). The results list only includes information about the DB
// instances associated with the DB clusters identified by these ARNs.
// - db-instance-id - Accepts DB instance identifiers and DB instance Amazon
// Resource Names (ARNs). The results list only includes information about the DB
// instances identified by these ARNs.
// - dbi-resource-id - Accepts DB instance resource identifiers. The results list
// only includes information about the DB instances identified by these DB instance
// resource identifiers.
// - domain - Accepts Active Directory directory IDs. The results list only
// includes information about the DB instances associated with these domains.
// - engine - Accepts engine names. The results list only includes information
// about the DB instances for these engines.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeDBInstances
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBInstances
// action.
type DescribeDBInstancesOutput struct {
// A list of DBInstance instances.
DBInstances []types.DBInstance
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBInstances{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBInstances{}, 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 = addOpDescribeDBInstancesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBInstances(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
}
// DescribeDBInstancesAPIClient is a client that implements the
// DescribeDBInstances operation.
type DescribeDBInstancesAPIClient interface {
DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error)
}
var _ DescribeDBInstancesAPIClient = (*Client)(nil)
// DescribeDBInstancesPaginatorOptions is the paginator options for
// DescribeDBInstances
type DescribeDBInstancesPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances
type DescribeDBInstancesPaginator struct {
options DescribeDBInstancesPaginatorOptions
client DescribeDBInstancesAPIClient
params *DescribeDBInstancesInput
nextToken *string
firstPage bool
}
// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator
func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator {
if params == nil {
params = &DescribeDBInstancesInput{}
}
options := DescribeDBInstancesPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBInstancesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBInstancesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBInstances page.
func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, 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.DescribeDBInstances(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
}
// DBInstanceAvailableWaiterOptions are waiter options for
// DBInstanceAvailableWaiter
type DBInstanceAvailableWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBInstanceAvailableWaiter will use default minimum delay of 30 seconds. Note
// that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBInstanceAvailableWaiter will use default max delay of 120
// seconds. Note that MaxDelay must resolve to value greater than or equal to the
// MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBInstancesInput, *DescribeDBInstancesOutput, error) (bool, error)
}
// DBInstanceAvailableWaiter defines the waiters for DBInstanceAvailable
type DBInstanceAvailableWaiter struct {
client DescribeDBInstancesAPIClient
options DBInstanceAvailableWaiterOptions
}
// NewDBInstanceAvailableWaiter constructs a DBInstanceAvailableWaiter.
func NewDBInstanceAvailableWaiter(client DescribeDBInstancesAPIClient, optFns ...func(*DBInstanceAvailableWaiterOptions)) *DBInstanceAvailableWaiter {
options := DBInstanceAvailableWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBInstanceAvailableStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBInstanceAvailableWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBInstanceAvailable waiter. The maxWaitDur
// is the maximum wait duration the waiter will wait. The maxWaitDur is required
// and must be greater than zero.
func (w *DBInstanceAvailableWaiter) Wait(ctx context.Context, params *DescribeDBInstancesInput, maxWaitDur time.Duration, optFns ...func(*DBInstanceAvailableWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBInstanceAvailable waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBInstanceAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeDBInstancesInput, maxWaitDur time.Duration, optFns ...func(*DBInstanceAvailableWaiterOptions)) (*DescribeDBInstancesOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBInstanceAvailable waiter")
}
func dBInstanceAvailableStateRetryable(ctx context.Context, input *DescribeDBInstancesInput, output *DescribeDBInstancesOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "available"
var match = true
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
if len(listOfValues) == 0 {
match = false
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) != expectedValue {
match = false
}
}
if match {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleted"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "failed"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-restore"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-parameters"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
// DBInstanceDeletedWaiterOptions are waiter options for DBInstanceDeletedWaiter
type DBInstanceDeletedWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBInstanceDeletedWaiter will use default minimum delay of 30 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBInstanceDeletedWaiter will use default max delay of 120 seconds.
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBInstancesInput, *DescribeDBInstancesOutput, error) (bool, error)
}
// DBInstanceDeletedWaiter defines the waiters for DBInstanceDeleted
type DBInstanceDeletedWaiter struct {
client DescribeDBInstancesAPIClient
options DBInstanceDeletedWaiterOptions
}
// NewDBInstanceDeletedWaiter constructs a DBInstanceDeletedWaiter.
func NewDBInstanceDeletedWaiter(client DescribeDBInstancesAPIClient, optFns ...func(*DBInstanceDeletedWaiterOptions)) *DBInstanceDeletedWaiter {
options := DBInstanceDeletedWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBInstanceDeletedStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBInstanceDeletedWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBInstanceDeleted waiter. The maxWaitDur is
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *DBInstanceDeletedWaiter) Wait(ctx context.Context, params *DescribeDBInstancesInput, maxWaitDur time.Duration, optFns ...func(*DBInstanceDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBInstanceDeleted waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBInstanceDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeDBInstancesInput, maxWaitDur time.Duration, optFns ...func(*DBInstanceDeletedWaiterOptions)) (*DescribeDBInstancesOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBInstanceDeleted waiter")
}
func dBInstanceDeletedStateRetryable(ctx context.Context, input *DescribeDBInstancesInput, output *DescribeDBInstancesOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("length(DBInstances) == `0`", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "true"
bv, err := strconv.ParseBool(expectedValue)
if err != nil {
return false, fmt.Errorf("error parsing boolean from string %w", err)
}
value, ok := pathValue.(bool)
if !ok {
return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
}
if value == bv {
return false, nil
}
}
if err != nil {
var apiErr smithy.APIError
ok := errors.As(err, &apiErr)
if !ok {
return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
}
if "DBInstanceNotFound" == apiErr.ErrorCode() {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "creating"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "modifying"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "rebooting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBInstances[].DBInstanceStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "resetting-master-credentials"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
func newServiceMetadataMiddleware_opDescribeDBInstances(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBInstances",
}
}
| 834 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DB log files for the DB instance. This command doesn't apply
// to RDS Custom.
func (c *Client) DescribeDBLogFiles(ctx context.Context, params *DescribeDBLogFilesInput, optFns ...func(*Options)) (*DescribeDBLogFilesOutput, error) {
if params == nil {
params = &DescribeDBLogFilesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBLogFiles", params, optFns, c.addOperationDescribeDBLogFilesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBLogFilesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBLogFilesInput struct {
// The customer-assigned name of the DB instance that contains the log files you
// want to list. Constraints:
// - Must match the identifier of an existing DBInstance.
//
// This member is required.
DBInstanceIdentifier *string
// Filters the available log files for files written since the specified date, in
// POSIX timestamp format with milliseconds.
FileLastWritten int64
// Filters the available log files for files larger than the specified size.
FileSize int64
// Filters the available log files for log file names that contain the specified
// string.
FilenameContains *string
// This parameter isn't currently supported.
Filters []types.Filter
// The pagination token provided in the previous request. If this parameter is
// specified the response includes only records beyond the marker, up to
// MaxRecords.
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results.
MaxRecords *int32
noSmithyDocumentSerde
}
// The response from a call to DescribeDBLogFiles .
type DescribeDBLogFilesOutput struct {
// The DB log files returned.
DescribeDBLogFiles []types.DescribeDBLogFilesDetails
// A pagination token that can be used in a later DescribeDBLogFiles request.
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBLogFilesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBLogFiles{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBLogFiles{}, 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 = addOpDescribeDBLogFilesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBLogFiles(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
}
// DescribeDBLogFilesAPIClient is a client that implements the DescribeDBLogFiles
// operation.
type DescribeDBLogFilesAPIClient interface {
DescribeDBLogFiles(context.Context, *DescribeDBLogFilesInput, ...func(*Options)) (*DescribeDBLogFilesOutput, error)
}
var _ DescribeDBLogFilesAPIClient = (*Client)(nil)
// DescribeDBLogFilesPaginatorOptions is the paginator options for
// DescribeDBLogFiles
type DescribeDBLogFilesPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining 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
}
// DescribeDBLogFilesPaginator is a paginator for DescribeDBLogFiles
type DescribeDBLogFilesPaginator struct {
options DescribeDBLogFilesPaginatorOptions
client DescribeDBLogFilesAPIClient
params *DescribeDBLogFilesInput
nextToken *string
firstPage bool
}
// NewDescribeDBLogFilesPaginator returns a new DescribeDBLogFilesPaginator
func NewDescribeDBLogFilesPaginator(client DescribeDBLogFilesAPIClient, params *DescribeDBLogFilesInput, optFns ...func(*DescribeDBLogFilesPaginatorOptions)) *DescribeDBLogFilesPaginator {
if params == nil {
params = &DescribeDBLogFilesInput{}
}
options := DescribeDBLogFilesPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBLogFilesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBLogFilesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBLogFiles page.
func (p *DescribeDBLogFilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBLogFilesOutput, 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.DescribeDBLogFiles(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_opDescribeDBLogFiles(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBLogFiles",
}
}
| 250 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is
// specified, the list will contain only the description of the specified DB
// parameter group.
func (c *Client) DescribeDBParameterGroups(ctx context.Context, params *DescribeDBParameterGroupsInput, optFns ...func(*Options)) (*DescribeDBParameterGroupsOutput, error) {
if params == nil {
params = &DescribeDBParameterGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBParameterGroups", params, optFns, c.addOperationDescribeDBParameterGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBParameterGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBParameterGroupsInput struct {
// The name of a specific DB parameter group to return details for. Constraints:
// - If supplied, must match the name of an existing DBClusterParameterGroup.
DBParameterGroupName *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeDBParameterGroups
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBParameterGroups
// action.
type DescribeDBParameterGroupsOutput struct {
// A list of DBParameterGroup instances.
DBParameterGroups []types.DBParameterGroup
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBParameterGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBParameterGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBParameterGroups{}, 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 = addOpDescribeDBParameterGroupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBParameterGroups(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
}
// DescribeDBParameterGroupsAPIClient is a client that implements the
// DescribeDBParameterGroups operation.
type DescribeDBParameterGroupsAPIClient interface {
DescribeDBParameterGroups(context.Context, *DescribeDBParameterGroupsInput, ...func(*Options)) (*DescribeDBParameterGroupsOutput, error)
}
var _ DescribeDBParameterGroupsAPIClient = (*Client)(nil)
// DescribeDBParameterGroupsPaginatorOptions is the paginator options for
// DescribeDBParameterGroups
type DescribeDBParameterGroupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBParameterGroupsPaginator is a paginator for DescribeDBParameterGroups
type DescribeDBParameterGroupsPaginator struct {
options DescribeDBParameterGroupsPaginatorOptions
client DescribeDBParameterGroupsAPIClient
params *DescribeDBParameterGroupsInput
nextToken *string
firstPage bool
}
// NewDescribeDBParameterGroupsPaginator returns a new
// DescribeDBParameterGroupsPaginator
func NewDescribeDBParameterGroupsPaginator(client DescribeDBParameterGroupsAPIClient, params *DescribeDBParameterGroupsInput, optFns ...func(*DescribeDBParameterGroupsPaginatorOptions)) *DescribeDBParameterGroupsPaginator {
if params == nil {
params = &DescribeDBParameterGroupsInput{}
}
options := DescribeDBParameterGroupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBParameterGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBParameterGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBParameterGroups page.
func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBParameterGroupsOutput, 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.DescribeDBParameterGroups(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_opDescribeDBParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBParameterGroups",
}
}
| 243 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the detailed parameter list for a particular DB parameter group.
func (c *Client) DescribeDBParameters(ctx context.Context, params *DescribeDBParametersInput, optFns ...func(*Options)) (*DescribeDBParametersOutput, error) {
if params == nil {
params = &DescribeDBParametersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBParameters", params, optFns, c.addOperationDescribeDBParametersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBParametersOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBParametersInput struct {
// The name of a specific DB parameter group to return details for. Constraints:
// - If supplied, must match the name of an existing DBParameterGroup.
//
// This member is required.
DBParameterGroupName *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeDBParameters
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The parameter types to return. Default: All parameter types returned Valid
// Values: user | system | engine-default
Source *string
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBParameters
// action.
type DescribeDBParametersOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// A list of Parameter values.
Parameters []types.Parameter
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBParameters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBParameters{}, 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 = addOpDescribeDBParametersValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBParameters(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
}
// DescribeDBParametersAPIClient is a client that implements the
// DescribeDBParameters operation.
type DescribeDBParametersAPIClient interface {
DescribeDBParameters(context.Context, *DescribeDBParametersInput, ...func(*Options)) (*DescribeDBParametersOutput, error)
}
var _ DescribeDBParametersAPIClient = (*Client)(nil)
// DescribeDBParametersPaginatorOptions is the paginator options for
// DescribeDBParameters
type DescribeDBParametersPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBParametersPaginator is a paginator for DescribeDBParameters
type DescribeDBParametersPaginator struct {
options DescribeDBParametersPaginatorOptions
client DescribeDBParametersAPIClient
params *DescribeDBParametersInput
nextToken *string
firstPage bool
}
// NewDescribeDBParametersPaginator returns a new DescribeDBParametersPaginator
func NewDescribeDBParametersPaginator(client DescribeDBParametersAPIClient, params *DescribeDBParametersInput, optFns ...func(*DescribeDBParametersPaginatorOptions)) *DescribeDBParametersPaginator {
if params == nil {
params = &DescribeDBParametersInput{}
}
options := DescribeDBParametersPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBParametersPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBParametersPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBParameters page.
func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBParametersOutput, 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.DescribeDBParameters(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_opDescribeDBParameters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBParameters",
}
}
| 246 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about DB proxies.
func (c *Client) DescribeDBProxies(ctx context.Context, params *DescribeDBProxiesInput, optFns ...func(*Options)) (*DescribeDBProxiesOutput, error) {
if params == nil {
params = &DescribeDBProxiesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBProxies", params, optFns, c.addOperationDescribeDBProxiesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBProxiesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBProxiesInput struct {
// The name of the DB proxy. If you omit this parameter, the output includes
// information about all DB proxies owned by your Amazon Web Services account ID.
DBProxyName *string
// This parameter is not currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeDBProxiesOutput struct {
// A return value representing an arbitrary number of DBProxy data structures.
DBProxies []types.DBProxy
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBProxiesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBProxies{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBProxies{}, 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 = addOpDescribeDBProxiesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBProxies(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
}
// DescribeDBProxiesAPIClient is a client that implements the DescribeDBProxies
// operation.
type DescribeDBProxiesAPIClient interface {
DescribeDBProxies(context.Context, *DescribeDBProxiesInput, ...func(*Options)) (*DescribeDBProxiesOutput, error)
}
var _ DescribeDBProxiesAPIClient = (*Client)(nil)
// DescribeDBProxiesPaginatorOptions is the paginator options for DescribeDBProxies
type DescribeDBProxiesPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// 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
}
// DescribeDBProxiesPaginator is a paginator for DescribeDBProxies
type DescribeDBProxiesPaginator struct {
options DescribeDBProxiesPaginatorOptions
client DescribeDBProxiesAPIClient
params *DescribeDBProxiesInput
nextToken *string
firstPage bool
}
// NewDescribeDBProxiesPaginator returns a new DescribeDBProxiesPaginator
func NewDescribeDBProxiesPaginator(client DescribeDBProxiesAPIClient, params *DescribeDBProxiesInput, optFns ...func(*DescribeDBProxiesPaginatorOptions)) *DescribeDBProxiesPaginator {
if params == nil {
params = &DescribeDBProxiesInput{}
}
options := DescribeDBProxiesPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBProxiesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBProxiesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBProxies page.
func (p *DescribeDBProxiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBProxiesOutput, 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.DescribeDBProxies(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_opDescribeDBProxies(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBProxies",
}
}
| 237 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about DB proxy endpoints.
func (c *Client) DescribeDBProxyEndpoints(ctx context.Context, params *DescribeDBProxyEndpointsInput, optFns ...func(*Options)) (*DescribeDBProxyEndpointsOutput, error) {
if params == nil {
params = &DescribeDBProxyEndpointsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBProxyEndpoints", params, optFns, c.addOperationDescribeDBProxyEndpointsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBProxyEndpointsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBProxyEndpointsInput struct {
// The name of a DB proxy endpoint to describe. If you omit this parameter, the
// output includes information about all DB proxy endpoints associated with the
// specified proxy.
DBProxyEndpointName *string
// The name of the DB proxy whose endpoints you want to describe. If you omit this
// parameter, the output includes information about all DB proxy endpoints
// associated with all your DB proxies.
DBProxyName *string
// This parameter is not currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeDBProxyEndpointsOutput struct {
// The list of ProxyEndpoint objects returned by the API operation.
DBProxyEndpoints []types.DBProxyEndpoint
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBProxyEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBProxyEndpoints{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBProxyEndpoints{}, 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 = addOpDescribeDBProxyEndpointsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBProxyEndpoints(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
}
// DescribeDBProxyEndpointsAPIClient is a client that implements the
// DescribeDBProxyEndpoints operation.
type DescribeDBProxyEndpointsAPIClient interface {
DescribeDBProxyEndpoints(context.Context, *DescribeDBProxyEndpointsInput, ...func(*Options)) (*DescribeDBProxyEndpointsOutput, error)
}
var _ DescribeDBProxyEndpointsAPIClient = (*Client)(nil)
// DescribeDBProxyEndpointsPaginatorOptions is the paginator options for
// DescribeDBProxyEndpoints
type DescribeDBProxyEndpointsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// 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
}
// DescribeDBProxyEndpointsPaginator is a paginator for DescribeDBProxyEndpoints
type DescribeDBProxyEndpointsPaginator struct {
options DescribeDBProxyEndpointsPaginatorOptions
client DescribeDBProxyEndpointsAPIClient
params *DescribeDBProxyEndpointsInput
nextToken *string
firstPage bool
}
// NewDescribeDBProxyEndpointsPaginator returns a new
// DescribeDBProxyEndpointsPaginator
func NewDescribeDBProxyEndpointsPaginator(client DescribeDBProxyEndpointsAPIClient, params *DescribeDBProxyEndpointsInput, optFns ...func(*DescribeDBProxyEndpointsPaginatorOptions)) *DescribeDBProxyEndpointsPaginator {
if params == nil {
params = &DescribeDBProxyEndpointsInput{}
}
options := DescribeDBProxyEndpointsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBProxyEndpointsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBProxyEndpointsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBProxyEndpoints page.
func (p *DescribeDBProxyEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBProxyEndpointsOutput, 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.DescribeDBProxyEndpoints(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_opDescribeDBProxyEndpoints(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBProxyEndpoints",
}
}
| 245 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about DB proxy target groups, represented by
// DBProxyTargetGroup data structures.
func (c *Client) DescribeDBProxyTargetGroups(ctx context.Context, params *DescribeDBProxyTargetGroupsInput, optFns ...func(*Options)) (*DescribeDBProxyTargetGroupsOutput, error) {
if params == nil {
params = &DescribeDBProxyTargetGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBProxyTargetGroups", params, optFns, c.addOperationDescribeDBProxyTargetGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBProxyTargetGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBProxyTargetGroupsInput struct {
// The identifier of the DBProxy associated with the target group.
//
// This member is required.
DBProxyName *string
// This parameter is not currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The identifier of the DBProxyTargetGroup to describe.
TargetGroupName *string
noSmithyDocumentSerde
}
type DescribeDBProxyTargetGroupsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// An arbitrary number of DBProxyTargetGroup objects, containing details of the
// corresponding target groups.
TargetGroups []types.DBProxyTargetGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBProxyTargetGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBProxyTargetGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBProxyTargetGroups{}, 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 = addOpDescribeDBProxyTargetGroupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBProxyTargetGroups(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
}
// DescribeDBProxyTargetGroupsAPIClient is a client that implements the
// DescribeDBProxyTargetGroups operation.
type DescribeDBProxyTargetGroupsAPIClient interface {
DescribeDBProxyTargetGroups(context.Context, *DescribeDBProxyTargetGroupsInput, ...func(*Options)) (*DescribeDBProxyTargetGroupsOutput, error)
}
var _ DescribeDBProxyTargetGroupsAPIClient = (*Client)(nil)
// DescribeDBProxyTargetGroupsPaginatorOptions is the paginator options for
// DescribeDBProxyTargetGroups
type DescribeDBProxyTargetGroupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// 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
}
// DescribeDBProxyTargetGroupsPaginator is a paginator for
// DescribeDBProxyTargetGroups
type DescribeDBProxyTargetGroupsPaginator struct {
options DescribeDBProxyTargetGroupsPaginatorOptions
client DescribeDBProxyTargetGroupsAPIClient
params *DescribeDBProxyTargetGroupsInput
nextToken *string
firstPage bool
}
// NewDescribeDBProxyTargetGroupsPaginator returns a new
// DescribeDBProxyTargetGroupsPaginator
func NewDescribeDBProxyTargetGroupsPaginator(client DescribeDBProxyTargetGroupsAPIClient, params *DescribeDBProxyTargetGroupsInput, optFns ...func(*DescribeDBProxyTargetGroupsPaginatorOptions)) *DescribeDBProxyTargetGroupsPaginator {
if params == nil {
params = &DescribeDBProxyTargetGroupsInput{}
}
options := DescribeDBProxyTargetGroupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBProxyTargetGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBProxyTargetGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBProxyTargetGroups page.
func (p *DescribeDBProxyTargetGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBProxyTargetGroupsOutput, 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.DescribeDBProxyTargetGroups(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_opDescribeDBProxyTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBProxyTargetGroups",
}
}
| 246 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about DBProxyTarget objects. This API supports pagination.
func (c *Client) DescribeDBProxyTargets(ctx context.Context, params *DescribeDBProxyTargetsInput, optFns ...func(*Options)) (*DescribeDBProxyTargetsOutput, error) {
if params == nil {
params = &DescribeDBProxyTargetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBProxyTargets", params, optFns, c.addOperationDescribeDBProxyTargetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBProxyTargetsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBProxyTargetsInput struct {
// The identifier of the DBProxyTarget to describe.
//
// This member is required.
DBProxyName *string
// This parameter is not currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The identifier of the DBProxyTargetGroup to describe.
TargetGroupName *string
noSmithyDocumentSerde
}
type DescribeDBProxyTargetsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// An arbitrary number of DBProxyTarget objects, containing details of the
// corresponding targets.
Targets []types.DBProxyTarget
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBProxyTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBProxyTargets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBProxyTargets{}, 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 = addOpDescribeDBProxyTargetsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBProxyTargets(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
}
// DescribeDBProxyTargetsAPIClient is a client that implements the
// DescribeDBProxyTargets operation.
type DescribeDBProxyTargetsAPIClient interface {
DescribeDBProxyTargets(context.Context, *DescribeDBProxyTargetsInput, ...func(*Options)) (*DescribeDBProxyTargetsOutput, error)
}
var _ DescribeDBProxyTargetsAPIClient = (*Client)(nil)
// DescribeDBProxyTargetsPaginatorOptions is the paginator options for
// DescribeDBProxyTargets
type DescribeDBProxyTargetsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// 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
}
// DescribeDBProxyTargetsPaginator is a paginator for DescribeDBProxyTargets
type DescribeDBProxyTargetsPaginator struct {
options DescribeDBProxyTargetsPaginatorOptions
client DescribeDBProxyTargetsAPIClient
params *DescribeDBProxyTargetsInput
nextToken *string
firstPage bool
}
// NewDescribeDBProxyTargetsPaginator returns a new DescribeDBProxyTargetsPaginator
func NewDescribeDBProxyTargetsPaginator(client DescribeDBProxyTargetsAPIClient, params *DescribeDBProxyTargetsInput, optFns ...func(*DescribeDBProxyTargetsPaginatorOptions)) *DescribeDBProxyTargetsPaginator {
if params == nil {
params = &DescribeDBProxyTargetsInput{}
}
options := DescribeDBProxyTargetsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBProxyTargetsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBProxyTargetsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBProxyTargets page.
func (p *DescribeDBProxyTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBProxyTargetsOutput, 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.DescribeDBProxyTargets(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_opDescribeDBProxyTargets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBProxyTargets",
}
}
| 243 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DBSecurityGroup descriptions. If a DBSecurityGroupName is
// specified, the list will contain only the descriptions of the specified DB
// security group. EC2-Classic was retired on August 15, 2022. If you haven't
// migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as
// possible. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html)
// in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring –
// Here’s How to Prepare (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/)
// , and Moving a DB instance not in a VPC into a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html)
// in the Amazon RDS User Guide.
func (c *Client) DescribeDBSecurityGroups(ctx context.Context, params *DescribeDBSecurityGroupsInput, optFns ...func(*Options)) (*DescribeDBSecurityGroupsOutput, error) {
if params == nil {
params = &DescribeDBSecurityGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBSecurityGroups", params, optFns, c.addOperationDescribeDBSecurityGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBSecurityGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBSecurityGroupsInput struct {
// The name of the DB security group to return details for.
DBSecurityGroupName *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeDBSecurityGroups
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBSecurityGroups
// action.
type DescribeDBSecurityGroupsOutput struct {
// A list of DBSecurityGroup instances.
DBSecurityGroups []types.DBSecurityGroup
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBSecurityGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBSecurityGroups{}, 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 = addOpDescribeDBSecurityGroupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBSecurityGroups(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
}
// DescribeDBSecurityGroupsAPIClient is a client that implements the
// DescribeDBSecurityGroups operation.
type DescribeDBSecurityGroupsAPIClient interface {
DescribeDBSecurityGroups(context.Context, *DescribeDBSecurityGroupsInput, ...func(*Options)) (*DescribeDBSecurityGroupsOutput, error)
}
var _ DescribeDBSecurityGroupsAPIClient = (*Client)(nil)
// DescribeDBSecurityGroupsPaginatorOptions is the paginator options for
// DescribeDBSecurityGroups
type DescribeDBSecurityGroupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBSecurityGroupsPaginator is a paginator for DescribeDBSecurityGroups
type DescribeDBSecurityGroupsPaginator struct {
options DescribeDBSecurityGroupsPaginatorOptions
client DescribeDBSecurityGroupsAPIClient
params *DescribeDBSecurityGroupsInput
nextToken *string
firstPage bool
}
// NewDescribeDBSecurityGroupsPaginator returns a new
// DescribeDBSecurityGroupsPaginator
func NewDescribeDBSecurityGroupsPaginator(client DescribeDBSecurityGroupsAPIClient, params *DescribeDBSecurityGroupsInput, optFns ...func(*DescribeDBSecurityGroupsPaginatorOptions)) *DescribeDBSecurityGroupsPaginator {
if params == nil {
params = &DescribeDBSecurityGroupsInput{}
}
options := DescribeDBSecurityGroupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBSecurityGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBSecurityGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBSecurityGroups page.
func (p *DescribeDBSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBSecurityGroupsOutput, 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.DescribeDBSecurityGroups(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_opDescribeDBSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBSecurityGroups",
}
}
| 248 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DB snapshot attribute names and values for a manual DB
// snapshot. When sharing snapshots with other Amazon Web Services accounts,
// DescribeDBSnapshotAttributes returns the restore attribute and a list of IDs
// for the Amazon Web Services accounts that are authorized to copy or restore the
// manual DB snapshot. If all is included in the list of values for the restore
// attribute, then the manual DB snapshot is public and can be copied or restored
// by all Amazon Web Services accounts. To add or remove access for an Amazon Web
// Services account to copy or restore a manual DB snapshot, or to make the manual
// DB snapshot public or private, use the ModifyDBSnapshotAttribute API action.
func (c *Client) DescribeDBSnapshotAttributes(ctx context.Context, params *DescribeDBSnapshotAttributesInput, optFns ...func(*Options)) (*DescribeDBSnapshotAttributesOutput, error) {
if params == nil {
params = &DescribeDBSnapshotAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBSnapshotAttributes", params, optFns, c.addOperationDescribeDBSnapshotAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBSnapshotAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBSnapshotAttributesInput struct {
// The identifier for the DB snapshot to describe the attributes for.
//
// This member is required.
DBSnapshotIdentifier *string
noSmithyDocumentSerde
}
type DescribeDBSnapshotAttributesOutput struct {
// Contains the results of a successful call to the DescribeDBSnapshotAttributes
// API action. Manual DB snapshot attributes are used to authorize other Amazon Web
// Services accounts to copy or restore a manual DB snapshot. For more information,
// see the ModifyDBSnapshotAttribute API action.
DBSnapshotAttributesResult *types.DBSnapshotAttributesResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBSnapshotAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBSnapshotAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBSnapshotAttributes{}, 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 = addOpDescribeDBSnapshotAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBSnapshotAttributes(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_opDescribeDBSnapshotAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBSnapshotAttributes",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
import (
"context"
"errors"
"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/rds/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"strconv"
"time"
)
// Returns information about DB snapshots. This API action supports pagination.
func (c *Client) DescribeDBSnapshots(ctx context.Context, params *DescribeDBSnapshotsInput, optFns ...func(*Options)) (*DescribeDBSnapshotsOutput, error) {
if params == nil {
params = &DescribeDBSnapshotsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBSnapshots", params, optFns, c.addOperationDescribeDBSnapshotsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBSnapshotsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBSnapshotsInput struct {
// The ID of the DB instance to retrieve the list of DB snapshots for. This
// parameter isn't case-sensitive. Constraints:
// - If supplied, must match the identifier of an existing DBInstance.
DBInstanceIdentifier *string
// A specific DB snapshot identifier to describe. This value is stored as a
// lowercase string. Constraints:
// - If supplied, must match the identifier of an existing DBSnapshot.
// - If this identifier is for an automated snapshot, the SnapshotType parameter
// must also be specified.
DBSnapshotIdentifier *string
// A specific DB resource ID to describe.
DbiResourceId *string
// A filter that specifies one or more DB snapshots to describe. Supported
// filters:
// - db-instance-id - Accepts DB instance identifiers and DB instance Amazon
// Resource Names (ARNs).
// - db-snapshot-id - Accepts DB snapshot identifiers.
// - dbi-resource-id - Accepts identifiers of source DB instances.
// - snapshot-type - Accepts types of DB snapshots.
// - engine - Accepts names of database engines.
Filters []types.Filter
// A value that indicates whether to include manual DB cluster snapshots that are
// public and can be copied or restored by any Amazon Web Services account. By
// default, the public snapshots are not included. You can share a manual DB
// snapshot as public by using the ModifyDBSnapshotAttribute API. This setting
// doesn't apply to RDS Custom.
IncludePublic bool
// A value that indicates whether to include shared manual DB cluster snapshots
// from other Amazon Web Services accounts that this Amazon Web Services account
// has been given permission to copy or restore. By default, these snapshots are
// not included. You can give an Amazon Web Services account permission to restore
// a manual DB snapshot from another Amazon Web Services account by using the
// ModifyDBSnapshotAttribute API action. This setting doesn't apply to RDS Custom.
IncludeShared bool
// An optional pagination token provided by a previous DescribeDBSnapshots
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The type of snapshots to be returned. You can specify one of the following
// values:
// - automated - Return all DB snapshots that have been automatically taken by
// Amazon RDS for my Amazon Web Services account.
// - manual - Return all DB snapshots that have been taken by my Amazon Web
// Services account.
// - shared - Return all manual DB snapshots that have been shared to my Amazon
// Web Services account.
// - public - Return all DB snapshots that have been marked as public.
// - awsbackup - Return the DB snapshots managed by the Amazon Web Services
// Backup service. For information about Amazon Web Services Backup, see the
// Amazon Web Services Backup Developer Guide. (https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html)
// The awsbackup type does not apply to Aurora.
// If you don't specify a SnapshotType value, then both automated and manual
// snapshots are returned. Shared and public DB snapshots are not included in the
// returned results by default. You can include shared snapshots with these results
// by enabling the IncludeShared parameter. You can include public snapshots with
// these results by enabling the IncludePublic parameter. The IncludeShared and
// IncludePublic parameters don't apply for SnapshotType values of manual or
// automated . The IncludePublic parameter doesn't apply when SnapshotType is set
// to shared . The IncludeShared parameter doesn't apply when SnapshotType is set
// to public .
SnapshotType *string
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBSnapshots
// action.
type DescribeDBSnapshotsOutput struct {
// A list of DBSnapshot instances.
DBSnapshots []types.DBSnapshot
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBSnapshots{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBSnapshots{}, 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 = addOpDescribeDBSnapshotsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBSnapshots(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
}
// DescribeDBSnapshotsAPIClient is a client that implements the
// DescribeDBSnapshots operation.
type DescribeDBSnapshotsAPIClient interface {
DescribeDBSnapshots(context.Context, *DescribeDBSnapshotsInput, ...func(*Options)) (*DescribeDBSnapshotsOutput, error)
}
var _ DescribeDBSnapshotsAPIClient = (*Client)(nil)
// DescribeDBSnapshotsPaginatorOptions is the paginator options for
// DescribeDBSnapshots
type DescribeDBSnapshotsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBSnapshotsPaginator is a paginator for DescribeDBSnapshots
type DescribeDBSnapshotsPaginator struct {
options DescribeDBSnapshotsPaginatorOptions
client DescribeDBSnapshotsAPIClient
params *DescribeDBSnapshotsInput
nextToken *string
firstPage bool
}
// NewDescribeDBSnapshotsPaginator returns a new DescribeDBSnapshotsPaginator
func NewDescribeDBSnapshotsPaginator(client DescribeDBSnapshotsAPIClient, params *DescribeDBSnapshotsInput, optFns ...func(*DescribeDBSnapshotsPaginatorOptions)) *DescribeDBSnapshotsPaginator {
if params == nil {
params = &DescribeDBSnapshotsInput{}
}
options := DescribeDBSnapshotsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBSnapshotsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBSnapshotsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBSnapshots page.
func (p *DescribeDBSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBSnapshotsOutput, 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.DescribeDBSnapshots(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
}
// DBSnapshotAvailableWaiterOptions are waiter options for
// DBSnapshotAvailableWaiter
type DBSnapshotAvailableWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBSnapshotAvailableWaiter will use default minimum delay of 30 seconds. Note
// that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBSnapshotAvailableWaiter will use default max delay of 120
// seconds. Note that MaxDelay must resolve to value greater than or equal to the
// MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBSnapshotsInput, *DescribeDBSnapshotsOutput, error) (bool, error)
}
// DBSnapshotAvailableWaiter defines the waiters for DBSnapshotAvailable
type DBSnapshotAvailableWaiter struct {
client DescribeDBSnapshotsAPIClient
options DBSnapshotAvailableWaiterOptions
}
// NewDBSnapshotAvailableWaiter constructs a DBSnapshotAvailableWaiter.
func NewDBSnapshotAvailableWaiter(client DescribeDBSnapshotsAPIClient, optFns ...func(*DBSnapshotAvailableWaiterOptions)) *DBSnapshotAvailableWaiter {
options := DBSnapshotAvailableWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBSnapshotAvailableStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBSnapshotAvailableWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBSnapshotAvailable waiter. The maxWaitDur
// is the maximum wait duration the waiter will wait. The maxWaitDur is required
// and must be greater than zero.
func (w *DBSnapshotAvailableWaiter) Wait(ctx context.Context, params *DescribeDBSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBSnapshotAvailableWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBSnapshotAvailable waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBSnapshotAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeDBSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBSnapshotAvailableWaiterOptions)) (*DescribeDBSnapshotsOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBSnapshots(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBSnapshotAvailable waiter")
}
func dBSnapshotAvailableStateRetryable(ctx context.Context, input *DescribeDBSnapshotsInput, output *DescribeDBSnapshotsOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "available"
var match = true
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
if len(listOfValues) == 0 {
match = false
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) != expectedValue {
match = false
}
}
if match {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleted"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "deleting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "failed"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-restore"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "incompatible-parameters"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
// DBSnapshotDeletedWaiterOptions are waiter options for DBSnapshotDeletedWaiter
type DBSnapshotDeletedWaiterOptions 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
// MinDelay is the minimum amount of time to delay between retries. If unset,
// DBSnapshotDeletedWaiter will use default minimum delay of 30 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, DBSnapshotDeletedWaiter will use default max delay of 120 seconds.
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *DescribeDBSnapshotsInput, *DescribeDBSnapshotsOutput, error) (bool, error)
}
// DBSnapshotDeletedWaiter defines the waiters for DBSnapshotDeleted
type DBSnapshotDeletedWaiter struct {
client DescribeDBSnapshotsAPIClient
options DBSnapshotDeletedWaiterOptions
}
// NewDBSnapshotDeletedWaiter constructs a DBSnapshotDeletedWaiter.
func NewDBSnapshotDeletedWaiter(client DescribeDBSnapshotsAPIClient, optFns ...func(*DBSnapshotDeletedWaiterOptions)) *DBSnapshotDeletedWaiter {
options := DBSnapshotDeletedWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = dBSnapshotDeletedStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &DBSnapshotDeletedWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for DBSnapshotDeleted waiter. The maxWaitDur is
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *DBSnapshotDeletedWaiter) Wait(ctx context.Context, params *DescribeDBSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBSnapshotDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for DBSnapshotDeleted waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *DBSnapshotDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeDBSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*DBSnapshotDeletedWaiterOptions)) (*DescribeDBSnapshotsOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.DescribeDBSnapshots(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for DBSnapshotDeleted waiter")
}
func dBSnapshotDeletedStateRetryable(ctx context.Context, input *DescribeDBSnapshotsInput, output *DescribeDBSnapshotsOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("length(DBSnapshots) == `0`", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "true"
bv, err := strconv.ParseBool(expectedValue)
if err != nil {
return false, fmt.Errorf("error parsing boolean from string %w", err)
}
value, ok := pathValue.(bool)
if !ok {
return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
}
if value == bv {
return false, nil
}
}
if err != nil {
var apiErr smithy.APIError
ok := errors.As(err, &apiErr)
if !ok {
return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
}
if "DBSnapshotNotFound" == apiErr.ErrorCode() {
return false, nil
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "creating"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "modifying"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "rebooting"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
if err == nil {
pathValue, err := jmespath.Search("DBSnapshots[].Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "resetting-master-credentials"
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
for _, v := range listOfValues {
value, ok := v.(*string)
if !ok {
return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
}
if string(*value) == expectedValue {
return false, fmt.Errorf("waiter state transitioned to Failure")
}
}
}
return true, nil
}
func newServiceMetadataMiddleware_opDescribeDBSnapshots(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBSnapshots",
}
}
| 873 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is
// specified, the list will contain only the descriptions of the specified
// DBSubnetGroup. For an overview of CIDR ranges, go to the Wikipedia Tutorial (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// .
func (c *Client) DescribeDBSubnetGroups(ctx context.Context, params *DescribeDBSubnetGroupsInput, optFns ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) {
if params == nil {
params = &DescribeDBSubnetGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDBSubnetGroups", params, optFns, c.addOperationDescribeDBSubnetGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDBSubnetGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDBSubnetGroupsInput struct {
// The name of the DB subnet group to return details for.
DBSubnetGroupName *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeDBSubnetGroups
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeDBSubnetGroups
// action.
type DescribeDBSubnetGroupsOutput struct {
// A list of DBSubnetGroup instances.
DBSubnetGroups []types.DBSubnetGroup
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeDBSubnetGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeDBSubnetGroups{}, 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 = addOpDescribeDBSubnetGroupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDBSubnetGroups(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
}
// DescribeDBSubnetGroupsAPIClient is a client that implements the
// DescribeDBSubnetGroups operation.
type DescribeDBSubnetGroupsAPIClient interface {
DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error)
}
var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil)
// DescribeDBSubnetGroupsPaginatorOptions is the paginator options for
// DescribeDBSubnetGroups
type DescribeDBSubnetGroupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeDBSubnetGroupsPaginator is a paginator for DescribeDBSubnetGroups
type DescribeDBSubnetGroupsPaginator struct {
options DescribeDBSubnetGroupsPaginatorOptions
client DescribeDBSubnetGroupsAPIClient
params *DescribeDBSubnetGroupsInput
nextToken *string
firstPage bool
}
// NewDescribeDBSubnetGroupsPaginator returns a new DescribeDBSubnetGroupsPaginator
func NewDescribeDBSubnetGroupsPaginator(client DescribeDBSubnetGroupsAPIClient, params *DescribeDBSubnetGroupsInput, optFns ...func(*DescribeDBSubnetGroupsPaginatorOptions)) *DescribeDBSubnetGroupsPaginator {
if params == nil {
params = &DescribeDBSubnetGroupsInput{}
}
options := DescribeDBSubnetGroupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeDBSubnetGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeDBSubnetGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeDBSubnetGroups page.
func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBSubnetGroupsOutput, 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.DescribeDBSubnetGroups(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_opDescribeDBSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeDBSubnetGroups",
}
}
| 242 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the default engine and system parameter information for the cluster
// database engine. For more information on Amazon Aurora, see What is Amazon
// Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide.
func (c *Client) DescribeEngineDefaultClusterParameters(ctx context.Context, params *DescribeEngineDefaultClusterParametersInput, optFns ...func(*Options)) (*DescribeEngineDefaultClusterParametersOutput, error) {
if params == nil {
params = &DescribeEngineDefaultClusterParametersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeEngineDefaultClusterParameters", params, optFns, c.addOperationDescribeEngineDefaultClusterParametersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeEngineDefaultClusterParametersOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeEngineDefaultClusterParametersInput struct {
// The name of the DB cluster parameter group family to return engine parameter
// information for.
//
// This member is required.
DBParameterGroupFamily *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous
// DescribeEngineDefaultClusterParameters request. If this parameter is specified,
// the response includes only records beyond the marker, up to the value specified
// by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeEngineDefaultClusterParametersOutput struct {
// Contains the result of a successful invocation of the
// DescribeEngineDefaultParameters action.
EngineDefaults *types.EngineDefaults
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeEngineDefaultClusterParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeEngineDefaultClusterParameters{}, 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 = addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEngineDefaultClusterParameters(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_opDescribeEngineDefaultClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeEngineDefaultClusterParameters",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the default engine and system parameter information for the specified
// database engine.
func (c *Client) DescribeEngineDefaultParameters(ctx context.Context, params *DescribeEngineDefaultParametersInput, optFns ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) {
if params == nil {
params = &DescribeEngineDefaultParametersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeEngineDefaultParameters", params, optFns, c.addOperationDescribeEngineDefaultParametersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeEngineDefaultParametersOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeEngineDefaultParametersInput struct {
// The name of the DB parameter group family. Valid Values:
// - aurora-mysql5.7
// - aurora-mysql8.0
// - aurora-postgresql10
// - aurora-postgresql11
// - aurora-postgresql12
// - aurora-postgresql13
// - aurora-postgresql14
// - custom-oracle-ee-19
// - mariadb10.2
// - mariadb10.3
// - mariadb10.4
// - mariadb10.5
// - mariadb10.6
// - mysql5.7
// - mysql8.0
// - oracle-ee-19
// - oracle-ee-cdb-19
// - oracle-ee-cdb-21
// - oracle-se2-19
// - oracle-se2-cdb-19
// - oracle-se2-cdb-21
// - postgres10
// - postgres11
// - postgres12
// - postgres13
// - postgres14
// - sqlserver-ee-11.0
// - sqlserver-ee-12.0
// - sqlserver-ee-13.0
// - sqlserver-ee-14.0
// - sqlserver-ee-15.0
// - sqlserver-ex-11.0
// - sqlserver-ex-12.0
// - sqlserver-ex-13.0
// - sqlserver-ex-14.0
// - sqlserver-ex-15.0
// - sqlserver-se-11.0
// - sqlserver-se-12.0
// - sqlserver-se-13.0
// - sqlserver-se-14.0
// - sqlserver-se-15.0
// - sqlserver-web-11.0
// - sqlserver-web-12.0
// - sqlserver-web-13.0
// - sqlserver-web-14.0
// - sqlserver-web-15.0
//
// This member is required.
DBParameterGroupFamily *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous
// DescribeEngineDefaultParameters request. If this parameter is specified, the
// response includes only records beyond the marker, up to the value specified by
// MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeEngineDefaultParametersOutput struct {
// Contains the result of a successful invocation of the
// DescribeEngineDefaultParameters action.
EngineDefaults *types.EngineDefaults
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeEngineDefaultParameters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeEngineDefaultParameters{}, 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 = addOpDescribeEngineDefaultParametersValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEngineDefaultParameters(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
}
// DescribeEngineDefaultParametersAPIClient is a client that implements the
// DescribeEngineDefaultParameters operation.
type DescribeEngineDefaultParametersAPIClient interface {
DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error)
}
var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil)
// DescribeEngineDefaultParametersPaginatorOptions is the paginator options for
// DescribeEngineDefaultParameters
type DescribeEngineDefaultParametersPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. 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
}
// DescribeEngineDefaultParametersPaginator is a paginator for
// DescribeEngineDefaultParameters
type DescribeEngineDefaultParametersPaginator struct {
options DescribeEngineDefaultParametersPaginatorOptions
client DescribeEngineDefaultParametersAPIClient
params *DescribeEngineDefaultParametersInput
nextToken *string
firstPage bool
}
// NewDescribeEngineDefaultParametersPaginator returns a new
// DescribeEngineDefaultParametersPaginator
func NewDescribeEngineDefaultParametersPaginator(client DescribeEngineDefaultParametersAPIClient, params *DescribeEngineDefaultParametersInput, optFns ...func(*DescribeEngineDefaultParametersPaginatorOptions)) *DescribeEngineDefaultParametersPaginator {
if params == nil {
params = &DescribeEngineDefaultParametersInput{}
}
options := DescribeEngineDefaultParametersPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeEngineDefaultParametersPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeEngineDefaultParametersPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeEngineDefaultParameters page.
func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEngineDefaultParametersOutput, 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.DescribeEngineDefaultParameters(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = nil
if result.EngineDefaults != nil {
p.nextToken = result.EngineDefaults.Marker
}
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opDescribeEngineDefaultParameters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeEngineDefaultParameters",
}
}
| 288 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Displays a list of categories for all event source types, or, if specified, for
// a specified source type. You can also see this list in the "Amazon RDS event
// categories and event messages" section of the Amazon RDS User Guide (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html)
// or the Amazon Aurora User Guide (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html)
// .
func (c *Client) DescribeEventCategories(ctx context.Context, params *DescribeEventCategoriesInput, optFns ...func(*Options)) (*DescribeEventCategoriesOutput, error) {
if params == nil {
params = &DescribeEventCategoriesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeEventCategories", params, optFns, c.addOperationDescribeEventCategoriesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeEventCategoriesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeEventCategoriesInput struct {
// This parameter isn't currently supported.
Filters []types.Filter
// The type of source that is generating the events. For RDS Proxy events, specify
// db-proxy . Valid values: db-instance | db-cluster | db-parameter-group |
// db-security-group | db-snapshot | db-cluster-snapshot | db-proxy
SourceType *string
noSmithyDocumentSerde
}
// Data returned from the DescribeEventCategories operation.
type DescribeEventCategoriesOutput struct {
// A list of EventCategoriesMap data types.
EventCategoriesMapList []types.EventCategoriesMap
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeEventCategories{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeEventCategories{}, 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 = addOpDescribeEventCategoriesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventCategories(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_opDescribeEventCategories(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeEventCategories",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Returns events related to DB instances, DB clusters, DB parameter groups, DB
// security groups, DB snapshots, DB cluster snapshots, and RDS Proxies for the
// past 14 days. Events specific to a particular DB instance, DB cluster, DB
// parameter group, DB security group, DB snapshot, DB cluster snapshot group, or
// RDS Proxy can be obtained by providing the name as a parameter. For more
// information on working with events, see Monitoring Amazon RDS events (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-events.html)
// in the Amazon RDS User Guide and Monitoring Amazon Aurora events (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/working-with-events.html)
// in the Amazon Aurora User Guide. By default, RDS returns events that were
// generated in the past hour.
func (c *Client) DescribeEvents(ctx context.Context, params *DescribeEventsInput, optFns ...func(*Options)) (*DescribeEventsOutput, error) {
if params == nil {
params = &DescribeEventsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeEvents", params, optFns, c.addOperationDescribeEventsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeEventsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeEventsInput struct {
// The number of minutes to retrieve events for. Default: 60
Duration *int32
// The end of the time interval for which to retrieve events, specified in ISO
// 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia
// page. (http://en.wikipedia.org/wiki/ISO_8601) Example: 2009-07-08T18:00Z
EndTime *time.Time
// A list of event categories that trigger notifications for a event notification
// subscription.
EventCategories []string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeEvents request. If
// this parameter is specified, the response includes only records beyond the
// marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The identifier of the event source for which events are returned. If not
// specified, then all sources are included in the response. Constraints:
// - If SourceIdentifier is supplied, SourceType must also be provided.
// - If the source type is a DB instance, a DBInstanceIdentifier value must be
// supplied.
// - If the source type is a DB cluster, a DBClusterIdentifier value must be
// supplied.
// - If the source type is a DB parameter group, a DBParameterGroupName value
// must be supplied.
// - If the source type is a DB security group, a DBSecurityGroupName value must
// be supplied.
// - If the source type is a DB snapshot, a DBSnapshotIdentifier value must be
// supplied.
// - If the source type is a DB cluster snapshot, a DBClusterSnapshotIdentifier
// value must be supplied.
// - If the source type is an RDS Proxy, a DBProxyName value must be supplied.
// - Can't end with a hyphen or contain two consecutive hyphens.
SourceIdentifier *string
// The event source to retrieve events for. If no value is specified, all events
// are returned.
SourceType types.SourceType
// The beginning of the time interval to retrieve events for, specified in ISO
// 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia
// page. (http://en.wikipedia.org/wiki/ISO_8601) Example: 2009-07-08T18:00Z
StartTime *time.Time
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeEvents action.
type DescribeEventsOutput struct {
// A list of Event instances.
Events []types.Event
// An optional pagination token provided by a previous Events request. If this
// parameter is specified, the response includes only records beyond the marker, up
// to the value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeEvents{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeEvents{}, 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 = addOpDescribeEventsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(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
}
// DescribeEventsAPIClient is a client that implements the DescribeEvents
// operation.
type DescribeEventsAPIClient interface {
DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error)
}
var _ DescribeEventsAPIClient = (*Client)(nil)
// DescribeEventsPaginatorOptions is the paginator options for DescribeEvents
type DescribeEventsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeEventsPaginator is a paginator for DescribeEvents
type DescribeEventsPaginator struct {
options DescribeEventsPaginatorOptions
client DescribeEventsAPIClient
params *DescribeEventsInput
nextToken *string
firstPage bool
}
// NewDescribeEventsPaginator returns a new DescribeEventsPaginator
func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *DescribeEventsInput, optFns ...func(*DescribeEventsPaginatorOptions)) *DescribeEventsPaginator {
if params == nil {
params = &DescribeEventsInput{}
}
options := DescribeEventsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeEventsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeEventsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeEvents page.
func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEventsOutput, 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.DescribeEvents(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_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeEvents",
}
}
| 283 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all the subscription descriptions for a customer account. The description
// for a subscription includes SubscriptionName , SNSTopicARN , CustomerID ,
// SourceType , SourceID , CreationTime , and Status . If you specify a
// SubscriptionName , lists the description for that subscription.
func (c *Client) DescribeEventSubscriptions(ctx context.Context, params *DescribeEventSubscriptionsInput, optFns ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) {
if params == nil {
params = &DescribeEventSubscriptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeEventSubscriptions", params, optFns, c.addOperationDescribeEventSubscriptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeEventSubscriptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeEventSubscriptionsInput struct {
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous
// DescribeOrderableDBInstanceOptions request. If this parameter is specified, the
// response includes only records beyond the marker, up to the value specified by
// MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The name of the RDS event notification subscription you want to describe.
SubscriptionName *string
noSmithyDocumentSerde
}
// Data returned by the DescribeEventSubscriptions action.
type DescribeEventSubscriptionsOutput struct {
// A list of EventSubscriptions data types.
EventSubscriptionsList []types.EventSubscription
// An optional pagination token provided by a previous
// DescribeOrderableDBInstanceOptions request. If this parameter is specified, the
// response includes only records beyond the marker, up to the value specified by
// MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeEventSubscriptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeEventSubscriptions{}, 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 = addOpDescribeEventSubscriptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventSubscriptions(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
}
// DescribeEventSubscriptionsAPIClient is a client that implements the
// DescribeEventSubscriptions operation.
type DescribeEventSubscriptionsAPIClient interface {
DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error)
}
var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil)
// DescribeEventSubscriptionsPaginatorOptions is the paginator options for
// DescribeEventSubscriptions
type DescribeEventSubscriptionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeEventSubscriptionsPaginator is a paginator for
// DescribeEventSubscriptions
type DescribeEventSubscriptionsPaginator struct {
options DescribeEventSubscriptionsPaginatorOptions
client DescribeEventSubscriptionsAPIClient
params *DescribeEventSubscriptionsInput
nextToken *string
firstPage bool
}
// NewDescribeEventSubscriptionsPaginator returns a new
// DescribeEventSubscriptionsPaginator
func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPIClient, params *DescribeEventSubscriptionsInput, optFns ...func(*DescribeEventSubscriptionsPaginatorOptions)) *DescribeEventSubscriptionsPaginator {
if params == nil {
params = &DescribeEventSubscriptionsInput{}
}
options := DescribeEventSubscriptionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeEventSubscriptionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeEventSubscriptions page.
func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEventSubscriptionsOutput, 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.DescribeEventSubscriptions(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_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeEventSubscriptions",
}
}
| 245 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a snapshot or cluster export to Amazon S3. This API
// operation supports pagination.
func (c *Client) DescribeExportTasks(ctx context.Context, params *DescribeExportTasksInput, optFns ...func(*Options)) (*DescribeExportTasksOutput, error) {
if params == nil {
params = &DescribeExportTasksInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeExportTasks", params, optFns, c.addOperationDescribeExportTasksMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeExportTasksOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeExportTasksInput struct {
// The identifier of the snapshot or cluster export task to be described.
ExportTaskIdentifier *string
// Filters specify one or more snapshot or cluster exports to describe. The
// filters are specified as name-value pairs that define what to include in the
// output. Filter names and values are case-sensitive. Supported filters include
// the following:
// - export-task-identifier - An identifier for the snapshot or cluster export
// task.
// - s3-bucket - The Amazon S3 bucket the data is exported to.
// - source-arn - The Amazon Resource Name (ARN) of the snapshot or cluster
// exported to Amazon S3.
// - status - The status of the export task. Must be lowercase. Valid statuses
// are the following:
// - canceled
// - canceling
// - complete
// - failed
// - in_progress
// - starting
Filters []types.Filter
// An optional pagination token provided by a previous DescribeExportTasks
// request. If you specify this parameter, the response includes only records
// beyond the marker, up to the value specified by the MaxRecords parameter.
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified value, a pagination token called a marker is included in the
// response. You can use the marker in a later DescribeExportTasks request to
// retrieve the remaining results. Default: 100 Constraints: Minimum 20, maximum
// 100.
MaxRecords *int32
// The Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3.
SourceArn *string
// The type of source for the export.
SourceType types.ExportSourceType
noSmithyDocumentSerde
}
type DescribeExportTasksOutput struct {
// Information about an export of a snapshot or cluster to Amazon S3.
ExportTasks []types.ExportTask
// A pagination token that can be used in a later DescribeExportTasks request. A
// marker is used for pagination to identify the location to begin output for the
// next response of DescribeExportTasks .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeExportTasks{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeExportTasks{}, 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 = addOpDescribeExportTasksValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportTasks(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
}
// DescribeExportTasksAPIClient is a client that implements the
// DescribeExportTasks operation.
type DescribeExportTasksAPIClient interface {
DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error)
}
var _ DescribeExportTasksAPIClient = (*Client)(nil)
// DescribeExportTasksPaginatorOptions is the paginator options for
// DescribeExportTasks
type DescribeExportTasksPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified value, a pagination token called a marker is included in the
// response. You can use the marker in a later DescribeExportTasks request to
// retrieve the remaining results. 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
}
// DescribeExportTasksPaginator is a paginator for DescribeExportTasks
type DescribeExportTasksPaginator struct {
options DescribeExportTasksPaginatorOptions
client DescribeExportTasksAPIClient
params *DescribeExportTasksInput
nextToken *string
firstPage bool
}
// NewDescribeExportTasksPaginator returns a new DescribeExportTasksPaginator
func NewDescribeExportTasksPaginator(client DescribeExportTasksAPIClient, params *DescribeExportTasksInput, optFns ...func(*DescribeExportTasksPaginatorOptions)) *DescribeExportTasksPaginator {
if params == nil {
params = &DescribeExportTasksInput{}
}
options := DescribeExportTasksPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeExportTasksPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeExportTasksPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeExportTasks page.
func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeExportTasksOutput, 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.DescribeExportTasks(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_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeExportTasks",
}
}
| 262 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about Aurora global database clusters. This API supports
// pagination. For more information on Amazon Aurora, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters.
func (c *Client) DescribeGlobalClusters(ctx context.Context, params *DescribeGlobalClustersInput, optFns ...func(*Options)) (*DescribeGlobalClustersOutput, error) {
if params == nil {
params = &DescribeGlobalClustersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeGlobalClusters", params, optFns, c.addOperationDescribeGlobalClustersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeGlobalClustersOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeGlobalClustersInput struct {
// This parameter isn't currently supported.
Filters []types.Filter
// The user-supplied DB cluster identifier. If this parameter is specified,
// information from only the specific DB cluster is returned. This parameter isn't
// case-sensitive. Constraints:
// - If supplied, must match an existing DBClusterIdentifier.
GlobalClusterIdentifier *string
// An optional pagination token provided by a previous DescribeGlobalClusters
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeGlobalClustersOutput struct {
// The list of global clusters returned by this request.
GlobalClusters []types.GlobalCluster
// An optional pagination token provided by a previous DescribeGlobalClusters
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeGlobalClusters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeGlobalClusters{}, 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 = addOpDescribeGlobalClustersValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGlobalClusters(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
}
// DescribeGlobalClustersAPIClient is a client that implements the
// DescribeGlobalClusters operation.
type DescribeGlobalClustersAPIClient interface {
DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error)
}
var _ DescribeGlobalClustersAPIClient = (*Client)(nil)
// DescribeGlobalClustersPaginatorOptions is the paginator options for
// DescribeGlobalClusters
type DescribeGlobalClustersPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeGlobalClustersPaginator is a paginator for DescribeGlobalClusters
type DescribeGlobalClustersPaginator struct {
options DescribeGlobalClustersPaginatorOptions
client DescribeGlobalClustersAPIClient
params *DescribeGlobalClustersInput
nextToken *string
firstPage bool
}
// NewDescribeGlobalClustersPaginator returns a new DescribeGlobalClustersPaginator
func NewDescribeGlobalClustersPaginator(client DescribeGlobalClustersAPIClient, params *DescribeGlobalClustersInput, optFns ...func(*DescribeGlobalClustersPaginatorOptions)) *DescribeGlobalClustersPaginator {
if params == nil {
params = &DescribeGlobalClustersInput{}
}
options := DescribeGlobalClustersPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeGlobalClustersPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeGlobalClustersPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeGlobalClusters page.
func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeGlobalClustersOutput, 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.DescribeGlobalClusters(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_opDescribeGlobalClusters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeGlobalClusters",
}
}
| 242 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Describes all available options.
func (c *Client) DescribeOptionGroupOptions(ctx context.Context, params *DescribeOptionGroupOptionsInput, optFns ...func(*Options)) (*DescribeOptionGroupOptionsOutput, error) {
if params == nil {
params = &DescribeOptionGroupOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeOptionGroupOptions", params, optFns, c.addOperationDescribeOptionGroupOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeOptionGroupOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeOptionGroupOptionsInput struct {
// A required parameter. Options available for the given engine name are
// described. Valid Values:
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
//
// This member is required.
EngineName *string
// This parameter isn't currently supported.
Filters []types.Filter
// If specified, filters the results to include only options for the specified
// major engine version.
MajorEngineVersion *string
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
noSmithyDocumentSerde
}
type DescribeOptionGroupOptionsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// List of available option group options.
OptionGroupOptions []types.OptionGroupOption
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeOptionGroupOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeOptionGroupOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeOptionGroupOptions{}, 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 = addOpDescribeOptionGroupOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOptionGroupOptions(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
}
// DescribeOptionGroupOptionsAPIClient is a client that implements the
// DescribeOptionGroupOptions operation.
type DescribeOptionGroupOptionsAPIClient interface {
DescribeOptionGroupOptions(context.Context, *DescribeOptionGroupOptionsInput, ...func(*Options)) (*DescribeOptionGroupOptionsOutput, error)
}
var _ DescribeOptionGroupOptionsAPIClient = (*Client)(nil)
// DescribeOptionGroupOptionsPaginatorOptions is the paginator options for
// DescribeOptionGroupOptions
type DescribeOptionGroupOptionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeOptionGroupOptionsPaginator is a paginator for
// DescribeOptionGroupOptions
type DescribeOptionGroupOptionsPaginator struct {
options DescribeOptionGroupOptionsPaginatorOptions
client DescribeOptionGroupOptionsAPIClient
params *DescribeOptionGroupOptionsInput
nextToken *string
firstPage bool
}
// NewDescribeOptionGroupOptionsPaginator returns a new
// DescribeOptionGroupOptionsPaginator
func NewDescribeOptionGroupOptionsPaginator(client DescribeOptionGroupOptionsAPIClient, params *DescribeOptionGroupOptionsInput, optFns ...func(*DescribeOptionGroupOptionsPaginatorOptions)) *DescribeOptionGroupOptionsPaginator {
if params == nil {
params = &DescribeOptionGroupOptionsInput{}
}
options := DescribeOptionGroupOptionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeOptionGroupOptionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeOptionGroupOptionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeOptionGroupOptions page.
func (p *DescribeOptionGroupOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOptionGroupOptionsOutput, 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.DescribeOptionGroupOptions(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_opDescribeOptionGroupOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeOptionGroupOptions",
}
}
| 257 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Describes the available option groups.
func (c *Client) DescribeOptionGroups(ctx context.Context, params *DescribeOptionGroupsInput, optFns ...func(*Options)) (*DescribeOptionGroupsOutput, error) {
if params == nil {
params = &DescribeOptionGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeOptionGroups", params, optFns, c.addOperationDescribeOptionGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeOptionGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeOptionGroupsInput struct {
// Filters the list of option groups to only include groups associated with a
// specific database engine. Valid Values:
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
EngineName *string
// This parameter isn't currently supported.
Filters []types.Filter
// Filters the list of option groups to only include groups associated with a
// specific database engine version. If specified, then EngineName must also be
// specified.
MajorEngineVersion *string
// An optional pagination token provided by a previous DescribeOptionGroups
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The name of the option group to describe. Can't be supplied together with
// EngineName or MajorEngineVersion.
OptionGroupName *string
noSmithyDocumentSerde
}
// List of option groups.
type DescribeOptionGroupsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// List of option groups.
OptionGroupsList []types.OptionGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeOptionGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeOptionGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeOptionGroups{}, 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 = addOpDescribeOptionGroupsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOptionGroups(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
}
// DescribeOptionGroupsAPIClient is a client that implements the
// DescribeOptionGroups operation.
type DescribeOptionGroupsAPIClient interface {
DescribeOptionGroups(context.Context, *DescribeOptionGroupsInput, ...func(*Options)) (*DescribeOptionGroupsOutput, error)
}
var _ DescribeOptionGroupsAPIClient = (*Client)(nil)
// DescribeOptionGroupsPaginatorOptions is the paginator options for
// DescribeOptionGroups
type DescribeOptionGroupsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribeOptionGroupsPaginator is a paginator for DescribeOptionGroups
type DescribeOptionGroupsPaginator struct {
options DescribeOptionGroupsPaginatorOptions
client DescribeOptionGroupsAPIClient
params *DescribeOptionGroupsInput
nextToken *string
firstPage bool
}
// NewDescribeOptionGroupsPaginator returns a new DescribeOptionGroupsPaginator
func NewDescribeOptionGroupsPaginator(client DescribeOptionGroupsAPIClient, params *DescribeOptionGroupsInput, optFns ...func(*DescribeOptionGroupsPaginatorOptions)) *DescribeOptionGroupsPaginator {
if params == nil {
params = &DescribeOptionGroupsInput{}
}
options := DescribeOptionGroupsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeOptionGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeOptionGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeOptionGroups page.
func (p *DescribeOptionGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOptionGroupsOutput, 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.DescribeOptionGroups(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_opDescribeOptionGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeOptionGroups",
}
}
| 259 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of orderable DB instance options for the specified DB engine, DB
// engine version, and DB instance class.
func (c *Client) DescribeOrderableDBInstanceOptions(ctx context.Context, params *DescribeOrderableDBInstanceOptionsInput, optFns ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) {
if params == nil {
params = &DescribeOrderableDBInstanceOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeOrderableDBInstanceOptions", params, optFns, c.addOperationDescribeOrderableDBInstanceOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeOrderableDBInstanceOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeOrderableDBInstanceOptionsInput struct {
// The name of the engine to retrieve DB instance options for. Valid Values:
// - aurora-mysql
// - aurora-postgresql
// - custom-oracle-ee
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
//
// This member is required.
Engine *string
// The Availability Zone group associated with a Local Zone. Specify this
// parameter to retrieve available offerings for the Local Zones in the group. Omit
// this parameter to show the available offerings in the specified Amazon Web
// Services Region. This setting doesn't apply to RDS Custom.
AvailabilityZoneGroup *string
// The DB instance class filter value. Specify this parameter to show only the
// available offerings matching the specified DB instance class.
DBInstanceClass *string
// The engine version filter value. Specify this parameter to show only the
// available offerings matching the specified engine version.
EngineVersion *string
// This parameter isn't currently supported.
Filters []types.Filter
// The license model filter value. Specify this parameter to show only the
// available offerings matching the specified license model. RDS Custom supports
// only the BYOL licensing model.
LicenseModel *string
// An optional pagination token provided by a previous
// DescribeOrderableDBInstanceOptions request. If this parameter is specified, the
// response includes only records beyond the marker, up to the value specified by
// MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 10000.
MaxRecords *int32
// A value that indicates whether to show only VPC or non-VPC offerings. RDS
// Custom supports only VPC offerings. RDS Custom supports only VPC offerings. If
// you describe non-VPC offerings for RDS Custom, the output shows VPC offerings.
Vpc *bool
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the
// DescribeOrderableDBInstanceOptions action.
type DescribeOrderableDBInstanceOptionsOutput struct {
// An optional pagination token provided by a previous OrderableDBInstanceOptions
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// An OrderableDBInstanceOption structure containing information about orderable
// options for the DB instance.
OrderableDBInstanceOptions []types.OrderableDBInstanceOption
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeOrderableDBInstanceOptions{}, 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 = addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrderableDBInstanceOptions(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
}
// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the
// DescribeOrderableDBInstanceOptions operation.
type DescribeOrderableDBInstanceOptionsAPIClient interface {
DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error)
}
var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil)
// DescribeOrderableDBInstanceOptionsPaginatorOptions is the paginator options for
// DescribeOrderableDBInstanceOptions
type DescribeOrderableDBInstanceOptionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 10000.
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
}
// DescribeOrderableDBInstanceOptionsPaginator is a paginator for
// DescribeOrderableDBInstanceOptions
type DescribeOrderableDBInstanceOptionsPaginator struct {
options DescribeOrderableDBInstanceOptionsPaginatorOptions
client DescribeOrderableDBInstanceOptionsAPIClient
params *DescribeOrderableDBInstanceOptionsInput
nextToken *string
firstPage bool
}
// NewDescribeOrderableDBInstanceOptionsPaginator returns a new
// DescribeOrderableDBInstanceOptionsPaginator
func NewDescribeOrderableDBInstanceOptionsPaginator(client DescribeOrderableDBInstanceOptionsAPIClient, params *DescribeOrderableDBInstanceOptionsInput, optFns ...func(*DescribeOrderableDBInstanceOptionsPaginatorOptions)) *DescribeOrderableDBInstanceOptionsPaginator {
if params == nil {
params = &DescribeOrderableDBInstanceOptionsInput{}
}
options := DescribeOrderableDBInstanceOptionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeOrderableDBInstanceOptionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeOrderableDBInstanceOptionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeOrderableDBInstanceOptions page.
func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, 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.DescribeOrderableDBInstanceOptions(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_opDescribeOrderableDBInstanceOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeOrderableDBInstanceOptions",
}
}
| 284 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of resources (for example, DB instances) that have at least one
// pending maintenance action.
func (c *Client) DescribePendingMaintenanceActions(ctx context.Context, params *DescribePendingMaintenanceActionsInput, optFns ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) {
if params == nil {
params = &DescribePendingMaintenanceActionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribePendingMaintenanceActions", params, optFns, c.addOperationDescribePendingMaintenanceActionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribePendingMaintenanceActionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribePendingMaintenanceActionsInput struct {
// A filter that specifies one or more resources to return pending maintenance
// actions for. Supported filters:
// - db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon
// Resource Names (ARNs). The results list only includes pending maintenance
// actions for the DB clusters identified by these ARNs.
// - db-instance-id - Accepts DB instance identifiers and DB instance ARNs. The
// results list only includes pending maintenance actions for the DB instances
// identified by these ARNs.
Filters []types.Filter
// An optional pagination token provided by a previous
// DescribePendingMaintenanceActions request. If this parameter is specified, the
// response includes only records beyond the marker, up to a number of records
// specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// Default: 100 Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The ARN of a resource to return pending maintenance actions for.
ResourceIdentifier *string
noSmithyDocumentSerde
}
// Data returned from the DescribePendingMaintenanceActions action.
type DescribePendingMaintenanceActionsOutput struct {
// An optional pagination token provided by a previous
// DescribePendingMaintenanceActions request. If this parameter is specified, the
// response includes only records beyond the marker, up to a number of records
// specified by MaxRecords .
Marker *string
// A list of the pending maintenance actions for the resource.
PendingMaintenanceActions []types.ResourcePendingMaintenanceActions
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribePendingMaintenanceActions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribePendingMaintenanceActions{}, 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 = addOpDescribePendingMaintenanceActionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePendingMaintenanceActions(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
}
// DescribePendingMaintenanceActionsAPIClient is a client that implements the
// DescribePendingMaintenanceActions operation.
type DescribePendingMaintenanceActionsAPIClient interface {
DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error)
}
var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil)
// DescribePendingMaintenanceActionsPaginatorOptions is the paginator options for
// DescribePendingMaintenanceActions
type DescribePendingMaintenanceActionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that you can retrieve the remaining results.
// 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
}
// DescribePendingMaintenanceActionsPaginator is a paginator for
// DescribePendingMaintenanceActions
type DescribePendingMaintenanceActionsPaginator struct {
options DescribePendingMaintenanceActionsPaginatorOptions
client DescribePendingMaintenanceActionsAPIClient
params *DescribePendingMaintenanceActionsInput
nextToken *string
firstPage bool
}
// NewDescribePendingMaintenanceActionsPaginator returns a new
// DescribePendingMaintenanceActionsPaginator
func NewDescribePendingMaintenanceActionsPaginator(client DescribePendingMaintenanceActionsAPIClient, params *DescribePendingMaintenanceActionsInput, optFns ...func(*DescribePendingMaintenanceActionsPaginatorOptions)) *DescribePendingMaintenanceActionsPaginator {
if params == nil {
params = &DescribePendingMaintenanceActionsInput{}
}
options := DescribePendingMaintenanceActionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribePendingMaintenanceActionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribePendingMaintenanceActionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribePendingMaintenanceActions page.
func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, 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.DescribePendingMaintenanceActions(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_opDescribePendingMaintenanceActions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribePendingMaintenanceActions",
}
}
| 250 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about reserved DB instances for this account, or about a
// specified reserved DB instance.
func (c *Client) DescribeReservedDBInstances(ctx context.Context, params *DescribeReservedDBInstancesInput, optFns ...func(*Options)) (*DescribeReservedDBInstancesOutput, error) {
if params == nil {
params = &DescribeReservedDBInstancesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeReservedDBInstances", params, optFns, c.addOperationDescribeReservedDBInstancesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeReservedDBInstancesOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeReservedDBInstancesInput struct {
// The DB instance class filter value. Specify this parameter to show only those
// reservations matching the specified DB instances class.
DBInstanceClass *string
// The duration filter value, specified in years or seconds. Specify this
// parameter to show only reservations for this duration. Valid Values: 1 | 3 |
// 31536000 | 94608000
Duration *string
// This parameter isn't currently supported.
Filters []types.Filter
// The lease identifier filter value. Specify this parameter to show only the
// reservation that matches the specified lease ID. Amazon Web Services Support
// might request the lease ID for an issue related to a reserved DB instance.
LeaseId *string
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// A value that indicates whether to show only those reservations that support
// Multi-AZ.
MultiAZ *bool
// The offering type filter value. Specify this parameter to show only the
// available offerings matching the specified offering type. Valid Values:
// "Partial Upfront" | "All Upfront" | "No Upfront"
OfferingType *string
// The product description filter value. Specify this parameter to show only those
// reservations matching the specified product description.
ProductDescription *string
// The reserved DB instance identifier filter value. Specify this parameter to
// show only the reservation that matches the specified reservation ID.
ReservedDBInstanceId *string
// The offering identifier filter value. Specify this parameter to show only
// purchased reservations matching the specified offering identifier.
ReservedDBInstancesOfferingId *string
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the
// DescribeReservedDBInstances action.
type DescribeReservedDBInstancesOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// A list of reserved DB instances.
ReservedDBInstances []types.ReservedDBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeReservedDBInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeReservedDBInstances{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeReservedDBInstances{}, 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 = addOpDescribeReservedDBInstancesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedDBInstances(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
}
// DescribeReservedDBInstancesAPIClient is a client that implements the
// DescribeReservedDBInstances operation.
type DescribeReservedDBInstancesAPIClient interface {
DescribeReservedDBInstances(context.Context, *DescribeReservedDBInstancesInput, ...func(*Options)) (*DescribeReservedDBInstancesOutput, error)
}
var _ DescribeReservedDBInstancesAPIClient = (*Client)(nil)
// DescribeReservedDBInstancesPaginatorOptions is the paginator options for
// DescribeReservedDBInstances
type DescribeReservedDBInstancesPaginatorOptions struct {
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. 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
}
// DescribeReservedDBInstancesPaginator is a paginator for
// DescribeReservedDBInstances
type DescribeReservedDBInstancesPaginator struct {
options DescribeReservedDBInstancesPaginatorOptions
client DescribeReservedDBInstancesAPIClient
params *DescribeReservedDBInstancesInput
nextToken *string
firstPage bool
}
// NewDescribeReservedDBInstancesPaginator returns a new
// DescribeReservedDBInstancesPaginator
func NewDescribeReservedDBInstancesPaginator(client DescribeReservedDBInstancesAPIClient, params *DescribeReservedDBInstancesInput, optFns ...func(*DescribeReservedDBInstancesPaginatorOptions)) *DescribeReservedDBInstancesPaginator {
if params == nil {
params = &DescribeReservedDBInstancesInput{}
}
options := DescribeReservedDBInstancesPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeReservedDBInstancesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeReservedDBInstancesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeReservedDBInstances page.
func (p *DescribeReservedDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedDBInstancesOutput, 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.DescribeReservedDBInstances(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_opDescribeReservedDBInstances(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeReservedDBInstances",
}
}
| 274 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists available reserved DB instance offerings.
func (c *Client) DescribeReservedDBInstancesOfferings(ctx context.Context, params *DescribeReservedDBInstancesOfferingsInput, optFns ...func(*Options)) (*DescribeReservedDBInstancesOfferingsOutput, error) {
if params == nil {
params = &DescribeReservedDBInstancesOfferingsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeReservedDBInstancesOfferings", params, optFns, c.addOperationDescribeReservedDBInstancesOfferingsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeReservedDBInstancesOfferingsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeReservedDBInstancesOfferingsInput struct {
// The DB instance class filter value. Specify this parameter to show only the
// available offerings matching the specified DB instance class.
DBInstanceClass *string
// Duration filter value, specified in years or seconds. Specify this parameter to
// show only reservations for this duration. Valid Values: 1 | 3 | 31536000 |
// 94608000
Duration *string
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// A value that indicates whether to show only those reservations that support
// Multi-AZ.
MultiAZ *bool
// The offering type filter value. Specify this parameter to show only the
// available offerings matching the specified offering type. Valid Values:
// "Partial Upfront" | "All Upfront" | "No Upfront"
OfferingType *string
// Product description filter value. Specify this parameter to show only the
// available offerings that contain the specified product description. The results
// show offerings that partially match the filter value.
ProductDescription *string
// The offering identifier filter value. Specify this parameter to show only the
// available offering that matches the specified reservation identifier. Example:
// 438012d3-4052-4cc7-b2e3-8d3372e0e706
ReservedDBInstancesOfferingId *string
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the
// DescribeReservedDBInstancesOfferings action.
type DescribeReservedDBInstancesOfferingsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// A list of reserved DB instance offerings.
ReservedDBInstancesOfferings []types.ReservedDBInstancesOffering
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeReservedDBInstancesOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeReservedDBInstancesOfferings{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeReservedDBInstancesOfferings{}, 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 = addOpDescribeReservedDBInstancesOfferingsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedDBInstancesOfferings(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
}
// DescribeReservedDBInstancesOfferingsAPIClient is a client that implements the
// DescribeReservedDBInstancesOfferings operation.
type DescribeReservedDBInstancesOfferingsAPIClient interface {
DescribeReservedDBInstancesOfferings(context.Context, *DescribeReservedDBInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedDBInstancesOfferingsOutput, error)
}
var _ DescribeReservedDBInstancesOfferingsAPIClient = (*Client)(nil)
// DescribeReservedDBInstancesOfferingsPaginatorOptions is the paginator options
// for DescribeReservedDBInstancesOfferings
type DescribeReservedDBInstancesOfferingsPaginatorOptions struct {
// The maximum number of records to include in the response. If more than the
// MaxRecords value is available, a pagination token called a marker is included in
// the response so you can retrieve the remaining results. 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
}
// DescribeReservedDBInstancesOfferingsPaginator is a paginator for
// DescribeReservedDBInstancesOfferings
type DescribeReservedDBInstancesOfferingsPaginator struct {
options DescribeReservedDBInstancesOfferingsPaginatorOptions
client DescribeReservedDBInstancesOfferingsAPIClient
params *DescribeReservedDBInstancesOfferingsInput
nextToken *string
firstPage bool
}
// NewDescribeReservedDBInstancesOfferingsPaginator returns a new
// DescribeReservedDBInstancesOfferingsPaginator
func NewDescribeReservedDBInstancesOfferingsPaginator(client DescribeReservedDBInstancesOfferingsAPIClient, params *DescribeReservedDBInstancesOfferingsInput, optFns ...func(*DescribeReservedDBInstancesOfferingsPaginatorOptions)) *DescribeReservedDBInstancesOfferingsPaginator {
if params == nil {
params = &DescribeReservedDBInstancesOfferingsInput{}
}
options := DescribeReservedDBInstancesOfferingsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeReservedDBInstancesOfferingsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeReservedDBInstancesOfferingsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeReservedDBInstancesOfferings page.
func (p *DescribeReservedDBInstancesOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedDBInstancesOfferingsOutput, 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.DescribeReservedDBInstancesOfferings(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_opDescribeReservedDBInstancesOfferings(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeReservedDBInstancesOfferings",
}
}
| 266 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of the source Amazon Web Services Regions where the current
// Amazon Web Services Region can create a read replica, copy a DB snapshot from,
// or replicate automated backups from. Use this operation to determine whether
// cross-Region features are supported between other Regions and your current
// Region. This operation supports pagination. To return information about the
// Regions that are enabled for your account, or all Regions, use the EC2 operation
// DescribeRegions . For more information, see DescribeRegions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
// in the Amazon EC2 API Reference.
func (c *Client) DescribeSourceRegions(ctx context.Context, params *DescribeSourceRegionsInput, optFns ...func(*Options)) (*DescribeSourceRegionsOutput, error) {
if params == nil {
params = &DescribeSourceRegionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeSourceRegions", params, optFns, c.addOperationDescribeSourceRegionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeSourceRegionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeSourceRegionsInput struct {
// This parameter isn't currently supported.
Filters []types.Filter
// An optional pagination token provided by a previous DescribeSourceRegions
// request. If this parameter is specified, the response includes only records
// beyond the marker, up to the value specified by MaxRecords .
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. Default: 100
// Constraints: Minimum 20, maximum 100.
MaxRecords *int32
// The source Amazon Web Services Region name. For example, us-east-1 .
// Constraints:
// - Must specify a valid Amazon Web Services Region name.
RegionName *string
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the DescribeSourceRegions
// action.
type DescribeSourceRegionsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords .
Marker *string
// A list of SourceRegion instances that contains each source Amazon Web Services
// Region that the current Amazon Web Services Region can get a read replica or a
// DB snapshot from.
SourceRegions []types.SourceRegion
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeSourceRegionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeSourceRegions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeSourceRegions{}, 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 = addOpDescribeSourceRegionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSourceRegions(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
}
// DescribeSourceRegionsAPIClient is a client that implements the
// DescribeSourceRegions operation.
type DescribeSourceRegionsAPIClient interface {
DescribeSourceRegions(context.Context, *DescribeSourceRegionsInput, ...func(*Options)) (*DescribeSourceRegionsOutput, error)
}
var _ DescribeSourceRegionsAPIClient = (*Client)(nil)
// DescribeSourceRegionsPaginatorOptions is the paginator options for
// DescribeSourceRegions
type DescribeSourceRegionsPaginatorOptions struct {
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so you can retrieve the remaining results. 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
}
// DescribeSourceRegionsPaginator is a paginator for DescribeSourceRegions
type DescribeSourceRegionsPaginator struct {
options DescribeSourceRegionsPaginatorOptions
client DescribeSourceRegionsAPIClient
params *DescribeSourceRegionsInput
nextToken *string
firstPage bool
}
// NewDescribeSourceRegionsPaginator returns a new DescribeSourceRegionsPaginator
func NewDescribeSourceRegionsPaginator(client DescribeSourceRegionsAPIClient, params *DescribeSourceRegionsInput, optFns ...func(*DescribeSourceRegionsPaginatorOptions)) *DescribeSourceRegionsPaginator {
if params == nil {
params = &DescribeSourceRegionsInput{}
}
options := DescribeSourceRegionsPaginatorOptions{}
if params.MaxRecords != nil {
options.Limit = *params.MaxRecords
}
for _, fn := range optFns {
fn(&options)
}
return &DescribeSourceRegionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DescribeSourceRegionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DescribeSourceRegions page.
func (p *DescribeSourceRegionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSourceRegionsOutput, 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.DescribeSourceRegions(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_opDescribeSourceRegions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeSourceRegions",
}
}
| 250 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// You can call DescribeValidDBInstanceModifications to learn what modifications
// you can make to your DB instance. You can use this information when you call
// ModifyDBInstance . This command doesn't apply to RDS Custom.
func (c *Client) DescribeValidDBInstanceModifications(ctx context.Context, params *DescribeValidDBInstanceModificationsInput, optFns ...func(*Options)) (*DescribeValidDBInstanceModificationsOutput, error) {
if params == nil {
params = &DescribeValidDBInstanceModificationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeValidDBInstanceModifications", params, optFns, c.addOperationDescribeValidDBInstanceModificationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeValidDBInstanceModificationsOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeValidDBInstanceModificationsInput struct {
// The customer identifier or the ARN of your DB instance.
//
// This member is required.
DBInstanceIdentifier *string
noSmithyDocumentSerde
}
type DescribeValidDBInstanceModificationsOutput struct {
// Information about valid modifications that you can make to your DB instance.
// Contains the result of a successful call to the
// DescribeValidDBInstanceModifications action. You can use this information when
// you call ModifyDBInstance .
ValidDBInstanceModificationsMessage *types.ValidDBInstanceModificationsMessage
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeValidDBInstanceModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeValidDBInstanceModifications{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeValidDBInstanceModifications{}, 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 = addOpDescribeValidDBInstanceModificationsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeValidDBInstanceModifications(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_opDescribeValidDBInstanceModifications(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DescribeValidDBInstanceModifications",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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"
)
// Downloads all or a portion of the specified log file, up to 1 MB in size. This
// command doesn't apply to RDS Custom.
func (c *Client) DownloadDBLogFilePortion(ctx context.Context, params *DownloadDBLogFilePortionInput, optFns ...func(*Options)) (*DownloadDBLogFilePortionOutput, error) {
if params == nil {
params = &DownloadDBLogFilePortionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DownloadDBLogFilePortion", params, optFns, c.addOperationDownloadDBLogFilePortionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DownloadDBLogFilePortionOutput)
out.ResultMetadata = metadata
return out, nil
}
type DownloadDBLogFilePortionInput struct {
// The customer-assigned name of the DB instance that contains the log files you
// want to list. Constraints:
// - Must match the identifier of an existing DBInstance.
//
// This member is required.
DBInstanceIdentifier *string
// The name of the log file to be downloaded.
//
// This member is required.
LogFileName *string
// The pagination token provided in the previous request or "0". If the Marker
// parameter is specified the response includes only records beyond the marker
// until the end of the file or up to NumberOfLines.
Marker *string
// The number of lines to download. If the number of lines specified results in a
// file over 1 MB in size, the file is truncated at 1 MB in size. If the
// NumberOfLines parameter is specified, then the block of lines returned can be
// from the beginning or the end of the log file, depending on the value of the
// Marker parameter.
// - If neither Marker or NumberOfLines are specified, the entire log file is
// returned up to a maximum of 10000 lines, starting with the most recent log
// entries first.
// - If NumberOfLines is specified and Marker isn't specified, then the most
// recent lines from the end of the log file are returned.
// - If Marker is specified as "0", then the specified number of lines from the
// beginning of the log file are returned.
// - You can download the log file in blocks of lines by specifying the size of
// the block using the NumberOfLines parameter, and by specifying a value of "0"
// for the Marker parameter in your first request. Include the Marker value
// returned in the response as the Marker value for the next request, continuing
// until the AdditionalDataPending response element returns false.
NumberOfLines int32
noSmithyDocumentSerde
}
// This data type is used as a response element to DownloadDBLogFilePortion .
type DownloadDBLogFilePortionOutput struct {
// Boolean value that if true, indicates there is more data to be downloaded.
AdditionalDataPending bool
// Entries from the specified log file.
LogFileData *string
// A pagination token that can be used in a later DownloadDBLogFilePortion request.
Marker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDownloadDBLogFilePortionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDownloadDBLogFilePortion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDownloadDBLogFilePortion{}, 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 = addOpDownloadDBLogFilePortionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDownloadDBLogFilePortion(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
}
// DownloadDBLogFilePortionAPIClient is a client that implements the
// DownloadDBLogFilePortion operation.
type DownloadDBLogFilePortionAPIClient interface {
DownloadDBLogFilePortion(context.Context, *DownloadDBLogFilePortionInput, ...func(*Options)) (*DownloadDBLogFilePortionOutput, error)
}
var _ DownloadDBLogFilePortionAPIClient = (*Client)(nil)
// DownloadDBLogFilePortionPaginatorOptions is the paginator options for
// DownloadDBLogFilePortion
type DownloadDBLogFilePortionPaginatorOptions struct {
// The number of lines to download. If the number of lines specified results in a
// file over 1 MB in size, the file is truncated at 1 MB in size. If the
// NumberOfLines parameter is specified, then the block of lines returned can be
// from the beginning or the end of the log file, depending on the value of the
// Marker parameter.
// - If neither Marker or NumberOfLines are specified, the entire log file is
// returned up to a maximum of 10000 lines, starting with the most recent log
// entries first.
// - If NumberOfLines is specified and Marker isn't specified, then the most
// recent lines from the end of the log file are returned.
// - If Marker is specified as "0", then the specified number of lines from the
// beginning of the log file are returned.
// - You can download the log file in blocks of lines by specifying the size of
// the block using the NumberOfLines parameter, and by specifying a value of "0"
// for the Marker parameter in your first request. Include the Marker value
// returned in the response as the Marker value for the next request, continuing
// until the AdditionalDataPending response element returns false.
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
}
// DownloadDBLogFilePortionPaginator is a paginator for DownloadDBLogFilePortion
type DownloadDBLogFilePortionPaginator struct {
options DownloadDBLogFilePortionPaginatorOptions
client DownloadDBLogFilePortionAPIClient
params *DownloadDBLogFilePortionInput
nextToken *string
firstPage bool
}
// NewDownloadDBLogFilePortionPaginator returns a new
// DownloadDBLogFilePortionPaginator
func NewDownloadDBLogFilePortionPaginator(client DownloadDBLogFilePortionAPIClient, params *DownloadDBLogFilePortionInput, optFns ...func(*DownloadDBLogFilePortionPaginatorOptions)) *DownloadDBLogFilePortionPaginator {
if params == nil {
params = &DownloadDBLogFilePortionInput{}
}
options := DownloadDBLogFilePortionPaginatorOptions{}
if params.NumberOfLines != 0 {
options.Limit = params.NumberOfLines
}
for _, fn := range optFns {
fn(&options)
}
return &DownloadDBLogFilePortionPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *DownloadDBLogFilePortionPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next DownloadDBLogFilePortion page.
func (p *DownloadDBLogFilePortionPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DownloadDBLogFilePortionOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
params.NumberOfLines = p.options.Limit
result, err := p.client.DownloadDBLogFilePortion(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_opDownloadDBLogFilePortion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "DownloadDBLogFilePortion",
}
}
| 268 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Forces a failover for a DB cluster. For an Aurora DB cluster, failover for a DB
// cluster promotes one of the Aurora Replicas (read-only instances) in the DB
// cluster to be the primary DB instance (the cluster writer). For a Multi-AZ DB
// cluster, failover for a DB cluster promotes one of the readable standby DB
// instances (read-only instances) in the DB cluster to be the primary DB instance
// (the cluster writer). An Amazon Aurora DB cluster automatically fails over to an
// Aurora Replica, if one exists, when the primary DB instance fails. A Multi-AZ DB
// cluster automatically fails over to a readable standby DB instance when the
// primary DB instance fails. To simulate a failure of a primary instance for
// testing, you can force a failover. Because each instance in a DB cluster has its
// own endpoint address, make sure to clean up and re-establish any existing
// connections that use those endpoint addresses when the failover is complete. For
// more information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) FailoverDBCluster(ctx context.Context, params *FailoverDBClusterInput, optFns ...func(*Options)) (*FailoverDBClusterOutput, error) {
if params == nil {
params = &FailoverDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "FailoverDBCluster", params, optFns, c.addOperationFailoverDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*FailoverDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type FailoverDBClusterInput struct {
// A DB cluster identifier to force a failover for. This parameter isn't
// case-sensitive. Constraints:
// - Must match the identifier of an existing DBCluster.
//
// This member is required.
DBClusterIdentifier *string
// The name of the DB instance to promote to the primary DB instance. Specify the
// DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in
// the DB cluster, for example mydbcluster-replica1 . This setting isn't supported
// for RDS for MySQL Multi-AZ DB clusters.
TargetDBInstanceIdentifier *string
noSmithyDocumentSerde
}
type FailoverDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationFailoverDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpFailoverDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpFailoverDBCluster{}, 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 = addOpFailoverDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFailoverDBCluster(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_opFailoverDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "FailoverDBCluster",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Initiates the failover process for an Aurora global database ( GlobalCluster ).
// A failover for an Aurora global database promotes one of secondary read-only DB
// clusters to be the primary DB cluster and demotes the primary DB cluster to
// being a secondary (read-only) DB cluster. In other words, the role of the
// current primary DB cluster and the selected (target) DB cluster are switched.
// The selected secondary DB cluster assumes full read/write capabilities for the
// Aurora global database. For more information about failing over an Amazon Aurora
// global database, see Managed planned failover for Amazon Aurora global databases (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-disaster-recovery.html#aurora-global-database-disaster-recovery.managed-failover)
// in the Amazon Aurora User Guide. This action applies to GlobalCluster (Aurora
// global databases) only. Use this action only on healthy Aurora global databases
// with running Aurora DB clusters and no Region-wide outages, to test disaster
// recovery scenarios or to reconfigure your Aurora global database topology.
func (c *Client) FailoverGlobalCluster(ctx context.Context, params *FailoverGlobalClusterInput, optFns ...func(*Options)) (*FailoverGlobalClusterOutput, error) {
if params == nil {
params = &FailoverGlobalClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "FailoverGlobalCluster", params, optFns, c.addOperationFailoverGlobalClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*FailoverGlobalClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type FailoverGlobalClusterInput struct {
// Identifier of the Aurora global database ( GlobalCluster ) that should be failed
// over. The identifier is the unique key assigned by the user when the Aurora
// global database was created. In other words, it's the name of the Aurora global
// database that you want to fail over. Constraints:
// - Must match the identifier of an existing GlobalCluster (Aurora global
// database).
//
// This member is required.
GlobalClusterIdentifier *string
// Identifier of the secondary Aurora DB cluster that you want to promote to
// primary for the Aurora global database ( GlobalCluster .) Use the Amazon
// Resource Name (ARN) for the identifier so that Aurora can locate the cluster in
// its Amazon Web Services Region.
//
// This member is required.
TargetDbClusterIdentifier *string
noSmithyDocumentSerde
}
type FailoverGlobalClusterOutput struct {
// A data type representing an Aurora global database.
GlobalCluster *types.GlobalCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationFailoverGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpFailoverGlobalCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpFailoverGlobalCluster{}, 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 = addOpFailoverGlobalClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFailoverGlobalCluster(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_opFailoverGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "FailoverGlobalCluster",
}
}
| 149 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all tags on an Amazon RDS resource. For an overview on tagging an Amazon
// RDS resource, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html)
// in the Amazon RDS User Guide.
func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) {
if params == nil {
params = &ListTagsForResourceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTagsForResourceOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListTagsForResourceInput struct {
// The Amazon RDS resource with tags to be listed. This value is an Amazon
// Resource Name (ARN). For information about creating an ARN, see Constructing an
// ARN for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing)
// in the Amazon RDS User Guide.
//
// This member is required.
ResourceName *string
// This parameter isn't currently supported.
Filters []types.Filter
noSmithyDocumentSerde
}
type ListTagsForResourceOutput struct {
// List of tags returned by the ListTagsForResource operation.
TagList []types.Tag
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ListTagsForResource",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Changes the audit policy state of a database activity stream to either locked
// (default) or unlocked. A locked policy is read-only, whereas an unlocked policy
// is read/write. If your activity stream is started and locked, you can unlock it,
// customize your audit policy, and then lock your activity stream. Restarting the
// activity stream isn't required. For more information, see Modifying a database
// activity stream (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/DBActivityStreams.Modifying.html)
// in the Amazon RDS User Guide. This operation is supported for RDS for Oracle and
// Microsoft SQL Server.
func (c *Client) ModifyActivityStream(ctx context.Context, params *ModifyActivityStreamInput, optFns ...func(*Options)) (*ModifyActivityStreamOutput, error) {
if params == nil {
params = &ModifyActivityStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyActivityStream", params, optFns, c.addOperationModifyActivityStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyActivityStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyActivityStreamInput struct {
// The audit policy state. When a policy is unlocked, it is read/write. When it is
// locked, it is read-only. You can edit your audit policy only when the activity
// stream is unlocked or stopped.
AuditPolicyState types.AuditPolicyState
// The Amazon Resource Name (ARN) of the RDS for Oracle or Microsoft SQL Server DB
// instance. For example, arn:aws:rds:us-east-1:12345667890:instance:my-orcl-db .
ResourceArn *string
noSmithyDocumentSerde
}
type ModifyActivityStreamOutput struct {
// Indicates whether engine-native audit fields are included in the database
// activity stream.
EngineNativeAuditFieldsIncluded *bool
// The name of the Amazon Kinesis data stream to be used for the database activity
// stream.
KinesisStreamName *string
// The Amazon Web Services KMS key identifier for encryption of messages in the
// database activity stream.
KmsKeyId *string
// The mode of the database activity stream.
Mode types.ActivityStreamMode
// The status of the modification to the policy state of the database activity
// stream.
PolicyStatus types.ActivityStreamPolicyStatus
// The status of the modification to the database activity stream.
Status types.ActivityStreamStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyActivityStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyActivityStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyActivityStream{}, 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_opModifyActivityStream(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_opModifyActivityStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyActivityStream",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Override the system-default Secure Sockets Layer/Transport Layer Security
// (SSL/TLS) certificate for Amazon RDS for new DB instances, or remove the
// override. By using this operation, you can specify an RDS-approved SSL/TLS
// certificate for new DB instances that is different from the default certificate
// provided by RDS. You can also use this operation to remove the override, so that
// new DB instances use the default certificate provided by RDS. You might need to
// override the default certificate in the following situations:
// - You already migrated your applications to support the latest certificate
// authority (CA) certificate, but the new CA certificate is not yet the RDS
// default CA certificate for the specified Amazon Web Services Region.
// - RDS has already moved to a new default CA certificate for the specified
// Amazon Web Services Region, but you are still in the process of supporting the
// new CA certificate. In this case, you temporarily need additional time to finish
// your application changes.
//
// For more information about rotating your SSL/TLS certificate for RDS DB
// engines, see Rotating Your SSL/TLS Certificate (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html)
// in the Amazon RDS User Guide. For more information about rotating your SSL/TLS
// certificate for Aurora DB engines, see Rotating Your SSL/TLS Certificate (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html)
// in the Amazon Aurora User Guide.
func (c *Client) ModifyCertificates(ctx context.Context, params *ModifyCertificatesInput, optFns ...func(*Options)) (*ModifyCertificatesOutput, error) {
if params == nil {
params = &ModifyCertificatesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyCertificates", params, optFns, c.addOperationModifyCertificatesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyCertificatesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyCertificatesInput struct {
// The new default certificate identifier to override the current one with. To
// determine the valid values, use the describe-certificates CLI command or the
// DescribeCertificates API operation.
CertificateIdentifier *string
// A value that indicates whether to remove the override for the default
// certificate. If the override is removed, the default certificate is the system
// default.
RemoveCustomerOverride *bool
noSmithyDocumentSerde
}
type ModifyCertificatesOutput struct {
// A CA certificate for an Amazon Web Services account. For more information, see
// Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
Certificate *types.Certificate
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyCertificatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCertificates{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCertificates{}, 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_opModifyCertificates(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_opModifyCertificates(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyCertificates",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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"
)
// Set the capacity of an Aurora Serverless v1 DB cluster to a specific value.
// Aurora Serverless v1 scales seamlessly based on the workload on the DB cluster.
// In some cases, the capacity might not scale fast enough to meet a sudden change
// in workload, such as a large number of new transactions. Call
// ModifyCurrentDBClusterCapacity to set the capacity explicitly. After this call
// sets the DB cluster capacity, Aurora Serverless v1 can automatically scale the
// DB cluster based on the cooldown period for scaling up and the cooldown period
// for scaling down. For more information about Aurora Serverless v1, see Using
// Amazon Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
// in the Amazon Aurora User Guide. If you call ModifyCurrentDBClusterCapacity
// with the default TimeoutAction , connections that prevent Aurora Serverless v1
// from finding a scaling point might be dropped. For more information about
// scaling points, see Autoscaling for Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling)
// in the Amazon Aurora User Guide. This action only applies to Aurora Serverless
// v1 DB clusters.
func (c *Client) ModifyCurrentDBClusterCapacity(ctx context.Context, params *ModifyCurrentDBClusterCapacityInput, optFns ...func(*Options)) (*ModifyCurrentDBClusterCapacityOutput, error) {
if params == nil {
params = &ModifyCurrentDBClusterCapacityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyCurrentDBClusterCapacity", params, optFns, c.addOperationModifyCurrentDBClusterCapacityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyCurrentDBClusterCapacityOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyCurrentDBClusterCapacityInput struct {
// The DB cluster identifier for the cluster being modified. This parameter isn't
// case-sensitive. Constraints:
// - Must match the identifier of an existing DB cluster.
//
// This member is required.
DBClusterIdentifier *string
// The DB cluster capacity. When you change the capacity of a paused Aurora
// Serverless v1 DB cluster, it automatically resumes. Constraints:
// - For Aurora MySQL, valid capacity values are 1 , 2 , 4 , 8 , 16 , 32 , 64 ,
// 128 , and 256 .
// - For Aurora PostgreSQL, valid capacity values are 2 , 4 , 8 , 16 , 32 , 64 ,
// 192 , and 384 .
Capacity *int32
// The amount of time, in seconds, that Aurora Serverless v1 tries to find a
// scaling point to perform seamless scaling before enforcing the timeout action.
// The default is 300. Specify a value between 10 and 600 seconds.
SecondsBeforeTimeout *int32
// The action to take when the timeout is reached, either ForceApplyCapacityChange
// or RollbackCapacityChange . ForceApplyCapacityChange , the default, sets the
// capacity to the specified value as soon as possible. RollbackCapacityChange
// ignores the capacity change if a scaling point isn't found in the timeout
// period.
TimeoutAction *string
noSmithyDocumentSerde
}
type ModifyCurrentDBClusterCapacityOutput struct {
// The current capacity of the DB cluster.
CurrentCapacity *int32
// A user-supplied DB cluster identifier. This identifier is the unique key that
// identifies a DB cluster.
DBClusterIdentifier *string
// A value that specifies the capacity that the DB cluster scales to next.
PendingCapacity *int32
// The number of seconds before a call to ModifyCurrentDBClusterCapacity times out.
SecondsBeforeTimeout *int32
// The timeout action of a call to ModifyCurrentDBClusterCapacity , either
// ForceApplyCapacityChange or RollbackCapacityChange .
TimeoutAction *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyCurrentDBClusterCapacityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCurrentDBClusterCapacity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCurrentDBClusterCapacity{}, 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 = addOpModifyCurrentDBClusterCapacityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCurrentDBClusterCapacity(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_opModifyCurrentDBClusterCapacity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyCurrentDBClusterCapacity",
}
}
| 174 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Modifies the status of a custom engine version (CEV). You can find CEVs to
// modify by calling DescribeDBEngineVersions . The MediaImport service that
// imports files from Amazon S3 to create CEVs isn't integrated with Amazon Web
// Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail,
// calls to the ModifyCustomDbEngineVersion event aren't logged. However, you
// might see calls from the API gateway that accesses your Amazon S3 bucket. These
// calls originate from the MediaImport service for the ModifyCustomDbEngineVersion
// event. For more information, see Modifying CEV status (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.modify)
// in the Amazon RDS User Guide.
func (c *Client) ModifyCustomDBEngineVersion(ctx context.Context, params *ModifyCustomDBEngineVersionInput, optFns ...func(*Options)) (*ModifyCustomDBEngineVersionOutput, error) {
if params == nil {
params = &ModifyCustomDBEngineVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyCustomDBEngineVersion", params, optFns, c.addOperationModifyCustomDBEngineVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyCustomDBEngineVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyCustomDBEngineVersionInput struct {
// The DB engine. The only supported values are custom-oracle-ee and
// custom-oracle-ee-cdb .
//
// This member is required.
Engine *string
// The custom engine version (CEV) that you want to modify. This option is
// required for RDS Custom for Oracle, but optional for Amazon RDS. The combination
// of Engine and EngineVersion is unique per customer per Amazon Web Services
// Region.
//
// This member is required.
EngineVersion *string
// An optional description of your CEV.
Description *string
// The availability status to be assigned to the CEV. Valid values are as follows:
// available You can use this CEV to create a new RDS Custom DB instance. inactive
// You can create a new RDS Custom instance by restoring a DB snapshot with this
// CEV. You can't patch or create new instances with this CEV. You can change any
// status to any status. A typical reason to change status is to prevent the
// accidental use of a CEV, or to make a deprecated CEV eligible for use again. For
// example, you might change the status of your CEV from available to inactive ,
// and from inactive back to available . To change the availability status of the
// CEV, it must not currently be in use by an RDS Custom instance, snapshot, or
// automated backup.
Status types.CustomEngineVersionStatus
noSmithyDocumentSerde
}
// This data type is used as a response element in the action
// DescribeDBEngineVersions .
type ModifyCustomDBEngineVersionOutput struct {
// The creation time of the DB engine version.
CreateTime *time.Time
// JSON string that lists the installation files and parameters that RDS Custom
// uses to create a custom engine version (CEV). RDS Custom applies the patches in
// the order in which they're listed in the manifest. You can set the Oracle home,
// Oracle base, and UNIX/Linux user and group using the installation parameters.
// For more information, see JSON fields in the CEV manifest (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields)
// in the Amazon RDS User Guide.
CustomDBEngineVersionManifest *string
// The description of the database engine.
DBEngineDescription *string
// A value that indicates the source media provider of the AMI based on the usage
// operation. Applicable for RDS Custom for SQL Server.
DBEngineMediaType *string
// The ARN of the custom engine version.
DBEngineVersionArn *string
// The description of the database engine version.
DBEngineVersionDescription *string
// The name of the DB parameter group family for the database engine.
DBParameterGroupFamily *string
// The name of the Amazon S3 bucket that contains your database installation files.
DatabaseInstallationFilesS3BucketName *string
// The Amazon S3 directory that contains the database installation files. If not
// specified, then no prefix is assumed.
DatabaseInstallationFilesS3Prefix *string
// The default character set for new instances of this engine version, if the
// CharacterSetName parameter of the CreateDBInstance API isn't specified.
DefaultCharacterSet *types.CharacterSet
// The name of the database engine.
Engine *string
// The version number of the database engine.
EngineVersion *string
// The types of logs that the database engine has available for export to
// CloudWatch Logs.
ExportableLogTypes []string
// The EC2 image
Image *types.CustomDBEngineVersionAMI
// The Amazon Web Services KMS key identifier for an encrypted CEV. This parameter
// is required for RDS Custom, but optional for Amazon RDS.
KMSKeyId *string
// The major engine version of the CEV.
MajorEngineVersion *string
// The status of the DB engine version, either available or deprecated .
Status *string
// A list of the supported CA certificate identifiers. For more information, see
// Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
SupportedCACertificateIdentifiers []string
// A list of the character sets supported by this engine for the CharacterSetName
// parameter of the CreateDBInstance operation.
SupportedCharacterSets []types.CharacterSet
// A list of the supported DB engine modes.
SupportedEngineModes []string
// A list of features supported by the DB engine. The supported features vary by
// DB engine and DB engine version. To determine the supported features for a
// specific DB engine and DB engine version using the CLI, use the following
// command: aws rds describe-db-engine-versions --engine --engine-version For
// example, to determine the supported features for RDS for PostgreSQL version 13.3
// using the CLI, use the following command: aws rds describe-db-engine-versions
// --engine postgres --engine-version 13.3 The supported features are listed under
// SupportedFeatureNames in the output.
SupportedFeatureNames []string
// A list of the character sets supported by the Oracle DB engine for the
// NcharCharacterSetName parameter of the CreateDBInstance operation.
SupportedNcharCharacterSets []types.CharacterSet
// A list of the time zones supported by this engine for the Timezone parameter of
// the CreateDBInstance action.
SupportedTimezones []types.Timezone
// A value that indicates whether the engine version supports Babelfish for Aurora
// PostgreSQL.
SupportsBabelfish bool
// A value that indicates whether the engine version supports rotating the server
// certificate without rebooting the DB instance.
SupportsCertificateRotationWithoutRestart *bool
// A value that indicates whether you can use Aurora global databases with a
// specific DB engine version.
SupportsGlobalDatabases bool
// A value that indicates whether the engine version supports exporting the log
// types specified by ExportableLogTypes to CloudWatch Logs.
SupportsLogExportsToCloudwatchLogs bool
// A value that indicates whether you can use Aurora parallel query with a
// specific DB engine version.
SupportsParallelQuery bool
// Indicates whether the database engine version supports read replicas.
SupportsReadReplica bool
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []types.Tag
// A list of engine versions that this database engine version can be upgraded to.
ValidUpgradeTarget []types.UpgradeTarget
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyCustomDBEngineVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCustomDBEngineVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCustomDBEngineVersion{}, 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 = addOpModifyCustomDBEngineVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCustomDBEngineVersion(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_opModifyCustomDBEngineVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyCustomDBEngineVersion",
}
}
| 280 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the settings of an Amazon Aurora DB cluster or a Multi-AZ DB cluster.
// You can change one or more settings by specifying these parameters and the new
// values in the request. For more information on Amazon Aurora DB clusters, see
// What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) ModifyDBCluster(ctx context.Context, params *ModifyDBClusterInput, optFns ...func(*Options)) (*ModifyDBClusterOutput, error) {
if params == nil {
params = &ModifyDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBCluster", params, optFns, c.addOperationModifyDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBClusterInput struct {
// The DB cluster identifier for the cluster being modified. This parameter isn't
// case-sensitive. Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB
// clusters Constraints:
// - Must match the identifier of an existing DB cluster.
//
// This member is required.
DBClusterIdentifier *string
// The amount of storage in gibibytes (GiB) to allocate to each DB instance in the
// Multi-AZ DB cluster. Valid for Cluster Type: Multi-AZ DB clusters only
AllocatedStorage *int32
// Specifies whether engine mode changes from serverless to provisioned are
// allowed. Valid for Cluster Type: Aurora Serverless v1 DB clusters only
// Constraints:
// - You must allow engine mode changes when specifying a different value for
// the EngineMode parameter from the DB cluster's current engine mode.
AllowEngineModeChange bool
// Specifies whether major version upgrades are allowed. Valid for Cluster Type:
// Aurora DB clusters only Constraints:
// - You must allow major version upgrades when specifying a value for the
// EngineVersion parameter that is a different major version than the DB
// cluster's current version.
AllowMajorVersionUpgrade bool
// Specifies whether the modifications in this request and any pending
// modifications are asynchronously applied as soon as possible, regardless of the
// PreferredMaintenanceWindow setting for the DB cluster. If this parameter is
// disabled, changes to the DB cluster are applied during the next maintenance
// window. Most modifications can be applied immediately or during the next
// scheduled maintenance window. Some modifications, such as turning on deletion
// protection and changing the master password, are applied immediately—regardless
// of when you choose to apply them. By default, this parameter is disabled. Valid
// for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters
ApplyImmediately bool
// Specifies whether minor engine upgrades are applied automatically to the DB
// cluster during the maintenance window. By default, minor engine upgrades are
// applied automatically. Valid for Cluster Type: Multi-AZ DB clusters only
AutoMinorVersionUpgrade *bool
// The target backtrack window, in seconds. To disable backtracking, set this
// value to 0 . Valid for Cluster Type: Aurora MySQL DB clusters only Default: 0
// Constraints:
// - If specified, this value must be set to a number from 0 to 259,200 (72
// hours).
BacktrackWindow *int64
// The number of days for which automated backups are retained. Specify a minimum
// value of 1 . Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters
// Default: 1 Constraints:
// - Must be a value from 1 to 35.
BackupRetentionPeriod *int32
// The configuration setting for the log types to be enabled for export to
// CloudWatch Logs for a specific DB cluster. Valid for Cluster Type: Aurora DB
// clusters and Multi-AZ DB clusters The following values are valid for each DB
// engine:
// - Aurora MySQL - audit | error | general | slowquery
// - Aurora PostgreSQL - postgresql
// - RDS for MySQL - error | general | slowquery
// - RDS for PostgreSQL - postgresql | upgrade
// For more information about exporting CloudWatch Logs for Amazon RDS, see
// Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. For more information about exporting CloudWatch
// Logs for Amazon Aurora, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon Aurora User Guide.
CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration
// Specifies whether to copy all tags from the DB cluster to snapshots of the DB
// cluster. The default is not to copy them. Valid for Cluster Type: Aurora DB
// clusters and Multi-AZ DB clusters
CopyTagsToSnapshot *bool
// The compute and memory capacity of each DB instance in the Multi-AZ DB cluster,
// for example db.m6gd.xlarge . Not all DB instance classes are available in all
// Amazon Web Services Regions, or for all database engines. For the full list of
// DB instance classes and availability for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Valid for Cluster Type: Multi-AZ DB clusters only
DBClusterInstanceClass *string
// The name of the DB cluster parameter group to use for the DB cluster. Valid for
// Cluster Type: Aurora DB clusters and Multi-AZ DB clusters
DBClusterParameterGroupName *string
// The name of the DB parameter group to apply to all instances of the DB cluster.
// When you apply a parameter group using the DBInstanceParameterGroupName
// parameter, the DB cluster isn't rebooted automatically. Also, parameter changes
// are applied immediately rather than during the next maintenance window. Valid
// for Cluster Type: Aurora DB clusters only Default: The existing name setting
// Constraints:
// - The DB parameter group must be in the same DB parameter group family as
// this DB cluster.
// - The DBInstanceParameterGroupName parameter is valid in combination with the
// AllowMajorVersionUpgrade parameter for a major version upgrade only.
DBInstanceParameterGroupName *string
// Specifies whether the DB cluster has deletion protection enabled. The database
// can't be deleted when deletion protection is enabled. By default, deletion
// protection isn't enabled. Valid for Cluster Type: Aurora DB clusters and
// Multi-AZ DB clusters
DeletionProtection *bool
// The Active Directory directory ID to move the DB cluster to. Specify none to
// remove the cluster from its current domain. The domain must be created prior to
// this operation. For more information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only
Domain *string
// The name of the IAM role to use when making API calls to the Directory Service.
// Valid for Cluster Type: Aurora DB clusters only
DomainIAMRoleName *string
// Specifies whether to enable this DB cluster to forward write operations to the
// primary cluster of a global cluster (Aurora global database). By default, write
// operations are not allowed on Aurora DB clusters that are secondary clusters in
// an Aurora global database. You can set this value only on Aurora DB clusters
// that are members of an Aurora global database. With this parameter enabled, a
// secondary cluster can forward writes to the current primary cluster, and the
// resulting changes are replicated back to this cluster. For the primary DB
// cluster of an Aurora global database, this value is used immediately if the
// primary is demoted by a global cluster API operation, but it does nothing until
// then. Valid for Cluster Type: Aurora DB clusters only
EnableGlobalWriteForwarding *bool
// Specifies whether to enable the HTTP endpoint for an Aurora Serverless v1 DB
// cluster. By default, the HTTP endpoint is disabled. When enabled, the HTTP
// endpoint provides a connectionless web service API for running SQL queries on
// the Aurora Serverless v1 DB cluster. You can also query your database from
// inside the RDS console with the query editor. For more information, see Using
// the Data API for Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only
EnableHttpEndpoint *bool
// Specifies whether to enable mapping of Amazon Web Services Identity and Access
// Management (IAM) accounts to database accounts. By default, mapping isn't
// enabled. For more information, see IAM Database Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only
EnableIAMDatabaseAuthentication *bool
// Specifies whether to turn on Performance Insights for the DB cluster. For more
// information, see Using Amazon Performance Insights (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html)
// in the Amazon RDS User Guide. Valid for Cluster Type: Multi-AZ DB clusters only
EnablePerformanceInsights *bool
// The DB engine mode of the DB cluster, either provisioned or serverless . The DB
// engine mode can be modified only from serverless to provisioned . For more
// information, see CreateDBCluster (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html)
// . Valid for Cluster Type: Aurora DB clusters only
EngineMode *string
// The version number of the database engine to which you want to upgrade.
// Changing this parameter results in an outage. The change is applied during the
// next maintenance window unless ApplyImmediately is enabled. If the cluster that
// you're modifying has one or more read replicas, all replicas must be running an
// engine version that's the same or later than the version you specify. To list
// all of the available engine versions for Aurora MySQL, use the following
// command: aws rds describe-db-engine-versions --engine aurora-mysql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for Aurora PostgreSQL, use the following command: aws rds
// describe-db-engine-versions --engine aurora-postgresql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for RDS for MySQL, use the following command: aws rds
// describe-db-engine-versions --engine mysql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for RDS for PostgreSQL, use the following command: aws rds
// describe-db-engine-versions --engine postgres --query
// "DBEngineVersions[].EngineVersion" Valid for Cluster Type: Aurora DB clusters
// and Multi-AZ DB clusters
EngineVersion *string
// The amount of Provisioned IOPS (input/output operations per second) to be
// initially allocated for each DB instance in the Multi-AZ DB cluster. For
// information about valid IOPS values, see Amazon RDS Provisioned IOPS storage (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
// in the Amazon RDS User Guide. Valid for Cluster Type: Multi-AZ DB clusters only
// Constraints:
// - Must be a multiple between .5 and 50 of the storage amount for the DB
// cluster.
Iops *int32
// Specifies whether to manage the master user password with Amazon Web Services
// Secrets Manager. If the DB cluster doesn't manage the master user password with
// Amazon Web Services Secrets Manager, you can turn on this management. In this
// case, you can't specify MasterUserPassword . If the DB cluster already manages
// the master user password with Amazon Web Services Secrets Manager, and you
// specify that the master user password is not managed with Amazon Web Services
// Secrets Manager, then you must specify MasterUserPassword . In this case, RDS
// deletes the secret and uses the new password for the master user specified by
// MasterUserPassword . For more information, see Password management with Amazon
// Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide and Password management with Amazon Web Services
// Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters and
// Multi-AZ DB clusters
ManageMasterUserPassword *bool
// The new password for the master database user. Valid for Cluster Type: Aurora
// DB clusters and Multi-AZ DB clusters Constraints:
// - Must contain from 8 to 41 characters.
// - Can contain any printable ASCII character except "/", """, or "@".
// - Can't be specified if ManageMasterUserPassword is turned on.
MasterUserPassword *string
// The Amazon Web Services KMS key identifier to encrypt a secret that is
// automatically generated and managed in Amazon Web Services Secrets Manager. This
// setting is valid only if both of the following conditions are met:
// - The DB cluster doesn't manage the master user password in Amazon Web
// Services Secrets Manager. If the DB cluster already manages the master user
// password in Amazon Web Services Secrets Manager, you can't change the KMS key
// that is used to encrypt the secret.
// - You are turning on ManageMasterUserPassword to manage the master user
// password in Amazon Web Services Secrets Manager. If you are turning on
// ManageMasterUserPassword and don't specify MasterUserSecretKmsKeyId , then the
// aws/secretsmanager KMS key is used to encrypt the secret. If the secret is in
// a different Amazon Web Services account, then you can't use the
// aws/secretsmanager KMS key to encrypt the secret, and you must use a customer
// managed KMS key.
// The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN,
// or alias name for the KMS key. To use a KMS key in a different Amazon Web
// Services account, specify the key ARN or alias ARN. There is a default KMS key
// for your Amazon Web Services account. Your Amazon Web Services account has a
// different default KMS key for each Amazon Web Services Region. Valid for Cluster
// Type: Aurora DB clusters and Multi-AZ DB clusters
MasterUserSecretKmsKeyId *string
// The interval, in seconds, between points when Enhanced Monitoring metrics are
// collected for the DB cluster. To turn off collecting Enhanced Monitoring
// metrics, specify 0 . If MonitoringRoleArn is specified, also set
// MonitoringInterval to a value other than 0 . Valid for Cluster Type: Multi-AZ DB
// clusters only Valid Values: 0 | 1 | 5 | 10 | 15 | 30 | 60 Default: 0
MonitoringInterval *int32
// The Amazon Resource Name (ARN) for the IAM role that permits RDS to send
// Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is
// arn:aws:iam:123456789012:role/emaccess . For information on creating a
// monitoring role, see To create an IAM role for Amazon RDS Enhanced Monitoring (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole)
// in the Amazon RDS User Guide. If MonitoringInterval is set to a value other
// than 0 , supply a MonitoringRoleArn value. Valid for Cluster Type: Multi-AZ DB
// clusters only
MonitoringRoleArn *string
// The network type of the DB cluster. The network type is determined by the
// DBSubnetGroup specified for the DB cluster. A DBSubnetGroup can support only
// the IPv4 protocol or the IPv4 and the IPv6 protocols ( DUAL ). For more
// information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters only
// Valid Values: IPV4 | DUAL
NetworkType *string
// The new DB cluster identifier for the DB cluster when renaming a DB cluster.
// This value is stored as a lowercase string. Valid for Cluster Type: Aurora DB
// clusters and Multi-AZ DB clusters Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens.
// - The first character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Example: my-cluster2
NewDBClusterIdentifier *string
// The option group to associate the DB cluster with. DB clusters are associated
// with a default option group that can't be modified.
OptionGroupName *string
// The Amazon Web Services KMS key identifier for encryption of Performance
// Insights data. The Amazon Web Services KMS key identifier is the key ARN, key
// ID, alias ARN, or alias name for the KMS key. If you don't specify a value for
// PerformanceInsightsKMSKeyId , then Amazon RDS uses your default KMS key. There
// is a default KMS key for your Amazon Web Services account. Your Amazon Web
// Services account has a different default KMS key for each Amazon Web Services
// Region. Valid for Cluster Type: Multi-AZ DB clusters only
PerformanceInsightsKMSKeyId *string
// The number of days to retain Performance Insights data. Valid for Cluster Type:
// Multi-AZ DB clusters only Valid Values:
// - 7
// - month * 31, where month is a number of months from 1-23. Examples: 93 (3
// months * 31), 341 (11 months * 31), 589 (19 months * 31)
// - 731
// Default: 7 days If you specify a retention period that isn't valid, such as 94 ,
// Amazon RDS issues an error.
PerformanceInsightsRetentionPeriod *int32
// The port number on which the DB cluster accepts connections. Valid for Cluster
// Type: Aurora DB clusters only Valid Values: 1150-65535 Default: The same port
// as the original DB cluster.
Port *int32
// The daily time range during which automated backups are created if automated
// backups are enabled, using the BackupRetentionPeriod parameter. The default is
// a 30-minute window selected at random from an 8-hour block of time for each
// Amazon Web Services Region. To view the time blocks available, see Backup window (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters and
// Multi-AZ DB clusters Constraints:
// - Must be in the format hh24:mi-hh24:mi .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred maintenance window.
// - Must be at least 30 minutes.
PreferredBackupWindow *string
// The weekly time range during which system maintenance can occur, in Universal
// Coordinated Time (UTC). Valid for Cluster Type: Aurora DB clusters and Multi-AZ
// DB clusters The default is a 30-minute window selected at random from an 8-hour
// block of time for each Amazon Web Services Region, occurring on a random day of
// the week. To see the time blocks available, see Adjusting the Preferred DB
// Cluster Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora)
// in the Amazon Aurora User Guide. Constraints:
// - Must be in the format ddd:hh24:mi-ddd:hh24:mi .
// - Days must be one of Mon | Tue | Wed | Thu | Fri | Sat | Sun .
// - Must be in Universal Coordinated Time (UTC).
// - Must be at least 30 minutes.
PreferredMaintenanceWindow *string
// Specifies whether to rotate the secret managed by Amazon Web Services Secrets
// Manager for the master user password. This setting is valid only if the master
// user password is managed by RDS in Amazon Web Services Secrets Manager for the
// DB cluster. The secret value contains the updated password. For more
// information, see Password management with Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide and Password management with Amazon Web Services
// Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html)
// in the Amazon Aurora User Guide. Valid for Cluster Type: Aurora DB clusters and
// Multi-AZ DB clusters Constraints:
// - You must apply the change immediately when rotating the master user
// password.
RotateMasterUserPassword *bool
// The scaling properties of the DB cluster. You can only modify scaling
// properties for DB clusters in serverless DB engine mode. Valid for Cluster
// Type: Aurora DB clusters only
ScalingConfiguration *types.ScalingConfiguration
// Contains the scaling configuration of an Aurora Serverless v2 DB cluster. For
// more information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration
// The storage type to associate with the DB cluster. For information on storage
// types for Aurora DB clusters, see Storage configurations for Amazon Aurora DB
// clusters (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.StorageReliability.html#aurora-storage-type)
// . For information on storage types for Multi-AZ DB clusters, see Settings for
// creating Multi-AZ DB clusters (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/create-multi-az-db-cluster.html#create-multi-az-db-cluster-settings)
// . When specified for a Multi-AZ DB cluster, a value for the Iops parameter is
// required. Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters
// Valid Values:
// - Aurora DB clusters - aurora | aurora-iopt1
// - Multi-AZ DB clusters - io1
// Default:
// - Aurora DB clusters - aurora
// - Multi-AZ DB clusters - io1
StorageType *string
// A list of EC2 VPC security groups to associate with this DB cluster. Valid for
// Cluster Type: Aurora DB clusters and Multi-AZ DB clusters
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type ModifyDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBCluster{}, 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 = addOpModifyDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBCluster(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_opModifyDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBCluster",
}
}
| 493 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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 the properties of an endpoint in an Amazon Aurora DB cluster. This
// action only applies to Aurora DB clusters.
func (c *Client) ModifyDBClusterEndpoint(ctx context.Context, params *ModifyDBClusterEndpointInput, optFns ...func(*Options)) (*ModifyDBClusterEndpointOutput, error) {
if params == nil {
params = &ModifyDBClusterEndpointInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterEndpoint", params, optFns, c.addOperationModifyDBClusterEndpointMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBClusterEndpointOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBClusterEndpointInput struct {
// The identifier of the endpoint to modify. This parameter is stored as a
// lowercase string.
//
// This member is required.
DBClusterEndpointIdentifier *string
// The type of the endpoint. One of: READER , WRITER , ANY .
EndpointType *string
// List of DB instance identifiers that aren't part of the custom endpoint group.
// All other eligible instances are reachable through the custom endpoint. Only
// relevant if the list of static members is empty.
ExcludedMembers []string
// List of DB instance identifiers that are part of the custom endpoint group.
StaticMembers []string
noSmithyDocumentSerde
}
// This data type represents the information you need to connect to an Amazon
// Aurora DB cluster. This data type is used as a response element in the following
// actions:
// - CreateDBClusterEndpoint
// - DescribeDBClusterEndpoints
// - ModifyDBClusterEndpoint
// - DeleteDBClusterEndpoint
//
// For the data structure that represents Amazon RDS DB instance endpoints, see
// Endpoint .
type ModifyDBClusterEndpointOutput struct {
// The type associated with a custom endpoint. One of: READER , WRITER , ANY .
CustomEndpointType *string
// The Amazon Resource Name (ARN) for the endpoint.
DBClusterEndpointArn *string
// The identifier associated with the endpoint. This parameter is stored as a
// lowercase string.
DBClusterEndpointIdentifier *string
// A unique system-generated identifier for an endpoint. It remains the same for
// the whole life of the endpoint.
DBClusterEndpointResourceIdentifier *string
// The DB cluster identifier of the DB cluster associated with the endpoint. This
// parameter is stored as a lowercase string.
DBClusterIdentifier *string
// The DNS address of the endpoint.
Endpoint *string
// The type of the endpoint. One of: READER , WRITER , CUSTOM .
EndpointType *string
// List of DB instance identifiers that aren't part of the custom endpoint group.
// All other eligible instances are reachable through the custom endpoint. Only
// relevant if the list of static members is empty.
ExcludedMembers []string
// List of DB instance identifiers that are part of the custom endpoint group.
StaticMembers []string
// The current status of the endpoint. One of: creating , available , deleting ,
// inactive , modifying . The inactive state applies to an endpoint that can't be
// used for a certain kind of cluster, such as a writer endpoint for a read-only
// secondary cluster in a global database.
Status *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBClusterEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterEndpoint{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterEndpoint{}, 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 = addOpModifyDBClusterEndpointValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterEndpoint(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_opModifyDBClusterEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBClusterEndpoint",
}
}
| 182 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the parameters of a DB cluster parameter group. To modify more than
// one parameter, submit a list of the following: ParameterName , ParameterValue ,
// and ApplyMethod . A maximum of 20 parameters can be modified in a single
// request. After you create a DB cluster parameter group, you should wait at least
// 5 minutes before creating your first DB cluster that uses that DB cluster
// parameter group as the default parameter group. This allows Amazon RDS to fully
// complete the create action before the parameter group is used as the default for
// a new DB cluster. This is especially important for parameters that are critical
// when creating the default database for a DB cluster, such as the character set
// for the default database defined by the character_set_database parameter. You
// can use the Parameter Groups option of the Amazon RDS console (https://console.aws.amazon.com/rds/)
// or the DescribeDBClusterParameters operation to verify that your DB cluster
// parameter group has been created or modified. If the modified DB cluster
// parameter group is used by an Aurora Serverless v1 cluster, Aurora applies the
// update immediately. The cluster restart might interrupt your workload. In that
// case, your application must reopen any connections and retry any transactions
// that were active when the parameter changes took effect. For more information on
// Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) ModifyDBClusterParameterGroup(ctx context.Context, params *ModifyDBClusterParameterGroupInput, optFns ...func(*Options)) (*ModifyDBClusterParameterGroupOutput, error) {
if params == nil {
params = &ModifyDBClusterParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterParameterGroup", params, optFns, c.addOperationModifyDBClusterParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBClusterParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBClusterParameterGroupInput struct {
// The name of the DB cluster parameter group to modify.
//
// This member is required.
DBClusterParameterGroupName *string
// A list of parameters in the DB cluster parameter group to modify. Valid Values
// (for the application method): immediate | pending-reboot You can use the
// immediate value with dynamic parameters only. You can use the pending-reboot
// value for both dynamic and static parameters. When the application method is
// immediate , changes to dynamic parameters are applied immediately to the DB
// clusters associated with the parameter group. When the application method is
// pending-reboot , changes to dynamic and static parameters are applied after a
// reboot without failover to the DB clusters associated with the parameter group.
//
// This member is required.
Parameters []types.Parameter
noSmithyDocumentSerde
}
type ModifyDBClusterParameterGroupOutput struct {
// The name of the DB cluster parameter group. Constraints:
// - Must be 1 to 255 letters or numbers.
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// This value is stored as a lowercase string.
DBClusterParameterGroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterParameterGroup{}, 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 = addOpModifyDBClusterParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterParameterGroup(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_opModifyDBClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBClusterParameterGroup",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds an attribute and values to, or removes an attribute and values from, a
// manual DB cluster snapshot. To share a manual DB cluster snapshot with other
// Amazon Web Services accounts, specify restore as the AttributeName and use the
// ValuesToAdd parameter to add a list of IDs of the Amazon Web Services accounts
// that are authorized to restore the manual DB cluster snapshot. Use the value all
// to make the manual DB cluster snapshot public, which means that it can be copied
// or restored by all Amazon Web Services accounts. Don't add the all value for
// any manual DB cluster snapshots that contain private information that you don't
// want available to all Amazon Web Services accounts. If a manual DB cluster
// snapshot is encrypted, it can be shared, but only by specifying a list of
// authorized Amazon Web Services account IDs for the ValuesToAdd parameter. You
// can't use all as a value for that parameter in this case. To view which Amazon
// Web Services accounts have access to copy or restore a manual DB cluster
// snapshot, or whether a manual DB cluster snapshot is public or private, use the
// DescribeDBClusterSnapshotAttributes API operation. The accounts are returned as
// values for the restore attribute.
func (c *Client) ModifyDBClusterSnapshotAttribute(ctx context.Context, params *ModifyDBClusterSnapshotAttributeInput, optFns ...func(*Options)) (*ModifyDBClusterSnapshotAttributeOutput, error) {
if params == nil {
params = &ModifyDBClusterSnapshotAttributeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterSnapshotAttribute", params, optFns, c.addOperationModifyDBClusterSnapshotAttributeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBClusterSnapshotAttributeOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBClusterSnapshotAttributeInput struct {
// The name of the DB cluster snapshot attribute to modify. To manage
// authorization for other Amazon Web Services accounts to copy or restore a manual
// DB cluster snapshot, set this value to restore . To view the list of attributes
// available to modify, use the DescribeDBClusterSnapshotAttributes API operation.
//
// This member is required.
AttributeName *string
// The identifier for the DB cluster snapshot to modify the attributes for.
//
// This member is required.
DBClusterSnapshotIdentifier *string
// A list of DB cluster snapshot attributes to add to the attribute specified by
// AttributeName . To authorize other Amazon Web Services accounts to copy or
// restore a manual DB cluster snapshot, set this list to include one or more
// Amazon Web Services account IDs, or all to make the manual DB cluster snapshot
// restorable by any Amazon Web Services account. Do not add the all value for any
// manual DB cluster snapshots that contain private information that you don't want
// available to all Amazon Web Services accounts.
ValuesToAdd []string
// A list of DB cluster snapshot attributes to remove from the attribute specified
// by AttributeName . To remove authorization for other Amazon Web Services
// accounts to copy or restore a manual DB cluster snapshot, set this list to
// include one or more Amazon Web Services account identifiers, or all to remove
// authorization for any Amazon Web Services account to copy or restore the DB
// cluster snapshot. If you specify all , an Amazon Web Services account whose
// account ID is explicitly added to the restore attribute can still copy or
// restore a manual DB cluster snapshot.
ValuesToRemove []string
noSmithyDocumentSerde
}
type ModifyDBClusterSnapshotAttributeOutput struct {
// Contains the results of a successful call to the
// DescribeDBClusterSnapshotAttributes API action. Manual DB cluster snapshot
// attributes are used to authorize other Amazon Web Services accounts to copy or
// restore a manual DB cluster snapshot. For more information, see the
// ModifyDBClusterSnapshotAttribute API action.
DBClusterSnapshotAttributesResult *types.DBClusterSnapshotAttributesResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBClusterSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterSnapshotAttribute{}, 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 = addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterSnapshotAttribute(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_opModifyDBClusterSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBClusterSnapshotAttribute",
}
}
| 171 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies settings for a DB instance. You can change one or more database
// configuration parameters by specifying these parameters and the new values in
// the request. To learn what modifications you can make to your DB instance, call
// DescribeValidDBInstanceModifications before you call ModifyDBInstance .
func (c *Client) ModifyDBInstance(ctx context.Context, params *ModifyDBInstanceInput, optFns ...func(*Options)) (*ModifyDBInstanceOutput, error) {
if params == nil {
params = &ModifyDBInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBInstance", params, optFns, c.addOperationModifyDBInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBInstanceInput struct {
// The identifier of DB instance to modify. This value is stored as a lowercase
// string. Constraints:
// - Must match the identifier of an existing DB instance.
//
// This member is required.
DBInstanceIdentifier *string
// The new amount of storage in gibibytes (GiB) to allocate for the DB instance.
// For RDS for MariaDB, RDS for MySQL, RDS for Oracle, and RDS for PostgreSQL, the
// value supplied must be at least 10% greater than the current value. Values that
// are not at least 10% greater than the existing value are rounded up so that they
// are 10% greater than the current value. For the valid values for allocated
// storage for each engine, see CreateDBInstance .
AllocatedStorage *int32
// Specifies whether major version upgrades are allowed. Changing this parameter
// doesn't result in an outage and the change is asynchronously applied as soon as
// possible. This setting doesn't apply to RDS Custom DB instances. Constraints:
// - Major version upgrades must be allowed when specifying a value for the
// EngineVersion parameter that's a different major version than the DB
// instance's current version.
AllowMajorVersionUpgrade bool
// Specifies whether the modifications in this request and any pending
// modifications are asynchronously applied as soon as possible, regardless of the
// PreferredMaintenanceWindow setting for the DB instance. By default, this
// parameter is disabled. If this parameter is disabled, changes to the DB instance
// are applied during the next maintenance window. Some parameter changes can cause
// an outage and are applied on the next call to RebootDBInstance , or the next
// failure reboot. Review the table of parameters in Modifying a DB Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)
// in the Amazon RDS User Guide to see the impact of enabling or disabling
// ApplyImmediately for each modified parameter and to determine when the changes
// are applied.
ApplyImmediately bool
// Specifies whether minor version upgrades are applied automatically to the DB
// instance during the maintenance window. An outage occurs when all the following
// conditions are met:
// - The automatic upgrade is enabled for the maintenance window.
// - A newer minor version is available.
// - RDS has enabled automatic patching for the engine version.
// If any of the preceding conditions isn't met, Amazon RDS applies the change as
// soon as possible and doesn't cause an outage. For an RDS Custom DB instance,
// don't enable this setting. Otherwise, the operation returns an error.
AutoMinorVersionUpgrade *bool
// The automation mode of the RDS Custom DB instance. If full , the DB instance
// automates monitoring and instance recovery. If all paused , the instance pauses
// automation for the duration set by ResumeFullAutomationModeMinutes .
AutomationMode types.AutomationMode
// The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services
// Backup. This setting doesn't apply to RDS Custom DB instances.
AwsBackupRecoveryPointArn *string
// The number of days to retain automated backups. Setting this parameter to a
// positive number enables backups. Setting this parameter to 0 disables automated
// backups. Enabling and disabling backups can result in a brief I/O suspension
// that lasts from a few seconds to a few minutes, depending on the size and class
// of your DB instance. These changes are applied during the next maintenance
// window unless the ApplyImmediately parameter is enabled for this request. If
// you change the parameter from one non-zero value to another non-zero value, the
// change is asynchronously applied as soon as possible. This setting doesn't apply
// to Amazon Aurora DB instances. The retention period for automated backups is
// managed by the DB cluster. For more information, see ModifyDBCluster . Default:
// Uses existing setting Constraints:
// - Must be a value from 0 to 35.
// - Can't be set to 0 if the DB instance is a source to read replicas.
// - Can't be set to 0 for an RDS Custom for Oracle DB instance.
BackupRetentionPeriod *int32
// The CA certificate identifier to use for the DB instance6's server certificate.
// This setting doesn't apply to RDS Custom DB instances. For more information, see
// Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
CACertificateIdentifier *string
// Specifies whether the DB instance is restarted when you rotate your SSL/TLS
// certificate. By default, the DB instance is restarted when you rotate your
// SSL/TLS certificate. The certificate is not updated until the DB instance is
// restarted. Set this parameter only if you are not using SSL/TLS to connect to
// the DB instance. If you are using SSL/TLS to connect to the DB instance, follow
// the appropriate instructions for your DB engine to rotate your SSL/TLS
// certificate:
// - For more information about rotating your SSL/TLS certificate for RDS DB
// engines, see Rotating Your SSL/TLS Certificate. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html)
// in the Amazon RDS User Guide.
// - For more information about rotating your SSL/TLS certificate for Aurora DB
// engines, see Rotating Your SSL/TLS Certificate (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html)
// in the Amazon Aurora User Guide.
// This setting doesn't apply to RDS Custom DB instances.
CertificateRotationRestart *bool
// The log types to be enabled for export to CloudWatch Logs for a specific DB
// instance. A change to the CloudwatchLogsExportConfiguration parameter is always
// applied to the DB instance immediately. Therefore, the ApplyImmediately
// parameter has no effect. This setting doesn't apply to RDS Custom DB instances.
CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration
// Specifies whether to copy all tags from the DB instance to snapshots of the DB
// instance. By default, tags aren't copied. This setting doesn't apply to Amazon
// Aurora DB instances. Copying tags to snapshots is managed by the DB cluster.
// Setting this value for an Aurora DB instance has no effect on the DB cluster
// setting. For more information, see ModifyDBCluster .
CopyTagsToSnapshot *bool
// The new compute and memory capacity of the DB instance, for example db.m4.large
// . Not all DB instance classes are available in all Amazon Web Services Regions,
// or for all database engines. For the full list of DB instance classes, and
// availability for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide or Aurora DB instance classes (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html)
// in the Amazon Aurora User Guide. For RDS Custom, see DB instance class support
// for RDS Custom for Oracle (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-reqs-limits.html#custom-reqs-limits.instances)
// and DB instance class support for RDS Custom for SQL Server (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-reqs-limits-MS.html#custom-reqs-limits.instancesMS)
// . If you modify the DB instance class, an outage occurs during the change. The
// change is applied during the next maintenance window, unless you specify
// ApplyImmediately in your request. Default: Uses existing setting
DBInstanceClass *string
// The name of the DB parameter group to apply to the DB instance. Changing this
// setting doesn't result in an outage. The parameter group name itself is changed
// immediately, but the actual parameter changes are not applied until you reboot
// the instance without failover. In this case, the DB instance isn't rebooted
// automatically, and the parameter changes aren't applied during the next
// maintenance window. However, if you modify dynamic parameters in the newly
// associated DB parameter group, these changes are applied immediately without a
// reboot. This setting doesn't apply to RDS Custom DB instances. Default: Uses
// existing setting Constraints:
// - Must be in the same DB parameter group family as the DB instance.
DBParameterGroupName *string
// The port number on which the database accepts connections. The value of the
// DBPortNumber parameter must not match any of the port values specified for
// options in the option group for the DB instance. If you change the DBPortNumber
// value, your database restarts regardless of the value of the ApplyImmediately
// parameter. This setting doesn't apply to RDS Custom DB instances. Valid Values:
// 1150-65535 Default:
// - Amazon Aurora - 3306
// - RDS for MariaDB - 3306
// - RDS for Microsoft SQL Server - 1433
// - RDS for MySQL - 3306
// - RDS for Oracle - 1521
// - RDS for PostgreSQL - 5432
// Constraints:
// - For RDS for Microsoft SQL Server, the value can't be 1234 , 1434 , 3260 ,
// 3343 , 3389 , 47001 , or 49152-49156 .
DBPortNumber *int32
// A list of DB security groups to authorize on this DB instance. Changing this
// setting doesn't result in an outage and the change is asynchronously applied as
// soon as possible. This setting doesn't apply to RDS Custom DB instances.
// Constraints:
// - If supplied, must match existing DB security groups.
DBSecurityGroups []string
// The new DB subnet group for the DB instance. You can use this parameter to move
// your DB instance to a different VPC. If your DB instance isn't in a VPC, you can
// also use this parameter to move your DB instance into a VPC. For more
// information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Non-VPC2VPC)
// in the Amazon RDS User Guide. Changing the subnet group causes an outage during
// the change. The change is applied during the next maintenance window, unless you
// enable ApplyImmediately . This parameter doesn't apply to RDS Custom DB
// instances. Constraints:
// - If supplied, must match existing DB subnet group.
// Example: mydbsubnetgroup
DBSubnetGroupName *string
// Specifies whether the DB instance has deletion protection enabled. The database
// can't be deleted when deletion protection is enabled. By default, deletion
// protection isn't enabled. For more information, see Deleting a DB Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html)
// .
DeletionProtection *bool
// Boolean. If present, removes the instance from the Active Directory domain.
DisableDomain *bool
// The Active Directory directory ID to move the DB instance to. Specify none to
// remove the instance from its current domain. You must create the domain before
// this operation. Currently, you can create only MySQL, Microsoft SQL Server,
// Oracle, and PostgreSQL DB instances in an Active Directory Domain. For more
// information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom DB
// instances.
Domain *string
// The ARN for the Secrets Manager secret that contains the credentials for the
// user performing the domain join. Example:
// arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456
DomainAuthSecretArn *string
// The IPv4 DNS IP addresses of your primary and secondary Active Directory domain
// controllers. Constraints:
// - Two IP addresses must be provided. If there isn't a secondary domain
// controller, use the IP address of the primary domain controller for both entries
// in the list.
// Example: 123.124.125.126,234.235.236.237
DomainDnsIps []string
// Specifies the fully qualified domain name of an Active Directory domain.
// Constraints:
// - Cannot be greater than 64 characters.
// Example: mymanagedADtest.mymanagedAD.mydomain
DomainFqdn *string
// The name of the IAM role to use when making API calls to the Directory Service.
// This setting doesn't apply to RDS Custom DB instances.
DomainIAMRoleName *string
// The Active Directory organizational unit for your DB instance to join.
// Constraints:
// - Must be in the distinguished name format.
// - Cannot be greater than 64 characters.
// Example: OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain
DomainOu *string
// Specifies whether to enable a customer-owned IP address (CoIP) for an RDS on
// Outposts DB instance. A CoIP provides local or external connectivity to
// resources in your Outpost subnets through your on-premises network. For some use
// cases, a CoIP can provide lower latency for connections to the DB instance from
// outside of its virtual private cloud (VPC) on your local network. For more
// information about RDS on Outposts, see Working with Amazon RDS on Amazon Web
// Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide. For more information about CoIPs, see
// Customer-owned IP addresses (https://docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing)
// in the Amazon Web Services Outposts User Guide.
EnableCustomerOwnedIp *bool
// Specifies whether to enable mapping of Amazon Web Services Identity and Access
// Management (IAM) accounts to database accounts. By default, mapping isn't
// enabled. This setting doesn't apply to Amazon Aurora. Mapping Amazon Web
// Services IAM accounts to database accounts is managed by the DB cluster. For
// more information about IAM database authentication, see IAM Database
// Authentication for MySQL and PostgreSQL (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom DB
// instances.
EnableIAMDatabaseAuthentication *bool
// Specifies whether to enable Performance Insights for the DB instance. For more
// information, see Using Amazon Performance Insights (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom DB
// instances.
EnablePerformanceInsights *bool
// The target Oracle DB engine when you convert a non-CDB to a CDB. This
// intermediate step is necessary to upgrade an Oracle Database 19c non-CDB to an
// Oracle Database 21c CDB. Note the following requirements:
// - Make sure that you specify oracle-ee-cdb or oracle-se2-cdb .
// - Make sure that your DB engine runs Oracle Database 19c with an April 2021
// or later RU.
// Note the following limitations:
// - You can't convert a CDB to a non-CDB.
// - You can't convert a replica database.
// - You can't convert a non-CDB to a CDB and upgrade the engine version in the
// same command.
// - You can't convert the existing custom parameter or option group when it has
// options or parameters that are permanent or persistent. In this situation, the
// DB instance reverts to the default option and parameter group. To avoid
// reverting to the default, specify a new parameter group with
// --db-parameter-group-name and a new option group with --option-group-name .
Engine *string
// The version number of the database engine to upgrade to. Changing this
// parameter results in an outage and the change is applied during the next
// maintenance window unless the ApplyImmediately parameter is enabled for this
// request. For major version upgrades, if a nondefault DB parameter group is
// currently in use, a new DB parameter group in the DB parameter group family for
// the new engine version must be specified. The new DB parameter group can be the
// default for that DB parameter group family. If you specify only a major version,
// Amazon RDS updates the DB instance to the default minor version if the current
// minor version is lower. For information about valid engine versions, see
// CreateDBInstance , or call DescribeDBEngineVersions . If the instance that
// you're modifying is acting as a read replica, the engine version that you
// specify must be the same or higher than the version that the source DB instance
// or cluster is running. In RDS Custom for Oracle, this parameter is supported for
// read replicas only if they are in the PATCH_DB_FAILURE lifecycle.
EngineVersion *string
// The new Provisioned IOPS (I/O operations per second) value for the RDS
// instance. Changing this setting doesn't result in an outage and the change is
// applied during the next maintenance window unless the ApplyImmediately
// parameter is enabled for this request. If you are migrating from Provisioned
// IOPS to standard storage, set this value to 0. The DB instance will require a
// reboot for the change in storage type to take effect. If you choose to migrate
// your DB instance from using standard storage to using Provisioned IOPS, or from
// using Provisioned IOPS to using standard storage, the process can take time. The
// duration of the migration depends on several factors such as database load,
// storage size, storage type (standard or Provisioned IOPS), amount of IOPS
// provisioned (if any), and the number of prior scale storage operations. Typical
// migration times are under 24 hours, but the process can take up to several days
// in some cases. During the migration, the DB instance is available for use, but
// might experience performance degradation. While the migration takes place,
// nightly backups for the instance are suspended. No other Amazon RDS operations
// can take place for the instance, including modifying the instance, rebooting the
// instance, deleting the instance, creating a read replica for the instance, and
// creating a DB snapshot of the instance. Constraints:
// - For RDS for MariaDB, RDS for MySQL, RDS for Oracle, and RDS for PostgreSQL
// - The value supplied must be at least 10% greater than the current value. Values
// that are not at least 10% greater than the existing value are rounded up so that
// they are 10% greater than the current value.
// Default: Uses existing setting
Iops *int32
// The license model for the DB instance. This setting doesn't apply to Amazon
// Aurora or RDS Custom DB instances. Valid Values:
// - RDS for MariaDB - general-public-license
// - RDS for Microsoft SQL Server - license-included
// - RDS for MySQL - general-public-license
// - RDS for Oracle - bring-your-own-license | license-included
// - RDS for PostgreSQL - postgresql-license
LicenseModel *string
// Specifies whether to manage the master user password with Amazon Web Services
// Secrets Manager. If the DB instance doesn't manage the master user password with
// Amazon Web Services Secrets Manager, you can turn on this management. In this
// case, you can't specify MasterUserPassword . If the DB instance already manages
// the master user password with Amazon Web Services Secrets Manager, and you
// specify that the master user password is not managed with Amazon Web Services
// Secrets Manager, then you must specify MasterUserPassword . In this case, Amazon
// RDS deletes the secret and uses the new password for the master user specified
// by MasterUserPassword . For more information, see Password management with
// Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide. Constraints:
// - Can't manage the master user password with Amazon Web Services Secrets
// Manager if MasterUserPassword is specified.
ManageMasterUserPassword *bool
// The new password for the master user. Changing this parameter doesn't result in
// an outage and the 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. Amazon RDS API operations never return the password, so this
// action provides a way to regain access to a primary instance user if the
// password is lost. This includes restoring privileges that might have been
// accidentally revoked. This setting doesn't apply to the following DB instances:
// - Amazon Aurora (The password for the master user is managed by the DB
// cluster. For more information, see ModifyDBCluster .)
// - RDS Custom
// Default: Uses existing setting Constraints:
// - Can't be specified if ManageMasterUserPassword is turned on.
// - Can include any printable ASCII character except "/", """, or "@".
// Length Constraints:
// - RDS for MariaDB - Must contain from 8 to 41 characters.
// - RDS for Microsoft SQL Server - Must contain from 8 to 128 characters.
// - RDS for MySQL - Must contain from 8 to 41 characters.
// - RDS for Oracle - Must contain from 8 to 30 characters.
// - RDS for PostgreSQL - Must contain from 8 to 128 characters.
MasterUserPassword *string
// The Amazon Web Services KMS key identifier to encrypt a secret that is
// automatically generated and managed in Amazon Web Services Secrets Manager. This
// setting is valid only if both of the following conditions are met:
// - The DB instance doesn't manage the master user password in Amazon Web
// Services Secrets Manager. If the DB instance already manages the master user
// password in Amazon Web Services Secrets Manager, you can't change the KMS key
// used to encrypt the secret.
// - You are turning on ManageMasterUserPassword to manage the master user
// password in Amazon Web Services Secrets Manager. If you are turning on
// ManageMasterUserPassword and don't specify MasterUserSecretKmsKeyId , then the
// aws/secretsmanager KMS key is used to encrypt the secret. If the secret is in
// a different Amazon Web Services account, then you can't use the
// aws/secretsmanager KMS key to encrypt the secret, and you must use a customer
// managed KMS key.
// The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN,
// or alias name for the KMS key. To use a KMS key in a different Amazon Web
// Services account, specify the key ARN or alias ARN. There is a default KMS key
// for your Amazon Web Services account. Your Amazon Web Services account has a
// different default KMS key for each Amazon Web Services Region.
MasterUserSecretKmsKeyId *string
// The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale
// the storage of the DB instance. For more information about this setting,
// including limitations that apply to it, see Managing capacity automatically
// with Amazon RDS storage autoscaling (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom DB
// instances.
MaxAllocatedStorage *int32
// The interval, in seconds, between points when Enhanced Monitoring metrics are
// collected for the DB instance. To disable collection of Enhanced Monitoring
// metrics, specify 0 . If MonitoringRoleArn is specified, set MonitoringInterval
// to a value other than 0 . This setting doesn't apply to RDS Custom DB instances.
// Valid Values: 0 | 1 | 5 | 10 | 15 | 30 | 60 Default: 0
MonitoringInterval *int32
// The ARN for the IAM role that permits RDS to send enhanced monitoring metrics
// to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess .
// For information on creating a monitoring role, see To create an IAM role for
// Amazon RDS Enhanced Monitoring (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole)
// in the Amazon RDS User Guide. If MonitoringInterval is set to a value other
// than 0 , supply a MonitoringRoleArn value. This setting doesn't apply to RDS
// Custom DB instances.
MonitoringRoleArn *string
// Specifies whether the DB instance is a Multi-AZ deployment. Changing this
// parameter doesn't result in an outage. The change is applied during the next
// maintenance window unless the ApplyImmediately parameter is enabled for this
// request. This setting doesn't apply to RDS Custom DB instances.
MultiAZ *bool
// The network type of the DB instance. The network type is determined by the
// DBSubnetGroup specified for the DB instance. A DBSubnetGroup can support only
// the IPv4 protocol or the IPv4 and the IPv6 protocols ( DUAL ). For more
// information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide. Valid Values: IPV4 | DUAL
NetworkType *string
// The new identifier for the DB instance when renaming a DB instance. When you
// change the DB instance identifier, an instance reboot occurs immediately if you
// enable ApplyImmediately , or will occur during the next maintenance window if
// you disable ApplyImmediately . This value is stored as a lowercase string. This
// setting doesn't apply to RDS Custom DB instances. Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens.
// - The first character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Example: mydbinstance
NewDBInstanceIdentifier *string
// The option group to associate the DB instance with. Changing this parameter
// doesn't result in an outage, with one exception. If the parameter change results
// in an option group that enables OEM, it can cause a brief period, lasting less
// than a second, during which new connections are rejected but existing
// connections aren't interrupted. The change is applied during the next
// maintenance window unless the ApplyImmediately parameter is enabled for this
// request. Permanent options, such as the TDE option for Oracle Advanced Security
// TDE, can't be removed from an option group, and that option group can't be
// removed from a DB instance after it is associated with a DB instance. This
// setting doesn't apply to RDS Custom DB instances.
OptionGroupName *string
// The Amazon Web Services KMS key identifier for encryption of Performance
// Insights data. The Amazon Web Services KMS key identifier is the key ARN, key
// ID, alias ARN, or alias name for the KMS key. If you don't specify a value for
// PerformanceInsightsKMSKeyId , then Amazon RDS uses your default KMS key. There
// is a default KMS key for your Amazon Web Services account. Your Amazon Web
// Services account has a different default KMS key for each Amazon Web Services
// Region. This setting doesn't apply to RDS Custom DB instances.
PerformanceInsightsKMSKeyId *string
// The number of days to retain Performance Insights data. This setting doesn't
// apply to RDS Custom DB instances. Valid Values:
// - 7
// - month * 31, where month is a number of months from 1-23. Examples: 93 (3
// months * 31), 341 (11 months * 31), 589 (19 months * 31)
// - 731
// Default: 7 days If you specify a retention period that isn't valid, such as 94 ,
// Amazon RDS returns an error.
PerformanceInsightsRetentionPeriod *int32
// The daily time range during which automated backups are created if automated
// backups are enabled, as determined by the BackupRetentionPeriod parameter.
// Changing this parameter doesn't result in an outage and the change is
// asynchronously applied as soon as possible. The default is a 30-minute window
// selected at random from an 8-hour block of time for each Amazon Web Services
// Region. For more information, see Backup window (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow)
// in the Amazon RDS User Guide. This setting doesn't apply to Amazon Aurora DB
// instances. The daily time range for creating automated backups is managed by the
// DB cluster. For more information, see ModifyDBCluster . Constraints:
// - Must be in the format hh24:mi-hh24:mi .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred maintenance window.
// - Must be at least 30 minutes.
PreferredBackupWindow *string
// The weekly time range during which system maintenance can occur, which might
// result in an outage. Changing this parameter doesn't result in an outage, except
// in the following situation, and the change is asynchronously applied as soon as
// possible. If there are pending actions that cause a reboot, and the maintenance
// window is changed to include the current time, then changing this parameter
// causes a reboot of the DB instance. If you change this window to the current
// time, there must be at least 30 minutes between the current time and end of the
// window to ensure pending changes are applied. For more information, see Amazon
// RDS Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance)
// in the Amazon RDS User Guide. Default: Uses existing setting Constraints:
// - Must be in the format ddd:hh24:mi-ddd:hh24:mi .
// - The day values must be mon | tue | wed | thu | fri | sat | sun .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred backup window.
// - Must be at least 30 minutes.
PreferredMaintenanceWindow *string
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance. This setting doesn't apply to RDS Custom DB instances.
ProcessorFeatures []types.ProcessorFeature
// The order of priority in which an Aurora Replica is promoted to the primary
// instance after a failure of the existing primary instance. For more information,
// see Fault Tolerance for an Aurora DB Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Aurora.Managing.FaultTolerance)
// in the Amazon Aurora User Guide. This setting doesn't apply to RDS Custom DB
// instances. Default: 1 Valid Values: 0 - 15
PromotionTier *int32
// Specifies whether the DB instance is publicly accessible. When the DB cluster
// is publicly accessible, its Domain Name System (DNS) endpoint resolves to the
// private IP address from within the DB cluster's virtual private cloud (VPC). It
// resolves to the public IP address from outside of the DB cluster's VPC. Access
// to the DB cluster is ultimately controlled by the security group it uses. That
// public access isn't permitted if the security group assigned to the DB cluster
// doesn't permit it. When the DB instance isn't publicly accessible, it is an
// internal DB instance with a DNS name that resolves to a private IP address.
// PubliclyAccessible only applies to DB instances in a VPC. The DB instance must
// be part of a public subnet and PubliclyAccessible must be enabled for it to be
// publicly accessible. Changes to the PubliclyAccessible parameter are applied
// immediately regardless of the value of the ApplyImmediately parameter.
PubliclyAccessible *bool
// A value that sets the open mode of a replica database to either mounted or
// read-only. Currently, this parameter is only supported for Oracle DB instances.
// Mounted DB replicas are included in Oracle Enterprise Edition. The main use case
// for mounted replicas is cross-Region disaster recovery. The primary database
// doesn't use Active Data Guard to transmit information to the mounted replica.
// Because it doesn't accept user connections, a mounted replica can't serve a
// read-only workload. For more information, see Working with Oracle Read Replicas
// for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom DB
// instances.
ReplicaMode types.ReplicaMode
// The number of minutes to pause the automation. When the time period ends, RDS
// Custom resumes full automation. Default: 60 Constraints:
// - Must be at least 60.
// - Must be no more than 1,440.
ResumeFullAutomationModeMinutes *int32
// Specifies whether to rotate the secret managed by Amazon Web Services Secrets
// Manager for the master user password. This setting is valid only if the master
// user password is managed by RDS in Amazon Web Services Secrets Manager for the
// DB cluster. The secret value contains the updated password. For more
// information, see Password management with Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide. Constraints:
// - You must apply the change immediately when rotating the master user
// password.
RotateMasterUserPassword *bool
// The storage throughput value for the DB instance. This setting applies only to
// the gp3 storage type. This setting doesn't apply to Amazon Aurora or RDS Custom
// DB instances.
StorageThroughput *int32
// The storage type to associate with the DB instance. If you specify Provisioned
// IOPS ( io1 ), you must also include a value for the Iops parameter. If you
// choose to migrate your DB instance from using standard storage to using
// Provisioned IOPS, or from using Provisioned IOPS to using standard storage, the
// process can take time. The duration of the migration depends on several factors
// such as database load, storage size, storage type (standard or Provisioned
// IOPS), amount of IOPS provisioned (if any), and the number of prior scale
// storage operations. Typical migration times are under 24 hours, but the process
// can take up to several days in some cases. During the migration, the DB instance
// is available for use, but might experience performance degradation. While the
// migration takes place, nightly backups for the instance are suspended. No other
// Amazon RDS operations can take place for the instance, including modifying the
// instance, rebooting the instance, deleting the instance, creating a read replica
// for the instance, and creating a DB snapshot of the instance. Valid Values: gp2
// | gp3 | io1 | standard Default: io1 , if the Iops parameter is specified.
// Otherwise, gp2 .
StorageType *string
// The ARN from the key store with which to associate the instance for TDE
// encryption. This setting doesn't apply to RDS Custom DB instances.
TdeCredentialArn *string
// The password for the given ARN from the key store in order to access the
// device. This setting doesn't apply to RDS Custom DB instances.
TdeCredentialPassword *string
// Specifies whether the DB instance class of the DB instance uses its default
// processor features. This setting doesn't apply to RDS Custom DB instances.
UseDefaultProcessorFeatures *bool
// A list of Amazon EC2 VPC security groups to associate with this DB instance.
// This change is asynchronously applied as soon as possible. This setting doesn't
// apply to the following DB instances:
// - Amazon Aurora (The associated list of EC2 VPC security groups is managed by
// the DB cluster. For more information, see ModifyDBCluster .)
// - RDS Custom
// Constraints:
// - If supplied, must match existing VPC security group IDs.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type ModifyDBInstanceOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBInstance{}, 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 = addOpModifyDBInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBInstance(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_opModifyDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBInstance",
}
}
| 708 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the parameters of a DB parameter group. To modify more than one
// parameter, submit a list of the following: ParameterName , ParameterValue , and
// ApplyMethod . A maximum of 20 parameters can be modified in a single request.
// After you modify a DB parameter group, you should wait at least 5 minutes before
// creating your first DB instance that uses that DB parameter group as the default
// parameter group. This allows Amazon RDS to fully complete the modify action
// before the parameter group is used as the default for a new DB instance. This is
// especially important for parameters that are critical when creating the default
// database for a DB instance, such as the character set for the default database
// defined by the character_set_database parameter. You can use the Parameter
// Groups option of the Amazon RDS console (https://console.aws.amazon.com/rds/)
// or the DescribeDBParameters command to verify that your DB parameter group has
// been created or modified.
func (c *Client) ModifyDBParameterGroup(ctx context.Context, params *ModifyDBParameterGroupInput, optFns ...func(*Options)) (*ModifyDBParameterGroupOutput, error) {
if params == nil {
params = &ModifyDBParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBParameterGroup", params, optFns, c.addOperationModifyDBParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBParameterGroupInput struct {
// The name of the DB parameter group. Constraints:
// - If supplied, must match the name of an existing DBParameterGroup .
//
// This member is required.
DBParameterGroupName *string
// An array of parameter names, values, and the application methods for the
// parameter update. At least one parameter name, value, and application method
// must be supplied; later arguments are optional. A maximum of 20 parameters can
// be modified in a single request. Valid Values (for the application method):
// immediate | pending-reboot You can use the immediate value with dynamic
// parameters only. You can use the pending-reboot value for both dynamic and
// static parameters. When the application method is immediate , changes to dynamic
// parameters are applied immediately to the DB instances associated with the
// parameter group. When the application method is pending-reboot , changes to
// dynamic and static parameters are applied after a reboot without failover to the
// DB instances associated with the parameter group. You can't use pending-reboot
// with dynamic parameters on RDS for SQL Server DB instances. Use immediate . For
// more information on modifying DB parameters, see Working with DB parameter
// groups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
// in the Amazon RDS User Guide.
//
// This member is required.
Parameters []types.Parameter
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the ModifyDBParameterGroup or
// ResetDBParameterGroup action.
type ModifyDBParameterGroupOutput struct {
// The name of the DB parameter group.
DBParameterGroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBParameterGroup{}, 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 = addOpModifyDBParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBParameterGroup(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_opModifyDBParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBParameterGroup",
}
}
| 159 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Changes the settings for an existing DB proxy.
func (c *Client) ModifyDBProxy(ctx context.Context, params *ModifyDBProxyInput, optFns ...func(*Options)) (*ModifyDBProxyOutput, error) {
if params == nil {
params = &ModifyDBProxyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBProxy", params, optFns, c.addOperationModifyDBProxyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBProxyOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBProxyInput struct {
// The identifier for the DBProxy to modify.
//
// This member is required.
DBProxyName *string
// The new authentication settings for the DBProxy .
Auth []types.UserAuthConfig
// Whether the proxy includes detailed information about SQL statements in its
// logs. This information helps you to debug issues involving SQL behavior or the
// performance and scalability of the proxy connections. The debug information
// includes the text of SQL statements that you submit through the proxy. Thus,
// only enable this setting when needed for debugging, and only when you have
// security measures in place to safeguard any sensitive information that appears
// in the logs.
DebugLogging *bool
// The number of seconds that a connection to the proxy can be inactive before the
// proxy disconnects it. You can set this value higher or lower than the connection
// timeout limit for the associated database.
IdleClientTimeout *int32
// The new identifier for the DBProxy . An identifier must begin with a letter and
// must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen
// or contain two consecutive hyphens.
NewDBProxyName *string
// Whether Transport Layer Security (TLS) encryption is required for connections
// to the proxy. By enabling this setting, you can enforce encrypted TLS
// connections to the proxy, even if the associated database doesn't use TLS.
RequireTLS *bool
// The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access
// secrets in Amazon Web Services Secrets Manager.
RoleArn *string
// The new list of security groups for the DBProxy .
SecurityGroups []string
noSmithyDocumentSerde
}
type ModifyDBProxyOutput struct {
// The DBProxy object representing the new settings for the proxy.
DBProxy *types.DBProxy
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBProxyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBProxy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBProxy{}, 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 = addOpModifyDBProxyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBProxy(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_opModifyDBProxy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBProxy",
}
}
| 159 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Changes the settings for an existing DB proxy endpoint.
func (c *Client) ModifyDBProxyEndpoint(ctx context.Context, params *ModifyDBProxyEndpointInput, optFns ...func(*Options)) (*ModifyDBProxyEndpointOutput, error) {
if params == nil {
params = &ModifyDBProxyEndpointInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBProxyEndpoint", params, optFns, c.addOperationModifyDBProxyEndpointMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBProxyEndpointOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBProxyEndpointInput struct {
// The name of the DB proxy sociated with the DB proxy endpoint that you want to
// modify.
//
// This member is required.
DBProxyEndpointName *string
// The new identifier for the DBProxyEndpoint . An identifier must begin with a
// letter and must contain only ASCII letters, digits, and hyphens; it can't end
// with a hyphen or contain two consecutive hyphens.
NewDBProxyEndpointName *string
// The VPC security group IDs for the DB proxy endpoint. When the DB proxy
// endpoint uses a different VPC than the original proxy, you also specify a
// different set of security group IDs than for the original proxy.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type ModifyDBProxyEndpointOutput struct {
// The DBProxyEndpoint object representing the new settings for the DB proxy
// endpoint.
DBProxyEndpoint *types.DBProxyEndpoint
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBProxyEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBProxyEndpoint{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBProxyEndpoint{}, 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 = addOpModifyDBProxyEndpointValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBProxyEndpoint(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_opModifyDBProxyEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBProxyEndpoint",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the properties of a DBProxyTargetGroup .
func (c *Client) ModifyDBProxyTargetGroup(ctx context.Context, params *ModifyDBProxyTargetGroupInput, optFns ...func(*Options)) (*ModifyDBProxyTargetGroupOutput, error) {
if params == nil {
params = &ModifyDBProxyTargetGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBProxyTargetGroup", params, optFns, c.addOperationModifyDBProxyTargetGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBProxyTargetGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBProxyTargetGroupInput struct {
// The name of the proxy.
//
// This member is required.
DBProxyName *string
// The name of the target group to modify.
//
// This member is required.
TargetGroupName *string
// The settings that determine the size and behavior of the connection pool for
// the target group.
ConnectionPoolConfig *types.ConnectionPoolConfiguration
// The new name for the modified DBProxyTarget . An identifier must begin with a
// letter and must contain only ASCII letters, digits, and hyphens; it can't end
// with a hyphen or contain two consecutive hyphens.
NewName *string
noSmithyDocumentSerde
}
type ModifyDBProxyTargetGroupOutput struct {
// The settings of the modified DBProxyTarget .
DBProxyTargetGroup *types.DBProxyTargetGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBProxyTargetGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBProxyTargetGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBProxyTargetGroup{}, 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 = addOpModifyDBProxyTargetGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBProxyTargetGroup(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_opModifyDBProxyTargetGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBProxyTargetGroup",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a manual DB snapshot with a new engine version. The snapshot can be
// encrypted or unencrypted, but not shared or public. Amazon RDS supports
// upgrading DB snapshots for MySQL, PostgreSQL, and Oracle. This command doesn't
// apply to RDS Custom.
func (c *Client) ModifyDBSnapshot(ctx context.Context, params *ModifyDBSnapshotInput, optFns ...func(*Options)) (*ModifyDBSnapshotOutput, error) {
if params == nil {
params = &ModifyDBSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBSnapshot", params, optFns, c.addOperationModifyDBSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBSnapshotInput struct {
// The identifier of the DB snapshot to modify.
//
// This member is required.
DBSnapshotIdentifier *string
// The engine version to upgrade the DB snapshot to. The following are the
// database engines and engine versions that are available when you upgrade a DB
// snapshot. MySQL
// - 5.5.46 (supported for 5.1 DB snapshots)
// Oracle
// - 19.0.0.0.ru-2022-01.rur-2022-01.r1 (supported for 12.2.0.1 DB snapshots)
// - 19.0.0.0.ru-2022-07.rur-2022-07.r1 (supported for 12.1.0.2 DB snapshots)
// - 12.1.0.2.v8 (supported for 12.1.0.1 DB snapshots)
// - 11.2.0.4.v12 (supported for 11.2.0.2 DB snapshots)
// - 11.2.0.4.v11 (supported for 11.2.0.3 DB snapshots)
// PostgreSQL For the list of engine versions that are available for upgrading a
// DB snapshot, see Upgrading the PostgreSQL DB Engine for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion)
// .
EngineVersion *string
// The option group to identify with the upgraded DB snapshot. You can specify
// this parameter when you upgrade an Oracle DB snapshot. The same option group
// considerations apply when upgrading a DB snapshot as when upgrading a DB
// instance. For more information, see Option group considerations (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG)
// in the Amazon RDS User Guide.
OptionGroupName *string
noSmithyDocumentSerde
}
type ModifyDBSnapshotOutput struct {
// Contains the details of an Amazon RDS DB snapshot. This data type is used as a
// response element in the DescribeDBSnapshots action.
DBSnapshot *types.DBSnapshot
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBSnapshot{}, 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 = addOpModifyDBSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBSnapshot(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_opModifyDBSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBSnapshot",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds an attribute and values to, or removes an attribute and values from, a
// manual DB snapshot. To share a manual DB snapshot with other Amazon Web Services
// accounts, specify restore as the AttributeName and use the ValuesToAdd
// parameter to add a list of IDs of the Amazon Web Services accounts that are
// authorized to restore the manual DB snapshot. Uses the value all to make the
// manual DB snapshot public, which means it can be copied or restored by all
// Amazon Web Services accounts. Don't add the all value for any manual DB
// snapshots that contain private information that you don't want available to all
// Amazon Web Services accounts. If the manual DB snapshot is encrypted, it can be
// shared, but only by specifying a list of authorized Amazon Web Services account
// IDs for the ValuesToAdd parameter. You can't use all as a value for that
// parameter in this case. To view which Amazon Web Services accounts have access
// to copy or restore a manual DB snapshot, or whether a manual DB snapshot public
// or private, use the DescribeDBSnapshotAttributes API operation. The accounts
// are returned as values for the restore attribute.
func (c *Client) ModifyDBSnapshotAttribute(ctx context.Context, params *ModifyDBSnapshotAttributeInput, optFns ...func(*Options)) (*ModifyDBSnapshotAttributeOutput, error) {
if params == nil {
params = &ModifyDBSnapshotAttributeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBSnapshotAttribute", params, optFns, c.addOperationModifyDBSnapshotAttributeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBSnapshotAttributeOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBSnapshotAttributeInput struct {
// The name of the DB snapshot attribute to modify. To manage authorization for
// other Amazon Web Services accounts to copy or restore a manual DB snapshot, set
// this value to restore . To view the list of attributes available to modify, use
// the DescribeDBSnapshotAttributes API operation.
//
// This member is required.
AttributeName *string
// The identifier for the DB snapshot to modify the attributes for.
//
// This member is required.
DBSnapshotIdentifier *string
// A list of DB snapshot attributes to add to the attribute specified by
// AttributeName . To authorize other Amazon Web Services accounts to copy or
// restore a manual snapshot, set this list to include one or more Amazon Web
// Services account IDs, or all to make the manual DB snapshot restorable by any
// Amazon Web Services account. Do not add the all value for any manual DB
// snapshots that contain private information that you don't want available to all
// Amazon Web Services accounts.
ValuesToAdd []string
// A list of DB snapshot attributes to remove from the attribute specified by
// AttributeName . To remove authorization for other Amazon Web Services accounts
// to copy or restore a manual snapshot, set this list to include one or more
// Amazon Web Services account identifiers, or all to remove authorization for any
// Amazon Web Services account to copy or restore the DB snapshot. If you specify
// all , an Amazon Web Services account whose account ID is explicitly added to the
// restore attribute can still copy or restore the manual DB snapshot.
ValuesToRemove []string
noSmithyDocumentSerde
}
type ModifyDBSnapshotAttributeOutput struct {
// Contains the results of a successful call to the DescribeDBSnapshotAttributes
// API action. Manual DB snapshot attributes are used to authorize other Amazon Web
// Services accounts to copy or restore a manual DB snapshot. For more information,
// see the ModifyDBSnapshotAttribute API action.
DBSnapshotAttributesResult *types.DBSnapshotAttributesResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBSnapshotAttribute{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBSnapshotAttribute{}, 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 = addOpModifyDBSnapshotAttributeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBSnapshotAttribute(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_opModifyDBSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBSnapshotAttribute",
}
}
| 168 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies an existing DB subnet group. DB subnet groups must contain at least
// one subnet in at least two AZs in the Amazon Web Services Region.
func (c *Client) ModifyDBSubnetGroup(ctx context.Context, params *ModifyDBSubnetGroupInput, optFns ...func(*Options)) (*ModifyDBSubnetGroupOutput, error) {
if params == nil {
params = &ModifyDBSubnetGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyDBSubnetGroup", params, optFns, c.addOperationModifyDBSubnetGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyDBSubnetGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyDBSubnetGroupInput struct {
// The name for the DB subnet group. This value is stored as a lowercase string.
// You can't modify the default subnet group. Constraints: Must match the name of
// an existing DBSubnetGroup. Must not be default. Example: mydbsubnetgroup
//
// This member is required.
DBSubnetGroupName *string
// The EC2 subnet IDs for the DB subnet group.
//
// This member is required.
SubnetIds []string
// The description for the DB subnet group.
DBSubnetGroupDescription *string
noSmithyDocumentSerde
}
type ModifyDBSubnetGroupOutput struct {
// Contains the details of an Amazon RDS DB subnet group. This data type is used
// as a response element in the DescribeDBSubnetGroups action.
DBSubnetGroup *types.DBSubnetGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyDBSubnetGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBSubnetGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBSubnetGroup{}, 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 = addOpModifyDBSubnetGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBSubnetGroup(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_opModifyDBSubnetGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyDBSubnetGroup",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies an existing RDS event notification subscription. You can't modify the
// source identifiers using this call. To change source identifiers for a
// subscription, use the AddSourceIdentifierToSubscription and
// RemoveSourceIdentifierFromSubscription calls. You can see a list of the event
// categories for a given source type ( SourceType ) in Events (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html)
// in the Amazon RDS User Guide or by using the DescribeEventCategories operation.
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 RDS event notification subscription.
//
// This member is required.
SubscriptionName *string
// A value that indicates whether to activate the subscription.
Enabled *bool
// A list of event categories for a source type ( SourceType ) that you want to
// subscribe to. You can see a list of the categories for a given source type in
// Events (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html)
// in the Amazon RDS User Guide or by using the DescribeEventCategories operation.
EventCategories []string
// The Amazon Resource Name (ARN) of the SNS topic created for event notification.
// The ARN is created by Amazon SNS when you create a topic and subscribe to it.
SnsTopicArn *string
// The type of source that is generating the events. For example, if you want to
// be notified of events generated by a DB instance, you would set this parameter
// to db-instance. For RDS Proxy events, specify db-proxy . If this value isn't
// specified, all events are returned. Valid values: db-instance | db-cluster |
// db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot |
// db-proxy
SourceType *string
noSmithyDocumentSerde
}
type ModifyEventSubscriptionOutput struct {
// Contains the results of a successful invocation of the
// DescribeEventSubscriptions action.
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: "rds",
OperationName: "ModifyEventSubscription",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modify a setting for an Amazon Aurora global cluster. You can change one or
// more database configuration parameters by specifying these parameters and the
// new values in the request. For more information on Amazon Aurora, see What is
// Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters.
func (c *Client) ModifyGlobalCluster(ctx context.Context, params *ModifyGlobalClusterInput, optFns ...func(*Options)) (*ModifyGlobalClusterOutput, error) {
if params == nil {
params = &ModifyGlobalClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyGlobalCluster", params, optFns, c.addOperationModifyGlobalClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyGlobalClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyGlobalClusterInput struct {
// A value that indicates whether major version upgrades are allowed. Constraints:
// You must allow major version upgrades when specifying a value for the
// EngineVersion parameter that is a different major version than the DB cluster's
// current version. If you upgrade the major version of a global database, the
// cluster and DB instance parameter groups are set to the default parameter groups
// for the new version. Apply any custom parameter groups after completing the
// upgrade.
AllowMajorVersionUpgrade *bool
// Indicates if the global database cluster has deletion protection enabled. The
// global database cluster can't be deleted when deletion protection is enabled.
DeletionProtection *bool
// The version number of the database engine to which you want to upgrade.
// Changing this parameter results in an outage. The change is applied during the
// next maintenance window unless ApplyImmediately is enabled. To list all of the
// available engine versions for aurora-mysql (for MySQL-based Aurora global
// databases), use the following command: aws rds describe-db-engine-versions
// --engine aurora-mysql --query '*[]|[?SupportsGlobalDatabases ==
// `true`].[EngineVersion]' To list all of the available engine versions for
// aurora-postgresql (for PostgreSQL-based Aurora global databases), use the
// following command: aws rds describe-db-engine-versions --engine
// aurora-postgresql --query '*[]|[?SupportsGlobalDatabases ==
// `true`].[EngineVersion]'
EngineVersion *string
// The DB cluster identifier for the global cluster being modified. This parameter
// isn't case-sensitive. Constraints:
// - Must match the identifier of an existing global database cluster.
GlobalClusterIdentifier *string
// The new cluster identifier for the global database cluster when modifying a
// global database cluster. This value is stored as a lowercase string.
// Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens
// - The first character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// Example: my-cluster2
NewGlobalClusterIdentifier *string
noSmithyDocumentSerde
}
type ModifyGlobalClusterOutput struct {
// A data type representing an Aurora global database.
GlobalCluster *types.GlobalCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyGlobalCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyGlobalCluster{}, 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_opModifyGlobalCluster(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_opModifyGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyGlobalCluster",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies an existing option group.
func (c *Client) ModifyOptionGroup(ctx context.Context, params *ModifyOptionGroupInput, optFns ...func(*Options)) (*ModifyOptionGroupOutput, error) {
if params == nil {
params = &ModifyOptionGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyOptionGroup", params, optFns, c.addOperationModifyOptionGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyOptionGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyOptionGroupInput struct {
// The name of the option group to be modified. Permanent options, such as the TDE
// option for Oracle Advanced Security TDE, can't be removed from an option group,
// and that option group can't be removed from a DB instance once it is associated
// with a DB instance
//
// This member is required.
OptionGroupName *string
// A value that indicates whether to apply the change immediately or during the
// next maintenance window for each instance associated with the option group.
ApplyImmediately bool
// Options in this list are added to the option group or, if already present, the
// specified configuration is used to update the existing configuration.
OptionsToInclude []types.OptionConfiguration
// Options in this list are removed from the option group.
OptionsToRemove []string
noSmithyDocumentSerde
}
type ModifyOptionGroupOutput struct {
//
OptionGroup *types.OptionGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyOptionGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyOptionGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyOptionGroup{}, 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 = addOpModifyOptionGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyOptionGroup(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_opModifyOptionGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ModifyOptionGroup",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Promotes a read replica DB instance to a standalone DB instance.
// - Backup duration is a function of the amount of changes to the database
// since the previous backup. If you plan to promote a read replica to a standalone
// instance, we recommend that you enable backups and complete at least one backup
// prior to promotion. In addition, a read replica cannot be promoted to a
// standalone instance when it is in the backing-up status. If you have enabled
// backups on your read replica, configure the automated backup window so that
// daily backups do not interfere with read replica promotion.
// - This command doesn't apply to Aurora MySQL, Aurora PostgreSQL, or RDS
// Custom.
func (c *Client) PromoteReadReplica(ctx context.Context, params *PromoteReadReplicaInput, optFns ...func(*Options)) (*PromoteReadReplicaOutput, error) {
if params == nil {
params = &PromoteReadReplicaInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PromoteReadReplica", params, optFns, c.addOperationPromoteReadReplicaMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PromoteReadReplicaOutput)
out.ResultMetadata = metadata
return out, nil
}
type PromoteReadReplicaInput struct {
// The DB instance identifier. This value is stored as a lowercase string.
// Constraints:
// - Must match the identifier of an existing read replica DB instance.
// Example: mydbinstance
//
// This member is required.
DBInstanceIdentifier *string
// The number of days for which automated backups are retained. Setting this
// parameter to a positive number enables backups. Setting this parameter to 0
// disables automated backups. Default: 1 Constraints:
// - Must be a value from 0 to 35.
// - Can't be set to 0 if the DB instance is a source to read replicas.
BackupRetentionPeriod *int32
// The daily time range during which automated backups are created if automated
// backups are enabled, using the BackupRetentionPeriod parameter. The default is
// a 30-minute window selected at random from an 8-hour block of time for each
// Amazon Web Services Region. To see the time blocks available, see Adjusting the
// Preferred Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html)
// in the Amazon RDS User Guide. Constraints:
// - Must be in the format hh24:mi-hh24:mi .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred maintenance window.
// - Must be at least 30 minutes.
PreferredBackupWindow *string
noSmithyDocumentSerde
}
type PromoteReadReplicaOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPromoteReadReplicaMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPromoteReadReplica{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPromoteReadReplica{}, 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 = addOpPromoteReadReplicaValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPromoteReadReplica(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_opPromoteReadReplica(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "PromoteReadReplica",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Promotes a read replica DB cluster to a standalone DB cluster.
func (c *Client) PromoteReadReplicaDBCluster(ctx context.Context, params *PromoteReadReplicaDBClusterInput, optFns ...func(*Options)) (*PromoteReadReplicaDBClusterOutput, error) {
if params == nil {
params = &PromoteReadReplicaDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PromoteReadReplicaDBCluster", params, optFns, c.addOperationPromoteReadReplicaDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PromoteReadReplicaDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type PromoteReadReplicaDBClusterInput struct {
// The identifier of the DB cluster read replica to promote. This parameter isn't
// case-sensitive. Constraints:
// - Must match the identifier of an existing DB cluster read replica.
// Example: my-cluster-replica1
//
// This member is required.
DBClusterIdentifier *string
noSmithyDocumentSerde
}
type PromoteReadReplicaDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPromoteReadReplicaDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPromoteReadReplicaDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPromoteReadReplicaDBCluster{}, 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 = addOpPromoteReadReplicaDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPromoteReadReplicaDBCluster(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_opPromoteReadReplicaDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "PromoteReadReplicaDBCluster",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Purchases a reserved DB instance offering.
func (c *Client) PurchaseReservedDBInstancesOffering(ctx context.Context, params *PurchaseReservedDBInstancesOfferingInput, optFns ...func(*Options)) (*PurchaseReservedDBInstancesOfferingOutput, error) {
if params == nil {
params = &PurchaseReservedDBInstancesOfferingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PurchaseReservedDBInstancesOffering", params, optFns, c.addOperationPurchaseReservedDBInstancesOfferingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PurchaseReservedDBInstancesOfferingOutput)
out.ResultMetadata = metadata
return out, nil
}
type PurchaseReservedDBInstancesOfferingInput struct {
// The ID of the Reserved DB instance offering to purchase. Example:
// 438012d3-4052-4cc7-b2e3-8d3372e0e706
//
// This member is required.
ReservedDBInstancesOfferingId *string
// The number of instances to reserve. Default: 1
DBInstanceCount *int32
// Customer-specified identifier to track this reservation. Example:
// myreservationID
ReservedDBInstanceId *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
noSmithyDocumentSerde
}
type PurchaseReservedDBInstancesOfferingOutput struct {
// This data type is used as a response element in the DescribeReservedDBInstances
// and PurchaseReservedDBInstancesOffering actions.
ReservedDBInstance *types.ReservedDBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPurchaseReservedDBInstancesOfferingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPurchaseReservedDBInstancesOffering{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPurchaseReservedDBInstancesOffering{}, 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 = addOpPurchaseReservedDBInstancesOfferingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseReservedDBInstancesOffering(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_opPurchaseReservedDBInstancesOffering(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "PurchaseReservedDBInstancesOffering",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// You might need to reboot your DB cluster, usually for maintenance reasons. For
// example, if you make certain modifications, or if you change the DB cluster
// parameter group associated with the DB cluster, reboot the DB cluster for the
// changes to take effect. Rebooting a DB cluster restarts the database engine
// service. Rebooting a DB cluster results in a momentary outage, during which the
// DB cluster status is set to rebooting. Use this operation only for a non-Aurora
// Multi-AZ DB cluster. For more information on Multi-AZ DB clusters, see Multi-AZ
// DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) RebootDBCluster(ctx context.Context, params *RebootDBClusterInput, optFns ...func(*Options)) (*RebootDBClusterOutput, error) {
if params == nil {
params = &RebootDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RebootDBCluster", params, optFns, c.addOperationRebootDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RebootDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type RebootDBClusterInput struct {
// The DB cluster identifier. This parameter is stored as a lowercase string.
// Constraints:
// - Must match the identifier of an existing DBCluster.
//
// This member is required.
DBClusterIdentifier *string
noSmithyDocumentSerde
}
type RebootDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRebootDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRebootDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRebootDBCluster{}, 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 = addOpRebootDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootDBCluster(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_opRebootDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RebootDBCluster",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// You might need to reboot your DB instance, usually for maintenance reasons. For
// example, if you make certain modifications, or if you change the DB parameter
// group associated with the DB instance, you must reboot the instance for the
// changes to take effect. Rebooting a DB instance restarts the database engine
// service. Rebooting a DB instance results in a momentary outage, during which the
// DB instance status is set to rebooting. For more information about rebooting,
// see Rebooting a DB Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html)
// in the Amazon RDS User Guide. This command doesn't apply to RDS Custom. If your
// DB instance is part of a Multi-AZ DB cluster, you can reboot the DB cluster with
// the RebootDBCluster operation.
func (c *Client) RebootDBInstance(ctx context.Context, params *RebootDBInstanceInput, optFns ...func(*Options)) (*RebootDBInstanceOutput, error) {
if params == nil {
params = &RebootDBInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RebootDBInstance", params, optFns, c.addOperationRebootDBInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RebootDBInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type RebootDBInstanceInput struct {
// The DB instance identifier. This parameter is stored as a lowercase string.
// Constraints:
// - Must match the identifier of an existing DBInstance.
//
// This member is required.
DBInstanceIdentifier *string
// A value that indicates whether the reboot is conducted through a Multi-AZ
// failover. Constraint: You can't enable force failover if the instance isn't
// configured for Multi-AZ.
ForceFailover *bool
noSmithyDocumentSerde
}
type RebootDBInstanceOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRebootDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRebootDBInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRebootDBInstance{}, 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 = addOpRebootDBInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootDBInstance(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_opRebootDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RebootDBInstance",
}
}
| 146 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Associate one or more DBProxyTarget data structures with a DBProxyTargetGroup .
func (c *Client) RegisterDBProxyTargets(ctx context.Context, params *RegisterDBProxyTargetsInput, optFns ...func(*Options)) (*RegisterDBProxyTargetsOutput, error) {
if params == nil {
params = &RegisterDBProxyTargetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterDBProxyTargets", params, optFns, c.addOperationRegisterDBProxyTargetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterDBProxyTargetsOutput)
out.ResultMetadata = metadata
return out, nil
}
type RegisterDBProxyTargetsInput struct {
// The identifier of the DBProxy that is associated with the DBProxyTargetGroup .
//
// This member is required.
DBProxyName *string
// One or more DB cluster identifiers.
DBClusterIdentifiers []string
// One or more DB instance identifiers.
DBInstanceIdentifiers []string
// The identifier of the DBProxyTargetGroup .
TargetGroupName *string
noSmithyDocumentSerde
}
type RegisterDBProxyTargetsOutput struct {
// One or more DBProxyTarget objects that are created when you register targets
// with a target group.
DBProxyTargets []types.DBProxyTarget
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterDBProxyTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRegisterDBProxyTargets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRegisterDBProxyTargets{}, 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 = addOpRegisterDBProxyTargetsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterDBProxyTargets(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_opRegisterDBProxyTargets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RegisterDBProxyTargets",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Detaches an Aurora secondary cluster from an Aurora global database cluster.
// The cluster becomes a standalone cluster with read-write capability instead of
// being read-only and receiving data from a primary cluster in a different Region.
// This action only applies to Aurora DB clusters.
func (c *Client) RemoveFromGlobalCluster(ctx context.Context, params *RemoveFromGlobalClusterInput, optFns ...func(*Options)) (*RemoveFromGlobalClusterOutput, error) {
if params == nil {
params = &RemoveFromGlobalClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveFromGlobalCluster", params, optFns, c.addOperationRemoveFromGlobalClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveFromGlobalClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveFromGlobalClusterInput struct {
// The Amazon Resource Name (ARN) identifying the cluster that was detached from
// the Aurora global database cluster.
DbClusterIdentifier *string
// The cluster identifier to detach from the Aurora global database cluster.
GlobalClusterIdentifier *string
noSmithyDocumentSerde
}
type RemoveFromGlobalClusterOutput struct {
// A data type representing an Aurora global database.
GlobalCluster *types.GlobalCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveFromGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveFromGlobalCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveFromGlobalCluster{}, 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_opRemoveFromGlobalCluster(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_opRemoveFromGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RemoveFromGlobalCluster",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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"
)
// Removes the asssociation of an Amazon Web Services Identity and Access
// Management (IAM) role from a DB cluster. For more information on Amazon Aurora
// DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) RemoveRoleFromDBCluster(ctx context.Context, params *RemoveRoleFromDBClusterInput, optFns ...func(*Options)) (*RemoveRoleFromDBClusterOutput, error) {
if params == nil {
params = &RemoveRoleFromDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveRoleFromDBCluster", params, optFns, c.addOperationRemoveRoleFromDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveRoleFromDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveRoleFromDBClusterInput struct {
// The name of the DB cluster to disassociate the IAM role from.
//
// This member is required.
DBClusterIdentifier *string
// The Amazon Resource Name (ARN) of the IAM role to disassociate from the Aurora
// DB cluster, for example arn:aws:iam::123456789012:role/AuroraAccessRole .
//
// This member is required.
RoleArn *string
// The name of the feature for the DB cluster that the IAM role is to be
// disassociated from. For information about supported feature names, see
// DBEngineVersion .
FeatureName *string
noSmithyDocumentSerde
}
type RemoveRoleFromDBClusterOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveRoleFromDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveRoleFromDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveRoleFromDBCluster{}, 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 = addOpRemoveRoleFromDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRoleFromDBCluster(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_opRemoveRoleFromDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RemoveRoleFromDBCluster",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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"
)
// Disassociates an Amazon Web Services Identity and Access Management (IAM) role
// from a DB instance.
func (c *Client) RemoveRoleFromDBInstance(ctx context.Context, params *RemoveRoleFromDBInstanceInput, optFns ...func(*Options)) (*RemoveRoleFromDBInstanceOutput, error) {
if params == nil {
params = &RemoveRoleFromDBInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveRoleFromDBInstance", params, optFns, c.addOperationRemoveRoleFromDBInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveRoleFromDBInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveRoleFromDBInstanceInput struct {
// The name of the DB instance to disassociate the IAM role from.
//
// This member is required.
DBInstanceIdentifier *string
// The name of the feature for the DB instance that the IAM role is to be
// disassociated from. For information about supported feature names, see
// DBEngineVersion .
//
// This member is required.
FeatureName *string
// The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB
// instance, for example, arn:aws:iam::123456789012:role/AccessRole .
//
// This member is required.
RoleArn *string
noSmithyDocumentSerde
}
type RemoveRoleFromDBInstanceOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveRoleFromDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveRoleFromDBInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveRoleFromDBInstance{}, 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 = addOpRemoveRoleFromDBInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRoleFromDBInstance(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_opRemoveRoleFromDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RemoveRoleFromDBInstance",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes a source identifier from an existing RDS event notification
// subscription.
func (c *Client) RemoveSourceIdentifierFromSubscription(ctx context.Context, params *RemoveSourceIdentifierFromSubscriptionInput, optFns ...func(*Options)) (*RemoveSourceIdentifierFromSubscriptionOutput, error) {
if params == nil {
params = &RemoveSourceIdentifierFromSubscriptionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveSourceIdentifierFromSubscription", params, optFns, c.addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveSourceIdentifierFromSubscriptionOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveSourceIdentifierFromSubscriptionInput struct {
// The source identifier to be removed from the subscription, such as the DB
// instance identifier for a DB instance or the name of a security group.
//
// This member is required.
SourceIdentifier *string
// The name of the RDS event notification subscription you want to remove a source
// identifier from.
//
// This member is required.
SubscriptionName *string
noSmithyDocumentSerde
}
type RemoveSourceIdentifierFromSubscriptionOutput struct {
// Contains the results of a successful invocation of the
// DescribeEventSubscriptions action.
EventSubscription *types.EventSubscription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveSourceIdentifierFromSubscription{}, 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 = addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveSourceIdentifierFromSubscription(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_opRemoveSourceIdentifierFromSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RemoveSourceIdentifierFromSubscription",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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"
)
// Removes metadata tags from an Amazon RDS resource. For an overview on tagging
// an Amazon RDS resource, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html)
// in the Amazon RDS User Guide.
func (c *Client) RemoveTagsFromResource(ctx context.Context, params *RemoveTagsFromResourceInput, optFns ...func(*Options)) (*RemoveTagsFromResourceOutput, error) {
if params == nil {
params = &RemoveTagsFromResourceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveTagsFromResource", params, optFns, c.addOperationRemoveTagsFromResourceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveTagsFromResourceOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveTagsFromResourceInput struct {
// The Amazon RDS resource that the tags are removed from. This value is an Amazon
// Resource Name (ARN). For information about creating an ARN, see Constructing an
// ARN for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing)
// in the Amazon RDS User Guide.
//
// This member is required.
ResourceName *string
// The tag key (name) of the tag to be removed.
//
// This member is required.
TagKeys []string
noSmithyDocumentSerde
}
type RemoveTagsFromResourceOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveTagsFromResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveTagsFromResource{}, 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 = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveTagsFromResource(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_opRemoveTagsFromResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RemoveTagsFromResource",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the parameters of a DB cluster parameter group to the default value.
// To reset specific parameters submit a list of the following: ParameterName and
// ApplyMethod . To reset the entire DB cluster parameter group, specify the
// DBClusterParameterGroupName and ResetAllParameters parameters. When resetting
// the entire group, dynamic parameters are updated immediately and static
// parameters are set to pending-reboot to take effect on the next DB instance
// restart or RebootDBInstance request. You must call RebootDBInstance for every
// DB instance in your DB cluster that you want the updated static parameter to
// apply to. For more information on Amazon Aurora DB clusters, see What is Amazon
// Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) ResetDBClusterParameterGroup(ctx context.Context, params *ResetDBClusterParameterGroupInput, optFns ...func(*Options)) (*ResetDBClusterParameterGroupOutput, error) {
if params == nil {
params = &ResetDBClusterParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ResetDBClusterParameterGroup", params, optFns, c.addOperationResetDBClusterParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ResetDBClusterParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ResetDBClusterParameterGroupInput struct {
// The name of the DB cluster parameter group to reset.
//
// This member is required.
DBClusterParameterGroupName *string
// A list of parameter names in the DB cluster parameter group to reset to the
// default values. You can't use this parameter if the ResetAllParameters
// parameter is enabled.
Parameters []types.Parameter
// A value that indicates whether to reset all parameters in the DB cluster
// parameter group to their default values. You can't use this parameter if there
// is a list of parameter names specified for the Parameters parameter.
ResetAllParameters bool
noSmithyDocumentSerde
}
type ResetDBClusterParameterGroupOutput struct {
// The name of the DB cluster parameter group. Constraints:
// - Must be 1 to 255 letters or numbers.
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// This value is stored as a lowercase string.
DBClusterParameterGroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationResetDBClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpResetDBClusterParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetDBClusterParameterGroup{}, 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 = addOpResetDBClusterParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetDBClusterParameterGroup(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_opResetDBClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ResetDBClusterParameterGroup",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the parameters of a DB parameter group to the engine/system default
// value. To reset specific parameters, provide a list of the following:
// ParameterName and ApplyMethod . To reset the entire DB parameter group, specify
// the DBParameterGroup name and ResetAllParameters parameters. When resetting the
// entire group, dynamic parameters are updated immediately and static parameters
// are set to pending-reboot to take effect on the next DB instance restart or
// RebootDBInstance request.
func (c *Client) ResetDBParameterGroup(ctx context.Context, params *ResetDBParameterGroupInput, optFns ...func(*Options)) (*ResetDBParameterGroupOutput, error) {
if params == nil {
params = &ResetDBParameterGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ResetDBParameterGroup", params, optFns, c.addOperationResetDBParameterGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ResetDBParameterGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ResetDBParameterGroupInput struct {
// The name of the DB parameter group. Constraints:
// - Must match the name of an existing DBParameterGroup .
//
// This member is required.
DBParameterGroupName *string
// To reset the entire DB parameter group, specify the DBParameterGroup name and
// ResetAllParameters parameters. To reset specific parameters, provide a list of
// the following: ParameterName and ApplyMethod . A maximum of 20 parameters can be
// modified in a single request. MySQL Valid Values (for Apply method): immediate
// | pending-reboot You can use the immediate value with dynamic parameters only.
// You can use the pending-reboot value for both dynamic and static parameters,
// and changes are applied when DB instance reboots. MariaDB Valid Values (for
// Apply method): immediate | pending-reboot You can use the immediate value with
// dynamic parameters only. You can use the pending-reboot value for both dynamic
// and static parameters, and changes are applied when DB instance reboots. Oracle
// Valid Values (for Apply method): pending-reboot
Parameters []types.Parameter
// A value that indicates whether to reset all parameters in the DB parameter
// group to default values. By default, all parameters in the DB parameter group
// are reset to default values.
ResetAllParameters bool
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the ModifyDBParameterGroup or
// ResetDBParameterGroup action.
type ResetDBParameterGroupOutput struct {
// The name of the DB parameter group.
DBParameterGroupName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationResetDBParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpResetDBParameterGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetDBParameterGroup{}, 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 = addOpResetDBParameterGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetDBParameterGroup(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_opResetDBParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "ResetDBParameterGroup",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates an Amazon Aurora DB cluster from MySQL data stored in an Amazon S3
// bucket. Amazon RDS must be authorized to access the Amazon S3 bucket and the
// data must be created using the Percona XtraBackup utility as described in
// Migrating Data from MySQL by Using an Amazon S3 Bucket (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3)
// in the Amazon Aurora User Guide. This action only restores the DB cluster, not
// the DB instances for that DB cluster. You must invoke the CreateDBInstance
// action to create DB instances for the restored DB cluster, specifying the
// identifier of the restored DB cluster in DBClusterIdentifier . You can create DB
// instances only after the RestoreDBClusterFromS3 action has completed and the DB
// cluster is available. For more information on Amazon Aurora, see What is Amazon
// Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters.
// The source DB engine must be MySQL.
func (c *Client) RestoreDBClusterFromS3(ctx context.Context, params *RestoreDBClusterFromS3Input, optFns ...func(*Options)) (*RestoreDBClusterFromS3Output, error) {
if params == nil {
params = &RestoreDBClusterFromS3Input{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBClusterFromS3", params, optFns, c.addOperationRestoreDBClusterFromS3Middlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBClusterFromS3Output)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBClusterFromS3Input struct {
// The name of the DB cluster to create from the source data in the Amazon S3
// bucket. This parameter isn't case-sensitive. Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Example: my-cluster1
//
// This member is required.
DBClusterIdentifier *string
// The name of the database engine to be used for this DB cluster. Valid Values:
// aurora-mysql (for Aurora MySQL)
//
// This member is required.
Engine *string
// The name of the master user for the restored DB cluster. Constraints:
// - Must be 1 to 16 letters or numbers.
// - First character must be a letter.
// - Can't be a reserved word for the chosen database engine.
//
// This member is required.
MasterUsername *string
// The name of the Amazon S3 bucket that contains the data used to create the
// Amazon Aurora DB cluster.
//
// This member is required.
S3BucketName *string
// The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access
// Management (IAM) role that authorizes Amazon RDS to access the Amazon S3 bucket
// on your behalf.
//
// This member is required.
S3IngestionRoleArn *string
// The identifier for the database engine that was backed up to create the files
// stored in the Amazon S3 bucket. Valid values: mysql
//
// This member is required.
SourceEngine *string
// The version of the database that the backup files were created from. MySQL
// versions 5.5, 5.6, and 5.7 are supported. Example: 5.6.40 , 5.7.28
//
// This member is required.
SourceEngineVersion *string
// A list of Availability Zones (AZs) where instances in the restored DB cluster
// can be created.
AvailabilityZones []string
// The target backtrack window, in seconds. To disable backtracking, set this
// value to 0. Currently, Backtrack is only supported for Aurora MySQL DB clusters.
// Default: 0 Constraints:
// - If specified, this value must be set to a number from 0 to 259,200 (72
// hours).
BacktrackWindow *int64
// The number of days for which automated backups of the restored DB cluster are
// retained. You must specify a minimum value of 1. Default: 1 Constraints:
// - Must be a value from 1 to 35
BackupRetentionPeriod *int32
// A value that indicates that the restored DB cluster should be associated with
// the specified CharacterSet.
CharacterSetName *string
// A value that indicates whether to copy all tags from the restored DB cluster to
// snapshots of the restored DB cluster. The default is not to copy them.
CopyTagsToSnapshot *bool
// The name of the DB cluster parameter group to associate with the restored DB
// cluster. If this argument is omitted, the default parameter group for the engine
// version is used. Constraints:
// - If supplied, must match the name of an existing DBClusterParameterGroup.
DBClusterParameterGroupName *string
// A DB subnet group to associate with the restored DB cluster. Constraints: If
// supplied, must match the name of an existing DBSubnetGroup. Example:
// mydbsubnetgroup
DBSubnetGroupName *string
// The database name for the restored DB cluster.
DatabaseName *string
// A value that indicates whether the DB cluster has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled.
DeletionProtection *bool
// Specify the Active Directory directory ID to restore the DB cluster in. The
// domain must be created prior to this operation. For Amazon Aurora DB clusters,
// Amazon RDS can use Kerberos Authentication to authenticate users that connect to
// the DB cluster. For more information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html)
// in the Amazon Aurora User Guide.
Domain *string
// Specify the name of the IAM role to be used when making API calls to the
// Directory Service.
DomainIAMRoleName *string
// The list of logs that the restored DB cluster is to export to CloudWatch Logs.
// The values in the list depend on the DB engine being used. Aurora MySQL Possible
// values are audit , error , general , and slowquery . For more information about
// exporting CloudWatch Logs for Amazon Aurora, see Publishing Database Logs to
// Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon Aurora User Guide.
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping isn't enabled. For more information, see IAM Database Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon Aurora User Guide.
EnableIAMDatabaseAuthentication *bool
// The version number of the database engine to use. To list all of the available
// engine versions for aurora-mysql (Aurora MySQL), use the following command: aws
// rds describe-db-engine-versions --engine aurora-mysql --query
// "DBEngineVersions[].EngineVersion" Aurora MySQL Examples:
// 5.7.mysql_aurora.2.07.1 , 8.0.mysql_aurora.3.02.0
EngineVersion *string
// The Amazon Web Services KMS key identifier for an encrypted DB cluster. The
// Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or
// alias name for the KMS key. To use a KMS key in a different Amazon Web Services
// account, specify the key ARN or alias ARN. If the StorageEncrypted parameter is
// enabled, and you do not specify a value for the KmsKeyId parameter, then Amazon
// RDS will use your default KMS key. There is a default KMS key for your Amazon
// Web Services account. Your Amazon Web Services account has a different default
// KMS key for each Amazon Web Services Region.
KmsKeyId *string
// A value that indicates whether to manage the master user password with Amazon
// Web Services Secrets Manager. For more information, see Password management
// with Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide and Password management with Amazon Web Services
// Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html)
// in the Amazon Aurora User Guide. Constraints:
// - Can't manage the master user password with Amazon Web Services Secrets
// Manager if MasterUserPassword is specified.
ManageMasterUserPassword *bool
// The password for the master database user. This password can contain any
// printable ASCII character except "/", """, or "@". Constraints:
// - Must contain from 8 to 41 characters.
// - Can't be specified if ManageMasterUserPassword is turned on.
MasterUserPassword *string
// The Amazon Web Services KMS key identifier to encrypt a secret that is
// automatically generated and managed in Amazon Web Services Secrets Manager. This
// setting is valid only if the master user password is managed by RDS in Amazon
// Web Services Secrets Manager for the DB cluster. The Amazon Web Services KMS key
// identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To
// use a KMS key in a different Amazon Web Services account, specify the key ARN or
// alias ARN. If you don't specify MasterUserSecretKmsKeyId , then the
// aws/secretsmanager KMS key is used to encrypt the secret. If the secret is in a
// different Amazon Web Services account, then you can't use the aws/secretsmanager
// KMS key to encrypt the secret, and you must use a customer managed KMS key.
// There is a default KMS key for your Amazon Web Services account. Your Amazon Web
// Services account has a different default KMS key for each Amazon Web Services
// Region.
MasterUserSecretKmsKeyId *string
// The network type of the DB cluster. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the
// IPv6 protocols ( DUAL ). For more information, see Working with a DB instance
// in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide.
NetworkType *string
// A value that indicates that the restored DB cluster should be associated with
// the specified option group. Permanent options can't be removed from an option
// group. An option group can't be removed from a DB cluster once it is associated
// with a DB cluster.
OptionGroupName *string
// The port number on which the instances in the restored DB cluster accept
// connections. Default: 3306
Port *int32
// The daily time range during which automated backups are created if automated
// backups are enabled using the BackupRetentionPeriod parameter. The default is a
// 30-minute window selected at random from an 8-hour block of time for each Amazon
// Web Services Region. To view the time blocks available, see Backup window (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow)
// in the Amazon Aurora User Guide. Constraints:
// - Must be in the format hh24:mi-hh24:mi .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred maintenance window.
// - Must be at least 30 minutes.
PreferredBackupWindow *string
// The weekly time range during which system maintenance can occur, in Universal
// Coordinated Time (UTC). Format: ddd:hh24:mi-ddd:hh24:mi The default is a
// 30-minute window selected at random from an 8-hour block of time for each Amazon
// Web Services Region, occurring on a random day of the week. To see the time
// blocks available, see Adjusting the Preferred Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora)
// in the Amazon Aurora User Guide. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
// Constraints: Minimum 30-minute window.
PreferredMaintenanceWindow *string
// The prefix for all of the file names that contain the data used to create the
// Amazon Aurora DB cluster. If you do not specify a SourceS3Prefix value, then the
// Amazon Aurora DB cluster is created by using all of the files in the Amazon S3
// bucket.
S3Prefix *string
// Contains the scaling configuration of an Aurora Serverless v2 DB cluster. For
// more information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration
// A value that indicates whether the restored DB cluster is encrypted.
StorageEncrypted *bool
// Specifies the storage type to be associated with the DB cluster. Valid values:
// aurora , aurora-iopt1 Default: aurora Valid for: Aurora DB clusters only
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
// A list of EC2 VPC security groups to associate with the restored DB cluster.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBClusterFromS3Output struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBClusterFromS3Middlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBClusterFromS3{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBClusterFromS3{}, 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 = addOpRestoreDBClusterFromS3ValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBClusterFromS3(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_opRestoreDBClusterFromS3(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBClusterFromS3",
}
}
| 375 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. The target
// DB cluster is created from the source snapshot with a default configuration. If
// you don't specify a security group, the new DB cluster is associated with the
// default security group. This action only restores the DB cluster, not the DB
// instances for that DB cluster. You must invoke the CreateDBInstance action to
// create DB instances for the restored DB cluster, specifying the identifier of
// the restored DB cluster in DBClusterIdentifier . You can create DB instances
// only after the RestoreDBClusterFromSnapshot action has completed and the DB
// cluster is available. For more information on Amazon Aurora DB clusters, see
// What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) RestoreDBClusterFromSnapshot(ctx context.Context, params *RestoreDBClusterFromSnapshotInput, optFns ...func(*Options)) (*RestoreDBClusterFromSnapshotOutput, error) {
if params == nil {
params = &RestoreDBClusterFromSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBClusterFromSnapshot", params, optFns, c.addOperationRestoreDBClusterFromSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBClusterFromSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBClusterFromSnapshotInput struct {
// The name of the DB cluster to create from the DB snapshot or DB cluster
// snapshot. This parameter isn't case-sensitive. Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// Example: my-snapshot-id Valid for: Aurora DB clusters and Multi-AZ DB clusters
//
// This member is required.
DBClusterIdentifier *string
// The database engine to use for the new DB cluster. Default: The same as source
// Constraint: Must be compatible with the engine of the source Valid for: Aurora
// DB clusters and Multi-AZ DB clusters
//
// This member is required.
Engine *string
// The identifier for the DB snapshot or DB cluster snapshot to restore from. You
// can use either the name or the Amazon Resource Name (ARN) to specify a DB
// cluster snapshot. However, you can use only the ARN to specify a DB snapshot.
// Constraints:
// - Must match the identifier of an existing Snapshot.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
//
// This member is required.
SnapshotIdentifier *string
// Provides the list of Availability Zones (AZs) where instances in the restored
// DB cluster can be created. Valid for: Aurora DB clusters only
AvailabilityZones []string
// The target backtrack window, in seconds. To disable backtracking, set this
// value to 0. Currently, Backtrack is only supported for Aurora MySQL DB clusters.
// Default: 0 Constraints:
// - If specified, this value must be set to a number from 0 to 259,200 (72
// hours).
// Valid for: Aurora DB clusters only
BacktrackWindow *int64
// A value that indicates whether to copy all tags from the restored DB cluster to
// snapshots of the restored DB cluster. The default is not to copy them. Valid
// for: Aurora DB clusters and Multi-AZ DB clusters
CopyTagsToSnapshot *bool
// The compute and memory capacity of the each DB instance in the Multi-AZ DB
// cluster, for example db.m6gd.xlarge. Not all DB instance classes are available
// in all Amazon Web Services Regions, or for all database engines. For the full
// list of DB instance classes, and availability for your engine, see DB Instance
// Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only
DBClusterInstanceClass *string
// The name of the DB cluster parameter group to associate with this DB cluster.
// If this argument is omitted, the default DB cluster parameter group for the
// specified engine is used. Constraints:
// - If supplied, must match the name of an existing default DB cluster
// parameter group.
// - Must be 1 to 255 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
DBClusterParameterGroupName *string
// The name of the DB subnet group to use for the new DB cluster. Constraints: If
// supplied, must match the name of an existing DB subnet group. Example:
// mydbsubnetgroup Valid for: Aurora DB clusters and Multi-AZ DB clusters
DBSubnetGroupName *string
// The database name for the restored DB cluster. Valid for: Aurora DB clusters
// and Multi-AZ DB clusters
DatabaseName *string
// A value that indicates whether the DB cluster has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
DeletionProtection *bool
// Specify the Active Directory directory ID to restore the DB cluster in. The
// domain must be created prior to this operation. Currently, only MySQL, Microsoft
// SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active
// Directory Domain. For more information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html)
// in the Amazon RDS User Guide. Valid for: Aurora DB clusters only
Domain *string
// Specify the name of the IAM role to be used when making API calls to the
// Directory Service. Valid for: Aurora DB clusters only
DomainIAMRoleName *string
// The list of logs that the restored DB cluster is to export to Amazon CloudWatch
// Logs. The values in the list depend on the DB engine being used. RDS for MySQL
// Possible values are error , general , and slowquery . RDS for PostgreSQL
// Possible values are postgresql and upgrade . Aurora MySQL Possible values are
// audit , error , general , and slowquery . Aurora PostgreSQL Possible value is
// postgresql . For more information about exporting CloudWatch Logs for Amazon
// RDS, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. For more information about exporting CloudWatch
// Logs for Amazon Aurora, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping isn't enabled. For more information, see IAM Database Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only
EnableIAMDatabaseAuthentication *bool
// The DB engine mode of the DB cluster, either provisioned or serverless . For
// more information, see CreateDBCluster (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html)
// . Valid for: Aurora DB clusters only
EngineMode *string
// The version of the database engine to use for the new DB cluster. If you don't
// specify an engine version, the default version for the database engine in the
// Amazon Web Services Region is used. To list all of the available engine versions
// for Aurora MySQL, use the following command: aws rds
// describe-db-engine-versions --engine aurora-mysql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for Aurora PostgreSQL, use the following command: aws rds
// describe-db-engine-versions --engine aurora-postgresql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for RDS for MySQL, use the following command: aws rds
// describe-db-engine-versions --engine mysql --query
// "DBEngineVersions[].EngineVersion" To list all of the available engine versions
// for RDS for PostgreSQL, use the following command: aws rds
// describe-db-engine-versions --engine postgres --query
// "DBEngineVersions[].EngineVersion" Aurora MySQL See Database engine updates for
// Amazon Aurora MySQL (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html)
// in the Amazon Aurora User Guide. Aurora PostgreSQL See Amazon Aurora PostgreSQL
// releases and engine versions (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html)
// in the Amazon Aurora User Guide. MySQL See Amazon RDS for MySQL (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt)
// in the Amazon RDS User Guide. PostgreSQL See Amazon RDS for PostgreSQL versions
// and extensions (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts)
// in the Amazon RDS User Guide. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
EngineVersion *string
// The amount of Provisioned IOPS (input/output operations per second) to be
// initially allocated for each DB instance in the Multi-AZ DB cluster. For
// information about valid IOPS values, see Amazon RDS Provisioned IOPS storage (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
// in the Amazon RDS User Guide. Constraints: Must be a multiple between .5 and 50
// of the storage amount for the DB instance. Valid for: Aurora DB clusters and
// Multi-AZ DB clusters
Iops *int32
// The Amazon Web Services KMS key identifier to use when restoring an encrypted
// DB cluster from a DB snapshot or DB cluster snapshot. The Amazon Web Services
// KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS
// key. To use a KMS key in a different Amazon Web Services account, specify the
// key ARN or alias ARN. When you don't specify a value for the KmsKeyId
// parameter, then the following occurs:
// - If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is
// encrypted, then the restored DB cluster is encrypted using the KMS key that was
// used to encrypt the DB snapshot or DB cluster snapshot.
// - If the DB snapshot or DB cluster snapshot in SnapshotIdentifier isn't
// encrypted, then the restored DB cluster isn't encrypted.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
KmsKeyId *string
// The network type of the DB cluster. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the
// IPv6 protocols ( DUAL ). For more information, see Working with a DB instance
// in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only
NetworkType *string
// The name of the option group to use for the restored DB cluster. DB clusters
// are associated with a default option group that can't be modified.
OptionGroupName *string
// The port number on which the new DB cluster accepts connections. Constraints:
// This value must be 1150-65535 Default: The same port as the original DB
// cluster. Valid for: Aurora DB clusters and Multi-AZ DB clusters
Port *int32
// A value that indicates whether the DB cluster is publicly accessible. When the
// DB cluster is publicly accessible, its Domain Name System (DNS) endpoint
// resolves to the private IP address from within the DB cluster's virtual private
// cloud (VPC). It resolves to the public IP address from outside of the DB
// cluster's VPC. Access to the DB cluster is ultimately controlled by the security
// group it uses. That public access is not permitted if the security group
// assigned to the DB cluster doesn't permit it. When the DB cluster isn't publicly
// accessible, it is an internal DB cluster with a DNS name that resolves to a
// private IP address. Default: The default behavior varies depending on whether
// DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, and
// PubliclyAccessible isn't specified, the following applies:
// - If the default VPC in the target Region doesn’t have an internet gateway
// attached to it, the DB cluster is private.
// - If the default VPC in the target Region has an internet gateway attached to
// it, the DB cluster is public.
// If DBSubnetGroupName is specified, and PubliclyAccessible isn't specified, the
// following applies:
// - If the subnets are part of a VPC that doesn’t have an internet gateway
// attached to it, the DB cluster is private.
// - If the subnets are part of a VPC that has an internet gateway attached to
// it, the DB cluster is public.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
PubliclyAccessible *bool
// For DB clusters in serverless DB engine mode, the scaling properties of the DB
// cluster. Valid for: Aurora DB clusters only
ScalingConfiguration *types.ScalingConfiguration
// Contains the scaling configuration of an Aurora Serverless v2 DB cluster. For
// more information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration
// Specifies the storage type to be associated with the DB cluster. When specified
// for a Multi-AZ DB cluster, a value for the Iops parameter is required. Valid
// values: aurora , aurora-iopt1 (Aurora DB clusters); io1 (Multi-AZ DB clusters)
// Default: aurora (Aurora DB clusters); io1 (Multi-AZ DB clusters) Valid for:
// Aurora DB clusters and Multi-AZ DB clusters
StorageType *string
// The tags to be assigned to the restored DB cluster. Valid for: Aurora DB
// clusters and Multi-AZ DB clusters
Tags []types.Tag
// A list of VPC security groups that the new DB cluster will belong to. Valid
// for: Aurora DB clusters and Multi-AZ DB clusters
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBClusterFromSnapshotOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBClusterFromSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBClusterFromSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBClusterFromSnapshot{}, 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 = addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBClusterFromSnapshot(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_opRestoreDBClusterFromSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBClusterFromSnapshot",
}
}
| 372 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Restores a DB cluster to an arbitrary point in time. Users can restore to any
// point in time before LatestRestorableTime for up to BackupRetentionPeriod days.
// The target DB cluster is created from the source DB cluster with the same
// configuration as the original DB cluster, except that the new DB cluster is
// created with the default DB security group. For Aurora, this action only
// restores the DB cluster, not the DB instances for that DB cluster. You must
// invoke the CreateDBInstance action to create DB instances for the restored DB
// cluster, specifying the identifier of the restored DB cluster in
// DBClusterIdentifier . You can create DB instances only after the
// RestoreDBClusterToPointInTime action has completed and the DB cluster is
// available. For more information on Amazon Aurora DB clusters, see What is
// Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ DB cluster deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
func (c *Client) RestoreDBClusterToPointInTime(ctx context.Context, params *RestoreDBClusterToPointInTimeInput, optFns ...func(*Options)) (*RestoreDBClusterToPointInTimeOutput, error) {
if params == nil {
params = &RestoreDBClusterToPointInTimeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBClusterToPointInTime", params, optFns, c.addOperationRestoreDBClusterToPointInTimeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBClusterToPointInTimeOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBClusterToPointInTimeInput struct {
// The name of the new DB cluster to be created. Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
//
// This member is required.
DBClusterIdentifier *string
// The identifier of the source DB cluster from which to restore. Constraints:
// - Must match the identifier of an existing DBCluster.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
//
// This member is required.
SourceDBClusterIdentifier *string
// The target backtrack window, in seconds. To disable backtracking, set this
// value to 0. Default: 0 Constraints:
// - If specified, this value must be set to a number from 0 to 259,200 (72
// hours).
// Valid for: Aurora MySQL DB clusters only
BacktrackWindow *int64
// A value that indicates whether to copy all tags from the restored DB cluster to
// snapshots of the restored DB cluster. The default is not to copy them. Valid
// for: Aurora DB clusters and Multi-AZ DB clusters
CopyTagsToSnapshot *bool
// The compute and memory capacity of the each DB instance in the Multi-AZ DB
// cluster, for example db.m6gd.xlarge. Not all DB instance classes are available
// in all Amazon Web Services Regions, or for all database engines. For the full
// list of DB instance classes, and availability for your engine, see DB instance
// class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only
DBClusterInstanceClass *string
// The name of the DB cluster parameter group to associate with this DB cluster.
// If this argument is omitted, the default DB cluster parameter group for the
// specified engine is used. Constraints:
// - If supplied, must match the name of an existing DB cluster parameter group.
// - Must be 1 to 255 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Valid for: Aurora DB clusters and Multi-AZ DB clusters
DBClusterParameterGroupName *string
// The DB subnet group name to use for the new DB cluster. Constraints: If
// supplied, must match the name of an existing DBSubnetGroup. Example:
// mydbsubnetgroup Valid for: Aurora DB clusters and Multi-AZ DB clusters
DBSubnetGroupName *string
// A value that indicates whether the DB cluster has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
DeletionProtection *bool
// Specify the Active Directory directory ID to restore the DB cluster in. The
// domain must be created prior to this operation. For Amazon Aurora DB clusters,
// Amazon RDS can use Kerberos Authentication to authenticate users that connect to
// the DB cluster. For more information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only
Domain *string
// Specify the name of the IAM role to be used when making API calls to the
// Directory Service. Valid for: Aurora DB clusters only
DomainIAMRoleName *string
// The list of logs that the restored DB cluster is to export to CloudWatch Logs.
// The values in the list depend on the DB engine being used. RDS for MySQL
// Possible values are error , general , and slowquery . RDS for PostgreSQL
// Possible values are postgresql and upgrade . Aurora MySQL Possible values are
// audit , error , general , and slowquery . Aurora PostgreSQL Possible value is
// postgresql . For more information about exporting CloudWatch Logs for Amazon
// RDS, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. For more information about exporting CloudWatch
// Logs for Amazon Aurora, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping isn't enabled. For more information, see IAM Database Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only
EnableIAMDatabaseAuthentication *bool
// The engine mode of the new cluster. Specify provisioned or serverless ,
// depending on the type of the cluster you are creating. You can create an Aurora
// Serverless v1 clone from a provisioned cluster, or a provisioned clone from an
// Aurora Serverless v1 cluster. To create a clone that is an Aurora Serverless v1
// cluster, the original cluster must be an Aurora Serverless v1 cluster or an
// encrypted provisioned cluster. Valid for: Aurora DB clusters only
EngineMode *string
// The amount of Provisioned IOPS (input/output operations per second) to be
// initially allocated for each DB instance in the Multi-AZ DB cluster. For
// information about valid IOPS values, see Amazon RDS Provisioned IOPS storage (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
// in the Amazon RDS User Guide. Constraints: Must be a multiple between .5 and 50
// of the storage amount for the DB instance. Valid for: Multi-AZ DB clusters only
Iops *int32
// The Amazon Web Services KMS key identifier to use when restoring an encrypted
// DB cluster from an encrypted DB cluster. The Amazon Web Services KMS key
// identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To
// use a KMS key in a different Amazon Web Services account, specify the key ARN or
// alias ARN. You can restore to a new DB cluster and encrypt the new DB cluster
// with a KMS key that is different from the KMS key used to encrypt the source DB
// cluster. The new DB cluster is encrypted with the KMS key identified by the
// KmsKeyId parameter. If you don't specify a value for the KmsKeyId parameter,
// then the following occurs:
// - If the DB cluster is encrypted, then the restored DB cluster is encrypted
// using the KMS key that was used to encrypt the source DB cluster.
// - If the DB cluster isn't encrypted, then the restored DB cluster isn't
// encrypted.
// If DBClusterIdentifier refers to a DB cluster that isn't encrypted, then the
// restore request is rejected. Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
KmsKeyId *string
// The network type of the DB cluster. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the
// IPv6 protocols ( DUAL ). For more information, see Working with a DB instance
// in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only
NetworkType *string
// The name of the option group for the new DB cluster. DB clusters are associated
// with a default option group that can't be modified.
OptionGroupName *string
// The port number on which the new DB cluster accepts connections. Constraints: A
// value from 1150-65535 . Default: The default port for the engine. Valid for:
// Aurora DB clusters and Multi-AZ DB clusters
Port *int32
// A value that indicates whether the DB cluster is publicly accessible. When the
// DB cluster is publicly accessible, its Domain Name System (DNS) endpoint
// resolves to the private IP address from within the DB cluster's virtual private
// cloud (VPC). It resolves to the public IP address from outside of the DB
// cluster's VPC. Access to the DB cluster is ultimately controlled by the security
// group it uses. That public access is not permitted if the security group
// assigned to the DB cluster doesn't permit it. When the DB cluster isn't publicly
// accessible, it is an internal DB cluster with a DNS name that resolves to a
// private IP address. Default: The default behavior varies depending on whether
// DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, and
// PubliclyAccessible isn't specified, the following applies:
// - If the default VPC in the target Region doesn’t have an internet gateway
// attached to it, the DB cluster is private.
// - If the default VPC in the target Region has an internet gateway attached to
// it, the DB cluster is public.
// If DBSubnetGroupName is specified, and PubliclyAccessible isn't specified, the
// following applies:
// - If the subnets are part of a VPC that doesn’t have an internet gateway
// attached to it, the DB cluster is private.
// - If the subnets are part of a VPC that has an internet gateway attached to
// it, the DB cluster is public.
// Valid for: Multi-AZ DB clusters only
PubliclyAccessible *bool
// The date and time to restore the DB cluster to. Valid Values: Value must be a
// time in Universal Coordinated Time (UTC) format Constraints:
// - Must be before the latest restorable time for the DB instance
// - Must be specified if UseLatestRestorableTime parameter isn't provided
// - Can't be specified if the UseLatestRestorableTime parameter is enabled
// - Can't be specified if the RestoreType parameter is copy-on-write
// Example: 2015-03-07T23:45:00Z Valid for: Aurora DB clusters and Multi-AZ DB
// clusters
RestoreToTime *time.Time
// The type of restore to be performed. You can specify one of the following
// values:
// - full-copy - The new DB cluster is restored as a full copy of the source DB
// cluster.
// - copy-on-write - The new DB cluster is restored as a clone of the source DB
// cluster.
// If you don't specify a RestoreType value, then the new DB cluster is restored
// as a full copy of the source DB cluster. Valid for: Aurora DB clusters and
// Multi-AZ DB clusters
RestoreType *string
// For DB clusters in serverless DB engine mode, the scaling properties of the DB
// cluster. Valid for: Aurora DB clusters only
ScalingConfiguration *types.ScalingConfiguration
// Contains the scaling configuration of an Aurora Serverless v2 DB cluster. For
// more information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration
// Specifies the storage type to be associated with the DB cluster. When specified
// for a Multi-AZ DB cluster, a value for the Iops parameter is required. Valid
// values: aurora , aurora-iopt1 (Aurora DB clusters); io1 (Multi-AZ DB clusters)
// Default: aurora (Aurora DB clusters); io1 (Multi-AZ DB clusters) Valid for:
// Aurora DB clusters and Multi-AZ DB clusters
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
// A value that indicates whether to restore the DB cluster to the latest
// restorable backup time. By default, the DB cluster isn't restored to the latest
// restorable backup time. Constraints: Can't be specified if RestoreToTime
// parameter is provided. Valid for: Aurora DB clusters and Multi-AZ DB clusters
UseLatestRestorableTime bool
// A list of VPC security groups that the new DB cluster belongs to. Valid for:
// Aurora DB clusters and Multi-AZ DB clusters
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBClusterToPointInTimeOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBClusterToPointInTimeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBClusterToPointInTime{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBClusterToPointInTime{}, 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 = addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBClusterToPointInTime(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_opRestoreDBClusterToPointInTime(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBClusterToPointInTime",
}
}
| 362 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new DB instance from a DB snapshot. The target database is created
// from the source database restore point with most of the source's original
// configuration, including the default security group and DB parameter group. By
// default, the new DB instance is created as a Single-AZ deployment, except when
// the instance is a SQL Server instance that has an option group associated with
// mirroring. In this case, the instance becomes a Multi-AZ deployment, not a
// Single-AZ deployment. If you want to replace your original DB instance with the
// new, restored DB instance, then rename your original DB instance before you call
// the RestoreDBInstanceFromDBSnapshot action. RDS doesn't allow two DB instances
// with the same name. After you have renamed your original DB instance with a
// different identifier, then you can pass the original name of the DB instance as
// the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot
// action. The result is that you replace the original DB instance with the DB
// instance created from the snapshot. If you are restoring from a shared manual DB
// snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora,
// use RestoreDBClusterFromSnapshot .
func (c *Client) RestoreDBInstanceFromDBSnapshot(ctx context.Context, params *RestoreDBInstanceFromDBSnapshotInput, optFns ...func(*Options)) (*RestoreDBInstanceFromDBSnapshotOutput, error) {
if params == nil {
params = &RestoreDBInstanceFromDBSnapshotInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBInstanceFromDBSnapshot", params, optFns, c.addOperationRestoreDBInstanceFromDBSnapshotMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBInstanceFromDBSnapshotOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBInstanceFromDBSnapshotInput struct {
// Name of the DB instance to create from the DB snapshot. This parameter isn't
// case-sensitive. Constraints:
// - Must contain from 1 to 63 numbers, letters, or hyphens
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
// Example: my-snapshot-id
//
// This member is required.
DBInstanceIdentifier *string
// The amount of storage (in gibibytes) to allocate initially for the DB instance.
// Follow the allocation rules specified in CreateDBInstance. Be sure to allocate
// enough storage for your new DB instance so that the restore operation can
// succeed. You can also allocate additional storage for future growth.
AllocatedStorage *int32
// A value that indicates whether minor version upgrades are applied automatically
// to the DB instance during the maintenance window. If you restore an RDS Custom
// DB instance, you must disable this parameter.
AutoMinorVersionUpgrade *bool
// The Availability Zone (AZ) where the DB instance will be created. Default: A
// random, system-chosen Availability Zone. Constraint: You can't specify the
// AvailabilityZone parameter if the DB instance is a Multi-AZ deployment. Example:
// us-east-1a
AvailabilityZone *string
// Specifies where automated backups and manual snapshots are stored for the
// restored DB instance. Possible values are outposts (Amazon Web Services
// Outposts) and region (Amazon Web Services Region). The default is region . For
// more information, see Working with Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide.
BackupTarget *string
// A value that indicates whether to copy all tags from the restored DB instance
// to snapshots of the DB instance. In most cases, tags aren't copied by default.
// However, when you restore a DB instance from a DB snapshot, RDS checks whether
// you specify new tags. If yes, the new tags are added to the restored DB
// instance. If there are no new tags, RDS looks for the tags from the source DB
// instance for the DB snapshot, and then adds those tags to the restored DB
// instance. For more information, see Copying tags to DB instance snapshots (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html#USER_Tagging.CopyTags)
// in the Amazon RDS User Guide.
CopyTagsToSnapshot *bool
// The instance profile associated with the underlying Amazon EC2 instance of an
// RDS Custom DB instance. The instance profile must meet the following
// requirements:
// - The profile must exist in your account.
// - The profile must have an IAM role that Amazon EC2 has permissions to
// assume.
// - The instance profile name and the associated IAM role name must start with
// the prefix AWSRDSCustom .
// For the list of permissions required for the IAM role, see Configure IAM and
// your VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc)
// in the Amazon RDS User Guide. This setting is required for RDS Custom.
CustomIamInstanceProfile *string
// The identifier for the RDS for MySQL Multi-AZ DB cluster snapshot to restore
// from. For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster
// deployments (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide. Constraints:
// - Must match the identifier of an existing Multi-AZ DB cluster snapshot.
// - Can't be specified when DBSnapshotIdentifier is specified.
// - Must be specified when DBSnapshotIdentifier isn't specified.
// - If you are restoring from a shared manual Multi-AZ DB cluster snapshot, the
// DBClusterSnapshotIdentifier must be the ARN of the shared snapshot.
// - Can't be the identifier of an Aurora DB cluster snapshot.
// - Can't be the identifier of an RDS for PostgreSQL Multi-AZ DB cluster
// snapshot.
DBClusterSnapshotIdentifier *string
// The compute and memory capacity of the Amazon RDS DB instance, for example
// db.m4.large. Not all DB instance classes are available in all Amazon Web
// Services Regions, or for all database engines. For the full list of DB instance
// classes, and availability for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Default: The same DBInstanceClass as the original
// DB instance.
DBInstanceClass *string
// The database name for the restored DB instance. This parameter doesn't apply to
// the MySQL, PostgreSQL, or MariaDB engines. It also doesn't apply to RDS Custom
// DB instances.
DBName *string
// The name of the DB parameter group to associate with this DB instance. If you
// don't specify a value for DBParameterGroupName , then RDS uses the default
// DBParameterGroup for the specified DB engine. This setting doesn't apply to RDS
// Custom. Constraints:
// - If supplied, must match the name of an existing DBParameterGroup.
// - Must be 1 to 255 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
DBParameterGroupName *string
// The identifier for the DB snapshot to restore from. Constraints:
// - Must match the identifier of an existing DBSnapshot.
// - Can't be specified when DBClusterSnapshotIdentifier is specified.
// - Must be specified when DBClusterSnapshotIdentifier isn't specified.
// - If you are restoring from a shared manual DB snapshot, the
// DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
DBSnapshotIdentifier *string
// The DB subnet group name to use for the new instance. Constraints: If supplied,
// must match the name of an existing DBSubnetGroup. Example: mydbsubnetgroup
DBSubnetGroupName *string
// A value that indicates whether the DB instance has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled. For more information, see Deleting a DB
// Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html)
// .
DeletionProtection *bool
// Specify the Active Directory directory ID to restore the DB instance in. The
// domain/ must be created prior to this operation. Currently, you can create only
// MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances in an Active
// Directory Domain. For more information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom.
Domain *string
// The ARN for the Secrets Manager secret that contains the credentials for the
// user performing the domain join. Constraints: Example:
// arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456
DomainAuthSecretArn *string
// The IPv4 DNS IP addresses of your primary and secondary Active Directory domain
// controllers. Constraints:
// - Two IP addresses must be provided. If there isn't a secondary domain
// controller, use the IP address of the primary domain controller for both entries
// in the list.
// Example: 123.124.125.126,234.235.236.237
DomainDnsIps []string
// Specifies the fully qualified domain name of an Active Directory domain.
// Constraints:
// - Cannot be greater than 64 characters.
// Example: mymanagedADtest.mymanagedAD.mydomain
DomainFqdn *string
// Specify the name of the IAM role to be used when making API calls to the
// Directory Service. This setting doesn't apply to RDS Custom.
DomainIAMRoleName *string
// The Active Directory organizational unit for your DB instance to join.
// Constraints:
// - Must be in the distinguished name format.
// - Cannot be greater than 64 characters.
// Example: OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain
DomainOu *string
// The list of logs that the restored DB instance is to export to CloudWatch Logs.
// The values in the list depend on the DB engine being used. For more information,
// see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom.
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable a customer-owned IP address (CoIP) for
// an RDS on Outposts DB instance. A CoIP provides local or external connectivity
// to resources in your Outpost subnets through your on-premises network. For some
// use cases, a CoIP can provide lower latency for connections to the DB instance
// from outside of its virtual private cloud (VPC) on your local network. This
// setting doesn't apply to RDS Custom. For more information about RDS on Outposts,
// see Working with Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide. For more information about CoIPs, see
// Customer-owned IP addresses (https://docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing)
// in the Amazon Web Services Outposts User Guide.
EnableCustomerOwnedIp *bool
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping is disabled. For more information about IAM database authentication, see
// IAM Database Authentication for MySQL and PostgreSQL (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom.
EnableIAMDatabaseAuthentication *bool
// The database engine to use for the new instance. This setting doesn't apply to
// RDS Custom. Default: The same as source Constraint: Must be compatible with the
// engine of the source. For example, you can restore a MariaDB 10.1 DB instance
// from a MySQL 5.6 snapshot. Valid Values:
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
Engine *string
// Specifies the amount of provisioned IOPS for the DB instance, expressed in I/O
// operations per second. If this parameter isn't specified, the IOPS value is
// taken from the backup. If this parameter is set to 0, the new instance is
// converted to a non-PIOPS instance. The conversion takes additional time, though
// your DB instance is available for connections before the conversion starts. The
// provisioned IOPS value must follow the requirements for your database engine.
// For more information, see Amazon RDS Provisioned IOPS storage (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
// in the Amazon RDS User Guide. Constraints: Must be an integer greater than 1000.
Iops *int32
// License model information for the restored DB instance. This setting doesn't
// apply to RDS Custom. Default: Same as source. Valid values: license-included |
// bring-your-own-license | general-public-license
LicenseModel *string
// A value that indicates whether the DB instance is a Multi-AZ deployment. This
// setting doesn't apply to RDS Custom. Constraint: You can't specify the
// AvailabilityZone parameter if the DB instance is a Multi-AZ deployment.
MultiAZ *bool
// The network type of the DB instance. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// instance. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and
// the IPv6 protocols ( DUAL ). For more information, see Working with a DB
// instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide.
NetworkType *string
// The name of the option group to be used for the restored DB instance. Permanent
// options, such as the TDE option for Oracle Advanced Security TDE, can't be
// removed from an option group, and that option group can't be removed from a DB
// instance after it is associated with a DB instance. This setting doesn't apply
// to RDS Custom.
OptionGroupName *string
// The port number on which the database accepts connections. Default: The same
// port as the original DB instance Constraints: Value must be 1150-65535
Port *int32
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance. This setting doesn't apply to RDS Custom.
ProcessorFeatures []types.ProcessorFeature
// A value that indicates whether the DB instance is publicly accessible. When the
// DB instance is publicly accessible, its Domain Name System (DNS) endpoint
// resolves to the private IP address from within the DB instance's virtual private
// cloud (VPC). It resolves to the public IP address from outside of the DB
// instance's VPC. Access to the DB instance is ultimately controlled by the
// security group it uses. That public access is not permitted if the security
// group assigned to the DB instance doesn't permit it. When the DB instance isn't
// publicly accessible, it is an internal DB instance with a DNS name that resolves
// to a private IP address. For more information, see CreateDBInstance .
PubliclyAccessible *bool
// Specifies the storage throughput value for the DB instance. This setting
// doesn't apply to RDS Custom or Amazon Aurora.
StorageThroughput *int32
// Specifies the storage type to be associated with the DB instance. Valid values:
// gp2 | gp3 | io1 | standard If you specify io1 or gp3 , you must also include a
// value for the Iops parameter. Default: io1 if the Iops parameter is specified,
// otherwise gp2
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
// The ARN from the key store with which to associate the instance for TDE
// encryption. This setting doesn't apply to RDS Custom.
TdeCredentialArn *string
// The password for the given ARN from the key store in order to access the
// device. This setting doesn't apply to RDS Custom.
TdeCredentialPassword *string
// A value that indicates whether the DB instance class of the DB instance uses
// its default processor features. This setting doesn't apply to RDS Custom.
UseDefaultProcessorFeatures *bool
// A list of EC2 VPC security groups to associate with this DB instance. Default:
// The default EC2 VPC security group for the DB subnet group's VPC.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBInstanceFromDBSnapshotOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBInstanceFromDBSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBInstanceFromDBSnapshot{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBInstanceFromDBSnapshot{}, 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 = addOpRestoreDBInstanceFromDBSnapshotValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBInstanceFromDBSnapshot(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_opRestoreDBInstanceFromDBSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBInstanceFromDBSnapshot",
}
}
| 419 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Amazon Relational Database Service (Amazon RDS) supports importing MySQL
// databases by using backup files. You can create a backup of your on-premises
// database, store it on Amazon Simple Storage Service (Amazon S3), and then
// restore the backup file onto a new Amazon RDS DB instance running MySQL. For
// more information, see Importing Data into an Amazon RDS MySQL DB Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html)
// in the Amazon RDS User Guide. This command doesn't apply to RDS Custom.
func (c *Client) RestoreDBInstanceFromS3(ctx context.Context, params *RestoreDBInstanceFromS3Input, optFns ...func(*Options)) (*RestoreDBInstanceFromS3Output, error) {
if params == nil {
params = &RestoreDBInstanceFromS3Input{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBInstanceFromS3", params, optFns, c.addOperationRestoreDBInstanceFromS3Middlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBInstanceFromS3Output)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBInstanceFromS3Input struct {
// The compute and memory capacity of the DB instance, for example db.m4.large.
// Not all DB instance classes are available in all Amazon Web Services Regions, or
// for all database engines. For the full list of DB instance classes, and
// availability for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Importing from Amazon S3 isn't supported on the
// db.t2.micro DB instance class.
//
// This member is required.
DBInstanceClass *string
// The DB instance identifier. This parameter is stored as a lowercase string.
// Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
// Example: mydbinstance
//
// This member is required.
DBInstanceIdentifier *string
// The name of the database engine to be used for this instance. Valid Values:
// mysql
//
// This member is required.
Engine *string
// The name of your Amazon S3 bucket that contains your database backup file.
//
// This member is required.
S3BucketName *string
// An Amazon Web Services Identity and Access Management (IAM) role to allow
// Amazon RDS to access your Amazon S3 bucket.
//
// This member is required.
S3IngestionRoleArn *string
// The name of the engine of your source database. Valid Values: mysql
//
// This member is required.
SourceEngine *string
// The version of the database that the backup files were created from. MySQL
// versions 5.6 and 5.7 are supported. Example: 5.6.40
//
// This member is required.
SourceEngineVersion *string
// The amount of storage (in gibibytes) to allocate initially for the DB instance.
// Follow the allocation rules specified in CreateDBInstance . Be sure to allocate
// enough storage for your new DB instance so that the restore operation can
// succeed. You can also allocate additional storage for future growth.
AllocatedStorage *int32
// A value that indicates whether minor engine upgrades are applied automatically
// to the DB instance during the maintenance window. By default, minor engine
// upgrades are not applied automatically.
AutoMinorVersionUpgrade *bool
// The Availability Zone that the DB instance is created in. For information about
// Amazon Web Services Regions and Availability Zones, see Regions and
// Availability Zones (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html)
// in the Amazon RDS User Guide. Default: A random, system-chosen Availability Zone
// in the endpoint's Amazon Web Services Region. Example: us-east-1d Constraint:
// The AvailabilityZone parameter can't be specified if the DB instance is a
// Multi-AZ deployment. The specified Availability Zone must be in the same Amazon
// Web Services Region as the current endpoint.
AvailabilityZone *string
// The number of days for which automated backups are retained. Setting this
// parameter to a positive number enables backups. For more information, see
// CreateDBInstance .
BackupRetentionPeriod *int32
// A value that indicates whether to copy all tags from the DB instance to
// snapshots of the DB instance. By default, tags are not copied.
CopyTagsToSnapshot *bool
// The name of the database to create when the DB instance is created. Follow the
// naming rules specified in CreateDBInstance .
DBName *string
// The name of the DB parameter group to associate with this DB instance. If you
// do not specify a value for DBParameterGroupName , then the default
// DBParameterGroup for the specified DB engine is used.
DBParameterGroupName *string
// A list of DB security groups to associate with this DB instance. Default: The
// default DB security group for the database engine.
DBSecurityGroups []string
// A DB subnet group to associate with this DB instance. Constraints: If supplied,
// must match the name of an existing DBSubnetGroup. Example: mydbsubnetgroup
DBSubnetGroupName *string
// A value that indicates whether the DB instance has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled. For more information, see Deleting a DB
// Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html)
// .
DeletionProtection *bool
// The list of logs that the restored DB instance is to export to CloudWatch Logs.
// The values in the list depend on the DB engine being used. For more information,
// see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide.
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping isn't enabled. For more information about IAM database authentication,
// see IAM Database Authentication for MySQL and PostgreSQL (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon RDS User Guide.
EnableIAMDatabaseAuthentication *bool
// A value that indicates whether to enable Performance Insights for the DB
// instance. For more information, see Using Amazon Performance Insights (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html)
// in the Amazon RDS User Guide.
EnablePerformanceInsights *bool
// The version number of the database engine to use. Choose the latest minor
// version of your database engine. For information about engine versions, see
// CreateDBInstance , or call DescribeDBEngineVersions .
EngineVersion *string
// The amount of Provisioned IOPS (input/output operations per second) to allocate
// initially for the DB instance. For information about valid IOPS values, see
// Amazon RDS Provisioned IOPS storage (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
// in the Amazon RDS User Guide.
Iops *int32
// The Amazon Web Services KMS key identifier for an encrypted DB instance. The
// Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or
// alias name for the KMS key. To use a KMS key in a different Amazon Web Services
// account, specify the key ARN or alias ARN. If the StorageEncrypted parameter is
// enabled, and you do not specify a value for the KmsKeyId parameter, then Amazon
// RDS will use your default KMS key. There is a default KMS key for your Amazon
// Web Services account. Your Amazon Web Services account has a different default
// KMS key for each Amazon Web Services Region.
KmsKeyId *string
// The license model for this DB instance. Use general-public-license .
LicenseModel *string
// A value that indicates whether to manage the master user password with Amazon
// Web Services Secrets Manager. For more information, see Password management
// with Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide. Constraints:
// - Can't manage the master user password with Amazon Web Services Secrets
// Manager if MasterUserPassword is specified.
ManageMasterUserPassword *bool
// The password for the master user. The password can include any printable ASCII
// character except "/", """, or "@". Constraints: Can't be specified if
// ManageMasterUserPassword is turned on. MariaDB Constraints: Must contain from 8
// to 41 characters. Microsoft SQL Server Constraints: Must contain from 8 to 128
// characters. MySQL Constraints: Must contain from 8 to 41 characters. Oracle
// Constraints: Must contain from 8 to 30 characters. PostgreSQL Constraints: Must
// contain from 8 to 128 characters.
MasterUserPassword *string
// The Amazon Web Services KMS key identifier to encrypt a secret that is
// automatically generated and managed in Amazon Web Services Secrets Manager. This
// setting is valid only if the master user password is managed by RDS in Amazon
// Web Services Secrets Manager for the DB instance. The Amazon Web Services KMS
// key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
// To use a KMS key in a different Amazon Web Services account, specify the key ARN
// or alias ARN. If you don't specify MasterUserSecretKmsKeyId , then the
// aws/secretsmanager KMS key is used to encrypt the secret. If the secret is in a
// different Amazon Web Services account, then you can't use the aws/secretsmanager
// KMS key to encrypt the secret, and you must use a customer managed KMS key.
// There is a default KMS key for your Amazon Web Services account. Your Amazon Web
// Services account has a different default KMS key for each Amazon Web Services
// Region.
MasterUserSecretKmsKeyId *string
// The name for the master user. Constraints:
// - Must be 1 to 16 letters or numbers.
// - First character must be a letter.
// - Can't be a reserved word for the chosen database engine.
MasterUsername *string
// The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale
// the storage of the DB instance. For more information about this setting,
// including limitations that apply to it, see Managing capacity automatically
// with Amazon RDS storage autoscaling (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)
// in the Amazon RDS User Guide.
MaxAllocatedStorage *int32
// The interval, in seconds, between points when Enhanced Monitoring metrics are
// collected for the DB instance. To disable collecting Enhanced Monitoring
// metrics, specify 0. If MonitoringRoleArn is specified, then you must also set
// MonitoringInterval to a value other than 0. Valid Values: 0, 1, 5, 10, 15, 30,
// 60 Default: 0
MonitoringInterval *int32
// The ARN for the IAM role that permits RDS to send enhanced monitoring metrics
// to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess .
// For information on creating a monitoring role, see Setting Up and Enabling
// Enhanced Monitoring (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling)
// in the Amazon RDS User Guide. If MonitoringInterval is set to a value other
// than 0, then you must supply a MonitoringRoleArn value.
MonitoringRoleArn *string
// A value that indicates whether the DB instance is a Multi-AZ deployment. If the
// DB instance is a Multi-AZ deployment, you can't set the AvailabilityZone
// parameter.
MultiAZ *bool
// The network type of the DB instance. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// instance. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and
// the IPv6 protocols ( DUAL ). For more information, see Working with a DB
// instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide.
NetworkType *string
// The name of the option group to associate with this DB instance. If this
// argument is omitted, the default option group for the specified engine is used.
OptionGroupName *string
// The Amazon Web Services KMS key identifier for encryption of Performance
// Insights data. The Amazon Web Services KMS key identifier is the key ARN, key
// ID, alias ARN, or alias name for the KMS key. If you do not specify a value for
// PerformanceInsightsKMSKeyId , then Amazon RDS uses your default KMS key. There
// is a default KMS key for your Amazon Web Services account. Your Amazon Web
// Services account has a different default KMS key for each Amazon Web Services
// Region.
PerformanceInsightsKMSKeyId *string
// The number of days to retain Performance Insights data. The default is 7 days.
// The following values are valid:
// - 7
// - month * 31, where month is a number of months from 1-23
// - 731
// For example, the following values are valid:
// - 93 (3 months * 31)
// - 341 (11 months * 31)
// - 589 (19 months * 31)
// - 731
// If you specify a retention period such as 94, which isn't a valid value, RDS
// issues an error.
PerformanceInsightsRetentionPeriod *int32
// The port number on which the database accepts connections. Type: Integer Valid
// Values: 1150 - 65535 Default: 3306
Port *int32
// The time range each day during which automated backups are created if automated
// backups are enabled. For more information, see Backup window (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow)
// in the Amazon RDS User Guide. Constraints:
// - Must be in the format hh24:mi-hh24:mi .
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred maintenance window.
// - Must be at least 30 minutes.
PreferredBackupWindow *string
// The time range each week during which system maintenance can occur, in
// Universal Coordinated Time (UTC). For more information, see Amazon RDS
// Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance)
// in the Amazon RDS User Guide. Constraints:
// - Must be in the format ddd:hh24:mi-ddd:hh24:mi .
// - Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
// - Must be in Universal Coordinated Time (UTC).
// - Must not conflict with the preferred backup window.
// - Must be at least 30 minutes.
PreferredMaintenanceWindow *string
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance.
ProcessorFeatures []types.ProcessorFeature
// A value that indicates whether the DB instance is publicly accessible. When the
// DB instance is publicly accessible, its Domain Name System (DNS) endpoint
// resolves to the private IP address from within the DB instance's virtual private
// cloud (VPC). It resolves to the public IP address from outside of the DB
// instance's VPC. Access to the DB instance is ultimately controlled by the
// security group it uses. That public access is not permitted if the security
// group assigned to the DB instance doesn't permit it. When the DB instance isn't
// publicly accessible, it is an internal DB instance with a DNS name that resolves
// to a private IP address. For more information, see CreateDBInstance .
PubliclyAccessible *bool
// The prefix of your Amazon S3 bucket.
S3Prefix *string
// A value that indicates whether the new DB instance is encrypted or not.
StorageEncrypted *bool
// Specifies the storage throughput value for the DB instance. This setting
// doesn't apply to RDS Custom or Amazon Aurora.
StorageThroughput *int32
// Specifies the storage type to be associated with the DB instance. Valid values:
// gp2 | gp3 | io1 | standard If you specify io1 or gp3 , you must also include a
// value for the Iops parameter. Default: io1 if the Iops parameter is specified;
// otherwise gp2
StorageType *string
// A list of tags to associate with this DB instance. For more information, see
// Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
// A value that indicates whether the DB instance class of the DB instance uses
// its default processor features.
UseDefaultProcessorFeatures *bool
// A list of VPC security groups to associate with this DB instance.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBInstanceFromS3Output struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBInstanceFromS3Middlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBInstanceFromS3{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBInstanceFromS3{}, 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 = addOpRestoreDBInstanceFromS3ValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBInstanceFromS3(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_opRestoreDBInstanceFromS3(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBInstanceFromS3",
}
}
| 443 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Restores a DB instance to an arbitrary point in time. You can restore to any
// point in time before the time identified by the LatestRestorableTime property.
// You can restore to a point up to the number of days specified by the
// BackupRetentionPeriod property. The target database is created with most of the
// original configuration, but in a system-selected Availability Zone, with the
// default security group, the default subnet group, and the default DB parameter
// group. By default, the new DB instance is created as a single-AZ deployment
// except when the instance is a SQL Server instance that has an option group that
// is associated with mirroring; in this case, the instance becomes a mirrored
// deployment and not a single-AZ deployment. This command doesn't apply to Aurora
// MySQL and Aurora PostgreSQL. For Aurora, use RestoreDBClusterToPointInTime .
func (c *Client) RestoreDBInstanceToPointInTime(ctx context.Context, params *RestoreDBInstanceToPointInTimeInput, optFns ...func(*Options)) (*RestoreDBInstanceToPointInTimeOutput, error) {
if params == nil {
params = &RestoreDBInstanceToPointInTimeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RestoreDBInstanceToPointInTime", params, optFns, c.addOperationRestoreDBInstanceToPointInTimeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RestoreDBInstanceToPointInTimeOutput)
out.ResultMetadata = metadata
return out, nil
}
type RestoreDBInstanceToPointInTimeInput struct {
// The name of the new DB instance to be created. Constraints:
// - Must contain from 1 to 63 letters, numbers, or hyphens
// - First character must be a letter
// - Can't end with a hyphen or contain two consecutive hyphens
//
// This member is required.
TargetDBInstanceIdentifier *string
// The amount of storage (in gibibytes) to allocate initially for the DB instance.
// Follow the allocation rules specified in CreateDBInstance . Be sure to allocate
// enough storage for your new DB instance so that the restore operation can
// succeed. You can also allocate additional storage for future growth.
AllocatedStorage *int32
// A value that indicates whether minor version upgrades are applied automatically
// to the DB instance during the maintenance window. This setting doesn't apply to
// RDS Custom.
AutoMinorVersionUpgrade *bool
// The Availability Zone (AZ) where the DB instance will be created. Default: A
// random, system-chosen Availability Zone. Constraint: You can't specify the
// AvailabilityZone parameter if the DB instance is a Multi-AZ deployment. Example:
// us-east-1a
AvailabilityZone *string
// Specifies where automated backups and manual snapshots are stored for the
// restored DB instance. Possible values are outposts (Amazon Web Services
// Outposts) and region (Amazon Web Services Region). The default is region . For
// more information, see Working with Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide.
BackupTarget *string
// A value that indicates whether to copy all tags from the restored DB instance
// to snapshots of the DB instance. By default, tags are not copied.
CopyTagsToSnapshot *bool
// The instance profile associated with the underlying Amazon EC2 instance of an
// RDS Custom DB instance. The instance profile must meet the following
// requirements:
// - The profile must exist in your account.
// - The profile must have an IAM role that Amazon EC2 has permissions to
// assume.
// - The instance profile name and the associated IAM role name must start with
// the prefix AWSRDSCustom .
// For the list of permissions required for the IAM role, see Configure IAM and
// your VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc)
// in the Amazon RDS User Guide. This setting is required for RDS Custom.
CustomIamInstanceProfile *string
// The compute and memory capacity of the Amazon RDS DB instance, for example
// db.m4.large. Not all DB instance classes are available in all Amazon Web
// Services Regions, or for all database engines. For the full list of DB instance
// classes, and availability for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
// in the Amazon RDS User Guide. Default: The same DBInstanceClass as the original
// DB instance.
DBInstanceClass *string
// The database name for the restored DB instance. This parameter isn't supported
// for the MySQL or MariaDB engines. It also doesn't apply to RDS Custom.
DBName *string
// The name of the DB parameter group to associate with this DB instance. If you
// do not specify a value for DBParameterGroupName , then the default
// DBParameterGroup for the specified DB engine is used. This setting doesn't apply
// to RDS Custom. Constraints:
// - If supplied, must match the name of an existing DBParameterGroup.
// - Must be 1 to 255 letters, numbers, or hyphens.
// - First character must be a letter.
// - Can't end with a hyphen or contain two consecutive hyphens.
DBParameterGroupName *string
// The DB subnet group name to use for the new instance. Constraints: If supplied,
// must match the name of an existing DBSubnetGroup. Example: mydbsubnetgroup
DBSubnetGroupName *string
// A value that indicates whether the DB instance has deletion protection enabled.
// The database can't be deleted when deletion protection is enabled. By default,
// deletion protection isn't enabled. For more information, see Deleting a DB
// Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html)
// .
DeletionProtection *bool
// Specify the Active Directory directory ID to restore the DB instance in. Create
// the domain before running this command. Currently, you can create only the
// MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances in an Active
// Directory Domain. This setting doesn't apply to RDS Custom. For more
// information, see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html)
// in the Amazon RDS User Guide.
Domain *string
// The ARN for the Secrets Manager secret that contains the credentials for the
// user performing the domain join. Constraints:
// - Cannot be greater than 64 characters.
// Example:
// arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456
DomainAuthSecretArn *string
// The IPv4 DNS IP addresses of your primary and secondary Active Directory domain
// controllers. Constraints:
// - Two IP addresses must be provided. If there isn't a secondary domain
// controller, use the IP address of the primary domain controller for both entries
// in the list.
// Example: 123.124.125.126,234.235.236.237
DomainDnsIps []string
// Specifies the fully qualified domain name of an Active Directory domain.
// Constraints:
// - Cannot be greater than 64 characters.
// Example: mymanagedADtest.mymanagedAD.mydomain
DomainFqdn *string
// Specify the name of the IAM role to be used when making API calls to the
// Directory Service. This setting doesn't apply to RDS Custom.
DomainIAMRoleName *string
// The Active Directory organizational unit for your DB instance to join.
// Constraints:
// - Must be in the distinguished name format.
// - Cannot be greater than 64 characters.
// Example: OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain
DomainOu *string
// The list of logs that the restored DB instance is to export to CloudWatch Logs.
// The values in the list depend on the DB engine being used. For more information,
// see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom.
EnableCloudwatchLogsExports []string
// A value that indicates whether to enable a customer-owned IP address (CoIP) for
// an RDS on Outposts DB instance. A CoIP provides local or external connectivity
// to resources in your Outpost subnets through your on-premises network. For some
// use cases, a CoIP can provide lower latency for connections to the DB instance
// from outside of its virtual private cloud (VPC) on your local network. This
// setting doesn't apply to RDS Custom. For more information about RDS on Outposts,
// see Working with Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide. For more information about CoIPs, see
// Customer-owned IP addresses (https://docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing)
// in the Amazon Web Services Outposts User Guide.
EnableCustomerOwnedIp *bool
// A value that indicates whether to enable mapping of Amazon Web Services
// Identity and Access Management (IAM) accounts to database accounts. By default,
// mapping isn't enabled. This setting doesn't apply to RDS Custom. For more
// information about IAM database authentication, see IAM Database Authentication
// for MySQL and PostgreSQL (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html)
// in the Amazon RDS User Guide.
EnableIAMDatabaseAuthentication *bool
// The database engine to use for the new instance. This setting doesn't apply to
// RDS Custom. Default: The same as source Constraint: Must be compatible with the
// engine of the source Valid Values:
// - mariadb
// - mysql
// - oracle-ee
// - oracle-ee-cdb
// - oracle-se2
// - oracle-se2-cdb
// - postgres
// - sqlserver-ee
// - sqlserver-se
// - sqlserver-ex
// - sqlserver-web
Engine *string
// The amount of Provisioned IOPS (input/output operations per second) to be
// initially allocated for the DB instance. Constraints: Must be an integer greater
// than 1000. SQL Server Setting the IOPS value for the SQL Server database engine
// isn't supported.
Iops *int32
// License model information for the restored DB instance. This setting doesn't
// apply to RDS Custom. Default: Same as source. Valid values: license-included |
// bring-your-own-license | general-public-license
LicenseModel *string
// The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale
// the storage of the DB instance. For more information about this setting,
// including limitations that apply to it, see Managing capacity automatically
// with Amazon RDS storage autoscaling (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)
// in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom.
MaxAllocatedStorage *int32
// A value that indicates whether the DB instance is a Multi-AZ deployment. This
// setting doesn't apply to RDS Custom. Constraint: You can't specify the
// AvailabilityZone parameter if the DB instance is a Multi-AZ deployment.
MultiAZ *bool
// The network type of the DB instance. Valid values:
// - IPV4
// - DUAL
// The network type is determined by the DBSubnetGroup specified for the DB
// instance. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and
// the IPv6 protocols ( DUAL ). For more information, see Working with a DB
// instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide.
NetworkType *string
// The name of the option group to be used for the restored DB instance. Permanent
// options, such as the TDE option for Oracle Advanced Security TDE, can't be
// removed from an option group, and that option group can't be removed from a DB
// instance after it is associated with a DB instance This setting doesn't apply to
// RDS Custom.
OptionGroupName *string
// The port number on which the database accepts connections. Constraints: Value
// must be 1150-65535 Default: The same port as the original DB instance.
Port *int32
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance. This setting doesn't apply to RDS Custom.
ProcessorFeatures []types.ProcessorFeature
// A value that indicates whether the DB instance is publicly accessible. When the
// DB cluster is publicly accessible, its Domain Name System (DNS) endpoint
// resolves to the private IP address from within the DB cluster's virtual private
// cloud (VPC). It resolves to the public IP address from outside of the DB
// cluster's VPC. Access to the DB cluster is ultimately controlled by the security
// group it uses. That public access isn't permitted if the security group assigned
// to the DB cluster doesn't permit it. When the DB instance isn't publicly
// accessible, it is an internal DB instance with a DNS name that resolves to a
// private IP address. For more information, see CreateDBInstance .
PubliclyAccessible *bool
// The date and time to restore from. Valid Values: Value must be a time in
// Universal Coordinated Time (UTC) format Constraints:
// - Must be before the latest restorable time for the DB instance
// - Can't be specified if the UseLatestRestorableTime parameter is enabled
// Example: 2009-09-07T23:45:00Z
RestoreTime *time.Time
// The Amazon Resource Name (ARN) of the replicated automated backups from which
// to restore, for example,
// arn:aws:rds:useast-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE .
// This setting doesn't apply to RDS Custom.
SourceDBInstanceAutomatedBackupsArn *string
// The identifier of the source DB instance from which to restore. Constraints:
// - Must match the identifier of an existing DB instance.
SourceDBInstanceIdentifier *string
// The resource ID of the source DB instance from which to restore.
SourceDbiResourceId *string
// Specifies the storage throughput value for the DB instance. This setting
// doesn't apply to RDS Custom or Amazon Aurora.
StorageThroughput *int32
// Specifies the storage type to be associated with the DB instance. Valid values:
// gp2 | gp3 | io1 | standard If you specify io1 or gp3 , you must also include a
// value for the Iops parameter. Default: io1 if the Iops parameter is specified,
// otherwise gp2
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
Tags []types.Tag
// The ARN from the key store with which to associate the instance for TDE
// encryption. This setting doesn't apply to RDS Custom.
TdeCredentialArn *string
// The password for the given ARN from the key store in order to access the
// device. This setting doesn't apply to RDS Custom.
TdeCredentialPassword *string
// A value that indicates whether the DB instance class of the DB instance uses
// its default processor features. This setting doesn't apply to RDS Custom.
UseDefaultProcessorFeatures *bool
// A value that indicates whether the DB instance is restored from the latest
// backup time. By default, the DB instance isn't restored from the latest backup
// time. Constraints: Can't be specified if the RestoreTime parameter is provided.
UseLatestRestorableTime bool
// A list of EC2 VPC security groups to associate with this DB instance. Default:
// The default EC2 VPC security group for the DB subnet group's VPC.
VpcSecurityGroupIds []string
noSmithyDocumentSerde
}
type RestoreDBInstanceToPointInTimeOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRestoreDBInstanceToPointInTimeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBInstanceToPointInTime{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBInstanceToPointInTime{}, 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 = addOpRestoreDBInstanceToPointInTimeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBInstanceToPointInTime(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_opRestoreDBInstanceToPointInTime(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RestoreDBInstanceToPointInTime",
}
}
| 414 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or
// EC2 or VPC security groups. Required parameters for this API are one of CIDRIP,
// EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either
// EC2SecurityGroupName or EC2SecurityGroupId). EC2-Classic was retired on August
// 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that
// you migrate as soon as possible. For more information, see Migrate from
// EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html)
// in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring –
// Here’s How to Prepare (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/)
// , and Moving a DB instance not in a VPC into a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html)
// in the Amazon RDS User Guide.
func (c *Client) RevokeDBSecurityGroupIngress(ctx context.Context, params *RevokeDBSecurityGroupIngressInput, optFns ...func(*Options)) (*RevokeDBSecurityGroupIngressOutput, error) {
if params == nil {
params = &RevokeDBSecurityGroupIngressInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RevokeDBSecurityGroupIngress", params, optFns, c.addOperationRevokeDBSecurityGroupIngressMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RevokeDBSecurityGroupIngressOutput)
out.ResultMetadata = metadata
return out, nil
}
type RevokeDBSecurityGroupIngressInput struct {
// The name of the DB security group to revoke ingress from.
//
// This member is required.
DBSecurityGroupName *string
// The IP range to revoke access from. Must be a valid CIDR range. If CIDRIP is
// specified, EC2SecurityGroupName , EC2SecurityGroupId and EC2SecurityGroupOwnerId
// can't be provided.
CIDRIP *string
// The id of the EC2 security group to revoke access from. For VPC DB security
// groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId
// and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.
EC2SecurityGroupId *string
// The name of the EC2 security group to revoke access from. For VPC DB security
// groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId
// and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.
EC2SecurityGroupName *string
// The Amazon Web Services account number of the owner of the EC2 security group
// specified in the EC2SecurityGroupName parameter. The Amazon Web Services access
// key ID isn't an acceptable value. For VPC DB security groups, EC2SecurityGroupId
// must be provided. Otherwise, EC2SecurityGroupOwnerId and either
// EC2SecurityGroupName or EC2SecurityGroupId must be provided.
EC2SecurityGroupOwnerId *string
noSmithyDocumentSerde
}
type RevokeDBSecurityGroupIngressOutput struct {
// Contains the details for an Amazon RDS DB security group. This data type is
// used as a response element in the DescribeDBSecurityGroups action.
DBSecurityGroup *types.DBSecurityGroup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRevokeDBSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpRevokeDBSecurityGroupIngress{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRevokeDBSecurityGroupIngress{}, 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 = addOpRevokeDBSecurityGroupIngressValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeDBSecurityGroupIngress(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_opRevokeDBSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "RevokeDBSecurityGroupIngress",
}
}
| 158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts a database activity stream to monitor activity on the database. For more
// information, see Monitoring Amazon Aurora with Database Activity Streams (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html)
// in the Amazon Aurora User Guide or Monitoring Amazon RDS with Database Activity
// Streams (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/DBActivityStreams.html)
// in the Amazon RDS User Guide.
func (c *Client) StartActivityStream(ctx context.Context, params *StartActivityStreamInput, optFns ...func(*Options)) (*StartActivityStreamOutput, error) {
if params == nil {
params = &StartActivityStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartActivityStream", params, optFns, c.addOperationStartActivityStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartActivityStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartActivityStreamInput struct {
// The Amazon Web Services KMS key identifier for encrypting messages in the
// database activity stream. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
//
// This member is required.
KmsKeyId *string
// Specifies the mode of the database activity stream. Database events such as a
// change or access generate an activity stream event. The database session can
// handle these events either synchronously or asynchronously.
//
// This member is required.
Mode types.ActivityStreamMode
// The Amazon Resource Name (ARN) of the DB cluster, for example,
// arn:aws:rds:us-east-1:12345667890:cluster:das-cluster .
//
// This member is required.
ResourceArn *string
// Specifies whether or not the database activity stream is to start as soon as
// possible, regardless of the maintenance window for the database.
ApplyImmediately *bool
// Specifies whether the database activity stream includes engine-native audit
// fields. This option applies to an Oracle or Microsoft SQL Server DB instance. By
// default, no engine-native audit fields are included.
EngineNativeAuditFieldsIncluded *bool
noSmithyDocumentSerde
}
type StartActivityStreamOutput struct {
// Indicates whether or not the database activity stream will start as soon as
// possible, regardless of the maintenance window for the database.
ApplyImmediately bool
// Indicates whether engine-native audit fields are included in the database
// activity stream.
EngineNativeAuditFieldsIncluded *bool
// The name of the Amazon Kinesis data stream to be used for the database activity
// stream.
KinesisStreamName *string
// The Amazon Web Services KMS key identifier for encryption of messages in the
// database activity stream.
KmsKeyId *string
// The mode of the database activity stream.
Mode types.ActivityStreamMode
// The status of the database activity stream.
Status types.ActivityStreamStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartActivityStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStartActivityStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartActivityStream{}, 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 = addOpStartActivityStreamValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartActivityStream(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_opStartActivityStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StartActivityStream",
}
}
| 172 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts an Amazon Aurora DB cluster that was stopped using the Amazon Web
// Services console, the stop-db-cluster CLI command, or the StopDBCluster action.
// For more information, see Stopping and Starting an Aurora Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html)
// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters.
func (c *Client) StartDBCluster(ctx context.Context, params *StartDBClusterInput, optFns ...func(*Options)) (*StartDBClusterOutput, error) {
if params == nil {
params = &StartDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartDBCluster", params, optFns, c.addOperationStartDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartDBClusterInput struct {
// The DB cluster identifier of the Amazon Aurora DB cluster to be started. This
// parameter is stored as a lowercase string.
//
// This member is required.
DBClusterIdentifier *string
noSmithyDocumentSerde
}
type StartDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStartDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartDBCluster{}, 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 = addOpStartDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDBCluster(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_opStartDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StartDBCluster",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts an Amazon RDS DB instance that was stopped using the Amazon Web Services
// console, the stop-db-instance CLI command, or the StopDBInstance action. For
// more information, see Starting an Amazon RDS DB instance That Was Previously
// Stopped (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html)
// in the Amazon RDS User Guide. This command doesn't apply to RDS Custom, Aurora
// MySQL, and Aurora PostgreSQL. For Aurora DB clusters, use StartDBCluster
// instead.
func (c *Client) StartDBInstance(ctx context.Context, params *StartDBInstanceInput, optFns ...func(*Options)) (*StartDBInstanceOutput, error) {
if params == nil {
params = &StartDBInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartDBInstance", params, optFns, c.addOperationStartDBInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartDBInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartDBInstanceInput struct {
// The user-supplied instance identifier.
//
// This member is required.
DBInstanceIdentifier *string
noSmithyDocumentSerde
}
type StartDBInstanceOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStartDBInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartDBInstance{}, 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 = addOpStartDBInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDBInstance(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_opStartDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StartDBInstance",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables replication of automated backups to a different Amazon Web Services
// Region. This command doesn't apply to RDS Custom. For more information, see
// Replicating Automated Backups to Another Amazon Web Services Region (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html)
// in the Amazon RDS User Guide.
func (c *Client) StartDBInstanceAutomatedBackupsReplication(ctx context.Context, params *StartDBInstanceAutomatedBackupsReplicationInput, optFns ...func(*Options)) (*StartDBInstanceAutomatedBackupsReplicationOutput, error) {
if params == nil {
params = &StartDBInstanceAutomatedBackupsReplicationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartDBInstanceAutomatedBackupsReplication", params, optFns, c.addOperationStartDBInstanceAutomatedBackupsReplicationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartDBInstanceAutomatedBackupsReplicationOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartDBInstanceAutomatedBackupsReplicationInput struct {
// The Amazon Resource Name (ARN) of the source DB instance for the replicated
// automated backups, for example, arn:aws:rds:us-west-2:123456789012:db:mydatabase
// .
//
// This member is required.
SourceDBInstanceArn *string
// The retention period for the replicated automated backups.
BackupRetentionPeriod *int32
// The Amazon Web Services KMS key identifier for encryption of the replicated
// automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS
// encryption key in the destination Amazon Web Services Region, for example,
// arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE .
KmsKeyId *string
// In an Amazon Web Services GovCloud (US) Region, an URL that contains a
// Signature Version 4 signed request for the
// StartDBInstanceAutomatedBackupsReplication operation to call in the Amazon Web
// Services Region of the source DB instance. The presigned URL must be a valid
// request for the StartDBInstanceAutomatedBackupsReplication API operation that
// can run in the Amazon Web Services Region that contains the source DB instance.
// This setting applies only to Amazon Web Services GovCloud (US) Regions. It's
// ignored in other Amazon Web Services Regions. To learn how to generate a
// Signature Version 4 signed request, see Authenticating Requests: Using Query
// Parameters (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html)
// and Signature Version 4 Signing Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
// . If you are using an Amazon Web Services SDK tool or the CLI, you can specify
// SourceRegion (or --source-region for the CLI) instead of specifying PreSignedUrl
// manually. Specifying SourceRegion autogenerates a presigned URL that is a valid
// request for the operation that can run in the source Amazon Web Services Region.
PreSignedUrl *string
noSmithyDocumentSerde
}
type StartDBInstanceAutomatedBackupsReplicationOutput struct {
// An automated backup of a DB instance. It consists of system backups,
// transaction logs, and the database instance properties that existed at the time
// you deleted the source instance.
DBInstanceAutomatedBackup *types.DBInstanceAutomatedBackup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartDBInstanceAutomatedBackupsReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStartDBInstanceAutomatedBackupsReplication{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartDBInstanceAutomatedBackupsReplication{}, 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 = addOpStartDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDBInstanceAutomatedBackupsReplication(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_opStartDBInstanceAutomatedBackupsReplication(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StartDBInstanceAutomatedBackupsReplication",
}
}
| 158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Starts an export of DB snapshot or DB cluster data to Amazon S3. The provided
// IAM role must have access to the S3 bucket. You can't export snapshot data from
// RDS Custom DB instances. You can't export cluster data from Multi-AZ DB
// clusters. For more information on exporting DB snapshot data, see Exporting DB
// snapshot data to Amazon S3 (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ExportSnapshot.html)
// in the Amazon RDS User Guide or Exporting DB cluster snapshot data to Amazon S3 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-export-snapshot.html)
// in the Amazon Aurora User Guide. For more information on exporting DB cluster
// data, see Exporting DB cluster data to Amazon S3 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/export-cluster-data.html)
// in the Amazon Aurora User Guide.
func (c *Client) StartExportTask(ctx context.Context, params *StartExportTaskInput, optFns ...func(*Options)) (*StartExportTaskOutput, error) {
if params == nil {
params = &StartExportTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartExportTask", params, optFns, c.addOperationStartExportTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartExportTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartExportTaskInput struct {
// A unique identifier for the export task. This ID isn't an identifier for the
// Amazon S3 bucket where the data is to be exported.
//
// This member is required.
ExportTaskIdentifier *string
// The name of the IAM role to use for writing to the Amazon S3 bucket when
// exporting a snapshot or cluster. In the IAM policy attached to your IAM role,
// include the following required actions to allow the transfer of files from
// Amazon RDS or Amazon Aurora to an S3 bucket:
// - s3:PutObject*
// - s3:GetObject*
// - s3:ListBucket
// - s3:DeleteObject*
// - s3:GetBucketLocation
// In the policy, include the resources to identify the S3 bucket and objects in
// the bucket. The following list of resources shows the Amazon Resource Name (ARN)
// format for accessing S3:
// - arn:aws:s3:::your-s3-bucket
// - arn:aws:s3:::your-s3-bucket/*
//
// This member is required.
IamRoleArn *string
// The ID of the Amazon Web Services KMS key to use to encrypt the data exported
// to Amazon S3. The Amazon Web Services KMS key identifier is the key ARN, key ID,
// alias ARN, or alias name for the KMS key. The caller of this operation must be
// authorized to run the following operations. These can be set in the Amazon Web
// Services KMS key policy:
// - kms:Encrypt
// - kms:Decrypt
// - kms:GenerateDataKey
// - kms:GenerateDataKeyWithoutPlaintext
// - kms:ReEncryptFrom
// - kms:ReEncryptTo
// - kms:CreateGrant
// - kms:DescribeKey
// - kms:RetireGrant
//
// This member is required.
KmsKeyId *string
// The name of the Amazon S3 bucket to export the snapshot or cluster data to.
//
// This member is required.
S3BucketName *string
// The Amazon Resource Name (ARN) of the snapshot or cluster to export to Amazon
// S3.
//
// This member is required.
SourceArn *string
// The data to be exported from the snapshot or cluster. If this parameter is not
// provided, all of the data is exported. Valid values are the following:
// - database - Export all the data from a specified database.
// - database.table table-name - Export a table of the snapshot or cluster. This
// format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL.
// - database.schema schema-name - Export a database schema of the snapshot or
// cluster. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
//
// - database.schema.table table-name - Export a table of the database schema.
// This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
ExportOnly []string
// The Amazon S3 bucket prefix to use as the file name and path of the exported
// data.
S3Prefix *string
noSmithyDocumentSerde
}
// Contains the details of a snapshot or cluster export to Amazon S3. This data
// type is used as a response element in the DescribeExportTasks action.
type StartExportTaskOutput struct {
// The data exported from the snapshot or cluster. Valid values are the following:
// - database - Export all the data from a specified database.
// - database.table table-name - Export a table of the snapshot or cluster. This
// format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL.
// - database.schema schema-name - Export a database schema of the snapshot or
// cluster. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
//
// - database.schema.table table-name - Export a table of the database schema.
// This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
ExportOnly []string
// A unique identifier for the snapshot or cluster export task. This ID isn't an
// identifier for the Amazon S3 bucket where the data is exported.
ExportTaskIdentifier *string
// The reason the export failed, if it failed.
FailureCause *string
// The name of the IAM role that is used to write to Amazon S3 when exporting a
// snapshot or cluster.
IamRoleArn *string
// The key identifier of the Amazon Web Services KMS key that is used to encrypt
// the data when it's exported to Amazon S3. The KMS key identifier is its key ARN,
// key ID, alias ARN, or alias name. The IAM role used for the export must have
// encryption and decryption permissions to use this KMS key.
KmsKeyId *string
// The progress of the snapshot or cluster export task as a percentage.
PercentProgress int32
// The Amazon S3 bucket that the snapshot or cluster is exported to.
S3Bucket *string
// The Amazon S3 bucket prefix that is the file name and path of the exported data.
S3Prefix *string
// The time that the snapshot was created.
SnapshotTime *time.Time
// The Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3.
SourceArn *string
// The type of source for the export.
SourceType types.ExportSourceType
// The progress status of the export task. The status can be one of the following:
// - CANCELED
// - CANCELING
// - COMPLETE
// - FAILED
// - IN_PROGRESS
// - STARTING
Status *string
// The time that the snapshot or cluster export task ended.
TaskEndTime *time.Time
// The time that the snapshot or cluster export task started.
TaskStartTime *time.Time
// The total amount of data exported, in gigabytes.
TotalExtractedDataInGB int32
// A warning about the snapshot or cluster export task.
WarningMessage *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStartExportTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartExportTask{}, 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 = addOpStartExportTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExportTask(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_opStartExportTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StartExportTask",
}
}
| 264 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Stops a database activity stream that was started using the Amazon Web Services
// console, the start-activity-stream CLI command, or the StartActivityStream
// action. For more information, see Monitoring Amazon Aurora with Database
// Activity Streams (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html)
// in the Amazon Aurora User Guide or Monitoring Amazon RDS with Database Activity
// Streams (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/DBActivityStreams.html)
// in the Amazon RDS User Guide.
func (c *Client) StopActivityStream(ctx context.Context, params *StopActivityStreamInput, optFns ...func(*Options)) (*StopActivityStreamOutput, error) {
if params == nil {
params = &StopActivityStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StopActivityStream", params, optFns, c.addOperationStopActivityStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StopActivityStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type StopActivityStreamInput struct {
// The Amazon Resource Name (ARN) of the DB cluster for the database activity
// stream. For example, arn:aws:rds:us-east-1:12345667890:cluster:das-cluster .
//
// This member is required.
ResourceArn *string
// Specifies whether or not the database activity stream is to stop as soon as
// possible, regardless of the maintenance window for the database.
ApplyImmediately *bool
noSmithyDocumentSerde
}
type StopActivityStreamOutput struct {
// The name of the Amazon Kinesis data stream used for the database activity
// stream.
KinesisStreamName *string
// The Amazon Web Services KMS key identifier used for encrypting messages in the
// database activity stream. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
KmsKeyId *string
// The status of the database activity stream.
Status types.ActivityStreamStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStopActivityStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStopActivityStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStopActivityStream{}, 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 = addOpStopActivityStreamValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopActivityStream(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_opStopActivityStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StopActivityStream",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains
// the DB cluster's metadata, including its endpoints and DB parameter groups.
// Aurora also retains the transaction logs so you can do a point-in-time restore
// if necessary. For more information, see Stopping and Starting an Aurora Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html)
// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters.
func (c *Client) StopDBCluster(ctx context.Context, params *StopDBClusterInput, optFns ...func(*Options)) (*StopDBClusterOutput, error) {
if params == nil {
params = &StopDBClusterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StopDBCluster", params, optFns, c.addOperationStopDBClusterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StopDBClusterOutput)
out.ResultMetadata = metadata
return out, nil
}
type StopDBClusterInput struct {
// The DB cluster identifier of the Amazon Aurora DB cluster to be stopped. This
// parameter is stored as a lowercase string.
//
// This member is required.
DBClusterIdentifier *string
noSmithyDocumentSerde
}
type StopDBClusterOutput struct {
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
DBCluster *types.DBCluster
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStopDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStopDBCluster{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStopDBCluster{}, 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 = addOpStopDBClusterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopDBCluster(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_opStopDBCluster(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StopDBCluster",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS
// retains the DB instance's metadata, including its endpoint, DB parameter group,
// and option group membership. Amazon RDS also retains the transaction logs so you
// can do a point-in-time restore if necessary. For more information, see Stopping
// an Amazon RDS DB Instance Temporarily (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html)
// in the Amazon RDS User Guide. This command doesn't apply to RDS Custom, Aurora
// MySQL, and Aurora PostgreSQL. For Aurora clusters, use StopDBCluster instead.
func (c *Client) StopDBInstance(ctx context.Context, params *StopDBInstanceInput, optFns ...func(*Options)) (*StopDBInstanceOutput, error) {
if params == nil {
params = &StopDBInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StopDBInstance", params, optFns, c.addOperationStopDBInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StopDBInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type StopDBInstanceInput struct {
// The user-supplied instance identifier.
//
// This member is required.
DBInstanceIdentifier *string
// The user-supplied instance identifier of the DB Snapshot created immediately
// before the DB instance is stopped.
DBSnapshotIdentifier *string
noSmithyDocumentSerde
}
type StopDBInstanceOutput struct {
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
DBInstance *types.DBInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStopDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStopDBInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStopDBInstance{}, 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 = addOpStopDBInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopDBInstance(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_opStopDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StopDBInstance",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Stops automated backup replication for a DB instance. This command doesn't
// apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL. For more information,
// see Replicating Automated Backups to Another Amazon Web Services Region (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html)
// in the Amazon RDS User Guide.
func (c *Client) StopDBInstanceAutomatedBackupsReplication(ctx context.Context, params *StopDBInstanceAutomatedBackupsReplicationInput, optFns ...func(*Options)) (*StopDBInstanceAutomatedBackupsReplicationOutput, error) {
if params == nil {
params = &StopDBInstanceAutomatedBackupsReplicationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StopDBInstanceAutomatedBackupsReplication", params, optFns, c.addOperationStopDBInstanceAutomatedBackupsReplicationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StopDBInstanceAutomatedBackupsReplicationOutput)
out.ResultMetadata = metadata
return out, nil
}
type StopDBInstanceAutomatedBackupsReplicationInput struct {
// The Amazon Resource Name (ARN) of the source DB instance for which to stop
// replicating automate backups, for example,
// arn:aws:rds:us-west-2:123456789012:db:mydatabase .
//
// This member is required.
SourceDBInstanceArn *string
noSmithyDocumentSerde
}
type StopDBInstanceAutomatedBackupsReplicationOutput struct {
// An automated backup of a DB instance. It consists of system backups,
// transaction logs, and the database instance properties that existed at the time
// you deleted the source instance.
DBInstanceAutomatedBackup *types.DBInstanceAutomatedBackup
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStopDBInstanceAutomatedBackupsReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpStopDBInstanceAutomatedBackupsReplication{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStopDBInstanceAutomatedBackupsReplication{}, 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 = addOpStopDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopDBInstanceAutomatedBackupsReplication(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_opStopDBInstanceAutomatedBackupsReplication(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "StopDBInstanceAutomatedBackupsReplication",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Switches over a blue/green deployment. Before you switch over, production
// traffic is routed to the databases in the blue environment. After you switch
// over, production traffic is routed to the databases in the green environment.
// For more information, see Using Amazon RDS Blue/Green Deployments for database
// updates (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)
// in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for
// database updates (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html)
// in the Amazon Aurora User Guide.
func (c *Client) SwitchoverBlueGreenDeployment(ctx context.Context, params *SwitchoverBlueGreenDeploymentInput, optFns ...func(*Options)) (*SwitchoverBlueGreenDeploymentOutput, error) {
if params == nil {
params = &SwitchoverBlueGreenDeploymentInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SwitchoverBlueGreenDeployment", params, optFns, c.addOperationSwitchoverBlueGreenDeploymentMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SwitchoverBlueGreenDeploymentOutput)
out.ResultMetadata = metadata
return out, nil
}
type SwitchoverBlueGreenDeploymentInput struct {
// The blue/green deployment identifier. Constraints:
// - Must match an existing blue/green deployment identifier.
//
// This member is required.
BlueGreenDeploymentIdentifier *string
// The amount of time, in seconds, for the switchover to complete. The default is
// 300. If the switchover takes longer than the specified duration, then any
// changes are rolled back, and no changes are made to the environments.
SwitchoverTimeout *int32
noSmithyDocumentSerde
}
type SwitchoverBlueGreenDeploymentOutput struct {
// Contains the details about a blue/green deployment. For more information, see
// Using Amazon RDS Blue/Green Deployments for database updates (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)
// in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for
// database updates (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html)
// in the Amazon Aurora User Guide.
BlueGreenDeployment *types.BlueGreenDeployment
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSwitchoverBlueGreenDeploymentMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSwitchoverBlueGreenDeployment{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSwitchoverBlueGreenDeployment{}, 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 = addOpSwitchoverBlueGreenDeploymentValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSwitchoverBlueGreenDeployment(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_opSwitchoverBlueGreenDeployment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds",
OperationName: "SwitchoverBlueGreenDeployment",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package rds provides the API client, operations, and parameter types for Amazon
// Relational Database Service.
//
// Amazon Relational Database Service Amazon Relational Database Service (Amazon
// RDS) is a web service that makes it easier to set up, operate, and scale a
// relational database in the cloud. It provides cost-efficient, resizeable
// capacity for an industry-standard relational database and manages common
// database administration tasks, freeing up developers to focus on what makes
// their applications and businesses unique. Amazon RDS gives you access to the
// capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, Oracle, or
// Amazon Aurora database server. These capabilities mean that the code,
// applications, and tools you already use today with your existing databases work
// with Amazon RDS without modification. Amazon RDS automatically backs up your
// database and maintains the database software that powers your DB instance.
// Amazon RDS is flexible: you can scale your DB instance's compute resources and
// storage capacity to meet your application's demand. As with all Amazon Web
// Services, there are no up-front investments, and you pay only for the resources
// you use. This interface reference for Amazon RDS contains documentation for a
// programming or command line interface you can use to manage Amazon RDS. Amazon
// RDS is asynchronous, which means that some interfaces might require techniques
// such as polling or callback functions to determine when a command has been
// applied. In this reference, the parameter descriptions indicate whether a
// command is applied immediately, on the next instance reboot, or during the
// maintenance window. The reference structure is as follows, and we list following
// some related topics from the user guide. Amazon RDS API Reference
// - For the alphabetical list of API actions, see API Actions (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html)
// .
// - For the alphabetical list of data types, see Data Types (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Types.html)
// .
// - For a list of common query parameters, see Common Parameters (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonParameters.html)
// .
// - For descriptions of the error codes, see Common Errors (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonErrors.html)
// .
//
// Amazon RDS User Guide
// - For a summary of the Amazon RDS interfaces, see Available RDS Interfaces (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Interfaces)
// .
// - For more information about how to use the Query API, see Using the Query API (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Using_the_Query_API.html)
// .
package rds
| 43 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
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/rds/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 = "rds"
}
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 rds
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.46.0"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/query"
"github.com/aws/aws-sdk-go-v2/service/rds/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"
"math"
"path"
)
type awsAwsquery_serializeOpAddRoleToDBCluster struct {
}
func (*awsAwsquery_serializeOpAddRoleToDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAddRoleToDBCluster) 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.(*AddRoleToDBClusterInput)
_ = 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("AddRoleToDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentAddRoleToDBClusterInput(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_serializeOpAddRoleToDBInstance struct {
}
func (*awsAwsquery_serializeOpAddRoleToDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAddRoleToDBInstance) 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.(*AddRoleToDBInstanceInput)
_ = 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("AddRoleToDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentAddRoleToDBInstanceInput(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_serializeOpAddSourceIdentifierToSubscription struct {
}
func (*awsAwsquery_serializeOpAddSourceIdentifierToSubscription) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAddSourceIdentifierToSubscription) 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.(*AddSourceIdentifierToSubscriptionInput)
_ = 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("AddSourceIdentifierToSubscription")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentAddSourceIdentifierToSubscriptionInput(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_serializeOpAddTagsToResource struct {
}
func (*awsAwsquery_serializeOpAddTagsToResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAddTagsToResource) 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.(*AddTagsToResourceInput)
_ = 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("AddTagsToResource")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentAddTagsToResourceInput(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_serializeOpApplyPendingMaintenanceAction struct {
}
func (*awsAwsquery_serializeOpApplyPendingMaintenanceAction) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpApplyPendingMaintenanceAction) 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.(*ApplyPendingMaintenanceActionInput)
_ = 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("ApplyPendingMaintenanceAction")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentApplyPendingMaintenanceActionInput(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_serializeOpAuthorizeDBSecurityGroupIngress struct {
}
func (*awsAwsquery_serializeOpAuthorizeDBSecurityGroupIngress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpAuthorizeDBSecurityGroupIngress) 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.(*AuthorizeDBSecurityGroupIngressInput)
_ = 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("AuthorizeDBSecurityGroupIngress")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentAuthorizeDBSecurityGroupIngressInput(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_serializeOpBacktrackDBCluster struct {
}
func (*awsAwsquery_serializeOpBacktrackDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpBacktrackDBCluster) 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.(*BacktrackDBClusterInput)
_ = 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("BacktrackDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentBacktrackDBClusterInput(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_serializeOpCancelExportTask struct {
}
func (*awsAwsquery_serializeOpCancelExportTask) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCancelExportTask) 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.(*CancelExportTaskInput)
_ = 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("CancelExportTask")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCancelExportTaskInput(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_serializeOpCopyDBClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpCopyDBClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyDBClusterParameterGroup) 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.(*CopyDBClusterParameterGroupInput)
_ = 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("CopyDBClusterParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCopyDBClusterParameterGroupInput(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_serializeOpCopyDBClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpCopyDBClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyDBClusterSnapshot) 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.(*CopyDBClusterSnapshotInput)
_ = 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("CopyDBClusterSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCopyDBClusterSnapshotInput(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_serializeOpCopyDBParameterGroup struct {
}
func (*awsAwsquery_serializeOpCopyDBParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyDBParameterGroup) 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.(*CopyDBParameterGroupInput)
_ = 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("CopyDBParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCopyDBParameterGroupInput(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_serializeOpCopyDBSnapshot struct {
}
func (*awsAwsquery_serializeOpCopyDBSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyDBSnapshot) 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.(*CopyDBSnapshotInput)
_ = 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("CopyDBSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCopyDBSnapshotInput(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_serializeOpCopyOptionGroup struct {
}
func (*awsAwsquery_serializeOpCopyOptionGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCopyOptionGroup) 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.(*CopyOptionGroupInput)
_ = 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("CopyOptionGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCopyOptionGroupInput(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_serializeOpCreateBlueGreenDeployment struct {
}
func (*awsAwsquery_serializeOpCreateBlueGreenDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateBlueGreenDeployment) 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.(*CreateBlueGreenDeploymentInput)
_ = 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("CreateBlueGreenDeployment")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateBlueGreenDeploymentInput(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_serializeOpCreateCustomDBEngineVersion struct {
}
func (*awsAwsquery_serializeOpCreateCustomDBEngineVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateCustomDBEngineVersion) 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.(*CreateCustomDBEngineVersionInput)
_ = 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("CreateCustomDBEngineVersion")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateCustomDBEngineVersionInput(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_serializeOpCreateDBCluster struct {
}
func (*awsAwsquery_serializeOpCreateDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBCluster) 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.(*CreateDBClusterInput)
_ = 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("CreateDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBClusterInput(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_serializeOpCreateDBClusterEndpoint struct {
}
func (*awsAwsquery_serializeOpCreateDBClusterEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBClusterEndpoint) 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.(*CreateDBClusterEndpointInput)
_ = 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("CreateDBClusterEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBClusterEndpointInput(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_serializeOpCreateDBClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpCreateDBClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBClusterParameterGroup) 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.(*CreateDBClusterParameterGroupInput)
_ = 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("CreateDBClusterParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBClusterParameterGroupInput(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_serializeOpCreateDBClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpCreateDBClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBClusterSnapshot) 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.(*CreateDBClusterSnapshotInput)
_ = 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("CreateDBClusterSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBClusterSnapshotInput(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_serializeOpCreateDBInstance struct {
}
func (*awsAwsquery_serializeOpCreateDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBInstance) 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.(*CreateDBInstanceInput)
_ = 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("CreateDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBInstanceInput(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_serializeOpCreateDBInstanceReadReplica struct {
}
func (*awsAwsquery_serializeOpCreateDBInstanceReadReplica) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBInstanceReadReplica) 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.(*CreateDBInstanceReadReplicaInput)
_ = 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("CreateDBInstanceReadReplica")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBInstanceReadReplicaInput(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_serializeOpCreateDBParameterGroup struct {
}
func (*awsAwsquery_serializeOpCreateDBParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBParameterGroup) 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.(*CreateDBParameterGroupInput)
_ = 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("CreateDBParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBParameterGroupInput(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_serializeOpCreateDBProxy struct {
}
func (*awsAwsquery_serializeOpCreateDBProxy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBProxy) 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.(*CreateDBProxyInput)
_ = 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("CreateDBProxy")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBProxyInput(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_serializeOpCreateDBProxyEndpoint struct {
}
func (*awsAwsquery_serializeOpCreateDBProxyEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBProxyEndpoint) 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.(*CreateDBProxyEndpointInput)
_ = 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("CreateDBProxyEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBProxyEndpointInput(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_serializeOpCreateDBSecurityGroup struct {
}
func (*awsAwsquery_serializeOpCreateDBSecurityGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBSecurityGroup) 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.(*CreateDBSecurityGroupInput)
_ = 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("CreateDBSecurityGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBSecurityGroupInput(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_serializeOpCreateDBSnapshot struct {
}
func (*awsAwsquery_serializeOpCreateDBSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBSnapshot) 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.(*CreateDBSnapshotInput)
_ = 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("CreateDBSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBSnapshotInput(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_serializeOpCreateDBSubnetGroup struct {
}
func (*awsAwsquery_serializeOpCreateDBSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateDBSubnetGroup) 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.(*CreateDBSubnetGroupInput)
_ = 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("CreateDBSubnetGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateDBSubnetGroupInput(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("2014-10-31")
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_serializeOpCreateGlobalCluster struct {
}
func (*awsAwsquery_serializeOpCreateGlobalCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateGlobalCluster) 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.(*CreateGlobalClusterInput)
_ = 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("CreateGlobalCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateGlobalClusterInput(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_serializeOpCreateOptionGroup struct {
}
func (*awsAwsquery_serializeOpCreateOptionGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateOptionGroup) 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.(*CreateOptionGroupInput)
_ = 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("CreateOptionGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentCreateOptionGroupInput(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_serializeOpDeleteBlueGreenDeployment struct {
}
func (*awsAwsquery_serializeOpDeleteBlueGreenDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteBlueGreenDeployment) 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.(*DeleteBlueGreenDeploymentInput)
_ = 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("DeleteBlueGreenDeployment")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteBlueGreenDeploymentInput(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_serializeOpDeleteCustomDBEngineVersion struct {
}
func (*awsAwsquery_serializeOpDeleteCustomDBEngineVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteCustomDBEngineVersion) 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.(*DeleteCustomDBEngineVersionInput)
_ = 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("DeleteCustomDBEngineVersion")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteCustomDBEngineVersionInput(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_serializeOpDeleteDBCluster struct {
}
func (*awsAwsquery_serializeOpDeleteDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBCluster) 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.(*DeleteDBClusterInput)
_ = 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("DeleteDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBClusterInput(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_serializeOpDeleteDBClusterEndpoint struct {
}
func (*awsAwsquery_serializeOpDeleteDBClusterEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBClusterEndpoint) 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.(*DeleteDBClusterEndpointInput)
_ = 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("DeleteDBClusterEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBClusterEndpointInput(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_serializeOpDeleteDBClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpDeleteDBClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBClusterParameterGroup) 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.(*DeleteDBClusterParameterGroupInput)
_ = 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("DeleteDBClusterParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBClusterParameterGroupInput(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_serializeOpDeleteDBClusterSnapshot struct {
}
func (*awsAwsquery_serializeOpDeleteDBClusterSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBClusterSnapshot) 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.(*DeleteDBClusterSnapshotInput)
_ = 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("DeleteDBClusterSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBClusterSnapshotInput(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_serializeOpDeleteDBInstance struct {
}
func (*awsAwsquery_serializeOpDeleteDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBInstance) 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.(*DeleteDBInstanceInput)
_ = 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("DeleteDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBInstanceInput(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_serializeOpDeleteDBInstanceAutomatedBackup struct {
}
func (*awsAwsquery_serializeOpDeleteDBInstanceAutomatedBackup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBInstanceAutomatedBackup) 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.(*DeleteDBInstanceAutomatedBackupInput)
_ = 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("DeleteDBInstanceAutomatedBackup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBInstanceAutomatedBackupInput(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_serializeOpDeleteDBParameterGroup struct {
}
func (*awsAwsquery_serializeOpDeleteDBParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBParameterGroup) 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.(*DeleteDBParameterGroupInput)
_ = 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("DeleteDBParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBParameterGroupInput(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_serializeOpDeleteDBProxy struct {
}
func (*awsAwsquery_serializeOpDeleteDBProxy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBProxy) 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.(*DeleteDBProxyInput)
_ = 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("DeleteDBProxy")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBProxyInput(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_serializeOpDeleteDBProxyEndpoint struct {
}
func (*awsAwsquery_serializeOpDeleteDBProxyEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBProxyEndpoint) 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.(*DeleteDBProxyEndpointInput)
_ = 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("DeleteDBProxyEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBProxyEndpointInput(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_serializeOpDeleteDBSecurityGroup struct {
}
func (*awsAwsquery_serializeOpDeleteDBSecurityGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBSecurityGroup) 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.(*DeleteDBSecurityGroupInput)
_ = 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("DeleteDBSecurityGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBSecurityGroupInput(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_serializeOpDeleteDBSnapshot struct {
}
func (*awsAwsquery_serializeOpDeleteDBSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBSnapshot) 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.(*DeleteDBSnapshotInput)
_ = 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("DeleteDBSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBSnapshotInput(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_serializeOpDeleteDBSubnetGroup struct {
}
func (*awsAwsquery_serializeOpDeleteDBSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteDBSubnetGroup) 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.(*DeleteDBSubnetGroupInput)
_ = 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("DeleteDBSubnetGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteDBSubnetGroupInput(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("2014-10-31")
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_serializeOpDeleteGlobalCluster struct {
}
func (*awsAwsquery_serializeOpDeleteGlobalCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteGlobalCluster) 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.(*DeleteGlobalClusterInput)
_ = 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("DeleteGlobalCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteGlobalClusterInput(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_serializeOpDeleteOptionGroup struct {
}
func (*awsAwsquery_serializeOpDeleteOptionGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteOptionGroup) 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.(*DeleteOptionGroupInput)
_ = 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("DeleteOptionGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeleteOptionGroupInput(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_serializeOpDeregisterDBProxyTargets struct {
}
func (*awsAwsquery_serializeOpDeregisterDBProxyTargets) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeregisterDBProxyTargets) 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.(*DeregisterDBProxyTargetsInput)
_ = 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("DeregisterDBProxyTargets")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDeregisterDBProxyTargetsInput(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("2014-10-31")
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_serializeOpDescribeBlueGreenDeployments struct {
}
func (*awsAwsquery_serializeOpDescribeBlueGreenDeployments) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeBlueGreenDeployments) 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.(*DescribeBlueGreenDeploymentsInput)
_ = 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("DescribeBlueGreenDeployments")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeBlueGreenDeploymentsInput(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_serializeOpDescribeCertificates struct {
}
func (*awsAwsquery_serializeOpDescribeCertificates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeCertificates) 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.(*DescribeCertificatesInput)
_ = 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("DescribeCertificates")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeCertificatesInput(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_serializeOpDescribeDBClusterBacktracks struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterBacktracks) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterBacktracks) 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.(*DescribeDBClusterBacktracksInput)
_ = 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("DescribeDBClusterBacktracks")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterBacktracksInput(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_serializeOpDescribeDBClusterEndpoints struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterEndpoints) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterEndpoints) 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.(*DescribeDBClusterEndpointsInput)
_ = 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("DescribeDBClusterEndpoints")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterEndpointsInput(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_serializeOpDescribeDBClusterParameterGroups struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterParameterGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterParameterGroups) 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.(*DescribeDBClusterParameterGroupsInput)
_ = 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("DescribeDBClusterParameterGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterParameterGroupsInput(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_serializeOpDescribeDBClusterParameters struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterParameters) 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.(*DescribeDBClusterParametersInput)
_ = 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("DescribeDBClusterParameters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterParametersInput(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_serializeOpDescribeDBClusters struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusters) 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.(*DescribeDBClustersInput)
_ = 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("DescribeDBClusters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClustersInput(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_serializeOpDescribeDBClusterSnapshotAttributes struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) 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.(*DescribeDBClusterSnapshotAttributesInput)
_ = 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("DescribeDBClusterSnapshotAttributes")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotAttributesInput(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_serializeOpDescribeDBClusterSnapshots struct {
}
func (*awsAwsquery_serializeOpDescribeDBClusterSnapshots) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshots) 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.(*DescribeDBClusterSnapshotsInput)
_ = 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("DescribeDBClusterSnapshots")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotsInput(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_serializeOpDescribeDBEngineVersions struct {
}
func (*awsAwsquery_serializeOpDescribeDBEngineVersions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBEngineVersions) 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.(*DescribeDBEngineVersionsInput)
_ = 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("DescribeDBEngineVersions")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBEngineVersionsInput(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_serializeOpDescribeDBInstanceAutomatedBackups struct {
}
func (*awsAwsquery_serializeOpDescribeDBInstanceAutomatedBackups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBInstanceAutomatedBackups) 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.(*DescribeDBInstanceAutomatedBackupsInput)
_ = 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("DescribeDBInstanceAutomatedBackups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBInstanceAutomatedBackupsInput(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_serializeOpDescribeDBInstances struct {
}
func (*awsAwsquery_serializeOpDescribeDBInstances) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBInstances) 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.(*DescribeDBInstancesInput)
_ = 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("DescribeDBInstances")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBInstancesInput(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_serializeOpDescribeDBLogFiles struct {
}
func (*awsAwsquery_serializeOpDescribeDBLogFiles) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBLogFiles) 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.(*DescribeDBLogFilesInput)
_ = 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("DescribeDBLogFiles")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBLogFilesInput(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_serializeOpDescribeDBParameterGroups struct {
}
func (*awsAwsquery_serializeOpDescribeDBParameterGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBParameterGroups) 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.(*DescribeDBParameterGroupsInput)
_ = 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("DescribeDBParameterGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBParameterGroupsInput(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_serializeOpDescribeDBParameters struct {
}
func (*awsAwsquery_serializeOpDescribeDBParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBParameters) 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.(*DescribeDBParametersInput)
_ = 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("DescribeDBParameters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBParametersInput(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_serializeOpDescribeDBProxies struct {
}
func (*awsAwsquery_serializeOpDescribeDBProxies) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBProxies) 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.(*DescribeDBProxiesInput)
_ = 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("DescribeDBProxies")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBProxiesInput(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_serializeOpDescribeDBProxyEndpoints struct {
}
func (*awsAwsquery_serializeOpDescribeDBProxyEndpoints) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBProxyEndpoints) 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.(*DescribeDBProxyEndpointsInput)
_ = 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("DescribeDBProxyEndpoints")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBProxyEndpointsInput(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_serializeOpDescribeDBProxyTargetGroups struct {
}
func (*awsAwsquery_serializeOpDescribeDBProxyTargetGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBProxyTargetGroups) 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.(*DescribeDBProxyTargetGroupsInput)
_ = 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("DescribeDBProxyTargetGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBProxyTargetGroupsInput(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_serializeOpDescribeDBProxyTargets struct {
}
func (*awsAwsquery_serializeOpDescribeDBProxyTargets) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBProxyTargets) 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.(*DescribeDBProxyTargetsInput)
_ = 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("DescribeDBProxyTargets")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBProxyTargetsInput(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_serializeOpDescribeDBSecurityGroups struct {
}
func (*awsAwsquery_serializeOpDescribeDBSecurityGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBSecurityGroups) 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.(*DescribeDBSecurityGroupsInput)
_ = 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("DescribeDBSecurityGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBSecurityGroupsInput(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_serializeOpDescribeDBSnapshotAttributes struct {
}
func (*awsAwsquery_serializeOpDescribeDBSnapshotAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBSnapshotAttributes) 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.(*DescribeDBSnapshotAttributesInput)
_ = 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("DescribeDBSnapshotAttributes")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBSnapshotAttributesInput(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_serializeOpDescribeDBSnapshots struct {
}
func (*awsAwsquery_serializeOpDescribeDBSnapshots) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBSnapshots) 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.(*DescribeDBSnapshotsInput)
_ = 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("DescribeDBSnapshots")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBSnapshotsInput(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_serializeOpDescribeDBSubnetGroups struct {
}
func (*awsAwsquery_serializeOpDescribeDBSubnetGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeDBSubnetGroups) 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.(*DescribeDBSubnetGroupsInput)
_ = 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("DescribeDBSubnetGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeDBSubnetGroupsInput(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_serializeOpDescribeEngineDefaultClusterParameters struct {
}
func (*awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) 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.(*DescribeEngineDefaultClusterParametersInput)
_ = 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("DescribeEngineDefaultClusterParameters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeEngineDefaultClusterParametersInput(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_serializeOpDescribeEngineDefaultParameters struct {
}
func (*awsAwsquery_serializeOpDescribeEngineDefaultParameters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeEngineDefaultParameters) 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.(*DescribeEngineDefaultParametersInput)
_ = 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("DescribeEngineDefaultParameters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeEngineDefaultParametersInput(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("2014-10-31")
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("2014-10-31")
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("2014-10-31")
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_serializeOpDescribeExportTasks struct {
}
func (*awsAwsquery_serializeOpDescribeExportTasks) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeExportTasks) 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.(*DescribeExportTasksInput)
_ = 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("DescribeExportTasks")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeExportTasksInput(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_serializeOpDescribeGlobalClusters struct {
}
func (*awsAwsquery_serializeOpDescribeGlobalClusters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeGlobalClusters) 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.(*DescribeGlobalClustersInput)
_ = 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("DescribeGlobalClusters")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeGlobalClustersInput(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_serializeOpDescribeOptionGroupOptions struct {
}
func (*awsAwsquery_serializeOpDescribeOptionGroupOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeOptionGroupOptions) 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.(*DescribeOptionGroupOptionsInput)
_ = 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("DescribeOptionGroupOptions")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeOptionGroupOptionsInput(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_serializeOpDescribeOptionGroups struct {
}
func (*awsAwsquery_serializeOpDescribeOptionGroups) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeOptionGroups) 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.(*DescribeOptionGroupsInput)
_ = 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("DescribeOptionGroups")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeOptionGroupsInput(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_serializeOpDescribeOrderableDBInstanceOptions struct {
}
func (*awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) 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.(*DescribeOrderableDBInstanceOptionsInput)
_ = 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("DescribeOrderableDBInstanceOptions")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeOrderableDBInstanceOptionsInput(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_serializeOpDescribePendingMaintenanceActions struct {
}
func (*awsAwsquery_serializeOpDescribePendingMaintenanceActions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribePendingMaintenanceActions) 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.(*DescribePendingMaintenanceActionsInput)
_ = 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("DescribePendingMaintenanceActions")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribePendingMaintenanceActionsInput(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_serializeOpDescribeReservedDBInstances struct {
}
func (*awsAwsquery_serializeOpDescribeReservedDBInstances) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReservedDBInstances) 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.(*DescribeReservedDBInstancesInput)
_ = 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("DescribeReservedDBInstances")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeReservedDBInstancesInput(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_serializeOpDescribeReservedDBInstancesOfferings struct {
}
func (*awsAwsquery_serializeOpDescribeReservedDBInstancesOfferings) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReservedDBInstancesOfferings) 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.(*DescribeReservedDBInstancesOfferingsInput)
_ = 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("DescribeReservedDBInstancesOfferings")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeReservedDBInstancesOfferingsInput(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_serializeOpDescribeSourceRegions struct {
}
func (*awsAwsquery_serializeOpDescribeSourceRegions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeSourceRegions) 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.(*DescribeSourceRegionsInput)
_ = 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("DescribeSourceRegions")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeSourceRegionsInput(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_serializeOpDescribeValidDBInstanceModifications struct {
}
func (*awsAwsquery_serializeOpDescribeValidDBInstanceModifications) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeValidDBInstanceModifications) 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.(*DescribeValidDBInstanceModificationsInput)
_ = 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("DescribeValidDBInstanceModifications")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDescribeValidDBInstanceModificationsInput(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_serializeOpDownloadDBLogFilePortion struct {
}
func (*awsAwsquery_serializeOpDownloadDBLogFilePortion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDownloadDBLogFilePortion) 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.(*DownloadDBLogFilePortionInput)
_ = 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("DownloadDBLogFilePortion")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentDownloadDBLogFilePortionInput(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_serializeOpFailoverDBCluster struct {
}
func (*awsAwsquery_serializeOpFailoverDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpFailoverDBCluster) 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.(*FailoverDBClusterInput)
_ = 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("FailoverDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentFailoverDBClusterInput(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_serializeOpFailoverGlobalCluster struct {
}
func (*awsAwsquery_serializeOpFailoverGlobalCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpFailoverGlobalCluster) 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.(*FailoverGlobalClusterInput)
_ = 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("FailoverGlobalCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentFailoverGlobalClusterInput(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_serializeOpListTagsForResource struct {
}
func (*awsAwsquery_serializeOpListTagsForResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTagsForResourceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListTagsForResource")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentListTagsForResourceInput(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_serializeOpModifyActivityStream struct {
}
func (*awsAwsquery_serializeOpModifyActivityStream) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyActivityStream) 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.(*ModifyActivityStreamInput)
_ = 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("ModifyActivityStream")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyActivityStreamInput(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_serializeOpModifyCertificates struct {
}
func (*awsAwsquery_serializeOpModifyCertificates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyCertificates) 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.(*ModifyCertificatesInput)
_ = 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("ModifyCertificates")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyCertificatesInput(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_serializeOpModifyCurrentDBClusterCapacity struct {
}
func (*awsAwsquery_serializeOpModifyCurrentDBClusterCapacity) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyCurrentDBClusterCapacity) 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.(*ModifyCurrentDBClusterCapacityInput)
_ = 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("ModifyCurrentDBClusterCapacity")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyCurrentDBClusterCapacityInput(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_serializeOpModifyCustomDBEngineVersion struct {
}
func (*awsAwsquery_serializeOpModifyCustomDBEngineVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyCustomDBEngineVersion) 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.(*ModifyCustomDBEngineVersionInput)
_ = 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("ModifyCustomDBEngineVersion")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyCustomDBEngineVersionInput(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_serializeOpModifyDBCluster struct {
}
func (*awsAwsquery_serializeOpModifyDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBCluster) 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.(*ModifyDBClusterInput)
_ = 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("ModifyDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBClusterInput(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_serializeOpModifyDBClusterEndpoint struct {
}
func (*awsAwsquery_serializeOpModifyDBClusterEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBClusterEndpoint) 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.(*ModifyDBClusterEndpointInput)
_ = 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("ModifyDBClusterEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBClusterEndpointInput(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_serializeOpModifyDBClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpModifyDBClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBClusterParameterGroup) 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.(*ModifyDBClusterParameterGroupInput)
_ = 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("ModifyDBClusterParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBClusterParameterGroupInput(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_serializeOpModifyDBClusterSnapshotAttribute struct {
}
func (*awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) 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.(*ModifyDBClusterSnapshotAttributeInput)
_ = 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("ModifyDBClusterSnapshotAttribute")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBClusterSnapshotAttributeInput(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_serializeOpModifyDBInstance struct {
}
func (*awsAwsquery_serializeOpModifyDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBInstance) 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.(*ModifyDBInstanceInput)
_ = 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("ModifyDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBInstanceInput(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_serializeOpModifyDBParameterGroup struct {
}
func (*awsAwsquery_serializeOpModifyDBParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBParameterGroup) 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.(*ModifyDBParameterGroupInput)
_ = 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("ModifyDBParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBParameterGroupInput(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_serializeOpModifyDBProxy struct {
}
func (*awsAwsquery_serializeOpModifyDBProxy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBProxy) 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.(*ModifyDBProxyInput)
_ = 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("ModifyDBProxy")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBProxyInput(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_serializeOpModifyDBProxyEndpoint struct {
}
func (*awsAwsquery_serializeOpModifyDBProxyEndpoint) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBProxyEndpoint) 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.(*ModifyDBProxyEndpointInput)
_ = 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("ModifyDBProxyEndpoint")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBProxyEndpointInput(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_serializeOpModifyDBProxyTargetGroup struct {
}
func (*awsAwsquery_serializeOpModifyDBProxyTargetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBProxyTargetGroup) 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.(*ModifyDBProxyTargetGroupInput)
_ = 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("ModifyDBProxyTargetGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBProxyTargetGroupInput(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_serializeOpModifyDBSnapshot struct {
}
func (*awsAwsquery_serializeOpModifyDBSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBSnapshot) 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.(*ModifyDBSnapshotInput)
_ = 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("ModifyDBSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBSnapshotInput(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_serializeOpModifyDBSnapshotAttribute struct {
}
func (*awsAwsquery_serializeOpModifyDBSnapshotAttribute) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBSnapshotAttribute) 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.(*ModifyDBSnapshotAttributeInput)
_ = 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("ModifyDBSnapshotAttribute")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBSnapshotAttributeInput(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_serializeOpModifyDBSubnetGroup struct {
}
func (*awsAwsquery_serializeOpModifyDBSubnetGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyDBSubnetGroup) 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.(*ModifyDBSubnetGroupInput)
_ = 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("ModifyDBSubnetGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyDBSubnetGroupInput(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("2014-10-31")
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_serializeOpModifyGlobalCluster struct {
}
func (*awsAwsquery_serializeOpModifyGlobalCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyGlobalCluster) 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.(*ModifyGlobalClusterInput)
_ = 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("ModifyGlobalCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyGlobalClusterInput(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_serializeOpModifyOptionGroup struct {
}
func (*awsAwsquery_serializeOpModifyOptionGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpModifyOptionGroup) 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.(*ModifyOptionGroupInput)
_ = 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("ModifyOptionGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentModifyOptionGroupInput(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_serializeOpPromoteReadReplica struct {
}
func (*awsAwsquery_serializeOpPromoteReadReplica) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPromoteReadReplica) 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.(*PromoteReadReplicaInput)
_ = 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("PromoteReadReplica")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentPromoteReadReplicaInput(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_serializeOpPromoteReadReplicaDBCluster struct {
}
func (*awsAwsquery_serializeOpPromoteReadReplicaDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPromoteReadReplicaDBCluster) 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.(*PromoteReadReplicaDBClusterInput)
_ = 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("PromoteReadReplicaDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentPromoteReadReplicaDBClusterInput(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_serializeOpPurchaseReservedDBInstancesOffering struct {
}
func (*awsAwsquery_serializeOpPurchaseReservedDBInstancesOffering) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPurchaseReservedDBInstancesOffering) 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.(*PurchaseReservedDBInstancesOfferingInput)
_ = 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("PurchaseReservedDBInstancesOffering")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentPurchaseReservedDBInstancesOfferingInput(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_serializeOpRebootDBCluster struct {
}
func (*awsAwsquery_serializeOpRebootDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRebootDBCluster) 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.(*RebootDBClusterInput)
_ = 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("RebootDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRebootDBClusterInput(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_serializeOpRebootDBInstance struct {
}
func (*awsAwsquery_serializeOpRebootDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRebootDBInstance) 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.(*RebootDBInstanceInput)
_ = 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("RebootDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRebootDBInstanceInput(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_serializeOpRegisterDBProxyTargets struct {
}
func (*awsAwsquery_serializeOpRegisterDBProxyTargets) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRegisterDBProxyTargets) 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.(*RegisterDBProxyTargetsInput)
_ = 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("RegisterDBProxyTargets")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRegisterDBProxyTargetsInput(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_serializeOpRemoveFromGlobalCluster struct {
}
func (*awsAwsquery_serializeOpRemoveFromGlobalCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRemoveFromGlobalCluster) 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.(*RemoveFromGlobalClusterInput)
_ = 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("RemoveFromGlobalCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRemoveFromGlobalClusterInput(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_serializeOpRemoveRoleFromDBCluster struct {
}
func (*awsAwsquery_serializeOpRemoveRoleFromDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRemoveRoleFromDBCluster) 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.(*RemoveRoleFromDBClusterInput)
_ = 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("RemoveRoleFromDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRemoveRoleFromDBClusterInput(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_serializeOpRemoveRoleFromDBInstance struct {
}
func (*awsAwsquery_serializeOpRemoveRoleFromDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRemoveRoleFromDBInstance) 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.(*RemoveRoleFromDBInstanceInput)
_ = 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("RemoveRoleFromDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRemoveRoleFromDBInstanceInput(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_serializeOpRemoveSourceIdentifierFromSubscription struct {
}
func (*awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) 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.(*RemoveSourceIdentifierFromSubscriptionInput)
_ = 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("RemoveSourceIdentifierFromSubscription")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRemoveSourceIdentifierFromSubscriptionInput(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_serializeOpRemoveTagsFromResource struct {
}
func (*awsAwsquery_serializeOpRemoveTagsFromResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRemoveTagsFromResource) 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.(*RemoveTagsFromResourceInput)
_ = 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("RemoveTagsFromResource")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRemoveTagsFromResourceInput(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_serializeOpResetDBClusterParameterGroup struct {
}
func (*awsAwsquery_serializeOpResetDBClusterParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpResetDBClusterParameterGroup) 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.(*ResetDBClusterParameterGroupInput)
_ = 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("ResetDBClusterParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentResetDBClusterParameterGroupInput(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_serializeOpResetDBParameterGroup struct {
}
func (*awsAwsquery_serializeOpResetDBParameterGroup) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpResetDBParameterGroup) 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.(*ResetDBParameterGroupInput)
_ = 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("ResetDBParameterGroup")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentResetDBParameterGroupInput(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_serializeOpRestoreDBClusterFromS3 struct {
}
func (*awsAwsquery_serializeOpRestoreDBClusterFromS3) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBClusterFromS3) 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.(*RestoreDBClusterFromS3Input)
_ = 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("RestoreDBClusterFromS3")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBClusterFromS3Input(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_serializeOpRestoreDBClusterFromSnapshot struct {
}
func (*awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) 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.(*RestoreDBClusterFromSnapshotInput)
_ = 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("RestoreDBClusterFromSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(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_serializeOpRestoreDBClusterToPointInTime struct {
}
func (*awsAwsquery_serializeOpRestoreDBClusterToPointInTime) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBClusterToPointInTime) 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.(*RestoreDBClusterToPointInTimeInput)
_ = 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("RestoreDBClusterToPointInTime")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(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_serializeOpRestoreDBInstanceFromDBSnapshot struct {
}
func (*awsAwsquery_serializeOpRestoreDBInstanceFromDBSnapshot) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBInstanceFromDBSnapshot) 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.(*RestoreDBInstanceFromDBSnapshotInput)
_ = 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("RestoreDBInstanceFromDBSnapshot")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBInstanceFromDBSnapshotInput(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_serializeOpRestoreDBInstanceFromS3 struct {
}
func (*awsAwsquery_serializeOpRestoreDBInstanceFromS3) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBInstanceFromS3) 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.(*RestoreDBInstanceFromS3Input)
_ = 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("RestoreDBInstanceFromS3")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBInstanceFromS3Input(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_serializeOpRestoreDBInstanceToPointInTime struct {
}
func (*awsAwsquery_serializeOpRestoreDBInstanceToPointInTime) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRestoreDBInstanceToPointInTime) 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.(*RestoreDBInstanceToPointInTimeInput)
_ = 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("RestoreDBInstanceToPointInTime")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRestoreDBInstanceToPointInTimeInput(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_serializeOpRevokeDBSecurityGroupIngress struct {
}
func (*awsAwsquery_serializeOpRevokeDBSecurityGroupIngress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpRevokeDBSecurityGroupIngress) 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.(*RevokeDBSecurityGroupIngressInput)
_ = 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("RevokeDBSecurityGroupIngress")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentRevokeDBSecurityGroupIngressInput(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_serializeOpStartActivityStream struct {
}
func (*awsAwsquery_serializeOpStartActivityStream) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStartActivityStream) 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.(*StartActivityStreamInput)
_ = 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("StartActivityStream")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStartActivityStreamInput(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_serializeOpStartDBCluster struct {
}
func (*awsAwsquery_serializeOpStartDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStartDBCluster) 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.(*StartDBClusterInput)
_ = 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("StartDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStartDBClusterInput(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_serializeOpStartDBInstance struct {
}
func (*awsAwsquery_serializeOpStartDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStartDBInstance) 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.(*StartDBInstanceInput)
_ = 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("StartDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStartDBInstanceInput(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_serializeOpStartDBInstanceAutomatedBackupsReplication struct {
}
func (*awsAwsquery_serializeOpStartDBInstanceAutomatedBackupsReplication) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStartDBInstanceAutomatedBackupsReplication) 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.(*StartDBInstanceAutomatedBackupsReplicationInput)
_ = 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("StartDBInstanceAutomatedBackupsReplication")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStartDBInstanceAutomatedBackupsReplicationInput(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_serializeOpStartExportTask struct {
}
func (*awsAwsquery_serializeOpStartExportTask) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStartExportTask) 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.(*StartExportTaskInput)
_ = 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("StartExportTask")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStartExportTaskInput(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_serializeOpStopActivityStream struct {
}
func (*awsAwsquery_serializeOpStopActivityStream) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStopActivityStream) 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.(*StopActivityStreamInput)
_ = 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("StopActivityStream")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStopActivityStreamInput(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_serializeOpStopDBCluster struct {
}
func (*awsAwsquery_serializeOpStopDBCluster) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStopDBCluster) 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.(*StopDBClusterInput)
_ = 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("StopDBCluster")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStopDBClusterInput(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_serializeOpStopDBInstance struct {
}
func (*awsAwsquery_serializeOpStopDBInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStopDBInstance) 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.(*StopDBInstanceInput)
_ = 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("StopDBInstance")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStopDBInstanceInput(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_serializeOpStopDBInstanceAutomatedBackupsReplication struct {
}
func (*awsAwsquery_serializeOpStopDBInstanceAutomatedBackupsReplication) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpStopDBInstanceAutomatedBackupsReplication) 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.(*StopDBInstanceAutomatedBackupsReplicationInput)
_ = 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("StopDBInstanceAutomatedBackupsReplication")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentStopDBInstanceAutomatedBackupsReplicationInput(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_serializeOpSwitchoverBlueGreenDeployment struct {
}
func (*awsAwsquery_serializeOpSwitchoverBlueGreenDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSwitchoverBlueGreenDeployment) 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.(*SwitchoverBlueGreenDeploymentInput)
_ = 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("SwitchoverBlueGreenDeployment")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentSwitchoverBlueGreenDeploymentInput(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_serializeOpSwitchoverReadReplica struct {
}
func (*awsAwsquery_serializeOpSwitchoverReadReplica) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSwitchoverReadReplica) 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.(*SwitchoverReadReplicaInput)
_ = 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("SwitchoverReadReplica")
body.Key("Version").String("2014-10-31")
if err := awsAwsquery_serializeOpDocumentSwitchoverReadReplicaInput(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_serializeDocumentAttributeValueList(v []string, value query.Value) error {
array := value.Array("AttributeValue")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentAvailabilityZones(v []string, value query.Value) error {
array := value.Array("AvailabilityZone")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v *types.CloudwatchLogsExportConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.DisableLogTypes != nil {
objectKey := object.Key("DisableLogTypes")
if err := awsAwsquery_serializeDocumentLogTypeList(v.DisableLogTypes, objectKey); err != nil {
return err
}
}
if v.EnableLogTypes != nil {
objectKey := object.Key("EnableLogTypes")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableLogTypes, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentConnectionPoolConfiguration(v *types.ConnectionPoolConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.ConnectionBorrowTimeout != nil {
objectKey := object.Key("ConnectionBorrowTimeout")
objectKey.Integer(*v.ConnectionBorrowTimeout)
}
if v.InitQuery != nil {
objectKey := object.Key("InitQuery")
objectKey.String(*v.InitQuery)
}
if v.MaxConnectionsPercent != nil {
objectKey := object.Key("MaxConnectionsPercent")
objectKey.Integer(*v.MaxConnectionsPercent)
}
if v.MaxIdleConnectionsPercent != nil {
objectKey := object.Key("MaxIdleConnectionsPercent")
objectKey.Integer(*v.MaxIdleConnectionsPercent)
}
if v.SessionPinningFilters != nil {
objectKey := object.Key("SessionPinningFilters")
if err := awsAwsquery_serializeDocumentStringList(v.SessionPinningFilters, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentDBSecurityGroupNameList(v []string, value query.Value) error {
array := value.Array("DBSecurityGroupName")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentEngineModeList(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_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_serializeDocumentFilter(v *types.Filter, value query.Value) error {
object := value.Object()
_ = object
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Values != nil {
objectKey := object.Key("Values")
if err := awsAwsquery_serializeDocumentFilterValueList(v.Values, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentFilterList(v []types.Filter, value query.Value) error {
array := value.Array("Filter")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentFilter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentFilterValueList(v []string, value query.Value) error {
array := value.Array("Value")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentKeyList(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_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_serializeDocumentOptionConfiguration(v *types.OptionConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.DBSecurityGroupMemberships != nil {
objectKey := object.Key("DBSecurityGroupMemberships")
if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroupMemberships, objectKey); err != nil {
return err
}
}
if v.OptionName != nil {
objectKey := object.Key("OptionName")
objectKey.String(*v.OptionName)
}
if v.OptionSettings != nil {
objectKey := object.Key("OptionSettings")
if err := awsAwsquery_serializeDocumentOptionSettingsList(v.OptionSettings, objectKey); err != nil {
return err
}
}
if v.OptionVersion != nil {
objectKey := object.Key("OptionVersion")
objectKey.String(*v.OptionVersion)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.VpcSecurityGroupMemberships != nil {
objectKey := object.Key("VpcSecurityGroupMemberships")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupMemberships, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentOptionConfigurationList(v []types.OptionConfiguration, value query.Value) error {
array := value.Array("OptionConfiguration")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentOptionConfiguration(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentOptionNamesList(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_serializeDocumentOptionSetting(v *types.OptionSetting, value query.Value) error {
object := value.Object()
_ = object
if v.AllowedValues != nil {
objectKey := object.Key("AllowedValues")
objectKey.String(*v.AllowedValues)
}
if v.ApplyType != nil {
objectKey := object.Key("ApplyType")
objectKey.String(*v.ApplyType)
}
if v.DataType != nil {
objectKey := object.Key("DataType")
objectKey.String(*v.DataType)
}
if v.DefaultValue != nil {
objectKey := object.Key("DefaultValue")
objectKey.String(*v.DefaultValue)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.IsCollection {
objectKey := object.Key("IsCollection")
objectKey.Boolean(v.IsCollection)
}
if v.IsModifiable {
objectKey := object.Key("IsModifiable")
objectKey.Boolean(v.IsModifiable)
}
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Value != nil {
objectKey := object.Key("Value")
objectKey.String(*v.Value)
}
return nil
}
func awsAwsquery_serializeDocumentOptionSettingsList(v []types.OptionSetting, value query.Value) error {
array := value.Array("OptionSetting")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentOptionSetting(&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.ApplyMethod) > 0 {
objectKey := object.Key("ApplyMethod")
objectKey.String(string(v.ApplyMethod))
}
if v.ApplyType != nil {
objectKey := object.Key("ApplyType")
objectKey.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)
}
if v.SupportedEngineModes != nil {
objectKey := object.Key("SupportedEngineModes")
if err := awsAwsquery_serializeDocumentEngineModeList(v.SupportedEngineModes, objectKey); err != nil {
return err
}
}
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_serializeDocumentProcessorFeature(v *types.ProcessorFeature, value query.Value) error {
object := value.Object()
_ = object
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Value != nil {
objectKey := object.Key("Value")
objectKey.String(*v.Value)
}
return nil
}
func awsAwsquery_serializeDocumentProcessorFeatureList(v []types.ProcessorFeature, value query.Value) error {
array := value.Array("ProcessorFeature")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentProcessorFeature(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentScalingConfiguration(v *types.ScalingConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.AutoPause != nil {
objectKey := object.Key("AutoPause")
objectKey.Boolean(*v.AutoPause)
}
if v.MaxCapacity != nil {
objectKey := object.Key("MaxCapacity")
objectKey.Integer(*v.MaxCapacity)
}
if v.MinCapacity != nil {
objectKey := object.Key("MinCapacity")
objectKey.Integer(*v.MinCapacity)
}
if v.SecondsBeforeTimeout != nil {
objectKey := object.Key("SecondsBeforeTimeout")
objectKey.Integer(*v.SecondsBeforeTimeout)
}
if v.SecondsUntilAutoPause != nil {
objectKey := object.Key("SecondsUntilAutoPause")
objectKey.Integer(*v.SecondsUntilAutoPause)
}
if v.TimeoutAction != nil {
objectKey := object.Key("TimeoutAction")
objectKey.String(*v.TimeoutAction)
}
return nil
}
func awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v *types.ServerlessV2ScalingConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.MaxCapacity != nil {
objectKey := object.Key("MaxCapacity")
switch {
case math.IsNaN(*v.MaxCapacity):
objectKey.String("NaN")
case math.IsInf(*v.MaxCapacity, 1):
objectKey.String("Infinity")
case math.IsInf(*v.MaxCapacity, -1):
objectKey.String("-Infinity")
default:
objectKey.Double(*v.MaxCapacity)
}
}
if v.MinCapacity != nil {
objectKey := object.Key("MinCapacity")
switch {
case math.IsNaN(*v.MinCapacity):
objectKey.String("NaN")
case math.IsInf(*v.MinCapacity, 1):
objectKey.String("Infinity")
case math.IsInf(*v.MinCapacity, -1):
objectKey.String("-Infinity")
default:
objectKey.Double(*v.MinCapacity)
}
}
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_serializeDocumentStringList(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_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_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_serializeDocumentUserAuthConfig(v *types.UserAuthConfig, value query.Value) error {
object := value.Object()
_ = object
if len(v.AuthScheme) > 0 {
objectKey := object.Key("AuthScheme")
objectKey.String(string(v.AuthScheme))
}
if len(v.ClientPasswordAuthType) > 0 {
objectKey := object.Key("ClientPasswordAuthType")
objectKey.String(string(v.ClientPasswordAuthType))
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if len(v.IAMAuth) > 0 {
objectKey := object.Key("IAMAuth")
objectKey.String(string(v.IAMAuth))
}
if v.SecretArn != nil {
objectKey := object.Key("SecretArn")
objectKey.String(*v.SecretArn)
}
if v.UserName != nil {
objectKey := object.Key("UserName")
objectKey.String(*v.UserName)
}
return nil
}
func awsAwsquery_serializeDocumentUserAuthConfigList(v []types.UserAuthConfig, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentUserAuthConfig(&v[i], av); err != nil {
return err
}
}
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_serializeOpDocumentAddRoleToDBClusterInput(v *AddRoleToDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.FeatureName != nil {
objectKey := object.Key("FeatureName")
objectKey.String(*v.FeatureName)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentAddRoleToDBInstanceInput(v *AddRoleToDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.FeatureName != nil {
objectKey := object.Key("FeatureName")
objectKey.String(*v.FeatureName)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentAddSourceIdentifierToSubscriptionInput(v *AddSourceIdentifierToSubscriptionInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceIdentifier != nil {
objectKey := object.Key("SourceIdentifier")
objectKey.String(*v.SourceIdentifier)
}
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentAddTagsToResourceInput(v *AddTagsToResourceInput, 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_serializeOpDocumentApplyPendingMaintenanceActionInput(v *ApplyPendingMaintenanceActionInput, value query.Value) error {
object := value.Object()
_ = object
if v.ApplyAction != nil {
objectKey := object.Key("ApplyAction")
objectKey.String(*v.ApplyAction)
}
if v.OptInType != nil {
objectKey := object.Key("OptInType")
objectKey.String(*v.OptInType)
}
if v.ResourceIdentifier != nil {
objectKey := object.Key("ResourceIdentifier")
objectKey.String(*v.ResourceIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentAuthorizeDBSecurityGroupIngressInput(v *AuthorizeDBSecurityGroupIngressInput, value query.Value) error {
object := value.Object()
_ = object
if v.CIDRIP != nil {
objectKey := object.Key("CIDRIP")
objectKey.String(*v.CIDRIP)
}
if v.DBSecurityGroupName != nil {
objectKey := object.Key("DBSecurityGroupName")
objectKey.String(*v.DBSecurityGroupName)
}
if v.EC2SecurityGroupId != nil {
objectKey := object.Key("EC2SecurityGroupId")
objectKey.String(*v.EC2SecurityGroupId)
}
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_serializeOpDocumentBacktrackDBClusterInput(v *BacktrackDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.BacktrackTo != nil {
objectKey := object.Key("BacktrackTo")
objectKey.String(smithytime.FormatDateTime(*v.BacktrackTo))
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.Force != nil {
objectKey := object.Key("Force")
objectKey.Boolean(*v.Force)
}
if v.UseEarliestTimeOnPointInTimeUnavailable != nil {
objectKey := object.Key("UseEarliestTimeOnPointInTimeUnavailable")
objectKey.Boolean(*v.UseEarliestTimeOnPointInTimeUnavailable)
}
return nil
}
func awsAwsquery_serializeOpDocumentCancelExportTaskInput(v *CancelExportTaskInput, value query.Value) error {
object := value.Object()
_ = object
if v.ExportTaskIdentifier != nil {
objectKey := object.Key("ExportTaskIdentifier")
objectKey.String(*v.ExportTaskIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyDBClusterParameterGroupInput(v *CopyDBClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceDBClusterParameterGroupIdentifier != nil {
objectKey := object.Key("SourceDBClusterParameterGroupIdentifier")
objectKey.String(*v.SourceDBClusterParameterGroupIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetDBClusterParameterGroupDescription != nil {
objectKey := object.Key("TargetDBClusterParameterGroupDescription")
objectKey.String(*v.TargetDBClusterParameterGroupDescription)
}
if v.TargetDBClusterParameterGroupIdentifier != nil {
objectKey := object.Key("TargetDBClusterParameterGroupIdentifier")
objectKey.String(*v.TargetDBClusterParameterGroupIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyDBClusterSnapshotInput(v *CopyDBClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.CopyTags != nil {
objectKey := object.Key("CopyTags")
objectKey.Boolean(*v.CopyTags)
}
if v.destinationRegion != nil {
objectKey := object.Key("DestinationRegion")
objectKey.String(*v.destinationRegion)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.PreSignedUrl != nil {
objectKey := object.Key("PreSignedUrl")
objectKey.String(*v.PreSignedUrl)
}
if v.SourceDBClusterSnapshotIdentifier != nil {
objectKey := object.Key("SourceDBClusterSnapshotIdentifier")
objectKey.String(*v.SourceDBClusterSnapshotIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetDBClusterSnapshotIdentifier != nil {
objectKey := object.Key("TargetDBClusterSnapshotIdentifier")
objectKey.String(*v.TargetDBClusterSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyDBParameterGroupInput(v *CopyDBParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceDBParameterGroupIdentifier != nil {
objectKey := object.Key("SourceDBParameterGroupIdentifier")
objectKey.String(*v.SourceDBParameterGroupIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetDBParameterGroupDescription != nil {
objectKey := object.Key("TargetDBParameterGroupDescription")
objectKey.String(*v.TargetDBParameterGroupDescription)
}
if v.TargetDBParameterGroupIdentifier != nil {
objectKey := object.Key("TargetDBParameterGroupIdentifier")
objectKey.String(*v.TargetDBParameterGroupIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyDBSnapshotInput(v *CopyDBSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.CopyOptionGroup != nil {
objectKey := object.Key("CopyOptionGroup")
objectKey.Boolean(*v.CopyOptionGroup)
}
if v.CopyTags != nil {
objectKey := object.Key("CopyTags")
objectKey.Boolean(*v.CopyTags)
}
if v.destinationRegion != nil {
objectKey := object.Key("DestinationRegion")
objectKey.String(*v.destinationRegion)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PreSignedUrl != nil {
objectKey := object.Key("PreSignedUrl")
objectKey.String(*v.PreSignedUrl)
}
if v.SourceDBSnapshotIdentifier != nil {
objectKey := object.Key("SourceDBSnapshotIdentifier")
objectKey.String(*v.SourceDBSnapshotIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetCustomAvailabilityZone != nil {
objectKey := object.Key("TargetCustomAvailabilityZone")
objectKey.String(*v.TargetCustomAvailabilityZone)
}
if v.TargetDBSnapshotIdentifier != nil {
objectKey := object.Key("TargetDBSnapshotIdentifier")
objectKey.String(*v.TargetDBSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCopyOptionGroupInput(v *CopyOptionGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceOptionGroupIdentifier != nil {
objectKey := object.Key("SourceOptionGroupIdentifier")
objectKey.String(*v.SourceOptionGroupIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetOptionGroupDescription != nil {
objectKey := object.Key("TargetOptionGroupDescription")
objectKey.String(*v.TargetOptionGroupDescription)
}
if v.TargetOptionGroupIdentifier != nil {
objectKey := object.Key("TargetOptionGroupIdentifier")
objectKey.String(*v.TargetOptionGroupIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateBlueGreenDeploymentInput(v *CreateBlueGreenDeploymentInput, value query.Value) error {
object := value.Object()
_ = object
if v.BlueGreenDeploymentName != nil {
objectKey := object.Key("BlueGreenDeploymentName")
objectKey.String(*v.BlueGreenDeploymentName)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetDBClusterParameterGroupName != nil {
objectKey := object.Key("TargetDBClusterParameterGroupName")
objectKey.String(*v.TargetDBClusterParameterGroupName)
}
if v.TargetDBParameterGroupName != nil {
objectKey := object.Key("TargetDBParameterGroupName")
objectKey.String(*v.TargetDBParameterGroupName)
}
if v.TargetEngineVersion != nil {
objectKey := object.Key("TargetEngineVersion")
objectKey.String(*v.TargetEngineVersion)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateCustomDBEngineVersionInput(v *CreateCustomDBEngineVersionInput, value query.Value) error {
object := value.Object()
_ = object
if v.DatabaseInstallationFilesS3BucketName != nil {
objectKey := object.Key("DatabaseInstallationFilesS3BucketName")
objectKey.String(*v.DatabaseInstallationFilesS3BucketName)
}
if v.DatabaseInstallationFilesS3Prefix != nil {
objectKey := object.Key("DatabaseInstallationFilesS3Prefix")
objectKey.String(*v.DatabaseInstallationFilesS3Prefix)
}
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.ImageId != nil {
objectKey := object.Key("ImageId")
objectKey.String(*v.ImageId)
}
if v.KMSKeyId != nil {
objectKey := object.Key("KMSKeyId")
objectKey.String(*v.KMSKeyId)
}
if v.Manifest != nil {
objectKey := object.Key("Manifest")
objectKey.String(*v.Manifest)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBClusterEndpointInput(v *CreateDBClusterEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterEndpointIdentifier != nil {
objectKey := object.Key("DBClusterEndpointIdentifier")
objectKey.String(*v.DBClusterEndpointIdentifier)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.EndpointType != nil {
objectKey := object.Key("EndpointType")
objectKey.String(*v.EndpointType)
}
if v.ExcludedMembers != nil {
objectKey := object.Key("ExcludedMembers")
if err := awsAwsquery_serializeDocumentStringList(v.ExcludedMembers, objectKey); err != nil {
return err
}
}
if v.StaticMembers != nil {
objectKey := object.Key("StaticMembers")
if err := awsAwsquery_serializeDocumentStringList(v.StaticMembers, 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_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZones != nil {
objectKey := object.Key("AvailabilityZones")
if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil {
return err
}
}
if v.BacktrackWindow != nil {
objectKey := object.Key("BacktrackWindow")
objectKey.Long(*v.BacktrackWindow)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.CharacterSetName != nil {
objectKey := object.Key("CharacterSetName")
objectKey.String(*v.CharacterSetName)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterInstanceClass != nil {
objectKey := object.Key("DBClusterInstanceClass")
objectKey.String(*v.DBClusterInstanceClass)
}
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DBSystemId != nil {
objectKey := object.Key("DBSystemId")
objectKey.String(*v.DBSystemId)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.destinationRegion != nil {
objectKey := object.Key("DestinationRegion")
objectKey.String(*v.destinationRegion)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableGlobalWriteForwarding != nil {
objectKey := object.Key("EnableGlobalWriteForwarding")
objectKey.Boolean(*v.EnableGlobalWriteForwarding)
}
if v.EnableHttpEndpoint != nil {
objectKey := object.Key("EnableHttpEndpoint")
objectKey.Boolean(*v.EnableHttpEndpoint)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineMode != nil {
objectKey := object.Key("EngineMode")
objectKey.String(*v.EngineMode)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
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.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.PreSignedUrl != nil {
objectKey := object.Key("PreSignedUrl")
objectKey.String(*v.PreSignedUrl)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.ReplicationSourceIdentifier != nil {
objectKey := object.Key("ReplicationSourceIdentifier")
objectKey.String(*v.ReplicationSourceIdentifier)
}
if v.ScalingConfiguration != nil {
objectKey := object.Key("ScalingConfiguration")
if err := awsAwsquery_serializeDocumentScalingConfiguration(v.ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.ServerlessV2ScalingConfiguration != nil {
objectKey := object.Key("ServerlessV2ScalingConfiguration")
if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.StorageEncrypted != nil {
objectKey := object.Key("StorageEncrypted")
objectKey.Boolean(*v.StorageEncrypted)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
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_serializeOpDocumentCreateDBClusterParameterGroupInput(v *CreateDBClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBParameterGroupFamily != nil {
objectKey := object.Key("DBParameterGroupFamily")
objectKey.String(*v.DBParameterGroupFamily)
}
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_serializeOpDocumentCreateDBClusterSnapshotInput(v *CreateDBClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBInstanceInput(v *CreateDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.BackupTarget != nil {
objectKey := object.Key("BackupTarget")
objectKey.String(*v.BackupTarget)
}
if v.CACertificateIdentifier != nil {
objectKey := object.Key("CACertificateIdentifier")
objectKey.String(*v.CACertificateIdentifier)
}
if v.CharacterSetName != nil {
objectKey := object.Key("CharacterSetName")
objectKey.String(*v.CharacterSetName)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.CustomIamInstanceProfile != nil {
objectKey := object.Key("CustomIamInstanceProfile")
objectKey.String(*v.CustomIamInstanceProfile)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBName != nil {
objectKey := object.Key("DBName")
objectKey.String(*v.DBName)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBSecurityGroups != nil {
objectKey := object.Key("DBSecurityGroups")
if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroups, objectKey); err != nil {
return err
}
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainAuthSecretArn != nil {
objectKey := object.Key("DomainAuthSecretArn")
objectKey.String(*v.DomainAuthSecretArn)
}
if v.DomainDnsIps != nil {
objectKey := object.Key("DomainDnsIps")
if err := awsAwsquery_serializeDocumentStringList(v.DomainDnsIps, objectKey); err != nil {
return err
}
}
if v.DomainFqdn != nil {
objectKey := object.Key("DomainFqdn")
objectKey.String(*v.DomainFqdn)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.DomainOu != nil {
objectKey := object.Key("DomainOu")
objectKey.String(*v.DomainOu)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableCustomerOwnedIp != nil {
objectKey := object.Key("EnableCustomerOwnedIp")
objectKey.Boolean(*v.EnableCustomerOwnedIp)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
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.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.MaxAllocatedStorage != nil {
objectKey := object.Key("MaxAllocatedStorage")
objectKey.Integer(*v.MaxAllocatedStorage)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NcharCharacterSetName != nil {
objectKey := object.Key("NcharCharacterSetName")
objectKey.String(*v.NcharCharacterSetName)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PromotionTier != nil {
objectKey := object.Key("PromotionTier")
objectKey.Integer(*v.PromotionTier)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.StorageEncrypted != nil {
objectKey := object.Key("StorageEncrypted")
objectKey.Boolean(*v.StorageEncrypted)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TdeCredentialArn != nil {
objectKey := object.Key("TdeCredentialArn")
objectKey.String(*v.TdeCredentialArn)
}
if v.TdeCredentialPassword != nil {
objectKey := object.Key("TdeCredentialPassword")
objectKey.String(*v.TdeCredentialPassword)
}
if v.Timezone != nil {
objectKey := object.Key("Timezone")
objectKey.String(*v.Timezone)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBInstanceReadReplicaInput(v *CreateDBInstanceReadReplicaInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.CustomIamInstanceProfile != nil {
objectKey := object.Key("CustomIamInstanceProfile")
objectKey.String(*v.CustomIamInstanceProfile)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.destinationRegion != nil {
objectKey := object.Key("DestinationRegion")
objectKey.String(*v.destinationRegion)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainAuthSecretArn != nil {
objectKey := object.Key("DomainAuthSecretArn")
objectKey.String(*v.DomainAuthSecretArn)
}
if v.DomainDnsIps != nil {
objectKey := object.Key("DomainDnsIps")
if err := awsAwsquery_serializeDocumentStringList(v.DomainDnsIps, objectKey); err != nil {
return err
}
}
if v.DomainFqdn != nil {
objectKey := object.Key("DomainFqdn")
objectKey.String(*v.DomainFqdn)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.DomainOu != nil {
objectKey := object.Key("DomainOu")
objectKey.String(*v.DomainOu)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableCustomerOwnedIp != nil {
objectKey := object.Key("EnableCustomerOwnedIp")
objectKey.Boolean(*v.EnableCustomerOwnedIp)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.MaxAllocatedStorage != nil {
objectKey := object.Key("MaxAllocatedStorage")
objectKey.Integer(*v.MaxAllocatedStorage)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreSignedUrl != nil {
objectKey := object.Key("PreSignedUrl")
objectKey.String(*v.PreSignedUrl)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if len(v.ReplicaMode) > 0 {
objectKey := object.Key("ReplicaMode")
objectKey.String(string(v.ReplicaMode))
}
if v.SourceDBClusterIdentifier != nil {
objectKey := object.Key("SourceDBClusterIdentifier")
objectKey.String(*v.SourceDBClusterIdentifier)
}
if v.SourceDBInstanceIdentifier != nil {
objectKey := object.Key("SourceDBInstanceIdentifier")
objectKey.String(*v.SourceDBInstanceIdentifier)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.UseDefaultProcessorFeatures != nil {
objectKey := object.Key("UseDefaultProcessorFeatures")
objectKey.Boolean(*v.UseDefaultProcessorFeatures)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBParameterGroupInput(v *CreateDBParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupFamily != nil {
objectKey := object.Key("DBParameterGroupFamily")
objectKey.String(*v.DBParameterGroupFamily)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
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_serializeOpDocumentCreateDBProxyEndpointInput(v *CreateDBProxyEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyEndpointName != nil {
objectKey := object.Key("DBProxyEndpointName")
objectKey.String(*v.DBProxyEndpointName)
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if len(v.TargetRole) > 0 {
objectKey := object.Key("TargetRole")
objectKey.String(string(v.TargetRole))
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentStringList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
if v.VpcSubnetIds != nil {
objectKey := object.Key("VpcSubnetIds")
if err := awsAwsquery_serializeDocumentStringList(v.VpcSubnetIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBProxyInput(v *CreateDBProxyInput, value query.Value) error {
object := value.Object()
_ = object
if v.Auth != nil {
objectKey := object.Key("Auth")
if err := awsAwsquery_serializeDocumentUserAuthConfigList(v.Auth, objectKey); err != nil {
return err
}
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.DebugLogging {
objectKey := object.Key("DebugLogging")
objectKey.Boolean(v.DebugLogging)
}
if len(v.EngineFamily) > 0 {
objectKey := object.Key("EngineFamily")
objectKey.String(string(v.EngineFamily))
}
if v.IdleClientTimeout != nil {
objectKey := object.Key("IdleClientTimeout")
objectKey.Integer(*v.IdleClientTimeout)
}
if v.RequireTLS {
objectKey := object.Key("RequireTLS")
objectKey.Boolean(v.RequireTLS)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
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_serializeDocumentStringList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
if v.VpcSubnetIds != nil {
objectKey := object.Key("VpcSubnetIds")
if err := awsAwsquery_serializeDocumentStringList(v.VpcSubnetIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBSecurityGroupInput(v *CreateDBSecurityGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSecurityGroupDescription != nil {
objectKey := object.Key("DBSecurityGroupDescription")
objectKey.String(*v.DBSecurityGroupDescription)
}
if v.DBSecurityGroupName != nil {
objectKey := object.Key("DBSecurityGroupName")
objectKey.String(*v.DBSecurityGroupName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBSnapshotInput(v *CreateDBSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateDBSubnetGroupInput(v *CreateDBSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSubnetGroupDescription != nil {
objectKey := object.Key("DBSubnetGroupDescription")
objectKey.String(*v.DBSubnetGroupDescription)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
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_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.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_serializeOpDocumentCreateGlobalClusterInput(v *CreateGlobalClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
if v.SourceDBClusterIdentifier != nil {
objectKey := object.Key("SourceDBClusterIdentifier")
objectKey.String(*v.SourceDBClusterIdentifier)
}
if v.StorageEncrypted != nil {
objectKey := object.Key("StorageEncrypted")
objectKey.Boolean(*v.StorageEncrypted)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateOptionGroupInput(v *CreateOptionGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.EngineName != nil {
objectKey := object.Key("EngineName")
objectKey.String(*v.EngineName)
}
if v.MajorEngineVersion != nil {
objectKey := object.Key("MajorEngineVersion")
objectKey.String(*v.MajorEngineVersion)
}
if v.OptionGroupDescription != nil {
objectKey := object.Key("OptionGroupDescription")
objectKey.String(*v.OptionGroupDescription)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteBlueGreenDeploymentInput(v *DeleteBlueGreenDeploymentInput, value query.Value) error {
object := value.Object()
_ = object
if v.BlueGreenDeploymentIdentifier != nil {
objectKey := object.Key("BlueGreenDeploymentIdentifier")
objectKey.String(*v.BlueGreenDeploymentIdentifier)
}
if v.DeleteTarget != nil {
objectKey := object.Key("DeleteTarget")
objectKey.Boolean(*v.DeleteTarget)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteCustomDBEngineVersionInput(v *DeleteCustomDBEngineVersionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBClusterEndpointInput(v *DeleteDBClusterEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterEndpointIdentifier != nil {
objectKey := object.Key("DBClusterEndpointIdentifier")
objectKey.String(*v.DBClusterEndpointIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBClusterInput(v *DeleteDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.FinalDBSnapshotIdentifier != nil {
objectKey := object.Key("FinalDBSnapshotIdentifier")
objectKey.String(*v.FinalDBSnapshotIdentifier)
}
if v.SkipFinalSnapshot {
objectKey := object.Key("SkipFinalSnapshot")
objectKey.Boolean(v.SkipFinalSnapshot)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBClusterParameterGroupInput(v *DeleteDBClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBClusterSnapshotInput(v *DeleteDBClusterSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBInstanceAutomatedBackupInput(v *DeleteDBInstanceAutomatedBackupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceAutomatedBackupsArn != nil {
objectKey := object.Key("DBInstanceAutomatedBackupsArn")
objectKey.String(*v.DBInstanceAutomatedBackupsArn)
}
if v.DbiResourceId != nil {
objectKey := object.Key("DbiResourceId")
objectKey.String(*v.DbiResourceId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBInstanceInput(v *DeleteDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DeleteAutomatedBackups != nil {
objectKey := object.Key("DeleteAutomatedBackups")
objectKey.Boolean(*v.DeleteAutomatedBackups)
}
if v.FinalDBSnapshotIdentifier != nil {
objectKey := object.Key("FinalDBSnapshotIdentifier")
objectKey.String(*v.FinalDBSnapshotIdentifier)
}
if v.SkipFinalSnapshot {
objectKey := object.Key("SkipFinalSnapshot")
objectKey.Boolean(v.SkipFinalSnapshot)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBParameterGroupInput(v *DeleteDBParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBProxyEndpointInput(v *DeleteDBProxyEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyEndpointName != nil {
objectKey := object.Key("DBProxyEndpointName")
objectKey.String(*v.DBProxyEndpointName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBProxyInput(v *DeleteDBProxyInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBSecurityGroupInput(v *DeleteDBSecurityGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSecurityGroupName != nil {
objectKey := object.Key("DBSecurityGroupName")
objectKey.String(*v.DBSecurityGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBSnapshotInput(v *DeleteDBSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteDBSubnetGroupInput(v *DeleteDBSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
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_serializeOpDocumentDeleteGlobalClusterInput(v *DeleteGlobalClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteOptionGroupInput(v *DeleteOptionGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeregisterDBProxyTargetsInput(v *DeregisterDBProxyTargetsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifiers != nil {
objectKey := object.Key("DBClusterIdentifiers")
if err := awsAwsquery_serializeDocumentStringList(v.DBClusterIdentifiers, objectKey); err != nil {
return err
}
}
if v.DBInstanceIdentifiers != nil {
objectKey := object.Key("DBInstanceIdentifiers")
if err := awsAwsquery_serializeDocumentStringList(v.DBInstanceIdentifiers, objectKey); err != nil {
return err
}
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.TargetGroupName != nil {
objectKey := object.Key("TargetGroupName")
objectKey.String(*v.TargetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value query.Value) error {
object := value.Object()
_ = object
return nil
}
func awsAwsquery_serializeOpDocumentDescribeBlueGreenDeploymentsInput(v *DescribeBlueGreenDeploymentsInput, value query.Value) error {
object := value.Object()
_ = object
if v.BlueGreenDeploymentIdentifier != nil {
objectKey := object.Key("BlueGreenDeploymentIdentifier")
objectKey.String(*v.BlueGreenDeploymentIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeCertificatesInput(v *DescribeCertificatesInput, value query.Value) error {
object := value.Object()
_ = object
if v.CertificateIdentifier != nil {
objectKey := object.Key("CertificateIdentifier")
objectKey.String(*v.CertificateIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClusterBacktracksInput(v *DescribeDBClusterBacktracksInput, value query.Value) error {
object := value.Object()
_ = object
if v.BacktrackIdentifier != nil {
objectKey := object.Key("BacktrackIdentifier")
objectKey.String(*v.BacktrackIdentifier)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClusterEndpointsInput(v *DescribeDBClusterEndpointsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterEndpointIdentifier != nil {
objectKey := object.Key("DBClusterEndpointIdentifier")
objectKey.String(*v.DBClusterEndpointIdentifier)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClusterParameterGroupsInput(v *DescribeDBClusterParameterGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClusterParametersInput(v *DescribeDBClusterParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClustersInput(v *DescribeDBClustersInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.IncludeShared {
objectKey := object.Key("IncludeShared")
objectKey.Boolean(v.IncludeShared)
}
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_serializeOpDocumentDescribeDBClusterSnapshotAttributesInput(v *DescribeDBClusterSnapshotAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotsInput(v *DescribeDBClusterSnapshotsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.IncludePublic {
objectKey := object.Key("IncludePublic")
objectKey.Boolean(v.IncludePublic)
}
if v.IncludeShared {
objectKey := object.Key("IncludeShared")
objectKey.Boolean(v.IncludeShared)
}
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.SnapshotType != nil {
objectKey := object.Key("SnapshotType")
objectKey.String(*v.SnapshotType)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBEngineVersionsInput(v *DescribeDBEngineVersionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupFamily != nil {
objectKey := object.Key("DBParameterGroupFamily")
objectKey.String(*v.DBParameterGroupFamily)
}
if v.DefaultOnly {
objectKey := object.Key("DefaultOnly")
objectKey.Boolean(v.DefaultOnly)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.IncludeAll != nil {
objectKey := object.Key("IncludeAll")
objectKey.Boolean(*v.IncludeAll)
}
if v.ListSupportedCharacterSets != nil {
objectKey := object.Key("ListSupportedCharacterSets")
objectKey.Boolean(*v.ListSupportedCharacterSets)
}
if v.ListSupportedTimezones != nil {
objectKey := object.Key("ListSupportedTimezones")
objectKey.Boolean(*v.ListSupportedTimezones)
}
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_serializeOpDocumentDescribeDBInstanceAutomatedBackupsInput(v *DescribeDBInstanceAutomatedBackupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceAutomatedBackupsArn != nil {
objectKey := object.Key("DBInstanceAutomatedBackupsArn")
objectKey.String(*v.DBInstanceAutomatedBackupsArn)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DbiResourceId != nil {
objectKey := object.Key("DbiResourceId")
objectKey.String(*v.DbiResourceId)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBInstancesInput(v *DescribeDBInstancesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBLogFilesInput(v *DescribeDBLogFilesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.FileLastWritten != 0 {
objectKey := object.Key("FileLastWritten")
objectKey.Long(v.FileLastWritten)
}
if v.FilenameContains != nil {
objectKey := object.Key("FilenameContains")
objectKey.String(*v.FilenameContains)
}
if v.FileSize != 0 {
objectKey := object.Key("FileSize")
objectKey.Long(v.FileSize)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBParameterGroupsInput(v *DescribeDBParameterGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBParametersInput(v *DescribeDBParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBProxiesInput(v *DescribeDBProxiesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBProxyEndpointsInput(v *DescribeDBProxyEndpointsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyEndpointName != nil {
objectKey := object.Key("DBProxyEndpointName")
objectKey.String(*v.DBProxyEndpointName)
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBProxyTargetGroupsInput(v *DescribeDBProxyTargetGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.TargetGroupName != nil {
objectKey := object.Key("TargetGroupName")
objectKey.String(*v.TargetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBProxyTargetsInput(v *DescribeDBProxyTargetsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.TargetGroupName != nil {
objectKey := object.Key("TargetGroupName")
objectKey.String(*v.TargetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBSecurityGroupsInput(v *DescribeDBSecurityGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSecurityGroupName != nil {
objectKey := object.Key("DBSecurityGroupName")
objectKey.String(*v.DBSecurityGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBSnapshotAttributesInput(v *DescribeDBSnapshotAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBSnapshotsInput(v *DescribeDBSnapshotsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DbiResourceId != nil {
objectKey := object.Key("DbiResourceId")
objectKey.String(*v.DbiResourceId)
}
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.IncludePublic {
objectKey := object.Key("IncludePublic")
objectKey.Boolean(v.IncludePublic)
}
if v.IncludeShared {
objectKey := object.Key("IncludeShared")
objectKey.Boolean(v.IncludeShared)
}
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.SnapshotType != nil {
objectKey := object.Key("SnapshotType")
objectKey.String(*v.SnapshotType)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeDBSubnetGroupsInput(v *DescribeDBSubnetGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEngineDefaultClusterParametersInput(v *DescribeEngineDefaultClusterParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupFamily != nil {
objectKey := object.Key("DBParameterGroupFamily")
objectKey.String(*v.DBParameterGroupFamily)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEngineDefaultParametersInput(v *DescribeEngineDefaultParametersInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupFamily != nil {
objectKey := object.Key("DBParameterGroupFamily")
objectKey.String(*v.DBParameterGroupFamily)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeEventCategoriesInput(v *DescribeEventCategoriesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
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.EventCategories != nil {
objectKey := object.Key("EventCategories")
if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil {
return err
}
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.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.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeExportTasksInput(v *DescribeExportTasksInput, value query.Value) error {
object := value.Object()
_ = object
if v.ExportTaskIdentifier != nil {
objectKey := object.Key("ExportTaskIdentifier")
objectKey.String(*v.ExportTaskIdentifier)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
if len(v.SourceType) > 0 {
objectKey := object.Key("SourceType")
objectKey.String(string(v.SourceType))
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeGlobalClustersInput(v *DescribeGlobalClustersInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
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_serializeOpDocumentDescribeOptionGroupOptionsInput(v *DescribeOptionGroupOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.EngineName != nil {
objectKey := object.Key("EngineName")
objectKey.String(*v.EngineName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.MajorEngineVersion != nil {
objectKey := object.Key("MajorEngineVersion")
objectKey.String(*v.MajorEngineVersion)
}
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_serializeOpDocumentDescribeOptionGroupsInput(v *DescribeOptionGroupsInput, value query.Value) error {
object := value.Object()
_ = object
if v.EngineName != nil {
objectKey := object.Key("EngineName")
objectKey.String(*v.EngineName)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.MajorEngineVersion != nil {
objectKey := object.Key("MajorEngineVersion")
objectKey.String(*v.MajorEngineVersion)
}
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.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeOrderableDBInstanceOptionsInput(v *DescribeOrderableDBInstanceOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.AvailabilityZoneGroup != nil {
objectKey := object.Key("AvailabilityZoneGroup")
objectKey.String(*v.AvailabilityZoneGroup)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
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.Vpc != nil {
objectKey := object.Key("Vpc")
objectKey.Boolean(*v.Vpc)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribePendingMaintenanceActionsInput(v *DescribePendingMaintenanceActionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.ResourceIdentifier != nil {
objectKey := object.Key("ResourceIdentifier")
objectKey.String(*v.ResourceIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReservedDBInstancesInput(v *DescribeReservedDBInstancesInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.Duration != nil {
objectKey := object.Key("Duration")
objectKey.String(*v.Duration)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.LeaseId != nil {
objectKey := object.Key("LeaseId")
objectKey.String(*v.LeaseId)
}
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.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.OfferingType != nil {
objectKey := object.Key("OfferingType")
objectKey.String(*v.OfferingType)
}
if v.ProductDescription != nil {
objectKey := object.Key("ProductDescription")
objectKey.String(*v.ProductDescription)
}
if v.ReservedDBInstanceId != nil {
objectKey := object.Key("ReservedDBInstanceId")
objectKey.String(*v.ReservedDBInstanceId)
}
if v.ReservedDBInstancesOfferingId != nil {
objectKey := object.Key("ReservedDBInstancesOfferingId")
objectKey.String(*v.ReservedDBInstancesOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReservedDBInstancesOfferingsInput(v *DescribeReservedDBInstancesOfferingsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.Duration != nil {
objectKey := object.Key("Duration")
objectKey.String(*v.Duration)
}
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.OfferingType != nil {
objectKey := object.Key("OfferingType")
objectKey.String(*v.OfferingType)
}
if v.ProductDescription != nil {
objectKey := object.Key("ProductDescription")
objectKey.String(*v.ProductDescription)
}
if v.ReservedDBInstancesOfferingId != nil {
objectKey := object.Key("ReservedDBInstancesOfferingId")
objectKey.String(*v.ReservedDBInstancesOfferingId)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeSourceRegionsInput(v *DescribeSourceRegionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(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.RegionName != nil {
objectKey := object.Key("RegionName")
objectKey.String(*v.RegionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeValidDBInstanceModificationsInput(v *DescribeValidDBInstanceModificationsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentDownloadDBLogFilePortionInput(v *DownloadDBLogFilePortionInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.LogFileName != nil {
objectKey := object.Key("LogFileName")
objectKey.String(*v.LogFileName)
}
if v.Marker != nil {
objectKey := object.Key("Marker")
objectKey.String(*v.Marker)
}
if v.NumberOfLines != 0 {
objectKey := object.Key("NumberOfLines")
objectKey.Integer(v.NumberOfLines)
}
return nil
}
func awsAwsquery_serializeOpDocumentFailoverDBClusterInput(v *FailoverDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.TargetDBInstanceIdentifier != nil {
objectKey := object.Key("TargetDBInstanceIdentifier")
objectKey.String(*v.TargetDBInstanceIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentFailoverGlobalClusterInput(v *FailoverGlobalClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
if v.TargetDbClusterIdentifier != nil {
objectKey := object.Key("TargetDbClusterIdentifier")
objectKey.String(*v.TargetDbClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filters != nil {
objectKey := object.Key("Filters")
if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
return err
}
}
if v.ResourceName != nil {
objectKey := object.Key("ResourceName")
objectKey.String(*v.ResourceName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyActivityStreamInput(v *ModifyActivityStreamInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.AuditPolicyState) > 0 {
objectKey := object.Key("AuditPolicyState")
objectKey.String(string(v.AuditPolicyState))
}
if v.ResourceArn != nil {
objectKey := object.Key("ResourceArn")
objectKey.String(*v.ResourceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyCertificatesInput(v *ModifyCertificatesInput, value query.Value) error {
object := value.Object()
_ = object
if v.CertificateIdentifier != nil {
objectKey := object.Key("CertificateIdentifier")
objectKey.String(*v.CertificateIdentifier)
}
if v.RemoveCustomerOverride != nil {
objectKey := object.Key("RemoveCustomerOverride")
objectKey.Boolean(*v.RemoveCustomerOverride)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyCurrentDBClusterCapacityInput(v *ModifyCurrentDBClusterCapacityInput, value query.Value) error {
object := value.Object()
_ = object
if v.Capacity != nil {
objectKey := object.Key("Capacity")
objectKey.Integer(*v.Capacity)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.SecondsBeforeTimeout != nil {
objectKey := object.Key("SecondsBeforeTimeout")
objectKey.Integer(*v.SecondsBeforeTimeout)
}
if v.TimeoutAction != nil {
objectKey := object.Key("TimeoutAction")
objectKey.String(*v.TimeoutAction)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyCustomDBEngineVersionInput(v *ModifyCustomDBEngineVersionInput, value query.Value) error {
object := value.Object()
_ = object
if v.Description != nil {
objectKey := object.Key("Description")
objectKey.String(*v.Description)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if len(v.Status) > 0 {
objectKey := object.Key("Status")
objectKey.String(string(v.Status))
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBClusterEndpointInput(v *ModifyDBClusterEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterEndpointIdentifier != nil {
objectKey := object.Key("DBClusterEndpointIdentifier")
objectKey.String(*v.DBClusterEndpointIdentifier)
}
if v.EndpointType != nil {
objectKey := object.Key("EndpointType")
objectKey.String(*v.EndpointType)
}
if v.ExcludedMembers != nil {
objectKey := object.Key("ExcludedMembers")
if err := awsAwsquery_serializeDocumentStringList(v.ExcludedMembers, objectKey); err != nil {
return err
}
}
if v.StaticMembers != nil {
objectKey := object.Key("StaticMembers")
if err := awsAwsquery_serializeDocumentStringList(v.StaticMembers, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AllowEngineModeChange {
objectKey := object.Key("AllowEngineModeChange")
objectKey.Boolean(v.AllowEngineModeChange)
}
if v.AllowMajorVersionUpgrade {
objectKey := object.Key("AllowMajorVersionUpgrade")
objectKey.Boolean(v.AllowMajorVersionUpgrade)
}
if v.ApplyImmediately {
objectKey := object.Key("ApplyImmediately")
objectKey.Boolean(v.ApplyImmediately)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.BacktrackWindow != nil {
objectKey := object.Key("BacktrackWindow")
objectKey.Long(*v.BacktrackWindow)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.CloudwatchLogsExportConfiguration != nil {
objectKey := object.Key("CloudwatchLogsExportConfiguration")
if err := awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v.CloudwatchLogsExportConfiguration, objectKey); err != nil {
return err
}
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterInstanceClass != nil {
objectKey := object.Key("DBClusterInstanceClass")
objectKey.String(*v.DBClusterInstanceClass)
}
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBInstanceParameterGroupName != nil {
objectKey := object.Key("DBInstanceParameterGroupName")
objectKey.String(*v.DBInstanceParameterGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.EnableGlobalWriteForwarding != nil {
objectKey := object.Key("EnableGlobalWriteForwarding")
objectKey.Boolean(*v.EnableGlobalWriteForwarding)
}
if v.EnableHttpEndpoint != nil {
objectKey := object.Key("EnableHttpEndpoint")
objectKey.Boolean(*v.EnableHttpEndpoint)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.EngineMode != nil {
objectKey := object.Key("EngineMode")
objectKey.String(*v.EngineMode)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
if v.MasterUserPassword != nil {
objectKey := object.Key("MasterUserPassword")
objectKey.String(*v.MasterUserPassword)
}
if v.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.NewDBClusterIdentifier != nil {
objectKey := object.Key("NewDBClusterIdentifier")
objectKey.String(*v.NewDBClusterIdentifier)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.RotateMasterUserPassword != nil {
objectKey := object.Key("RotateMasterUserPassword")
objectKey.Boolean(*v.RotateMasterUserPassword)
}
if v.ScalingConfiguration != nil {
objectKey := object.Key("ScalingConfiguration")
if err := awsAwsquery_serializeDocumentScalingConfiguration(v.ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.ServerlessV2ScalingConfiguration != nil {
objectKey := object.Key("ServerlessV2ScalingConfiguration")
if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBClusterParameterGroupInput(v *ModifyDBClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.Parameters != nil {
objectKey := object.Key("Parameters")
if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBClusterSnapshotAttributeInput(v *ModifyDBClusterSnapshotAttributeInput, value query.Value) error {
object := value.Object()
_ = object
if v.AttributeName != nil {
objectKey := object.Key("AttributeName")
objectKey.String(*v.AttributeName)
}
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
if v.ValuesToAdd != nil {
objectKey := object.Key("ValuesToAdd")
if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToAdd, objectKey); err != nil {
return err
}
}
if v.ValuesToRemove != nil {
objectKey := object.Key("ValuesToRemove")
if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToRemove, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBInstanceInput(v *ModifyDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AllowMajorVersionUpgrade {
objectKey := object.Key("AllowMajorVersionUpgrade")
objectKey.Boolean(v.AllowMajorVersionUpgrade)
}
if v.ApplyImmediately {
objectKey := object.Key("ApplyImmediately")
objectKey.Boolean(v.ApplyImmediately)
}
if len(v.AutomationMode) > 0 {
objectKey := object.Key("AutomationMode")
objectKey.String(string(v.AutomationMode))
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AwsBackupRecoveryPointArn != nil {
objectKey := object.Key("AwsBackupRecoveryPointArn")
objectKey.String(*v.AwsBackupRecoveryPointArn)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.CACertificateIdentifier != nil {
objectKey := object.Key("CACertificateIdentifier")
objectKey.String(*v.CACertificateIdentifier)
}
if v.CertificateRotationRestart != nil {
objectKey := object.Key("CertificateRotationRestart")
objectKey.Boolean(*v.CertificateRotationRestart)
}
if v.CloudwatchLogsExportConfiguration != nil {
objectKey := object.Key("CloudwatchLogsExportConfiguration")
if err := awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v.CloudwatchLogsExportConfiguration, objectKey); err != nil {
return err
}
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBPortNumber != nil {
objectKey := object.Key("DBPortNumber")
objectKey.Integer(*v.DBPortNumber)
}
if v.DBSecurityGroups != nil {
objectKey := object.Key("DBSecurityGroups")
if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroups, objectKey); err != nil {
return err
}
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.DisableDomain != nil {
objectKey := object.Key("DisableDomain")
objectKey.Boolean(*v.DisableDomain)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainAuthSecretArn != nil {
objectKey := object.Key("DomainAuthSecretArn")
objectKey.String(*v.DomainAuthSecretArn)
}
if v.DomainDnsIps != nil {
objectKey := object.Key("DomainDnsIps")
if err := awsAwsquery_serializeDocumentStringList(v.DomainDnsIps, objectKey); err != nil {
return err
}
}
if v.DomainFqdn != nil {
objectKey := object.Key("DomainFqdn")
objectKey.String(*v.DomainFqdn)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.DomainOu != nil {
objectKey := object.Key("DomainOu")
objectKey.String(*v.DomainOu)
}
if v.EnableCustomerOwnedIp != nil {
objectKey := object.Key("EnableCustomerOwnedIp")
objectKey.Boolean(*v.EnableCustomerOwnedIp)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
if v.MasterUserPassword != nil {
objectKey := object.Key("MasterUserPassword")
objectKey.String(*v.MasterUserPassword)
}
if v.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.MaxAllocatedStorage != nil {
objectKey := object.Key("MaxAllocatedStorage")
objectKey.Integer(*v.MaxAllocatedStorage)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.NewDBInstanceIdentifier != nil {
objectKey := object.Key("NewDBInstanceIdentifier")
objectKey.String(*v.NewDBInstanceIdentifier)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PromotionTier != nil {
objectKey := object.Key("PromotionTier")
objectKey.Integer(*v.PromotionTier)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if len(v.ReplicaMode) > 0 {
objectKey := object.Key("ReplicaMode")
objectKey.String(string(v.ReplicaMode))
}
if v.ResumeFullAutomationModeMinutes != nil {
objectKey := object.Key("ResumeFullAutomationModeMinutes")
objectKey.Integer(*v.ResumeFullAutomationModeMinutes)
}
if v.RotateMasterUserPassword != nil {
objectKey := object.Key("RotateMasterUserPassword")
objectKey.Boolean(*v.RotateMasterUserPassword)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.TdeCredentialArn != nil {
objectKey := object.Key("TdeCredentialArn")
objectKey.String(*v.TdeCredentialArn)
}
if v.TdeCredentialPassword != nil {
objectKey := object.Key("TdeCredentialPassword")
objectKey.String(*v.TdeCredentialPassword)
}
if v.UseDefaultProcessorFeatures != nil {
objectKey := object.Key("UseDefaultProcessorFeatures")
objectKey.Boolean(*v.UseDefaultProcessorFeatures)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBParameterGroupInput(v *ModifyDBParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.Parameters != nil {
objectKey := object.Key("Parameters")
if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBProxyEndpointInput(v *ModifyDBProxyEndpointInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBProxyEndpointName != nil {
objectKey := object.Key("DBProxyEndpointName")
objectKey.String(*v.DBProxyEndpointName)
}
if v.NewDBProxyEndpointName != nil {
objectKey := object.Key("NewDBProxyEndpointName")
objectKey.String(*v.NewDBProxyEndpointName)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentStringList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBProxyInput(v *ModifyDBProxyInput, value query.Value) error {
object := value.Object()
_ = object
if v.Auth != nil {
objectKey := object.Key("Auth")
if err := awsAwsquery_serializeDocumentUserAuthConfigList(v.Auth, objectKey); err != nil {
return err
}
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.DebugLogging != nil {
objectKey := object.Key("DebugLogging")
objectKey.Boolean(*v.DebugLogging)
}
if v.IdleClientTimeout != nil {
objectKey := object.Key("IdleClientTimeout")
objectKey.Integer(*v.IdleClientTimeout)
}
if v.NewDBProxyName != nil {
objectKey := object.Key("NewDBProxyName")
objectKey.String(*v.NewDBProxyName)
}
if v.RequireTLS != nil {
objectKey := object.Key("RequireTLS")
objectKey.Boolean(*v.RequireTLS)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
if v.SecurityGroups != nil {
objectKey := object.Key("SecurityGroups")
if err := awsAwsquery_serializeDocumentStringList(v.SecurityGroups, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBProxyTargetGroupInput(v *ModifyDBProxyTargetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConnectionPoolConfig != nil {
objectKey := object.Key("ConnectionPoolConfig")
if err := awsAwsquery_serializeDocumentConnectionPoolConfiguration(v.ConnectionPoolConfig, objectKey); err != nil {
return err
}
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.NewName != nil {
objectKey := object.Key("NewName")
objectKey.String(*v.NewName)
}
if v.TargetGroupName != nil {
objectKey := object.Key("TargetGroupName")
objectKey.String(*v.TargetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBSnapshotAttributeInput(v *ModifyDBSnapshotAttributeInput, value query.Value) error {
object := value.Object()
_ = object
if v.AttributeName != nil {
objectKey := object.Key("AttributeName")
objectKey.String(*v.AttributeName)
}
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
if v.ValuesToAdd != nil {
objectKey := object.Key("ValuesToAdd")
if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToAdd, objectKey); err != nil {
return err
}
}
if v.ValuesToRemove != nil {
objectKey := object.Key("ValuesToRemove")
if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToRemove, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBSnapshotInput(v *ModifyDBSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyDBSubnetGroupInput(v *ModifyDBSubnetGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBSubnetGroupDescription != nil {
objectKey := object.Key("DBSubnetGroupDescription")
objectKey.String(*v.DBSubnetGroupDescription)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.SubnetIds != nil {
objectKey := object.Key("SubnetIds")
if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, 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.SnsTopicArn != nil {
objectKey := object.Key("SnsTopicArn")
objectKey.String(*v.SnsTopicArn)
}
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_serializeOpDocumentModifyGlobalClusterInput(v *ModifyGlobalClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllowMajorVersionUpgrade != nil {
objectKey := object.Key("AllowMajorVersionUpgrade")
objectKey.Boolean(*v.AllowMajorVersionUpgrade)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
if v.NewGlobalClusterIdentifier != nil {
objectKey := object.Key("NewGlobalClusterIdentifier")
objectKey.String(*v.NewGlobalClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentModifyOptionGroupInput(v *ModifyOptionGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.ApplyImmediately {
objectKey := object.Key("ApplyImmediately")
objectKey.Boolean(v.ApplyImmediately)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.OptionsToInclude != nil {
objectKey := object.Key("OptionsToInclude")
if err := awsAwsquery_serializeDocumentOptionConfigurationList(v.OptionsToInclude, objectKey); err != nil {
return err
}
}
if v.OptionsToRemove != nil {
objectKey := object.Key("OptionsToRemove")
if err := awsAwsquery_serializeDocumentOptionNamesList(v.OptionsToRemove, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentPromoteReadReplicaDBClusterInput(v *PromoteReadReplicaDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentPromoteReadReplicaInput(v *PromoteReadReplicaInput, value query.Value) error {
object := value.Object()
_ = object
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
return nil
}
func awsAwsquery_serializeOpDocumentPurchaseReservedDBInstancesOfferingInput(v *PurchaseReservedDBInstancesOfferingInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceCount != nil {
objectKey := object.Key("DBInstanceCount")
objectKey.Integer(*v.DBInstanceCount)
}
if v.ReservedDBInstanceId != nil {
objectKey := object.Key("ReservedDBInstanceId")
objectKey.String(*v.ReservedDBInstanceId)
}
if v.ReservedDBInstancesOfferingId != nil {
objectKey := object.Key("ReservedDBInstancesOfferingId")
objectKey.String(*v.ReservedDBInstancesOfferingId)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRebootDBClusterInput(v *RebootDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentRebootDBInstanceInput(v *RebootDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.ForceFailover != nil {
objectKey := object.Key("ForceFailover")
objectKey.Boolean(*v.ForceFailover)
}
return nil
}
func awsAwsquery_serializeOpDocumentRegisterDBProxyTargetsInput(v *RegisterDBProxyTargetsInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifiers != nil {
objectKey := object.Key("DBClusterIdentifiers")
if err := awsAwsquery_serializeDocumentStringList(v.DBClusterIdentifiers, objectKey); err != nil {
return err
}
}
if v.DBInstanceIdentifiers != nil {
objectKey := object.Key("DBInstanceIdentifiers")
if err := awsAwsquery_serializeDocumentStringList(v.DBInstanceIdentifiers, objectKey); err != nil {
return err
}
}
if v.DBProxyName != nil {
objectKey := object.Key("DBProxyName")
objectKey.String(*v.DBProxyName)
}
if v.TargetGroupName != nil {
objectKey := object.Key("TargetGroupName")
objectKey.String(*v.TargetGroupName)
}
return nil
}
func awsAwsquery_serializeOpDocumentRemoveFromGlobalClusterInput(v *RemoveFromGlobalClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DbClusterIdentifier != nil {
objectKey := object.Key("DbClusterIdentifier")
objectKey.String(*v.DbClusterIdentifier)
}
if v.GlobalClusterIdentifier != nil {
objectKey := object.Key("GlobalClusterIdentifier")
objectKey.String(*v.GlobalClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentRemoveRoleFromDBClusterInput(v *RemoveRoleFromDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.FeatureName != nil {
objectKey := object.Key("FeatureName")
objectKey.String(*v.FeatureName)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentRemoveRoleFromDBInstanceInput(v *RemoveRoleFromDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.FeatureName != nil {
objectKey := object.Key("FeatureName")
objectKey.String(*v.FeatureName)
}
if v.RoleArn != nil {
objectKey := object.Key("RoleArn")
objectKey.String(*v.RoleArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentRemoveSourceIdentifierFromSubscriptionInput(v *RemoveSourceIdentifierFromSubscriptionInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceIdentifier != nil {
objectKey := object.Key("SourceIdentifier")
objectKey.String(*v.SourceIdentifier)
}
if v.SubscriptionName != nil {
objectKey := object.Key("SubscriptionName")
objectKey.String(*v.SubscriptionName)
}
return nil
}
func awsAwsquery_serializeOpDocumentRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput, 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_serializeDocumentKeyList(v.TagKeys, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentResetDBClusterParameterGroupInput(v *ResetDBClusterParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
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_serializeOpDocumentResetDBParameterGroupInput(v *ResetDBParameterGroupInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
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_serializeOpDocumentRestoreDBClusterFromS3Input(v *RestoreDBClusterFromS3Input, value query.Value) error {
object := value.Object()
_ = object
if v.AvailabilityZones != nil {
objectKey := object.Key("AvailabilityZones")
if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil {
return err
}
}
if v.BacktrackWindow != nil {
objectKey := object.Key("BacktrackWindow")
objectKey.Long(*v.BacktrackWindow)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.CharacterSetName != nil {
objectKey := object.Key("CharacterSetName")
objectKey.String(*v.CharacterSetName)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
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.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.S3BucketName != nil {
objectKey := object.Key("S3BucketName")
objectKey.String(*v.S3BucketName)
}
if v.S3IngestionRoleArn != nil {
objectKey := object.Key("S3IngestionRoleArn")
objectKey.String(*v.S3IngestionRoleArn)
}
if v.S3Prefix != nil {
objectKey := object.Key("S3Prefix")
objectKey.String(*v.S3Prefix)
}
if v.ServerlessV2ScalingConfiguration != nil {
objectKey := object.Key("ServerlessV2ScalingConfiguration")
if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.SourceEngine != nil {
objectKey := object.Key("SourceEngine")
objectKey.String(*v.SourceEngine)
}
if v.SourceEngineVersion != nil {
objectKey := object.Key("SourceEngineVersion")
objectKey.String(*v.SourceEngineVersion)
}
if v.StorageEncrypted != nil {
objectKey := object.Key("StorageEncrypted")
objectKey.Boolean(*v.StorageEncrypted)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
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_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *RestoreDBClusterFromSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.AvailabilityZones != nil {
objectKey := object.Key("AvailabilityZones")
if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil {
return err
}
}
if v.BacktrackWindow != nil {
objectKey := object.Key("BacktrackWindow")
objectKey.Long(*v.BacktrackWindow)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DatabaseName != nil {
objectKey := object.Key("DatabaseName")
objectKey.String(*v.DatabaseName)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterInstanceClass != nil {
objectKey := object.Key("DBClusterInstanceClass")
objectKey.String(*v.DBClusterInstanceClass)
}
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineMode != nil {
objectKey := object.Key("EngineMode")
objectKey.String(*v.EngineMode)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.ScalingConfiguration != nil {
objectKey := object.Key("ScalingConfiguration")
if err := awsAwsquery_serializeDocumentScalingConfiguration(v.ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.ServerlessV2ScalingConfiguration != nil {
objectKey := object.Key("ServerlessV2ScalingConfiguration")
if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.SnapshotIdentifier != nil {
objectKey := object.Key("SnapshotIdentifier")
objectKey.String(*v.SnapshotIdentifier)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
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_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *RestoreDBClusterToPointInTimeInput, value query.Value) error {
object := value.Object()
_ = object
if v.BacktrackWindow != nil {
objectKey := object.Key("BacktrackWindow")
objectKey.Long(*v.BacktrackWindow)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
if v.DBClusterInstanceClass != nil {
objectKey := object.Key("DBClusterInstanceClass")
objectKey.String(*v.DBClusterInstanceClass)
}
if v.DBClusterParameterGroupName != nil {
objectKey := object.Key("DBClusterParameterGroupName")
objectKey.String(*v.DBClusterParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EngineMode != nil {
objectKey := object.Key("EngineMode")
objectKey.String(*v.EngineMode)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.RestoreToTime != nil {
objectKey := object.Key("RestoreToTime")
objectKey.String(smithytime.FormatDateTime(*v.RestoreToTime))
}
if v.RestoreType != nil {
objectKey := object.Key("RestoreType")
objectKey.String(*v.RestoreType)
}
if v.ScalingConfiguration != nil {
objectKey := object.Key("ScalingConfiguration")
if err := awsAwsquery_serializeDocumentScalingConfiguration(v.ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.ServerlessV2ScalingConfiguration != nil {
objectKey := object.Key("ServerlessV2ScalingConfiguration")
if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil {
return err
}
}
if v.SourceDBClusterIdentifier != nil {
objectKey := object.Key("SourceDBClusterIdentifier")
objectKey.String(*v.SourceDBClusterIdentifier)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.UseLatestRestorableTime {
objectKey := object.Key("UseLatestRestorableTime")
objectKey.Boolean(v.UseLatestRestorableTime)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRestoreDBInstanceFromDBSnapshotInput(v *RestoreDBInstanceFromDBSnapshotInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.BackupTarget != nil {
objectKey := object.Key("BackupTarget")
objectKey.String(*v.BackupTarget)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.CustomIamInstanceProfile != nil {
objectKey := object.Key("CustomIamInstanceProfile")
objectKey.String(*v.CustomIamInstanceProfile)
}
if v.DBClusterSnapshotIdentifier != nil {
objectKey := object.Key("DBClusterSnapshotIdentifier")
objectKey.String(*v.DBClusterSnapshotIdentifier)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBName != nil {
objectKey := object.Key("DBName")
objectKey.String(*v.DBName)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainAuthSecretArn != nil {
objectKey := object.Key("DomainAuthSecretArn")
objectKey.String(*v.DomainAuthSecretArn)
}
if v.DomainDnsIps != nil {
objectKey := object.Key("DomainDnsIps")
if err := awsAwsquery_serializeDocumentStringList(v.DomainDnsIps, objectKey); err != nil {
return err
}
}
if v.DomainFqdn != nil {
objectKey := object.Key("DomainFqdn")
objectKey.String(*v.DomainFqdn)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.DomainOu != nil {
objectKey := object.Key("DomainOu")
objectKey.String(*v.DomainOu)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableCustomerOwnedIp != nil {
objectKey := object.Key("EnableCustomerOwnedIp")
objectKey.Boolean(*v.EnableCustomerOwnedIp)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TdeCredentialArn != nil {
objectKey := object.Key("TdeCredentialArn")
objectKey.String(*v.TdeCredentialArn)
}
if v.TdeCredentialPassword != nil {
objectKey := object.Key("TdeCredentialPassword")
objectKey.String(*v.TdeCredentialPassword)
}
if v.UseDefaultProcessorFeatures != nil {
objectKey := object.Key("UseDefaultProcessorFeatures")
objectKey.Boolean(*v.UseDefaultProcessorFeatures)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRestoreDBInstanceFromS3Input(v *RestoreDBInstanceFromS3Input, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBName != nil {
objectKey := object.Key("DBName")
objectKey.String(*v.DBName)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBSecurityGroups != nil {
objectKey := object.Key("DBSecurityGroups")
if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroups, objectKey); err != nil {
return err
}
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.EnablePerformanceInsights != nil {
objectKey := object.Key("EnablePerformanceInsights")
objectKey.Boolean(*v.EnablePerformanceInsights)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.EngineVersion != nil {
objectKey := object.Key("EngineVersion")
objectKey.String(*v.EngineVersion)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
if v.ManageMasterUserPassword != nil {
objectKey := object.Key("ManageMasterUserPassword")
objectKey.Boolean(*v.ManageMasterUserPassword)
}
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.MasterUserSecretKmsKeyId != nil {
objectKey := object.Key("MasterUserSecretKmsKeyId")
objectKey.String(*v.MasterUserSecretKmsKeyId)
}
if v.MaxAllocatedStorage != nil {
objectKey := object.Key("MaxAllocatedStorage")
objectKey.Integer(*v.MaxAllocatedStorage)
}
if v.MonitoringInterval != nil {
objectKey := object.Key("MonitoringInterval")
objectKey.Integer(*v.MonitoringInterval)
}
if v.MonitoringRoleArn != nil {
objectKey := object.Key("MonitoringRoleArn")
objectKey.String(*v.MonitoringRoleArn)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.PerformanceInsightsKMSKeyId != nil {
objectKey := object.Key("PerformanceInsightsKMSKeyId")
objectKey.String(*v.PerformanceInsightsKMSKeyId)
}
if v.PerformanceInsightsRetentionPeriod != nil {
objectKey := object.Key("PerformanceInsightsRetentionPeriod")
objectKey.Integer(*v.PerformanceInsightsRetentionPeriod)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.PreferredBackupWindow != nil {
objectKey := object.Key("PreferredBackupWindow")
objectKey.String(*v.PreferredBackupWindow)
}
if v.PreferredMaintenanceWindow != nil {
objectKey := object.Key("PreferredMaintenanceWindow")
objectKey.String(*v.PreferredMaintenanceWindow)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.S3BucketName != nil {
objectKey := object.Key("S3BucketName")
objectKey.String(*v.S3BucketName)
}
if v.S3IngestionRoleArn != nil {
objectKey := object.Key("S3IngestionRoleArn")
objectKey.String(*v.S3IngestionRoleArn)
}
if v.S3Prefix != nil {
objectKey := object.Key("S3Prefix")
objectKey.String(*v.S3Prefix)
}
if v.SourceEngine != nil {
objectKey := object.Key("SourceEngine")
objectKey.String(*v.SourceEngine)
}
if v.SourceEngineVersion != nil {
objectKey := object.Key("SourceEngineVersion")
objectKey.String(*v.SourceEngineVersion)
}
if v.StorageEncrypted != nil {
objectKey := object.Key("StorageEncrypted")
objectKey.Boolean(*v.StorageEncrypted)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.UseDefaultProcessorFeatures != nil {
objectKey := object.Key("UseDefaultProcessorFeatures")
objectKey.Boolean(*v.UseDefaultProcessorFeatures)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRestoreDBInstanceToPointInTimeInput(v *RestoreDBInstanceToPointInTimeInput, value query.Value) error {
object := value.Object()
_ = object
if v.AllocatedStorage != nil {
objectKey := object.Key("AllocatedStorage")
objectKey.Integer(*v.AllocatedStorage)
}
if v.AutoMinorVersionUpgrade != nil {
objectKey := object.Key("AutoMinorVersionUpgrade")
objectKey.Boolean(*v.AutoMinorVersionUpgrade)
}
if v.AvailabilityZone != nil {
objectKey := object.Key("AvailabilityZone")
objectKey.String(*v.AvailabilityZone)
}
if v.BackupTarget != nil {
objectKey := object.Key("BackupTarget")
objectKey.String(*v.BackupTarget)
}
if v.CopyTagsToSnapshot != nil {
objectKey := object.Key("CopyTagsToSnapshot")
objectKey.Boolean(*v.CopyTagsToSnapshot)
}
if v.CustomIamInstanceProfile != nil {
objectKey := object.Key("CustomIamInstanceProfile")
objectKey.String(*v.CustomIamInstanceProfile)
}
if v.DBInstanceClass != nil {
objectKey := object.Key("DBInstanceClass")
objectKey.String(*v.DBInstanceClass)
}
if v.DBName != nil {
objectKey := object.Key("DBName")
objectKey.String(*v.DBName)
}
if v.DBParameterGroupName != nil {
objectKey := object.Key("DBParameterGroupName")
objectKey.String(*v.DBParameterGroupName)
}
if v.DBSubnetGroupName != nil {
objectKey := object.Key("DBSubnetGroupName")
objectKey.String(*v.DBSubnetGroupName)
}
if v.DeletionProtection != nil {
objectKey := object.Key("DeletionProtection")
objectKey.Boolean(*v.DeletionProtection)
}
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
if v.DomainAuthSecretArn != nil {
objectKey := object.Key("DomainAuthSecretArn")
objectKey.String(*v.DomainAuthSecretArn)
}
if v.DomainDnsIps != nil {
objectKey := object.Key("DomainDnsIps")
if err := awsAwsquery_serializeDocumentStringList(v.DomainDnsIps, objectKey); err != nil {
return err
}
}
if v.DomainFqdn != nil {
objectKey := object.Key("DomainFqdn")
objectKey.String(*v.DomainFqdn)
}
if v.DomainIAMRoleName != nil {
objectKey := object.Key("DomainIAMRoleName")
objectKey.String(*v.DomainIAMRoleName)
}
if v.DomainOu != nil {
objectKey := object.Key("DomainOu")
objectKey.String(*v.DomainOu)
}
if v.EnableCloudwatchLogsExports != nil {
objectKey := object.Key("EnableCloudwatchLogsExports")
if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil {
return err
}
}
if v.EnableCustomerOwnedIp != nil {
objectKey := object.Key("EnableCustomerOwnedIp")
objectKey.Boolean(*v.EnableCustomerOwnedIp)
}
if v.EnableIAMDatabaseAuthentication != nil {
objectKey := object.Key("EnableIAMDatabaseAuthentication")
objectKey.Boolean(*v.EnableIAMDatabaseAuthentication)
}
if v.Engine != nil {
objectKey := object.Key("Engine")
objectKey.String(*v.Engine)
}
if v.Iops != nil {
objectKey := object.Key("Iops")
objectKey.Integer(*v.Iops)
}
if v.LicenseModel != nil {
objectKey := object.Key("LicenseModel")
objectKey.String(*v.LicenseModel)
}
if v.MaxAllocatedStorage != nil {
objectKey := object.Key("MaxAllocatedStorage")
objectKey.Integer(*v.MaxAllocatedStorage)
}
if v.MultiAZ != nil {
objectKey := object.Key("MultiAZ")
objectKey.Boolean(*v.MultiAZ)
}
if v.NetworkType != nil {
objectKey := object.Key("NetworkType")
objectKey.String(*v.NetworkType)
}
if v.OptionGroupName != nil {
objectKey := object.Key("OptionGroupName")
objectKey.String(*v.OptionGroupName)
}
if v.Port != nil {
objectKey := object.Key("Port")
objectKey.Integer(*v.Port)
}
if v.ProcessorFeatures != nil {
objectKey := object.Key("ProcessorFeatures")
if err := awsAwsquery_serializeDocumentProcessorFeatureList(v.ProcessorFeatures, objectKey); err != nil {
return err
}
}
if v.PubliclyAccessible != nil {
objectKey := object.Key("PubliclyAccessible")
objectKey.Boolean(*v.PubliclyAccessible)
}
if v.RestoreTime != nil {
objectKey := object.Key("RestoreTime")
objectKey.String(smithytime.FormatDateTime(*v.RestoreTime))
}
if v.SourceDBInstanceAutomatedBackupsArn != nil {
objectKey := object.Key("SourceDBInstanceAutomatedBackupsArn")
objectKey.String(*v.SourceDBInstanceAutomatedBackupsArn)
}
if v.SourceDBInstanceIdentifier != nil {
objectKey := object.Key("SourceDBInstanceIdentifier")
objectKey.String(*v.SourceDBInstanceIdentifier)
}
if v.SourceDbiResourceId != nil {
objectKey := object.Key("SourceDbiResourceId")
objectKey.String(*v.SourceDbiResourceId)
}
if v.StorageThroughput != nil {
objectKey := object.Key("StorageThroughput")
objectKey.Integer(*v.StorageThroughput)
}
if v.StorageType != nil {
objectKey := object.Key("StorageType")
objectKey.String(*v.StorageType)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.TargetDBInstanceIdentifier != nil {
objectKey := object.Key("TargetDBInstanceIdentifier")
objectKey.String(*v.TargetDBInstanceIdentifier)
}
if v.TdeCredentialArn != nil {
objectKey := object.Key("TdeCredentialArn")
objectKey.String(*v.TdeCredentialArn)
}
if v.TdeCredentialPassword != nil {
objectKey := object.Key("TdeCredentialPassword")
objectKey.String(*v.TdeCredentialPassword)
}
if v.UseDefaultProcessorFeatures != nil {
objectKey := object.Key("UseDefaultProcessorFeatures")
objectKey.Boolean(*v.UseDefaultProcessorFeatures)
}
if v.UseLatestRestorableTime {
objectKey := object.Key("UseLatestRestorableTime")
objectKey.Boolean(v.UseLatestRestorableTime)
}
if v.VpcSecurityGroupIds != nil {
objectKey := object.Key("VpcSecurityGroupIds")
if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentRevokeDBSecurityGroupIngressInput(v *RevokeDBSecurityGroupIngressInput, value query.Value) error {
object := value.Object()
_ = object
if v.CIDRIP != nil {
objectKey := object.Key("CIDRIP")
objectKey.String(*v.CIDRIP)
}
if v.DBSecurityGroupName != nil {
objectKey := object.Key("DBSecurityGroupName")
objectKey.String(*v.DBSecurityGroupName)
}
if v.EC2SecurityGroupId != nil {
objectKey := object.Key("EC2SecurityGroupId")
objectKey.String(*v.EC2SecurityGroupId)
}
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_serializeOpDocumentStartActivityStreamInput(v *StartActivityStreamInput, value query.Value) error {
object := value.Object()
_ = object
if v.ApplyImmediately != nil {
objectKey := object.Key("ApplyImmediately")
objectKey.Boolean(*v.ApplyImmediately)
}
if v.EngineNativeAuditFieldsIncluded != nil {
objectKey := object.Key("EngineNativeAuditFieldsIncluded")
objectKey.Boolean(*v.EngineNativeAuditFieldsIncluded)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if len(v.Mode) > 0 {
objectKey := object.Key("Mode")
objectKey.String(string(v.Mode))
}
if v.ResourceArn != nil {
objectKey := object.Key("ResourceArn")
objectKey.String(*v.ResourceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentStartDBClusterInput(v *StartDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentStartDBInstanceAutomatedBackupsReplicationInput(v *StartDBInstanceAutomatedBackupsReplicationInput, value query.Value) error {
object := value.Object()
_ = object
if v.BackupRetentionPeriod != nil {
objectKey := object.Key("BackupRetentionPeriod")
objectKey.Integer(*v.BackupRetentionPeriod)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.PreSignedUrl != nil {
objectKey := object.Key("PreSignedUrl")
objectKey.String(*v.PreSignedUrl)
}
if v.SourceDBInstanceArn != nil {
objectKey := object.Key("SourceDBInstanceArn")
objectKey.String(*v.SourceDBInstanceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentStartDBInstanceInput(v *StartDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentStartExportTaskInput(v *StartExportTaskInput, value query.Value) error {
object := value.Object()
_ = object
if v.ExportOnly != nil {
objectKey := object.Key("ExportOnly")
if err := awsAwsquery_serializeDocumentStringList(v.ExportOnly, objectKey); err != nil {
return err
}
}
if v.ExportTaskIdentifier != nil {
objectKey := object.Key("ExportTaskIdentifier")
objectKey.String(*v.ExportTaskIdentifier)
}
if v.IamRoleArn != nil {
objectKey := object.Key("IamRoleArn")
objectKey.String(*v.IamRoleArn)
}
if v.KmsKeyId != nil {
objectKey := object.Key("KmsKeyId")
objectKey.String(*v.KmsKeyId)
}
if v.S3BucketName != nil {
objectKey := object.Key("S3BucketName")
objectKey.String(*v.S3BucketName)
}
if v.S3Prefix != nil {
objectKey := object.Key("S3Prefix")
objectKey.String(*v.S3Prefix)
}
if v.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentStopActivityStreamInput(v *StopActivityStreamInput, value query.Value) error {
object := value.Object()
_ = object
if v.ApplyImmediately != nil {
objectKey := object.Key("ApplyImmediately")
objectKey.Boolean(*v.ApplyImmediately)
}
if v.ResourceArn != nil {
objectKey := object.Key("ResourceArn")
objectKey.String(*v.ResourceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentStopDBClusterInput(v *StopDBClusterInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBClusterIdentifier != nil {
objectKey := object.Key("DBClusterIdentifier")
objectKey.String(*v.DBClusterIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentStopDBInstanceAutomatedBackupsReplicationInput(v *StopDBInstanceAutomatedBackupsReplicationInput, value query.Value) error {
object := value.Object()
_ = object
if v.SourceDBInstanceArn != nil {
objectKey := object.Key("SourceDBInstanceArn")
objectKey.String(*v.SourceDBInstanceArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentStopDBInstanceInput(v *StopDBInstanceInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
if v.DBSnapshotIdentifier != nil {
objectKey := object.Key("DBSnapshotIdentifier")
objectKey.String(*v.DBSnapshotIdentifier)
}
return nil
}
func awsAwsquery_serializeOpDocumentSwitchoverBlueGreenDeploymentInput(v *SwitchoverBlueGreenDeploymentInput, value query.Value) error {
object := value.Object()
_ = object
if v.BlueGreenDeploymentIdentifier != nil {
objectKey := object.Key("BlueGreenDeploymentIdentifier")
objectKey.String(*v.BlueGreenDeploymentIdentifier)
}
if v.SwitchoverTimeout != nil {
objectKey := object.Key("SwitchoverTimeout")
objectKey.Integer(*v.SwitchoverTimeout)
}
return nil
}
func awsAwsquery_serializeOpDocumentSwitchoverReadReplicaInput(v *SwitchoverReadReplicaInput, value query.Value) error {
object := value.Object()
_ = object
if v.DBInstanceIdentifier != nil {
objectKey := object.Key("DBInstanceIdentifier")
objectKey.String(*v.DBInstanceIdentifier)
}
return nil
}
| 15,739 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rds
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/rds/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpAddRoleToDBCluster struct {
}
func (*validateOpAddRoleToDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAddRoleToDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AddRoleToDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAddRoleToDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAddRoleToDBInstance struct {
}
func (*validateOpAddRoleToDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAddRoleToDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AddRoleToDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAddRoleToDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAddSourceIdentifierToSubscription struct {
}
func (*validateOpAddSourceIdentifierToSubscription) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAddSourceIdentifierToSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AddSourceIdentifierToSubscriptionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAddSourceIdentifierToSubscriptionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAddTagsToResource struct {
}
func (*validateOpAddTagsToResource) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAddTagsToResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AddTagsToResourceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAddTagsToResourceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpApplyPendingMaintenanceAction struct {
}
func (*validateOpApplyPendingMaintenanceAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpApplyPendingMaintenanceAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ApplyPendingMaintenanceActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpApplyPendingMaintenanceActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAuthorizeDBSecurityGroupIngress struct {
}
func (*validateOpAuthorizeDBSecurityGroupIngress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAuthorizeDBSecurityGroupIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AuthorizeDBSecurityGroupIngressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAuthorizeDBSecurityGroupIngressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpBacktrackDBCluster struct {
}
func (*validateOpBacktrackDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpBacktrackDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*BacktrackDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpBacktrackDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelExportTask struct {
}
func (*validateOpCancelExportTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelExportTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelExportTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyDBClusterParameterGroup struct {
}
func (*validateOpCopyDBClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyDBClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyDBClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyDBClusterSnapshot struct {
}
func (*validateOpCopyDBClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyDBClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyDBClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyDBParameterGroup struct {
}
func (*validateOpCopyDBParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyDBParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyDBParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyDBSnapshot struct {
}
func (*validateOpCopyDBSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyDBSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyDBSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyDBSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCopyOptionGroup struct {
}
func (*validateOpCopyOptionGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCopyOptionGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CopyOptionGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCopyOptionGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateBlueGreenDeployment struct {
}
func (*validateOpCreateBlueGreenDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateBlueGreenDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateBlueGreenDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateBlueGreenDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCustomDBEngineVersion struct {
}
func (*validateOpCreateCustomDBEngineVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCustomDBEngineVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCustomDBEngineVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCustomDBEngineVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBClusterEndpoint struct {
}
func (*validateOpCreateDBClusterEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBClusterEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBClusterEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBCluster struct {
}
func (*validateOpCreateDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBClusterParameterGroup struct {
}
func (*validateOpCreateDBClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBClusterSnapshot struct {
}
func (*validateOpCreateDBClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBInstance struct {
}
func (*validateOpCreateDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBInstanceReadReplica struct {
}
func (*validateOpCreateDBInstanceReadReplica) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBInstanceReadReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBInstanceReadReplicaInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBInstanceReadReplicaInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBParameterGroup struct {
}
func (*validateOpCreateDBParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBProxyEndpoint struct {
}
func (*validateOpCreateDBProxyEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBProxyEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBProxyEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBProxyEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBProxy struct {
}
func (*validateOpCreateDBProxy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBProxyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBProxyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBSecurityGroup struct {
}
func (*validateOpCreateDBSecurityGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBSecurityGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBSecurityGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBSnapshot struct {
}
func (*validateOpCreateDBSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDBSubnetGroup struct {
}
func (*validateOpCreateDBSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDBSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDBSubnetGroupInput(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 validateOpCreateOptionGroup struct {
}
func (*validateOpCreateOptionGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateOptionGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateOptionGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateOptionGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteBlueGreenDeployment struct {
}
func (*validateOpDeleteBlueGreenDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteBlueGreenDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteBlueGreenDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteBlueGreenDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCustomDBEngineVersion struct {
}
func (*validateOpDeleteCustomDBEngineVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCustomDBEngineVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCustomDBEngineVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCustomDBEngineVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBClusterEndpoint struct {
}
func (*validateOpDeleteDBClusterEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBClusterEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBClusterEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBCluster struct {
}
func (*validateOpDeleteDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBClusterParameterGroup struct {
}
func (*validateOpDeleteDBClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBClusterSnapshot struct {
}
func (*validateOpDeleteDBClusterSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBClusterSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBClusterSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBInstance struct {
}
func (*validateOpDeleteDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBParameterGroup struct {
}
func (*validateOpDeleteDBParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBProxyEndpoint struct {
}
func (*validateOpDeleteDBProxyEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBProxyEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBProxyEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBProxyEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBProxy struct {
}
func (*validateOpDeleteDBProxy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBProxyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBProxyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBSecurityGroup struct {
}
func (*validateOpDeleteDBSecurityGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBSecurityGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBSecurityGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBSnapshot struct {
}
func (*validateOpDeleteDBSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDBSubnetGroup struct {
}
func (*validateOpDeleteDBSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDBSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDBSubnetGroupInput(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 validateOpDeleteGlobalCluster struct {
}
func (*validateOpDeleteGlobalCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteGlobalClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteGlobalClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteOptionGroup struct {
}
func (*validateOpDeleteOptionGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteOptionGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteOptionGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteOptionGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeregisterDBProxyTargets struct {
}
func (*validateOpDeregisterDBProxyTargets) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeregisterDBProxyTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeregisterDBProxyTargetsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeregisterDBProxyTargetsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeBlueGreenDeployments struct {
}
func (*validateOpDescribeBlueGreenDeployments) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeBlueGreenDeployments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeBlueGreenDeploymentsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeBlueGreenDeploymentsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeCertificates struct {
}
func (*validateOpDescribeCertificates) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeCertificates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeCertificatesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeCertificatesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterBacktracks struct {
}
func (*validateOpDescribeDBClusterBacktracks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterBacktracks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterBacktracksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterBacktracksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterEndpoints struct {
}
func (*validateOpDescribeDBClusterEndpoints) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterEndpointsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterEndpointsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterParameterGroups struct {
}
func (*validateOpDescribeDBClusterParameterGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterParameterGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterParameterGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterParameterGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterParameters struct {
}
func (*validateOpDescribeDBClusterParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusters struct {
}
func (*validateOpDescribeDBClusters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClustersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClustersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterSnapshotAttributes struct {
}
func (*validateOpDescribeDBClusterSnapshotAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterSnapshotAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterSnapshotAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterSnapshotAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBClusterSnapshots struct {
}
func (*validateOpDescribeDBClusterSnapshots) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBClusterSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBClusterSnapshotsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBClusterSnapshotsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBEngineVersions struct {
}
func (*validateOpDescribeDBEngineVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBEngineVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBEngineVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBEngineVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBInstanceAutomatedBackups struct {
}
func (*validateOpDescribeDBInstanceAutomatedBackups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBInstanceAutomatedBackups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBInstanceAutomatedBackupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBInstanceAutomatedBackupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBInstances struct {
}
func (*validateOpDescribeDBInstances) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBInstancesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBInstancesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBLogFiles struct {
}
func (*validateOpDescribeDBLogFiles) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBLogFiles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBLogFilesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBLogFilesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBParameterGroups struct {
}
func (*validateOpDescribeDBParameterGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBParameterGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBParameterGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBParameterGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBParameters struct {
}
func (*validateOpDescribeDBParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBProxies struct {
}
func (*validateOpDescribeDBProxies) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBProxies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBProxiesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBProxiesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBProxyEndpoints struct {
}
func (*validateOpDescribeDBProxyEndpoints) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBProxyEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBProxyEndpointsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBProxyEndpointsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBProxyTargetGroups struct {
}
func (*validateOpDescribeDBProxyTargetGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBProxyTargetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBProxyTargetGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBProxyTargetGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBProxyTargets struct {
}
func (*validateOpDescribeDBProxyTargets) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBProxyTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBProxyTargetsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBProxyTargetsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBSecurityGroups struct {
}
func (*validateOpDescribeDBSecurityGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBSecurityGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBSecurityGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBSecurityGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBSnapshotAttributes struct {
}
func (*validateOpDescribeDBSnapshotAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBSnapshotAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBSnapshotAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBSnapshotAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBSnapshots struct {
}
func (*validateOpDescribeDBSnapshots) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBSnapshotsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBSnapshotsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDBSubnetGroups struct {
}
func (*validateOpDescribeDBSubnetGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDBSubnetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDBSubnetGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDBSubnetGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeEngineDefaultClusterParameters struct {
}
func (*validateOpDescribeEngineDefaultClusterParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeEngineDefaultClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeEngineDefaultClusterParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeEngineDefaultClusterParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeEngineDefaultParameters struct {
}
func (*validateOpDescribeEngineDefaultParameters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeEngineDefaultParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeEngineDefaultParametersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeEngineDefaultParametersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeEventCategories struct {
}
func (*validateOpDescribeEventCategories) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeEventCategories) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeEventCategoriesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeEventCategoriesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeEvents struct {
}
func (*validateOpDescribeEvents) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeEventsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeEventsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeEventSubscriptions struct {
}
func (*validateOpDescribeEventSubscriptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeEventSubscriptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeEventSubscriptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeEventSubscriptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeExportTasks struct {
}
func (*validateOpDescribeExportTasks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeExportTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeExportTasksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeExportTasksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeGlobalClusters struct {
}
func (*validateOpDescribeGlobalClusters) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeGlobalClusters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeGlobalClustersInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeGlobalClustersInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeOptionGroupOptions struct {
}
func (*validateOpDescribeOptionGroupOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeOptionGroupOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeOptionGroupOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeOptionGroupOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeOptionGroups struct {
}
func (*validateOpDescribeOptionGroups) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeOptionGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeOptionGroupsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeOptionGroupsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeOrderableDBInstanceOptions struct {
}
func (*validateOpDescribeOrderableDBInstanceOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeOrderableDBInstanceOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeOrderableDBInstanceOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeOrderableDBInstanceOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribePendingMaintenanceActions struct {
}
func (*validateOpDescribePendingMaintenanceActions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribePendingMaintenanceActions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribePendingMaintenanceActionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribePendingMaintenanceActionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeReservedDBInstances struct {
}
func (*validateOpDescribeReservedDBInstances) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeReservedDBInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeReservedDBInstancesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeReservedDBInstancesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeReservedDBInstancesOfferings struct {
}
func (*validateOpDescribeReservedDBInstancesOfferings) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeReservedDBInstancesOfferings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeReservedDBInstancesOfferingsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeReservedDBInstancesOfferingsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeSourceRegions struct {
}
func (*validateOpDescribeSourceRegions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeSourceRegions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeSourceRegionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeSourceRegionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeValidDBInstanceModifications struct {
}
func (*validateOpDescribeValidDBInstanceModifications) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeValidDBInstanceModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeValidDBInstanceModificationsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeValidDBInstanceModificationsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDownloadDBLogFilePortion struct {
}
func (*validateOpDownloadDBLogFilePortion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDownloadDBLogFilePortion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DownloadDBLogFilePortionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDownloadDBLogFilePortionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpFailoverDBCluster struct {
}
func (*validateOpFailoverDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpFailoverDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*FailoverDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpFailoverDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpFailoverGlobalCluster struct {
}
func (*validateOpFailoverGlobalCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpFailoverGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*FailoverGlobalClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpFailoverGlobalClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTagsForResource struct {
}
func (*validateOpListTagsForResource) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTagsForResourceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTagsForResourceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyCurrentDBClusterCapacity struct {
}
func (*validateOpModifyCurrentDBClusterCapacity) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyCurrentDBClusterCapacity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyCurrentDBClusterCapacityInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyCurrentDBClusterCapacityInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyCustomDBEngineVersion struct {
}
func (*validateOpModifyCustomDBEngineVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyCustomDBEngineVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyCustomDBEngineVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyCustomDBEngineVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBClusterEndpoint struct {
}
func (*validateOpModifyDBClusterEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBClusterEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBClusterEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBCluster struct {
}
func (*validateOpModifyDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBClusterParameterGroup struct {
}
func (*validateOpModifyDBClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBClusterSnapshotAttribute struct {
}
func (*validateOpModifyDBClusterSnapshotAttribute) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBClusterSnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBClusterSnapshotAttributeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBClusterSnapshotAttributeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBInstance struct {
}
func (*validateOpModifyDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBParameterGroup struct {
}
func (*validateOpModifyDBParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBProxyEndpoint struct {
}
func (*validateOpModifyDBProxyEndpoint) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBProxyEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBProxyEndpointInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBProxyEndpointInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBProxy struct {
}
func (*validateOpModifyDBProxy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBProxyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBProxyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBProxyTargetGroup struct {
}
func (*validateOpModifyDBProxyTargetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBProxyTargetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBProxyTargetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBProxyTargetGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBSnapshotAttribute struct {
}
func (*validateOpModifyDBSnapshotAttribute) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBSnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBSnapshotAttributeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBSnapshotAttributeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBSnapshot struct {
}
func (*validateOpModifyDBSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpModifyDBSubnetGroup struct {
}
func (*validateOpModifyDBSubnetGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyDBSubnetGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyDBSubnetGroupInput(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 validateOpModifyOptionGroup struct {
}
func (*validateOpModifyOptionGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpModifyOptionGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ModifyOptionGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpModifyOptionGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPromoteReadReplicaDBCluster struct {
}
func (*validateOpPromoteReadReplicaDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPromoteReadReplicaDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PromoteReadReplicaDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPromoteReadReplicaDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPromoteReadReplica struct {
}
func (*validateOpPromoteReadReplica) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPromoteReadReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PromoteReadReplicaInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPromoteReadReplicaInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPurchaseReservedDBInstancesOffering struct {
}
func (*validateOpPurchaseReservedDBInstancesOffering) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPurchaseReservedDBInstancesOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PurchaseReservedDBInstancesOfferingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPurchaseReservedDBInstancesOfferingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRebootDBCluster struct {
}
func (*validateOpRebootDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRebootDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RebootDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRebootDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRebootDBInstance struct {
}
func (*validateOpRebootDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRebootDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RebootDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRebootDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRegisterDBProxyTargets struct {
}
func (*validateOpRegisterDBProxyTargets) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRegisterDBProxyTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RegisterDBProxyTargetsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRegisterDBProxyTargetsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRemoveRoleFromDBCluster struct {
}
func (*validateOpRemoveRoleFromDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRemoveRoleFromDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RemoveRoleFromDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRemoveRoleFromDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRemoveRoleFromDBInstance struct {
}
func (*validateOpRemoveRoleFromDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRemoveRoleFromDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RemoveRoleFromDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRemoveRoleFromDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRemoveSourceIdentifierFromSubscription struct {
}
func (*validateOpRemoveSourceIdentifierFromSubscription) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRemoveSourceIdentifierFromSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RemoveSourceIdentifierFromSubscriptionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRemoveSourceIdentifierFromSubscriptionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRemoveTagsFromResource struct {
}
func (*validateOpRemoveTagsFromResource) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRemoveTagsFromResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RemoveTagsFromResourceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRemoveTagsFromResourceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpResetDBClusterParameterGroup struct {
}
func (*validateOpResetDBClusterParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpResetDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ResetDBClusterParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpResetDBClusterParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpResetDBParameterGroup struct {
}
func (*validateOpResetDBParameterGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpResetDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ResetDBParameterGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpResetDBParameterGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBClusterFromS3 struct {
}
func (*validateOpRestoreDBClusterFromS3) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBClusterFromS3) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBClusterFromS3Input)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBClusterFromS3Input(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBClusterFromSnapshot struct {
}
func (*validateOpRestoreDBClusterFromSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBClusterFromSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBClusterFromSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBClusterFromSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBClusterToPointInTime struct {
}
func (*validateOpRestoreDBClusterToPointInTime) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBClusterToPointInTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBClusterToPointInTimeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBClusterToPointInTimeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBInstanceFromDBSnapshot struct {
}
func (*validateOpRestoreDBInstanceFromDBSnapshot) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBInstanceFromDBSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBInstanceFromDBSnapshotInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBInstanceFromDBSnapshotInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBInstanceFromS3 struct {
}
func (*validateOpRestoreDBInstanceFromS3) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBInstanceFromS3) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBInstanceFromS3Input)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBInstanceFromS3Input(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRestoreDBInstanceToPointInTime struct {
}
func (*validateOpRestoreDBInstanceToPointInTime) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRestoreDBInstanceToPointInTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RestoreDBInstanceToPointInTimeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRestoreDBInstanceToPointInTimeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRevokeDBSecurityGroupIngress struct {
}
func (*validateOpRevokeDBSecurityGroupIngress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRevokeDBSecurityGroupIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RevokeDBSecurityGroupIngressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRevokeDBSecurityGroupIngressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartActivityStream struct {
}
func (*validateOpStartActivityStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartActivityStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartActivityStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartActivityStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartDBCluster struct {
}
func (*validateOpStartDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartDBInstanceAutomatedBackupsReplication struct {
}
func (*validateOpStartDBInstanceAutomatedBackupsReplication) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartDBInstanceAutomatedBackupsReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartDBInstanceAutomatedBackupsReplicationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartDBInstanceAutomatedBackupsReplicationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartDBInstance struct {
}
func (*validateOpStartDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartExportTask struct {
}
func (*validateOpStartExportTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartExportTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartExportTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStopActivityStream struct {
}
func (*validateOpStopActivityStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStopActivityStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StopActivityStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStopActivityStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStopDBCluster struct {
}
func (*validateOpStopDBCluster) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStopDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StopDBClusterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStopDBClusterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStopDBInstanceAutomatedBackupsReplication struct {
}
func (*validateOpStopDBInstanceAutomatedBackupsReplication) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStopDBInstanceAutomatedBackupsReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StopDBInstanceAutomatedBackupsReplicationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStopDBInstanceAutomatedBackupsReplicationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStopDBInstance struct {
}
func (*validateOpStopDBInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStopDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StopDBInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStopDBInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSwitchoverBlueGreenDeployment struct {
}
func (*validateOpSwitchoverBlueGreenDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSwitchoverBlueGreenDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SwitchoverBlueGreenDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSwitchoverBlueGreenDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSwitchoverReadReplica struct {
}
func (*validateOpSwitchoverReadReplica) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSwitchoverReadReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SwitchoverReadReplicaInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSwitchoverReadReplicaInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpAddRoleToDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddRoleToDBCluster{}, middleware.After)
}
func addOpAddRoleToDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddRoleToDBInstance{}, middleware.After)
}
func addOpAddSourceIdentifierToSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddSourceIdentifierToSubscription{}, middleware.After)
}
func addOpAddTagsToResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAddTagsToResource{}, middleware.After)
}
func addOpApplyPendingMaintenanceActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpApplyPendingMaintenanceAction{}, middleware.After)
}
func addOpAuthorizeDBSecurityGroupIngressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAuthorizeDBSecurityGroupIngress{}, middleware.After)
}
func addOpBacktrackDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpBacktrackDBCluster{}, middleware.After)
}
func addOpCancelExportTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelExportTask{}, middleware.After)
}
func addOpCopyDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyDBClusterParameterGroup{}, middleware.After)
}
func addOpCopyDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyDBClusterSnapshot{}, middleware.After)
}
func addOpCopyDBParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyDBParameterGroup{}, middleware.After)
}
func addOpCopyDBSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyDBSnapshot{}, middleware.After)
}
func addOpCopyOptionGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCopyOptionGroup{}, middleware.After)
}
func addOpCreateBlueGreenDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateBlueGreenDeployment{}, middleware.After)
}
func addOpCreateCustomDBEngineVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCustomDBEngineVersion{}, middleware.After)
}
func addOpCreateDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBClusterEndpoint{}, middleware.After)
}
func addOpCreateDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBCluster{}, middleware.After)
}
func addOpCreateDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBClusterParameterGroup{}, middleware.After)
}
func addOpCreateDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBClusterSnapshot{}, middleware.After)
}
func addOpCreateDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBInstance{}, middleware.After)
}
func addOpCreateDBInstanceReadReplicaValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBInstanceReadReplica{}, middleware.After)
}
func addOpCreateDBParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBParameterGroup{}, middleware.After)
}
func addOpCreateDBProxyEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBProxyEndpoint{}, middleware.After)
}
func addOpCreateDBProxyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBProxy{}, middleware.After)
}
func addOpCreateDBSecurityGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBSecurityGroup{}, middleware.After)
}
func addOpCreateDBSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBSnapshot{}, middleware.After)
}
func addOpCreateDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDBSubnetGroup{}, middleware.After)
}
func addOpCreateEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEventSubscription{}, middleware.After)
}
func addOpCreateOptionGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateOptionGroup{}, middleware.After)
}
func addOpDeleteBlueGreenDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteBlueGreenDeployment{}, middleware.After)
}
func addOpDeleteCustomDBEngineVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCustomDBEngineVersion{}, middleware.After)
}
func addOpDeleteDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBClusterEndpoint{}, middleware.After)
}
func addOpDeleteDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBCluster{}, middleware.After)
}
func addOpDeleteDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBClusterParameterGroup{}, middleware.After)
}
func addOpDeleteDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBClusterSnapshot{}, middleware.After)
}
func addOpDeleteDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBInstance{}, middleware.After)
}
func addOpDeleteDBParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBParameterGroup{}, middleware.After)
}
func addOpDeleteDBProxyEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBProxyEndpoint{}, middleware.After)
}
func addOpDeleteDBProxyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBProxy{}, middleware.After)
}
func addOpDeleteDBSecurityGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBSecurityGroup{}, middleware.After)
}
func addOpDeleteDBSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBSnapshot{}, middleware.After)
}
func addOpDeleteDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDBSubnetGroup{}, middleware.After)
}
func addOpDeleteEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEventSubscription{}, middleware.After)
}
func addOpDeleteGlobalClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteGlobalCluster{}, middleware.After)
}
func addOpDeleteOptionGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteOptionGroup{}, middleware.After)
}
func addOpDeregisterDBProxyTargetsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeregisterDBProxyTargets{}, middleware.After)
}
func addOpDescribeBlueGreenDeploymentsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeBlueGreenDeployments{}, middleware.After)
}
func addOpDescribeCertificatesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeCertificates{}, middleware.After)
}
func addOpDescribeDBClusterBacktracksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterBacktracks{}, middleware.After)
}
func addOpDescribeDBClusterEndpointsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterEndpoints{}, middleware.After)
}
func addOpDescribeDBClusterParameterGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterParameterGroups{}, middleware.After)
}
func addOpDescribeDBClusterParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterParameters{}, middleware.After)
}
func addOpDescribeDBClustersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusters{}, middleware.After)
}
func addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterSnapshotAttributes{}, middleware.After)
}
func addOpDescribeDBClusterSnapshotsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBClusterSnapshots{}, middleware.After)
}
func addOpDescribeDBEngineVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBEngineVersions{}, middleware.After)
}
func addOpDescribeDBInstanceAutomatedBackupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBInstanceAutomatedBackups{}, middleware.After)
}
func addOpDescribeDBInstancesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBInstances{}, middleware.After)
}
func addOpDescribeDBLogFilesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBLogFiles{}, middleware.After)
}
func addOpDescribeDBParameterGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBParameterGroups{}, middleware.After)
}
func addOpDescribeDBParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBParameters{}, middleware.After)
}
func addOpDescribeDBProxiesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBProxies{}, middleware.After)
}
func addOpDescribeDBProxyEndpointsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBProxyEndpoints{}, middleware.After)
}
func addOpDescribeDBProxyTargetGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBProxyTargetGroups{}, middleware.After)
}
func addOpDescribeDBProxyTargetsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBProxyTargets{}, middleware.After)
}
func addOpDescribeDBSecurityGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBSecurityGroups{}, middleware.After)
}
func addOpDescribeDBSnapshotAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBSnapshotAttributes{}, middleware.After)
}
func addOpDescribeDBSnapshotsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBSnapshots{}, middleware.After)
}
func addOpDescribeDBSubnetGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDBSubnetGroups{}, middleware.After)
}
func addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeEngineDefaultClusterParameters{}, middleware.After)
}
func addOpDescribeEngineDefaultParametersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeEngineDefaultParameters{}, middleware.After)
}
func addOpDescribeEventCategoriesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeEventCategories{}, middleware.After)
}
func addOpDescribeEventsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeEvents{}, middleware.After)
}
func addOpDescribeEventSubscriptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeEventSubscriptions{}, middleware.After)
}
func addOpDescribeExportTasksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeExportTasks{}, middleware.After)
}
func addOpDescribeGlobalClustersValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeGlobalClusters{}, middleware.After)
}
func addOpDescribeOptionGroupOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeOptionGroupOptions{}, middleware.After)
}
func addOpDescribeOptionGroupsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeOptionGroups{}, middleware.After)
}
func addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeOrderableDBInstanceOptions{}, middleware.After)
}
func addOpDescribePendingMaintenanceActionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribePendingMaintenanceActions{}, middleware.After)
}
func addOpDescribeReservedDBInstancesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeReservedDBInstances{}, middleware.After)
}
func addOpDescribeReservedDBInstancesOfferingsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeReservedDBInstancesOfferings{}, middleware.After)
}
func addOpDescribeSourceRegionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeSourceRegions{}, middleware.After)
}
func addOpDescribeValidDBInstanceModificationsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeValidDBInstanceModifications{}, middleware.After)
}
func addOpDownloadDBLogFilePortionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDownloadDBLogFilePortion{}, middleware.After)
}
func addOpFailoverDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpFailoverDBCluster{}, middleware.After)
}
func addOpFailoverGlobalClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpFailoverGlobalCluster{}, middleware.After)
}
func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
}
func addOpModifyCurrentDBClusterCapacityValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyCurrentDBClusterCapacity{}, middleware.After)
}
func addOpModifyCustomDBEngineVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyCustomDBEngineVersion{}, middleware.After)
}
func addOpModifyDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBClusterEndpoint{}, middleware.After)
}
func addOpModifyDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBCluster{}, middleware.After)
}
func addOpModifyDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBClusterParameterGroup{}, middleware.After)
}
func addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBClusterSnapshotAttribute{}, middleware.After)
}
func addOpModifyDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBInstance{}, middleware.After)
}
func addOpModifyDBParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBParameterGroup{}, middleware.After)
}
func addOpModifyDBProxyEndpointValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBProxyEndpoint{}, middleware.After)
}
func addOpModifyDBProxyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBProxy{}, middleware.After)
}
func addOpModifyDBProxyTargetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBProxyTargetGroup{}, middleware.After)
}
func addOpModifyDBSnapshotAttributeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBSnapshotAttribute{}, middleware.After)
}
func addOpModifyDBSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBSnapshot{}, middleware.After)
}
func addOpModifyDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyDBSubnetGroup{}, middleware.After)
}
func addOpModifyEventSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyEventSubscription{}, middleware.After)
}
func addOpModifyOptionGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpModifyOptionGroup{}, middleware.After)
}
func addOpPromoteReadReplicaDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPromoteReadReplicaDBCluster{}, middleware.After)
}
func addOpPromoteReadReplicaValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPromoteReadReplica{}, middleware.After)
}
func addOpPurchaseReservedDBInstancesOfferingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPurchaseReservedDBInstancesOffering{}, middleware.After)
}
func addOpRebootDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRebootDBCluster{}, middleware.After)
}
func addOpRebootDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRebootDBInstance{}, middleware.After)
}
func addOpRegisterDBProxyTargetsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRegisterDBProxyTargets{}, middleware.After)
}
func addOpRemoveRoleFromDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRemoveRoleFromDBCluster{}, middleware.After)
}
func addOpRemoveRoleFromDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRemoveRoleFromDBInstance{}, middleware.After)
}
func addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRemoveSourceIdentifierFromSubscription{}, middleware.After)
}
func addOpRemoveTagsFromResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRemoveTagsFromResource{}, middleware.After)
}
func addOpResetDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpResetDBClusterParameterGroup{}, middleware.After)
}
func addOpResetDBParameterGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpResetDBParameterGroup{}, middleware.After)
}
func addOpRestoreDBClusterFromS3ValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBClusterFromS3{}, middleware.After)
}
func addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBClusterFromSnapshot{}, middleware.After)
}
func addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBClusterToPointInTime{}, middleware.After)
}
func addOpRestoreDBInstanceFromDBSnapshotValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBInstanceFromDBSnapshot{}, middleware.After)
}
func addOpRestoreDBInstanceFromS3ValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBInstanceFromS3{}, middleware.After)
}
func addOpRestoreDBInstanceToPointInTimeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRestoreDBInstanceToPointInTime{}, middleware.After)
}
func addOpRevokeDBSecurityGroupIngressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRevokeDBSecurityGroupIngress{}, middleware.After)
}
func addOpStartActivityStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartActivityStream{}, middleware.After)
}
func addOpStartDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartDBCluster{}, middleware.After)
}
func addOpStartDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartDBInstanceAutomatedBackupsReplication{}, middleware.After)
}
func addOpStartDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartDBInstance{}, middleware.After)
}
func addOpStartExportTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartExportTask{}, middleware.After)
}
func addOpStopActivityStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStopActivityStream{}, middleware.After)
}
func addOpStopDBClusterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStopDBCluster{}, middleware.After)
}
func addOpStopDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStopDBInstanceAutomatedBackupsReplication{}, middleware.After)
}
func addOpStopDBInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStopDBInstance{}, middleware.After)
}
func addOpSwitchoverBlueGreenDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSwitchoverBlueGreenDeployment{}, middleware.After)
}
func addOpSwitchoverReadReplicaValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSwitchoverReadReplica{}, middleware.After)
}
func validateFilter(v *types.Filter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Filter"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Values == nil {
invalidParams.Add(smithy.NewErrParamRequired("Values"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateFilterList(v []types.Filter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "FilterList"}
for i := range v {
if err := validateFilter(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOptionConfiguration(v *types.OptionConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "OptionConfiguration"}
if v.OptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOptionConfigurationList(v []types.OptionConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "OptionConfigurationList"}
for i := range v {
if err := validateOptionConfiguration(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAddRoleToDBClusterInput(v *AddRoleToDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddRoleToDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAddRoleToDBInstanceInput(v *AddRoleToDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddRoleToDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.FeatureName == nil {
invalidParams.Add(smithy.NewErrParamRequired("FeatureName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAddSourceIdentifierToSubscriptionInput(v *AddSourceIdentifierToSubscriptionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddSourceIdentifierToSubscriptionInput"}
if v.SubscriptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName"))
}
if v.SourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAddTagsToResourceInput(v *AddTagsToResourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddTagsToResourceInput"}
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 validateOpApplyPendingMaintenanceActionInput(v *ApplyPendingMaintenanceActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ApplyPendingMaintenanceActionInput"}
if v.ResourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier"))
}
if v.ApplyAction == nil {
invalidParams.Add(smithy.NewErrParamRequired("ApplyAction"))
}
if v.OptInType == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptInType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAuthorizeDBSecurityGroupIngressInput(v *AuthorizeDBSecurityGroupIngressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthorizeDBSecurityGroupIngressInput"}
if v.DBSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpBacktrackDBClusterInput(v *BacktrackDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BacktrackDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.BacktrackTo == nil {
invalidParams.Add(smithy.NewErrParamRequired("BacktrackTo"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelExportTaskInput(v *CancelExportTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelExportTaskInput"}
if v.ExportTaskIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ExportTaskIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyDBClusterParameterGroupInput(v *CopyDBClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyDBClusterParameterGroupInput"}
if v.SourceDBClusterParameterGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier"))
}
if v.TargetDBClusterParameterGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier"))
}
if v.TargetDBClusterParameterGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterParameterGroupDescription"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyDBClusterSnapshotInput(v *CopyDBClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyDBClusterSnapshotInput"}
if v.SourceDBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterSnapshotIdentifier"))
}
if v.TargetDBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyDBParameterGroupInput(v *CopyDBParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyDBParameterGroupInput"}
if v.SourceDBParameterGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBParameterGroupIdentifier"))
}
if v.TargetDBParameterGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBParameterGroupIdentifier"))
}
if v.TargetDBParameterGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBParameterGroupDescription"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyDBSnapshotInput(v *CopyDBSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyDBSnapshotInput"}
if v.SourceDBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBSnapshotIdentifier"))
}
if v.TargetDBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCopyOptionGroupInput(v *CopyOptionGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CopyOptionGroupInput"}
if v.SourceOptionGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceOptionGroupIdentifier"))
}
if v.TargetOptionGroupIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetOptionGroupIdentifier"))
}
if v.TargetOptionGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetOptionGroupDescription"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateBlueGreenDeploymentInput(v *CreateBlueGreenDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateBlueGreenDeploymentInput"}
if v.BlueGreenDeploymentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BlueGreenDeploymentName"))
}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCustomDBEngineVersionInput(v *CreateCustomDBEngineVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCustomDBEngineVersionInput"}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.EngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("EngineVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBClusterEndpointInput(v *CreateDBClusterEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterEndpointInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.DBClusterEndpointIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier"))
}
if v.EndpointType == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndpointType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBClusterInput(v *CreateDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBClusterParameterGroupInput(v *CreateDBClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterParameterGroupInput"}
if v.DBClusterParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName"))
}
if v.DBParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBClusterSnapshotInput(v *CreateDBClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterSnapshotInput"}
if v.DBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier"))
}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBInstanceInput(v *CreateDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.DBInstanceClass == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceClass"))
}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBInstanceReadReplicaInput(v *CreateDBInstanceReadReplicaInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBInstanceReadReplicaInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBParameterGroupInput(v *CreateDBParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBParameterGroupInput"}
if v.DBParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName"))
}
if v.DBParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBProxyEndpointInput(v *CreateDBProxyEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBProxyEndpointInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if v.DBProxyEndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyEndpointName"))
}
if v.VpcSubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("VpcSubnetIds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBProxyInput(v *CreateDBProxyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBProxyInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if len(v.EngineFamily) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("EngineFamily"))
}
if v.Auth == nil {
invalidParams.Add(smithy.NewErrParamRequired("Auth"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.VpcSubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("VpcSubnetIds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBSecurityGroupInput(v *CreateDBSecurityGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBSecurityGroupInput"}
if v.DBSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSecurityGroupName"))
}
if v.DBSecurityGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSecurityGroupDescription"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBSnapshotInput(v *CreateDBSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBSnapshotInput"}
if v.DBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSnapshotIdentifier"))
}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDBSubnetGroupInput(v *CreateDBSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDBSubnetGroupInput"}
if v.DBSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName"))
}
if v.DBSubnetGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupDescription"))
}
if v.SubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetIds"))
}
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 validateOpCreateOptionGroupInput(v *CreateOptionGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateOptionGroupInput"}
if v.OptionGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptionGroupName"))
}
if v.EngineName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EngineName"))
}
if v.MajorEngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorEngineVersion"))
}
if v.OptionGroupDescription == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptionGroupDescription"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteBlueGreenDeploymentInput(v *DeleteBlueGreenDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteBlueGreenDeploymentInput"}
if v.BlueGreenDeploymentIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("BlueGreenDeploymentIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCustomDBEngineVersionInput(v *DeleteCustomDBEngineVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomDBEngineVersionInput"}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.EngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("EngineVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBClusterEndpointInput(v *DeleteDBClusterEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterEndpointInput"}
if v.DBClusterEndpointIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBClusterInput(v *DeleteDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBClusterParameterGroupInput(v *DeleteDBClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterParameterGroupInput"}
if v.DBClusterParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBClusterSnapshotInput(v *DeleteDBClusterSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterSnapshotInput"}
if v.DBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBInstanceInput(v *DeleteDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBParameterGroupInput(v *DeleteDBParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBParameterGroupInput"}
if v.DBParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBProxyEndpointInput(v *DeleteDBProxyEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBProxyEndpointInput"}
if v.DBProxyEndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyEndpointName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBProxyInput(v *DeleteDBProxyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBProxyInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBSecurityGroupInput(v *DeleteDBSecurityGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBSecurityGroupInput"}
if v.DBSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBSnapshotInput(v *DeleteDBSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBSnapshotInput"}
if v.DBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDBSubnetGroupInput(v *DeleteDBSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDBSubnetGroupInput"}
if v.DBSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName"))
}
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 validateOpDeleteGlobalClusterInput(v *DeleteGlobalClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteGlobalClusterInput"}
if v.GlobalClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteOptionGroupInput(v *DeleteOptionGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteOptionGroupInput"}
if v.OptionGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptionGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeregisterDBProxyTargetsInput(v *DeregisterDBProxyTargetsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeregisterDBProxyTargetsInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeBlueGreenDeploymentsInput(v *DescribeBlueGreenDeploymentsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeBlueGreenDeploymentsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeCertificatesInput(v *DescribeCertificatesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeCertificatesInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterBacktracksInput(v *DescribeDBClusterBacktracksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterBacktracksInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterEndpointsInput(v *DescribeDBClusterEndpointsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterEndpointsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterParameterGroupsInput(v *DescribeDBClusterParameterGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterParameterGroupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterParametersInput(v *DescribeDBClusterParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterParametersInput"}
if v.DBClusterParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClustersInput(v *DescribeDBClustersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClustersInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterSnapshotAttributesInput(v *DescribeDBClusterSnapshotAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterSnapshotAttributesInput"}
if v.DBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBClusterSnapshotsInput(v *DescribeDBClusterSnapshotsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterSnapshotsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBEngineVersionsInput(v *DescribeDBEngineVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBEngineVersionsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBInstanceAutomatedBackupsInput(v *DescribeDBInstanceAutomatedBackupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBInstanceAutomatedBackupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBInstancesInput(v *DescribeDBInstancesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBInstancesInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBLogFilesInput(v *DescribeDBLogFilesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBLogFilesInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBParameterGroupsInput(v *DescribeDBParameterGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBParameterGroupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBParametersInput(v *DescribeDBParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBParametersInput"}
if v.DBParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBProxiesInput(v *DescribeDBProxiesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBProxiesInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBProxyEndpointsInput(v *DescribeDBProxyEndpointsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBProxyEndpointsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBProxyTargetGroupsInput(v *DescribeDBProxyTargetGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBProxyTargetGroupsInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBProxyTargetsInput(v *DescribeDBProxyTargetsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBProxyTargetsInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBSecurityGroupsInput(v *DescribeDBSecurityGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBSecurityGroupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBSnapshotAttributesInput(v *DescribeDBSnapshotAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBSnapshotAttributesInput"}
if v.DBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBSnapshotsInput(v *DescribeDBSnapshotsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBSnapshotsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDBSubnetGroupsInput(v *DescribeDBSubnetGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDBSubnetGroupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeEngineDefaultClusterParametersInput(v *DescribeEngineDefaultClusterParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeEngineDefaultClusterParametersInput"}
if v.DBParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeEngineDefaultParametersInput(v *DescribeEngineDefaultParametersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeEngineDefaultParametersInput"}
if v.DBParameterGroupFamily == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeEventCategoriesInput(v *DescribeEventCategoriesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeEventCategoriesInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeEventsInput(v *DescribeEventsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeEventsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeEventSubscriptionsInput(v *DescribeEventSubscriptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeEventSubscriptionsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeExportTasksInput(v *DescribeExportTasksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeExportTasksInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeGlobalClustersInput(v *DescribeGlobalClustersInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeGlobalClustersInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeOptionGroupOptionsInput(v *DescribeOptionGroupOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeOptionGroupOptionsInput"}
if v.EngineName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EngineName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeOptionGroupsInput(v *DescribeOptionGroupsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeOptionGroupsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeOrderableDBInstanceOptionsInput(v *DescribeOrderableDBInstanceOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeOrderableDBInstanceOptionsInput"}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribePendingMaintenanceActionsInput(v *DescribePendingMaintenanceActionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribePendingMaintenanceActionsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeReservedDBInstancesInput(v *DescribeReservedDBInstancesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeReservedDBInstancesInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeReservedDBInstancesOfferingsInput(v *DescribeReservedDBInstancesOfferingsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeReservedDBInstancesOfferingsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeSourceRegionsInput(v *DescribeSourceRegionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeSourceRegionsInput"}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeValidDBInstanceModificationsInput(v *DescribeValidDBInstanceModificationsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeValidDBInstanceModificationsInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDownloadDBLogFilePortionInput(v *DownloadDBLogFilePortionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DownloadDBLogFilePortionInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.LogFileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LogFileName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpFailoverDBClusterInput(v *FailoverDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "FailoverDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpFailoverGlobalClusterInput(v *FailoverGlobalClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "FailoverGlobalClusterInput"}
if v.GlobalClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier"))
}
if v.TargetDbClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDbClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"}
if v.ResourceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceName"))
}
if v.Filters != nil {
if err := validateFilterList(v.Filters); err != nil {
invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyCurrentDBClusterCapacityInput(v *ModifyCurrentDBClusterCapacityInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyCurrentDBClusterCapacityInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyCustomDBEngineVersionInput(v *ModifyCustomDBEngineVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyCustomDBEngineVersionInput"}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.EngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("EngineVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBClusterEndpointInput(v *ModifyDBClusterEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterEndpointInput"}
if v.DBClusterEndpointIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBClusterInput(v *ModifyDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBClusterParameterGroupInput(v *ModifyDBClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterParameterGroupInput"}
if v.DBClusterParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName"))
}
if v.Parameters == nil {
invalidParams.Add(smithy.NewErrParamRequired("Parameters"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBClusterSnapshotAttributeInput(v *ModifyDBClusterSnapshotAttributeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterSnapshotAttributeInput"}
if v.DBClusterSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier"))
}
if v.AttributeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AttributeName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBInstanceInput(v *ModifyDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBParameterGroupInput(v *ModifyDBParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBParameterGroupInput"}
if v.DBParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName"))
}
if v.Parameters == nil {
invalidParams.Add(smithy.NewErrParamRequired("Parameters"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBProxyEndpointInput(v *ModifyDBProxyEndpointInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBProxyEndpointInput"}
if v.DBProxyEndpointName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyEndpointName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBProxyInput(v *ModifyDBProxyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBProxyInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBProxyTargetGroupInput(v *ModifyDBProxyTargetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBProxyTargetGroupInput"}
if v.TargetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetGroupName"))
}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBSnapshotAttributeInput(v *ModifyDBSnapshotAttributeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBSnapshotAttributeInput"}
if v.DBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSnapshotIdentifier"))
}
if v.AttributeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AttributeName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBSnapshotInput(v *ModifyDBSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBSnapshotInput"}
if v.DBSnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSnapshotIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpModifyDBSubnetGroupInput(v *ModifyDBSubnetGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyDBSubnetGroupInput"}
if v.DBSubnetGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName"))
}
if v.SubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetIds"))
}
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 validateOpModifyOptionGroupInput(v *ModifyOptionGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ModifyOptionGroupInput"}
if v.OptionGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("OptionGroupName"))
}
if v.OptionsToInclude != nil {
if err := validateOptionConfigurationList(v.OptionsToInclude); err != nil {
invalidParams.AddNested("OptionsToInclude", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPromoteReadReplicaDBClusterInput(v *PromoteReadReplicaDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PromoteReadReplicaDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPromoteReadReplicaInput(v *PromoteReadReplicaInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PromoteReadReplicaInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPurchaseReservedDBInstancesOfferingInput(v *PurchaseReservedDBInstancesOfferingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PurchaseReservedDBInstancesOfferingInput"}
if v.ReservedDBInstancesOfferingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ReservedDBInstancesOfferingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRebootDBClusterInput(v *RebootDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RebootDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRebootDBInstanceInput(v *RebootDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RebootDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRegisterDBProxyTargetsInput(v *RegisterDBProxyTargetsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RegisterDBProxyTargetsInput"}
if v.DBProxyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBProxyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRemoveRoleFromDBClusterInput(v *RemoveRoleFromDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RemoveRoleFromDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRemoveRoleFromDBInstanceInput(v *RemoveRoleFromDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RemoveRoleFromDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.FeatureName == nil {
invalidParams.Add(smithy.NewErrParamRequired("FeatureName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRemoveSourceIdentifierFromSubscriptionInput(v *RemoveSourceIdentifierFromSubscriptionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RemoveSourceIdentifierFromSubscriptionInput"}
if v.SubscriptionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName"))
}
if v.SourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsFromResourceInput"}
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 validateOpResetDBClusterParameterGroupInput(v *ResetDBClusterParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResetDBClusterParameterGroupInput"}
if v.DBClusterParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpResetDBParameterGroupInput(v *ResetDBParameterGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResetDBParameterGroupInput"}
if v.DBParameterGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBClusterFromS3Input(v *RestoreDBClusterFromS3Input) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBClusterFromS3Input"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.MasterUsername == nil {
invalidParams.Add(smithy.NewErrParamRequired("MasterUsername"))
}
if v.SourceEngine == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceEngine"))
}
if v.SourceEngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceEngineVersion"))
}
if v.S3BucketName == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3BucketName"))
}
if v.S3IngestionRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3IngestionRoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBClusterFromSnapshotInput(v *RestoreDBClusterFromSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBClusterFromSnapshotInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.SnapshotIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier"))
}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBClusterToPointInTimeInput(v *RestoreDBClusterToPointInTimeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBClusterToPointInTimeInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if v.SourceDBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBInstanceFromDBSnapshotInput(v *RestoreDBInstanceFromDBSnapshotInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBInstanceFromDBSnapshotInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBInstanceFromS3Input(v *RestoreDBInstanceFromS3Input) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBInstanceFromS3Input"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if v.DBInstanceClass == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceClass"))
}
if v.Engine == nil {
invalidParams.Add(smithy.NewErrParamRequired("Engine"))
}
if v.SourceEngine == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceEngine"))
}
if v.SourceEngineVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceEngineVersion"))
}
if v.S3BucketName == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3BucketName"))
}
if v.S3IngestionRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3IngestionRoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRestoreDBInstanceToPointInTimeInput(v *RestoreDBInstanceToPointInTimeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RestoreDBInstanceToPointInTimeInput"}
if v.TargetDBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetDBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRevokeDBSecurityGroupIngressInput(v *RevokeDBSecurityGroupIngressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RevokeDBSecurityGroupIngressInput"}
if v.DBSecurityGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBSecurityGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartActivityStreamInput(v *StartActivityStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartActivityStreamInput"}
if v.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
if len(v.Mode) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Mode"))
}
if v.KmsKeyId == nil {
invalidParams.Add(smithy.NewErrParamRequired("KmsKeyId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartDBClusterInput(v *StartDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartDBInstanceAutomatedBackupsReplicationInput(v *StartDBInstanceAutomatedBackupsReplicationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartDBInstanceAutomatedBackupsReplicationInput"}
if v.SourceDBInstanceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBInstanceArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartDBInstanceInput(v *StartDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartExportTaskInput(v *StartExportTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartExportTaskInput"}
if v.ExportTaskIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ExportTaskIdentifier"))
}
if v.SourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceArn"))
}
if v.S3BucketName == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3BucketName"))
}
if v.IamRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("IamRoleArn"))
}
if v.KmsKeyId == nil {
invalidParams.Add(smithy.NewErrParamRequired("KmsKeyId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStopActivityStreamInput(v *StopActivityStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopActivityStreamInput"}
if v.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStopDBClusterInput(v *StopDBClusterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopDBClusterInput"}
if v.DBClusterIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStopDBInstanceAutomatedBackupsReplicationInput(v *StopDBInstanceAutomatedBackupsReplicationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopDBInstanceAutomatedBackupsReplicationInput"}
if v.SourceDBInstanceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SourceDBInstanceArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStopDBInstanceInput(v *StopDBInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopDBInstanceInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSwitchoverBlueGreenDeploymentInput(v *SwitchoverBlueGreenDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SwitchoverBlueGreenDeploymentInput"}
if v.BlueGreenDeploymentIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("BlueGreenDeploymentIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSwitchoverReadReplicaInput(v *SwitchoverReadReplicaInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SwitchoverReadReplicaInput"}
if v.DBInstanceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 5,649 |
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 RDS 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: "rds.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "rds-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds-fips.ca-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ca-central-1-fips",
}: endpoints.Endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
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: "me-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "rds-fips.ca-central-1",
}: endpoints.Endpoint{
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds-fips.us-east-1",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds-fips.us-east-2",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds-fips.us-west-1",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds-fips.us-west-2",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.ca-central-1",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.ca-central-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.ca-central-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-east-1",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-east-2",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-west-1",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-west-2",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
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: "rds-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-1-fips",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2-fips",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-east-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-1-fips",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.us-west-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2-fips",
}: endpoints.Endpoint{
Hostname: "rds-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "rds.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "rds-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{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: "rds.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "rds-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "rds.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "rds.us-gov-east-1",
}: endpoints.Endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "rds.us-gov-west-1",
}: endpoints.Endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds.us-gov-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-gov-east-1-fips",
}: endpoints.Endpoint{
Hostname: "rds.us-gov-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "rds.us-gov-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-gov-west-1-fips",
}: endpoints.Endpoint{
Hostname: "rds.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
},
},
}
| 667 |
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 ActivityStreamMode string
// Enum values for ActivityStreamMode
const (
ActivityStreamModeSync ActivityStreamMode = "sync"
ActivityStreamModeAsync ActivityStreamMode = "async"
)
// Values returns all known values for ActivityStreamMode. 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 (ActivityStreamMode) Values() []ActivityStreamMode {
return []ActivityStreamMode{
"sync",
"async",
}
}
type ActivityStreamPolicyStatus string
// Enum values for ActivityStreamPolicyStatus
const (
ActivityStreamPolicyStatusLocked ActivityStreamPolicyStatus = "locked"
ActivityStreamPolicyStatusUnlocked ActivityStreamPolicyStatus = "unlocked"
ActivityStreamPolicyStatusLockingPolicy ActivityStreamPolicyStatus = "locking-policy"
ActivityStreamPolicyStatusUnlockingPolicy ActivityStreamPolicyStatus = "unlocking-policy"
)
// Values returns all known values for ActivityStreamPolicyStatus. 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 (ActivityStreamPolicyStatus) Values() []ActivityStreamPolicyStatus {
return []ActivityStreamPolicyStatus{
"locked",
"unlocked",
"locking-policy",
"unlocking-policy",
}
}
type ActivityStreamStatus string
// Enum values for ActivityStreamStatus
const (
ActivityStreamStatusStopped ActivityStreamStatus = "stopped"
ActivityStreamStatusStarting ActivityStreamStatus = "starting"
ActivityStreamStatusStarted ActivityStreamStatus = "started"
ActivityStreamStatusStopping ActivityStreamStatus = "stopping"
)
// Values returns all known values for ActivityStreamStatus. 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 (ActivityStreamStatus) Values() []ActivityStreamStatus {
return []ActivityStreamStatus{
"stopped",
"starting",
"started",
"stopping",
}
}
type ApplyMethod string
// Enum values for ApplyMethod
const (
ApplyMethodImmediate ApplyMethod = "immediate"
ApplyMethodPendingReboot ApplyMethod = "pending-reboot"
)
// Values returns all known values for ApplyMethod. 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 (ApplyMethod) Values() []ApplyMethod {
return []ApplyMethod{
"immediate",
"pending-reboot",
}
}
type AuditPolicyState string
// Enum values for AuditPolicyState
const (
AuditPolicyStateLockedPolicy AuditPolicyState = "locked"
AuditPolicyStateUnlockedPolicy AuditPolicyState = "unlocked"
)
// Values returns all known values for AuditPolicyState. 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 (AuditPolicyState) Values() []AuditPolicyState {
return []AuditPolicyState{
"locked",
"unlocked",
}
}
type AuthScheme string
// Enum values for AuthScheme
const (
AuthSchemeSecrets AuthScheme = "SECRETS"
)
// Values returns all known values for AuthScheme. 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 (AuthScheme) Values() []AuthScheme {
return []AuthScheme{
"SECRETS",
}
}
type AutomationMode string
// Enum values for AutomationMode
const (
AutomationModeFull AutomationMode = "full"
AutomationModeAllPaused AutomationMode = "all-paused"
)
// Values returns all known values for AutomationMode. 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 (AutomationMode) Values() []AutomationMode {
return []AutomationMode{
"full",
"all-paused",
}
}
type ClientPasswordAuthType string
// Enum values for ClientPasswordAuthType
const (
ClientPasswordAuthTypeMysqlNativePassword ClientPasswordAuthType = "MYSQL_NATIVE_PASSWORD"
ClientPasswordAuthTypePostgresScramSha256 ClientPasswordAuthType = "POSTGRES_SCRAM_SHA_256"
ClientPasswordAuthTypePostgresMd5 ClientPasswordAuthType = "POSTGRES_MD5"
ClientPasswordAuthTypeSqlServerAuthentication ClientPasswordAuthType = "SQL_SERVER_AUTHENTICATION"
)
// Values returns all known values for ClientPasswordAuthType. 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 (ClientPasswordAuthType) Values() []ClientPasswordAuthType {
return []ClientPasswordAuthType{
"MYSQL_NATIVE_PASSWORD",
"POSTGRES_SCRAM_SHA_256",
"POSTGRES_MD5",
"SQL_SERVER_AUTHENTICATION",
}
}
type CustomEngineVersionStatus string
// Enum values for CustomEngineVersionStatus
const (
CustomEngineVersionStatusAvailable CustomEngineVersionStatus = "available"
CustomEngineVersionStatusInactive CustomEngineVersionStatus = "inactive"
CustomEngineVersionStatusInactiveExceptRestore CustomEngineVersionStatus = "inactive-except-restore"
)
// Values returns all known values for CustomEngineVersionStatus. 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 (CustomEngineVersionStatus) Values() []CustomEngineVersionStatus {
return []CustomEngineVersionStatus{
"available",
"inactive",
"inactive-except-restore",
}
}
type DBProxyEndpointStatus string
// Enum values for DBProxyEndpointStatus
const (
DBProxyEndpointStatusAvailable DBProxyEndpointStatus = "available"
DBProxyEndpointStatusModifying DBProxyEndpointStatus = "modifying"
DBProxyEndpointStatusIncompatibleNetwork DBProxyEndpointStatus = "incompatible-network"
DBProxyEndpointStatusInsufficientResourceLimits DBProxyEndpointStatus = "insufficient-resource-limits"
DBProxyEndpointStatusCreating DBProxyEndpointStatus = "creating"
DBProxyEndpointStatusDeleting DBProxyEndpointStatus = "deleting"
)
// Values returns all known values for DBProxyEndpointStatus. 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 (DBProxyEndpointStatus) Values() []DBProxyEndpointStatus {
return []DBProxyEndpointStatus{
"available",
"modifying",
"incompatible-network",
"insufficient-resource-limits",
"creating",
"deleting",
}
}
type DBProxyEndpointTargetRole string
// Enum values for DBProxyEndpointTargetRole
const (
DBProxyEndpointTargetRoleReadWrite DBProxyEndpointTargetRole = "READ_WRITE"
DBProxyEndpointTargetRoleReadOnly DBProxyEndpointTargetRole = "READ_ONLY"
)
// Values returns all known values for DBProxyEndpointTargetRole. 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 (DBProxyEndpointTargetRole) Values() []DBProxyEndpointTargetRole {
return []DBProxyEndpointTargetRole{
"READ_WRITE",
"READ_ONLY",
}
}
type DBProxyStatus string
// Enum values for DBProxyStatus
const (
DBProxyStatusAvailable DBProxyStatus = "available"
DBProxyStatusModifying DBProxyStatus = "modifying"
DBProxyStatusIncompatibleNetwork DBProxyStatus = "incompatible-network"
DBProxyStatusInsufficientResourceLimits DBProxyStatus = "insufficient-resource-limits"
DBProxyStatusCreating DBProxyStatus = "creating"
DBProxyStatusDeleting DBProxyStatus = "deleting"
DBProxyStatusSuspended DBProxyStatus = "suspended"
DBProxyStatusSuspending DBProxyStatus = "suspending"
DBProxyStatusReactivating DBProxyStatus = "reactivating"
)
// Values returns all known values for DBProxyStatus. 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 (DBProxyStatus) Values() []DBProxyStatus {
return []DBProxyStatus{
"available",
"modifying",
"incompatible-network",
"insufficient-resource-limits",
"creating",
"deleting",
"suspended",
"suspending",
"reactivating",
}
}
type EngineFamily string
// Enum values for EngineFamily
const (
EngineFamilyMysql EngineFamily = "MYSQL"
EngineFamilyPostgresql EngineFamily = "POSTGRESQL"
EngineFamilySqlserver EngineFamily = "SQLSERVER"
)
// Values returns all known values for EngineFamily. 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 (EngineFamily) Values() []EngineFamily {
return []EngineFamily{
"MYSQL",
"POSTGRESQL",
"SQLSERVER",
}
}
type ExportSourceType string
// Enum values for ExportSourceType
const (
ExportSourceTypeSnapshot ExportSourceType = "SNAPSHOT"
ExportSourceTypeCluster ExportSourceType = "CLUSTER"
)
// Values returns all known values for ExportSourceType. 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 (ExportSourceType) Values() []ExportSourceType {
return []ExportSourceType{
"SNAPSHOT",
"CLUSTER",
}
}
type FailoverStatus string
// Enum values for FailoverStatus
const (
FailoverStatusPending FailoverStatus = "pending"
FailoverStatusFailingOver FailoverStatus = "failing-over"
FailoverStatusCancelling FailoverStatus = "cancelling"
)
// Values returns all known values for FailoverStatus. 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 (FailoverStatus) Values() []FailoverStatus {
return []FailoverStatus{
"pending",
"failing-over",
"cancelling",
}
}
type IAMAuthMode string
// Enum values for IAMAuthMode
const (
IAMAuthModeDisabled IAMAuthMode = "DISABLED"
IAMAuthModeRequired IAMAuthMode = "REQUIRED"
IAMAuthModeEnabled IAMAuthMode = "ENABLED"
)
// Values returns all known values for IAMAuthMode. 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 (IAMAuthMode) Values() []IAMAuthMode {
return []IAMAuthMode{
"DISABLED",
"REQUIRED",
"ENABLED",
}
}
type ReplicaMode string
// Enum values for ReplicaMode
const (
ReplicaModeOpenReadOnly ReplicaMode = "open-read-only"
ReplicaModeMounted ReplicaMode = "mounted"
)
// Values returns all known values for ReplicaMode. 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 (ReplicaMode) Values() []ReplicaMode {
return []ReplicaMode{
"open-read-only",
"mounted",
}
}
type SourceType string
// Enum values for SourceType
const (
SourceTypeDbInstance SourceType = "db-instance"
SourceTypeDbParameterGroup SourceType = "db-parameter-group"
SourceTypeDbSecurityGroup SourceType = "db-security-group"
SourceTypeDbSnapshot SourceType = "db-snapshot"
SourceTypeDbCluster SourceType = "db-cluster"
SourceTypeDbClusterSnapshot SourceType = "db-cluster-snapshot"
SourceTypeCustomEngineVersion SourceType = "custom-engine-version"
SourceTypeDbProxy SourceType = "db-proxy"
SourceTypeBlueGreenDeployment SourceType = "blue-green-deployment"
)
// 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{
"db-instance",
"db-parameter-group",
"db-security-group",
"db-snapshot",
"db-cluster",
"db-cluster-snapshot",
"custom-engine-version",
"db-proxy",
"blue-green-deployment",
}
}
type TargetHealthReason string
// Enum values for TargetHealthReason
const (
TargetHealthReasonUnreachable TargetHealthReason = "UNREACHABLE"
TargetHealthReasonConnectionFailed TargetHealthReason = "CONNECTION_FAILED"
TargetHealthReasonAuthFailure TargetHealthReason = "AUTH_FAILURE"
TargetHealthReasonPendingProxyCapacity TargetHealthReason = "PENDING_PROXY_CAPACITY"
TargetHealthReasonInvalidReplicationState TargetHealthReason = "INVALID_REPLICATION_STATE"
)
// Values returns all known values for TargetHealthReason. 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 (TargetHealthReason) Values() []TargetHealthReason {
return []TargetHealthReason{
"UNREACHABLE",
"CONNECTION_FAILED",
"AUTH_FAILURE",
"PENDING_PROXY_CAPACITY",
"INVALID_REPLICATION_STATE",
}
}
type TargetRole string
// Enum values for TargetRole
const (
TargetRoleReadWrite TargetRole = "READ_WRITE"
TargetRoleReadOnly TargetRole = "READ_ONLY"
TargetRoleUnknown TargetRole = "UNKNOWN"
)
// Values returns all known values for TargetRole. 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 (TargetRole) Values() []TargetRole {
return []TargetRole{
"READ_WRITE",
"READ_ONLY",
"UNKNOWN",
}
}
type TargetState string
// Enum values for TargetState
const (
TargetStateRegistering TargetState = "REGISTERING"
TargetStateAvailable TargetState = "AVAILABLE"
TargetStateUnavailable TargetState = "UNAVAILABLE"
)
// Values returns all known values for TargetState. 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 (TargetState) Values() []TargetState {
return []TargetState{
"REGISTERING",
"AVAILABLE",
"UNAVAILABLE",
}
}
type TargetType string
// Enum values for TargetType
const (
TargetTypeRdsInstance TargetType = "RDS_INSTANCE"
TargetTypeRdsServerlessEndpoint TargetType = "RDS_SERVERLESS_ENDPOINT"
TargetTypeTrackedCluster TargetType = "TRACKED_CLUSTER"
)
// Values returns all known values for TargetType. 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 (TargetType) Values() []TargetType {
return []TargetType{
"RDS_INSTANCE",
"RDS_SERVERLESS_ENDPOINT",
"TRACKED_CLUSTER",
}
}
type WriteForwardingStatus string
// Enum values for WriteForwardingStatus
const (
WriteForwardingStatusEnabled WriteForwardingStatus = "enabled"
WriteForwardingStatusDisabled WriteForwardingStatus = "disabled"
WriteForwardingStatusEnabling WriteForwardingStatus = "enabling"
WriteForwardingStatusDisabling WriteForwardingStatus = "disabling"
WriteForwardingStatusUnknown WriteForwardingStatus = "unknown"
)
// Values returns all known values for WriteForwardingStatus. 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 (WriteForwardingStatus) Values() []WriteForwardingStatus {
return []WriteForwardingStatus{
"enabled",
"disabled",
"enabling",
"disabling",
"unknown",
}
}
| 490 |
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 specified CIDR IP range or Amazon EC2 security group is already authorized
// for the specified DB 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 Amazon EC2 security group might not be
// authorized for the specified DB security group. Or, RDS might not be authorized
// to perform necessary actions using IAM on your behalf.
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 DB security group authorization quota 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 }
type BackupPolicyNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BackupPolicyNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BackupPolicyNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BackupPolicyNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BackupPolicyNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *BackupPolicyNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A blue/green deployment with the specified name already exists.
type BlueGreenDeploymentAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BlueGreenDeploymentAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BlueGreenDeploymentAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BlueGreenDeploymentAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BlueGreenDeploymentAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *BlueGreenDeploymentAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// BlueGreenDeploymentIdentifier doesn't refer to an existing blue/green
// deployment.
type BlueGreenDeploymentNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *BlueGreenDeploymentNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BlueGreenDeploymentNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BlueGreenDeploymentNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "BlueGreenDeploymentNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *BlueGreenDeploymentNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// CertificateIdentifier doesn't refer to an existing certificate.
type CertificateNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CertificateNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CertificateNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CertificateNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CertificateNotFound"
}
return *e.ErrorCodeOverride
}
func (e *CertificateNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An error occurred while trying to create the CEV.
type CreateCustomDBEngineVersionFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CreateCustomDBEngineVersionFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CreateCustomDBEngineVersionFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CreateCustomDBEngineVersionFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CreateCustomDBEngineVersionFault"
}
return *e.ErrorCodeOverride
}
func (e *CreateCustomDBEngineVersionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// CustomAvailabilityZoneId doesn't refer to an existing custom Availability Zone
// identifier.
type CustomAvailabilityZoneNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomAvailabilityZoneNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomAvailabilityZoneNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomAvailabilityZoneNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomAvailabilityZoneNotFound"
}
return *e.ErrorCodeOverride
}
func (e *CustomAvailabilityZoneNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// A CEV with the specified name already exists.
type CustomDBEngineVersionAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomDBEngineVersionAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomDBEngineVersionAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomDBEngineVersionAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomDBEngineVersionAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *CustomDBEngineVersionAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified CEV was not found.
type CustomDBEngineVersionNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomDBEngineVersionNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomDBEngineVersionNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomDBEngineVersionNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomDBEngineVersionNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *CustomDBEngineVersionNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You have exceeded your CEV quota.
type CustomDBEngineVersionQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomDBEngineVersionQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomDBEngineVersionQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomDBEngineVersionQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomDBEngineVersionQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *CustomDBEngineVersionQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The user already has a DB cluster with the given identifier.
type DBClusterAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// BacktrackIdentifier doesn't refer to an existing backtrack.
type DBClusterBacktrackNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterBacktrackNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterBacktrackNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterBacktrackNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterBacktrackNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterBacktrackNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified custom endpoint can't be created because it already exists.
type DBClusterEndpointAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterEndpointAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterEndpointAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterEndpointAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterEndpointAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterEndpointAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified custom endpoint doesn't exist.
type DBClusterEndpointNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterEndpointNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterEndpointNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterEndpointNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterEndpointNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterEndpointNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cluster already has the maximum number of custom endpoints.
type DBClusterEndpointQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterEndpointQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterEndpointQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterEndpointQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterEndpointQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterEndpointQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// DBClusterIdentifier doesn't refer to an existing DB cluster.
type DBClusterNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter
// group.
type DBClusterParameterGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterParameterGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterParameterGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterParameterGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterParameterGroupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The user attempted to create a new DB cluster and the user has already reached
// the maximum allowed DB cluster quota.
type DBClusterQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified IAM role Amazon Resource Name (ARN) is already associated with
// the specified DB cluster.
type DBClusterRoleAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterRoleAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterRoleAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterRoleAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterRoleAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterRoleAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified IAM role Amazon Resource Name (ARN) isn't associated with the
// specified DB cluster.
type DBClusterRoleNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterRoleNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterRoleNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterRoleNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterRoleNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterRoleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have exceeded the maximum number of IAM roles that can be associated with
// the specified DB cluster.
type DBClusterRoleQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterRoleQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterRoleQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterRoleQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterRoleQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterRoleQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The user already has a DB cluster snapshot with the given identifier.
type DBClusterSnapshotAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterSnapshotAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterSnapshotAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterSnapshotAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterSnapshotAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterSnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot.
type DBClusterSnapshotNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBClusterSnapshotNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBClusterSnapshotNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBClusterSnapshotNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBClusterSnapshotNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBClusterSnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The user already has a DB instance with the given identifier.
type DBInstanceAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// No automated backup for this DB instance was found.
type DBInstanceAutomatedBackupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceAutomatedBackupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceAutomatedBackupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceAutomatedBackupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceAutomatedBackupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceAutomatedBackupNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The quota for retained automated backups was exceeded. This prevents you from
// retaining any additional automated backups. The retained automated backups quota
// is the same as your DB Instance quota.
type DBInstanceAutomatedBackupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceAutomatedBackupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceAutomatedBackupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceAutomatedBackupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceAutomatedBackupQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceAutomatedBackupQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// DBInstanceIdentifier doesn't refer to an existing DB instance.
type DBInstanceNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified RoleArn or FeatureName value is already associated with the DB
// instance.
type DBInstanceRoleAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceRoleAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceRoleAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceRoleAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceRoleAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceRoleAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified RoleArn value doesn't match the specified feature for the DB
// instance.
type DBInstanceRoleNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceRoleNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceRoleNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceRoleNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceRoleNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceRoleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't associate any more Amazon Web Services Identity and Access Management
// (IAM) roles with the DB instance because the quota has been reached.
type DBInstanceRoleQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBInstanceRoleQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBInstanceRoleQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBInstanceRoleQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBInstanceRoleQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *DBInstanceRoleQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// LogFileName doesn't refer to an existing DB log file.
type DBLogFileNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBLogFileNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBLogFileNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBLogFileNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBLogFileNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBLogFileNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A DB parameter group with the same name exists.
type DBParameterGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBParameterGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBParameterGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBParameterGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBParameterGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBParameterGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// DBParameterGroupName doesn't refer to an existing DB parameter group.
type DBParameterGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBParameterGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBParameterGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBParameterGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBParameterGroupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of DB
// parameter groups.
type DBParameterGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBParameterGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBParameterGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBParameterGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBParameterGroupQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *DBParameterGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified proxy name must be unique for all proxies owned by your Amazon
// Web Services account in the specified Amazon Web Services Region.
type DBProxyAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified DB proxy endpoint name must be unique for all DB proxy endpoints
// owned by your Amazon Web Services account in the specified Amazon Web Services
// Region.
type DBProxyEndpointAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyEndpointAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyEndpointAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyEndpointAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyEndpointAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyEndpointAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB proxy endpoint doesn't exist.
type DBProxyEndpointNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyEndpointNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyEndpointNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyEndpointNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyEndpointNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyEndpointNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB proxy already has the maximum number of endpoints.
type DBProxyEndpointQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyEndpointQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyEndpointQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyEndpointQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyEndpointQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyEndpointQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified proxy name doesn't correspond to a proxy owned by your Amazon Web
// Services account in the specified Amazon Web Services Region.
type DBProxyNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Your Amazon Web Services account already has the maximum number of proxies in
// the specified Amazon Web Services Region.
type DBProxyQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The proxy is already associated with the specified RDS DB instance or Aurora DB
// cluster.
type DBProxyTargetAlreadyRegisteredFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyTargetAlreadyRegisteredFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyTargetAlreadyRegisteredFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyTargetAlreadyRegisteredFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyTargetAlreadyRegisteredFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyTargetAlreadyRegisteredFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified target group isn't available for a proxy owned by your Amazon Web
// Services account in the specified Amazon Web Services Region.
type DBProxyTargetGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyTargetGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyTargetGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyTargetGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyTargetGroupNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyTargetGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified RDS DB instance or Aurora DB cluster isn't available for a proxy
// owned by your Amazon Web Services account in the specified Amazon Web Services
// Region.
type DBProxyTargetNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBProxyTargetNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBProxyTargetNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBProxyTargetNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBProxyTargetNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBProxyTargetNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A DB security group with the name specified in DBSecurityGroupName already
// exists.
type DBSecurityGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSecurityGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSecurityGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSecurityGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSecurityGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBSecurityGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBSecurityGroupName doesn't refer to an existing DB security group.
type DBSecurityGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSecurityGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSecurityGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSecurityGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSecurityGroupNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBSecurityGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A DB security group isn't allowed for this action.
type DBSecurityGroupNotSupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSecurityGroupNotSupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSecurityGroupNotSupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSecurityGroupNotSupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSecurityGroupNotSupported"
}
return *e.ErrorCodeOverride
}
func (e *DBSecurityGroupNotSupportedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of DB
// security groups.
type DBSecurityGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSecurityGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSecurityGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSecurityGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "QuotaExceeded.DBSecurityGroup"
}
return *e.ErrorCodeOverride
}
func (e *DBSecurityGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBSnapshotIdentifier is already used by an existing snapshot.
type DBSnapshotAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSnapshotAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSnapshotAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSnapshotAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSnapshotAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBSnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBSnapshotIdentifier doesn't refer to an existing DB snapshot.
type DBSnapshotNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSnapshotNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSnapshotNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSnapshotNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSnapshotNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DBSnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBSubnetGroupName is already used by an existing DB subnet group.
type DBSubnetGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetGroupAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Subnets in the DB subnet group should cover at least two Availability Zones
// unless there is only one Availability Zone.
type DBSubnetGroupDoesNotCoverEnoughAZs struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetGroupDoesNotCoverEnoughAZs) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetGroupDoesNotCoverEnoughAZs"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The DBSubnetGroup shouldn't be specified while creating read replicas that lie
// in the same region as the source instance.
type DBSubnetGroupNotAllowedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetGroupNotAllowedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetGroupNotAllowedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetGroupNotAllowedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetGroupNotAllowedFault"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetGroupNotAllowedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// DBSubnetGroupName doesn't refer to an existing DB subnet group.
type DBSubnetGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetGroupNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of DB subnet
// groups.
type DBSubnetGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetGroupQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of subnets in
// a DB subnet groups.
type DBSubnetQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBSubnetQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBSubnetQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBSubnetQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBSubnetQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *DBSubnetQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB upgrade failed because a resource the DB depends on can't be modified.
type DBUpgradeDependencyFailureFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DBUpgradeDependencyFailureFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DBUpgradeDependencyFailureFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DBUpgradeDependencyFailureFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DBUpgradeDependencyFailure"
}
return *e.ErrorCodeOverride
}
func (e *DBUpgradeDependencyFailureFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Domain doesn't refer to an existing Active Directory domain.
type DomainNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DomainNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DomainNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DomainNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DomainNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *DomainNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The AMI configuration prerequisite has not been met.
type Ec2ImagePropertiesNotSupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *Ec2ImagePropertiesNotSupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *Ec2ImagePropertiesNotSupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *Ec2ImagePropertiesNotSupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "Ec2ImagePropertiesNotSupportedFault"
}
return *e.ErrorCodeOverride
}
func (e *Ec2ImagePropertiesNotSupportedFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You have reached the maximum number of event subscriptions.
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
}
// You can't start an export task that's already running.
type ExportTaskAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ExportTaskAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ExportTaskAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ExportTaskAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ExportTaskAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ExportTaskAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The export task doesn't exist.
type ExportTaskNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ExportTaskNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ExportTaskNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ExportTaskNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ExportTaskNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ExportTaskNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The GlobalClusterIdentifier already exists. Choose a new global database
// identifier (unique name) to create a new global database cluster.
type GlobalClusterAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *GlobalClusterAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *GlobalClusterAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *GlobalClusterAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "GlobalClusterAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *GlobalClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The GlobalClusterIdentifier doesn't refer to an existing global database
// cluster.
type GlobalClusterNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *GlobalClusterNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *GlobalClusterNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *GlobalClusterNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "GlobalClusterNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *GlobalClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The number of global database clusters for this account is already at the
// maximum allowed.
type GlobalClusterQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *GlobalClusterQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *GlobalClusterQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *GlobalClusterQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "GlobalClusterQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *GlobalClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The IAM role requires additional permissions to export to an Amazon S3 bucket.
type IamRoleMissingPermissionsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IamRoleMissingPermissionsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IamRoleMissingPermissionsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IamRoleMissingPermissionsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IamRoleMissingPermissions"
}
return *e.ErrorCodeOverride
}
func (e *IamRoleMissingPermissionsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The IAM role is missing for exporting to an Amazon S3 bucket.
type IamRoleNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IamRoleNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IamRoleNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IamRoleNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IamRoleNotFound"
}
return *e.ErrorCodeOverride
}
func (e *IamRoleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of DB
// instances.
type InstanceQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InstanceQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InstanceQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InstanceQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InstanceQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *InstanceQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested operation can't be performed because there aren't enough
// available IP addresses in the proxy's subnets. Add more CIDR blocks to the VPC
// or remove IP address that aren't required from the subnets.
type InsufficientAvailableIPsInSubnetFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientAvailableIPsInSubnetFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientAvailableIPsInSubnetFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientAvailableIPsInSubnetFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientAvailableIPsInSubnetFault"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientAvailableIPsInSubnetFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The DB cluster doesn't have enough capacity for the current operation.
type InsufficientDBClusterCapacityFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientDBClusterCapacityFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientDBClusterCapacityFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientDBClusterCapacityFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientDBClusterCapacityFault"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientDBClusterCapacityFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified DB instance class isn't available in the specified Availability
// Zone.
type InsufficientDBInstanceCapacityFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientDBInstanceCapacityFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientDBInstanceCapacityFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientDBInstanceCapacityFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientDBInstanceCapacity"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientDBInstanceCapacityFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// There is insufficient storage available for the current action. You might be
// able to resolve this error by updating your subnet group to use different
// Availability Zones that have more storage available.
type InsufficientStorageClusterCapacityFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientStorageClusterCapacityFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientStorageClusterCapacityFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientStorageClusterCapacityFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientStorageClusterCapacity"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientStorageClusterCapacityFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The blue/green deployment can't be switched over or deleted because there is an
// invalid configuration in the green environment.
type InvalidBlueGreenDeploymentStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidBlueGreenDeploymentStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidBlueGreenDeploymentStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidBlueGreenDeploymentStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidBlueGreenDeploymentStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidBlueGreenDeploymentStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You can't delete the CEV.
type InvalidCustomDBEngineVersionStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidCustomDBEngineVersionStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidCustomDBEngineVersionStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidCustomDBEngineVersionStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidCustomDBEngineVersionStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidCustomDBEngineVersionStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity
// values are 2 , 4 , 8 , 16 , 32 , 64 , 128 , and 256 .
type InvalidDBClusterCapacityFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBClusterCapacityFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBClusterCapacityFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBClusterCapacityFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBClusterCapacityFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBClusterCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested operation can't be performed on the endpoint while the endpoint
// is in this state.
type InvalidDBClusterEndpointStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBClusterEndpointStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBClusterEndpointStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBClusterEndpointStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBClusterEndpointStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBClusterEndpointStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The supplied value isn't a valid DB cluster snapshot state.
type InvalidDBClusterSnapshotStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBClusterSnapshotStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBClusterSnapshotStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBClusterSnapshotStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBClusterSnapshotStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBClusterSnapshotStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The requested operation can't be performed while the cluster is in this state.
type InvalidDBClusterStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBClusterStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBClusterStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBClusterStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBClusterStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The automated backup is in an invalid state. For example, this automated backup
// is associated with an active instance.
type InvalidDBInstanceAutomatedBackupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBInstanceAutomatedBackupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBInstanceAutomatedBackupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBInstanceAutomatedBackupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBInstanceAutomatedBackupState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBInstanceAutomatedBackupStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The DB instance isn't in a valid state.
type InvalidDBInstanceStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBInstanceStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBInstanceStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBInstanceStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBInstanceState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBInstanceStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB parameter group is in use or is in an invalid state. If you are
// attempting to delete the parameter group, you can't delete it when the parameter
// group is in this state.
type InvalidDBParameterGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBParameterGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBParameterGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBParameterGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBParameterGroupState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBParameterGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't perform this operation while the DB proxy endpoint is in a particular
// state.
type InvalidDBProxyEndpointStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBProxyEndpointStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBProxyEndpointStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBProxyEndpointStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBProxyEndpointStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBProxyEndpointStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested operation can't be performed while the proxy is in this state.
type InvalidDBProxyStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBProxyStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBProxyStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBProxyStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBProxyStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBProxyStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The state of the DB security group doesn't allow deletion.
type InvalidDBSecurityGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBSecurityGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBSecurityGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBSecurityGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBSecurityGroupState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBSecurityGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The state of the DB snapshot doesn't allow deletion.
type InvalidDBSnapshotStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBSnapshotStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBSnapshotStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBSnapshotStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBSnapshotState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBSnapshotStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DBSubnetGroup doesn't belong to the same VPC as that of an existing
// cross-region read replica of the same source instance.
type InvalidDBSubnetGroupFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBSubnetGroupFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBSubnetGroupFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBSubnetGroupFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBSubnetGroupFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBSubnetGroupFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB subnet group cannot be deleted because it's in use.
type InvalidDBSubnetGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBSubnetGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBSubnetGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBSubnetGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBSubnetGroupStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBSubnetGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB subnet isn't in the available state.
type InvalidDBSubnetStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDBSubnetStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDBSubnetStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDBSubnetStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDBSubnetStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDBSubnetStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This error can occur if someone else is modifying a subscription. You should
// retry the action.
type InvalidEventSubscriptionStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidEventSubscriptionStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidEventSubscriptionStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidEventSubscriptionStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidEventSubscriptionState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidEventSubscriptionStateFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The export is invalid for exporting to an Amazon S3 bucket.
type InvalidExportOnlyFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidExportOnlyFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidExportOnlyFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidExportOnlyFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidExportOnly"
}
return *e.ErrorCodeOverride
}
func (e *InvalidExportOnlyFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The state of the export snapshot is invalid for exporting to an Amazon S3
// bucket.
type InvalidExportSourceStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidExportSourceStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidExportSourceStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidExportSourceStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidExportSourceState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidExportSourceStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't cancel an export task that has completed.
type InvalidExportTaskStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidExportTaskStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidExportTaskStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidExportTaskStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidExportTaskStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidExportTaskStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The global cluster is in an invalid state and can't perform the requested
// operation.
type InvalidGlobalClusterStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidGlobalClusterStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidGlobalClusterStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidGlobalClusterStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidGlobalClusterStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidGlobalClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The option group isn't in the available state.
type InvalidOptionGroupStateFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidOptionGroupStateFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidOptionGroupStateFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidOptionGroupStateFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidOptionGroupStateFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidOptionGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Cannot restore from VPC backup to non-VPC DB instance.
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 "InvalidRestoreFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidRestoreFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't
// authorized to access the specified Amazon S3 bucket. Verify the
// SourceS3BucketName and S3IngestionRoleArn values and try again.
type InvalidS3BucketFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidS3BucketFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidS3BucketFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidS3BucketFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidS3BucketFault"
}
return *e.ErrorCodeOverride
}
func (e *InvalidS3BucketFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested subnet is invalid, or multiple subnets were requested that are
// not all in a common 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 DB subnet group doesn't cover all Availability Zones after it's created
// because of users' change.
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 }
// An error occurred accessing an Amazon Web Services KMS key.
type KMSKeyNotAccessibleFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *KMSKeyNotAccessibleFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *KMSKeyNotAccessibleFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *KMSKeyNotAccessibleFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "KMSKeyNotAccessibleFault"
}
return *e.ErrorCodeOverride
}
func (e *KMSKeyNotAccessibleFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The network type is invalid for the DB instance. Valid nework type values are
// IPV4 and DUAL .
type NetworkTypeNotSupported struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NetworkTypeNotSupported) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NetworkTypeNotSupported) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NetworkTypeNotSupported) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NetworkTypeNotSupported"
}
return *e.ErrorCodeOverride
}
func (e *NetworkTypeNotSupported) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The option group you are trying to create already exists.
type OptionGroupAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *OptionGroupAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *OptionGroupAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *OptionGroupAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "OptionGroupAlreadyExistsFault"
}
return *e.ErrorCodeOverride
}
func (e *OptionGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified option group could not be found.
type OptionGroupNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *OptionGroupNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *OptionGroupNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *OptionGroupNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "OptionGroupNotFoundFault"
}
return *e.ErrorCodeOverride
}
func (e *OptionGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The quota of 20 option groups was exceeded for this Amazon Web Services account.
type OptionGroupQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *OptionGroupQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *OptionGroupQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *OptionGroupQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "OptionGroupQuotaExceededFault"
}
return *e.ErrorCodeOverride
}
func (e *OptionGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod
// equal to 0.
type PointInTimeRestoreNotEnabledFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *PointInTimeRestoreNotEnabledFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PointInTimeRestoreNotEnabledFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PointInTimeRestoreNotEnabledFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "PointInTimeRestoreNotEnabled"
}
return *e.ErrorCodeOverride
}
func (e *PointInTimeRestoreNotEnabledFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Provisioned IOPS not available in the specified Availability Zone.
type ProvisionedIopsNotAvailableInAZFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ProvisionedIopsNotAvailableInAZFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ProvisionedIopsNotAvailableInAZFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ProvisionedIopsNotAvailableInAZFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ProvisionedIopsNotAvailableInAZFault"
}
return *e.ErrorCodeOverride
}
func (e *ProvisionedIopsNotAvailableInAZFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// User already has a reservation with the given identifier.
type ReservedDBInstanceAlreadyExistsFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedDBInstanceAlreadyExistsFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedDBInstanceAlreadyExistsFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedDBInstanceAlreadyExistsFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedDBInstanceAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ReservedDBInstanceAlreadyExistsFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified reserved DB Instance not found.
type ReservedDBInstanceNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedDBInstanceNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedDBInstanceNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedDBInstanceNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedDBInstanceNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ReservedDBInstanceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Request would exceed the user's DB Instance quota.
type ReservedDBInstanceQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedDBInstanceQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedDBInstanceQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedDBInstanceQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedDBInstanceQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *ReservedDBInstanceQuotaExceededFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Specified offering does not exist.
type ReservedDBInstancesOfferingNotFoundFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ReservedDBInstancesOfferingNotFoundFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ReservedDBInstancesOfferingNotFoundFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ReservedDBInstancesOfferingNotFoundFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ReservedDBInstancesOfferingNotFound"
}
return *e.ErrorCodeOverride
}
func (e *ReservedDBInstancesOfferingNotFoundFault) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified resource ID was not 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 }
// You have exceeded the maximum number of accounts that you can share a manual DB
// snapshot with.
type SharedSnapshotQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SharedSnapshotQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SharedSnapshotQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SharedSnapshotQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SharedSnapshotQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *SharedSnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request would result in the user exceeding the allowed number of DB
// snapshots.
type SnapshotQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SnapshotQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SnapshotQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SnapshotQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SnapshotQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *SnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// SNS has responded that there is a problem with the SNS topic specified.
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 SNS topic ARN.
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 }
// The SNS topic 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 source DB cluster isn't supported for a blue/green deployment.
type SourceClusterNotSupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SourceClusterNotSupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SourceClusterNotSupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SourceClusterNotSupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SourceClusterNotSupportedFault"
}
return *e.ErrorCodeOverride
}
func (e *SourceClusterNotSupportedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The source DB instance isn't supported for a blue/green deployment.
type SourceDatabaseNotSupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SourceDatabaseNotSupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SourceDatabaseNotSupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SourceDatabaseNotSupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SourceDatabaseNotSupportedFault"
}
return *e.ErrorCodeOverride
}
func (e *SourceDatabaseNotSupportedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The requested 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 }
// The request would result in the user exceeding the allowed amount of storage
// available across all DB instances.
type StorageQuotaExceededFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *StorageQuotaExceededFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *StorageQuotaExceededFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *StorageQuotaExceededFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "StorageQuotaExceeded"
}
return *e.ErrorCodeOverride
}
func (e *StorageQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The aurora-iopt1 storage type isn't available, because you modified the DB
// cluster to use this storage type less than one month ago.
type StorageTypeNotAvailableFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *StorageTypeNotAvailableFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *StorageTypeNotAvailableFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *StorageTypeNotAvailableFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "StorageTypeNotAvailableFault"
}
return *e.ErrorCodeOverride
}
func (e *StorageTypeNotAvailableFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified StorageType can't be associated with the DB instance.
type StorageTypeNotSupportedFault struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *StorageTypeNotSupportedFault) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *StorageTypeNotSupportedFault) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *StorageTypeNotSupportedFault) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "StorageTypeNotSupported"
}
return *e.ErrorCodeOverride
}
func (e *StorageTypeNotSupportedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The DB subnet is already in use in the Availability Zone.
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 }
// The supplied subscription name already exists.
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 supplied category does not exist.
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 }
// The subscription 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 }
| 3,407 |
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"
)
// Describes a quota for an Amazon Web Services account. The following are account
// quotas:
// - AllocatedStorage - The total allocated storage per account, in GiB. The used
// value is the total allocated storage in the account, in GiB.
// - AuthorizationsPerDBSecurityGroup - The number of ingress rules per DB
// security group. The used value is the highest number of ingress rules in a DB
// security group in the account. Other DB security groups in the account might
// have a lower number of ingress rules.
// - CustomEndpointsPerDBCluster - The number of custom endpoints per DB cluster.
// The used value is the highest number of custom endpoints in a DB clusters in the
// account. Other DB clusters in the account might have a lower number of custom
// endpoints.
// - DBClusterParameterGroups - The number of DB cluster parameter groups per
// account, excluding default parameter groups. The used value is the count of
// nondefault DB cluster parameter groups in the account.
// - DBClusterRoles - The number of associated Amazon Web Services Identity and
// Access Management (IAM) roles per DB cluster. The used value is the highest
// number of associated IAM roles for a DB cluster in the account. Other DB
// clusters in the account might have a lower number of associated IAM roles.
// - DBClusters - The number of DB clusters per account. The used value is the
// count of DB clusters in the account.
// - DBInstanceRoles - The number of associated IAM roles per DB instance. The
// used value is the highest number of associated IAM roles for a DB instance in
// the account. Other DB instances in the account might have a lower number of
// associated IAM roles.
// - DBInstances - The number of DB instances per account. The used value is the
// count of the DB instances in the account. Amazon RDS DB instances, Amazon Aurora
// DB instances, Amazon Neptune instances, and Amazon DocumentDB instances apply to
// this quota.
// - DBParameterGroups - The number of DB parameter groups per account, excluding
// default parameter groups. The used value is the count of nondefault DB parameter
// groups in the account.
// - DBSecurityGroups - The number of DB security groups (not VPC security
// groups) per account, excluding the default security group. The used value is the
// count of nondefault DB security groups in the account.
// - DBSubnetGroups - The number of DB subnet groups per account. The used value
// is the count of the DB subnet groups in the account.
// - EventSubscriptions - The number of event subscriptions per account. The used
// value is the count of the event subscriptions in the account.
// - ManualClusterSnapshots - The number of manual DB cluster snapshots per
// account. The used value is the count of the manual DB cluster snapshots in the
// account.
// - ManualSnapshots - The number of manual DB instance snapshots per account.
// The used value is the count of the manual DB instance snapshots in the account.
// - OptionGroups - The number of DB option groups per account, excluding default
// option groups. The used value is the count of nondefault DB option groups in the
// account.
// - ReadReplicasPerMaster - The number of read replicas per DB instance. The
// used value is the highest number of read replicas for a DB instance in the
// account. Other DB instances in the account might have a lower number of read
// replicas.
// - ReservedDBInstances - The number of reserved DB instances per account. The
// used value is the count of the active reserved DB instances in the account.
// - SubnetsPerDBSubnetGroup - The number of subnets per DB subnet group. The
// used value is highest number of subnets for a DB subnet group in the account.
// Other DB subnet groups in the account might have a lower number of subnets.
//
// For more information, see Quotas for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html)
// in the Amazon RDS User Guide and Quotas for Amazon Aurora (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_Limits.html)
// in the Amazon Aurora User Guide.
type AccountQuota struct {
// The name of the Amazon RDS quota for this Amazon Web Services account.
AccountQuotaName *string
// The maximum allowed value for the quota.
Max int64
// The amount currently used toward the quota maximum.
Used int64
noSmithyDocumentSerde
}
// Contains Availability Zone information. This data type is used as an element in
// the OrderableDBInstanceOption data type.
type AvailabilityZone struct {
// The name of the Availability Zone.
Name *string
noSmithyDocumentSerde
}
// Contains the available processor feature information for the DB instance class
// of a DB instance. For more information, see Configuring the Processor of the DB
// Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor)
// in the Amazon RDS User Guide.
type AvailableProcessorFeature struct {
// The allowed values for the processor feature of the DB instance class.
AllowedValues *string
// The default value for the processor feature of the DB instance class.
DefaultValue *string
// The name of the processor feature. Valid names are coreCount and threadsPerCore .
Name *string
noSmithyDocumentSerde
}
// Contains the details about a blue/green deployment. For more information, see
// Using Amazon RDS Blue/Green Deployments for database updates (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)
// in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for
// database updates (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html)
// in the Amazon Aurora User Guide.
type BlueGreenDeployment struct {
// The system-generated identifier of the blue/green deployment.
BlueGreenDeploymentIdentifier *string
// The user-supplied name of the blue/green deployment.
BlueGreenDeploymentName *string
// Specifies the time when the blue/green deployment was created, in Universal
// Coordinated Time (UTC).
CreateTime *time.Time
// Specifies the time when the blue/green deployment was deleted, in Universal
// Coordinated Time (UTC).
DeleteTime *time.Time
// The source database for the blue/green deployment. Before switchover, the
// source database is the production database in the blue environment.
Source *string
// The status of the blue/green deployment. Values:
// - PROVISIONING - Resources are being created in the green environment.
// - AVAILABLE - Resources are available in the green environment.
// - SWITCHOVER_IN_PROGRESS - The deployment is being switched from the blue
// environment to the green environment.
// - SWITCHOVER_COMPLETED - Switchover from the blue environment to the green
// environment is complete.
// - INVALID_CONFIGURATION - Resources in the green environment are invalid, so
// switchover isn't possible.
// - SWITCHOVER_FAILED - Switchover was attempted but failed.
// - DELETING - The blue/green deployment is being deleted.
Status *string
// Additional information about the status of the blue/green deployment.
StatusDetails *string
// The details about each source and target resource in the blue/green deployment.
SwitchoverDetails []SwitchoverDetail
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// The target database for the blue/green deployment. Before switchover, the
// target database is the clone database in the green environment.
Target *string
// Either tasks to be performed or tasks that have been completed on the target
// database before switchover.
Tasks []BlueGreenDeploymentTask
noSmithyDocumentSerde
}
// Contains the details about a task for a blue/green deployment. For more
// information, see Using Amazon RDS Blue/Green Deployments for database updates (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)
// in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for
// database updates (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html)
// in the Amazon Aurora User Guide.
type BlueGreenDeploymentTask struct {
// The name of the blue/green deployment task.
Name *string
// The status of the blue/green deployment task. Values:
// - PENDING - The resources are being prepared for deployment.
// - IN_PROGRESS - The resource is being deployed.
// - COMPLETED - The resource has been deployed.
// - FAILED - Deployment of the resource failed.
Status *string
noSmithyDocumentSerde
}
// A CA certificate for an Amazon Web Services account. For more information, see
// Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
type Certificate struct {
// The Amazon Resource Name (ARN) for the certificate.
CertificateArn *string
// The unique key that identifies a certificate.
CertificateIdentifier *string
// The type of the certificate.
CertificateType *string
// Whether there is an override for the default certificate identifier.
CustomerOverride *bool
// If there is an override for the default certificate identifier, when the
// override expires.
CustomerOverrideValidTill *time.Time
// The thumbprint of the certificate.
Thumbprint *string
// The starting date from which the certificate is valid.
ValidFrom *time.Time
// The final date that the certificate continues to be valid.
ValidTill *time.Time
noSmithyDocumentSerde
}
// Returns the details of the DB instance’s server certificate. For more
// information, see Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
type CertificateDetails struct {
// The CA identifier of the CA certificate used for the DB instance's server
// certificate.
CAIdentifier *string
// The expiration date of the DB instance’s server certificate.
ValidTill *time.Time
noSmithyDocumentSerde
}
// This data type is used as a response element in the action
// DescribeDBEngineVersions .
type CharacterSet struct {
// The description of the character set.
CharacterSetDescription *string
// The name of the character set.
CharacterSetName *string
noSmithyDocumentSerde
}
// The configuration setting for the log types to be enabled for export to
// CloudWatch Logs for a specific DB instance or DB cluster. The EnableLogTypes
// and DisableLogTypes arrays determine which logs will be exported (or not
// exported) to CloudWatch Logs. The values within these arrays depend on the DB
// engine being used. For more information about exporting CloudWatch Logs for
// Amazon RDS DB instances, see Publishing Database Logs to Amazon CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon RDS User Guide. For more information about exporting CloudWatch
// Logs for Amazon Aurora DB clusters, see Publishing Database Logs to Amazon
// CloudWatch Logs (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
// in the Amazon Aurora User Guide.
type CloudwatchLogsExportConfiguration struct {
// The list of log types to disable.
DisableLogTypes []string
// The list of log types to enable.
EnableLogTypes []string
noSmithyDocumentSerde
}
// This data type is used as a response element in the ModifyDBCluster operation
// and contains changes that will be applied during the next maintenance window.
type ClusterPendingModifiedValues struct {
// The allocated storage size in gibibytes (GiB) for all database engines except
// Amazon Aurora. For Aurora, AllocatedStorage always returns 1, because Aurora DB
// cluster storage size isn't fixed, but instead automatically adjusts as needed.
AllocatedStorage *int32
// The number of days for which automatic DB snapshots are retained.
BackupRetentionPeriod *int32
// The DBClusterIdentifier value for the DB cluster.
DBClusterIdentifier *string
// The database engine version.
EngineVersion *string
// A value that indicates whether mapping of Amazon Web Services Identity and
// Access Management (IAM) accounts to database accounts is enabled.
IAMDatabaseAuthenticationEnabled *bool
// The Provisioned IOPS (I/O operations per second) value. This setting is only
// for non-Aurora Multi-AZ DB clusters.
Iops *int32
// The master credentials for the DB cluster.
MasterUserPassword *string
// A list of the log types whose configuration is still pending. In other words,
// these log types are in the process of being activated or deactivated.
PendingCloudwatchLogsExports *PendingCloudwatchLogsExports
// The storage type for the DB cluster.
StorageType *string
noSmithyDocumentSerde
}
// Specifies the settings that control the size and behavior of the connection
// pool associated with a DBProxyTargetGroup .
type ConnectionPoolConfiguration struct {
// The number of seconds for a proxy to wait for a connection to become available
// in the connection pool. Only applies when the proxy has opened its maximum
// number of connections and all connections are busy with client sessions.
// Default: 120 Constraints: between 1 and 3600, or 0 representing unlimited
ConnectionBorrowTimeout *int32
// One or more SQL statements for the proxy to run when opening each new database
// connection. Typically used with SET statements to make sure that each
// connection has identical settings such as time zone and character set. For
// multiple statements, use semicolons as the separator. You can also include
// multiple variables in a single SET statement, such as SET x=1, y=2 . Default: no
// initialization query
InitQuery *string
// The maximum size of the connection pool for each target in a target group. The
// value is expressed as a percentage of the max_connections setting for the RDS
// DB instance or Aurora DB cluster used by the target group. If you specify
// MaxIdleConnectionsPercent , then you must also include a value for this
// parameter. Default: 10 for RDS for Microsoft SQL Server, and 100 for all other
// engines Constraints: Must be between 1 and 100.
MaxConnectionsPercent *int32
// Controls how actively the proxy closes idle database connections in the
// connection pool. The value is expressed as a percentage of the max_connections
// setting for the RDS DB instance or Aurora DB cluster used by the target group.
// With a high value, the proxy leaves a high percentage of idle database
// connections open. A low value causes the proxy to close more idle connections
// and return them to the database. If you specify this parameter, then you must
// also include a value for MaxConnectionsPercent . Default: The default value is
// half of the value of MaxConnectionsPercent . For example, if
// MaxConnectionsPercent is 80, then the default value of MaxIdleConnectionsPercent
// is 40. If the value of MaxConnectionsPercent isn't specified, then for SQL
// Server, MaxIdleConnectionsPercent is 5, and for all other engines, the default
// is 50. Constraints: Must be between 0 and the value of MaxConnectionsPercent .
MaxIdleConnectionsPercent *int32
// Each item in the list represents a class of SQL operations that normally cause
// all later statements in a session using a proxy to be pinned to the same
// underlying database connection. Including an item in the list exempts that class
// of SQL operations from the pinning behavior. Default: no session pinning filters
SessionPinningFilters []string
noSmithyDocumentSerde
}
// Displays the settings that control the size and behavior of the connection pool
// associated with a DBProxyTarget .
type ConnectionPoolConfigurationInfo struct {
// The number of seconds for a proxy to wait for a connection to become available
// in the connection pool. Only applies when the proxy has opened its maximum
// number of connections and all connections are busy with client sessions.
ConnectionBorrowTimeout int32
// One or more SQL statements for the proxy to run when opening each new database
// connection. Typically used with SET statements to make sure that each
// connection has identical settings such as time zone and character set. This
// setting is empty by default. For multiple statements, use semicolons as the
// separator. You can also include multiple variables in a single SET statement,
// such as SET x=1, y=2 .
InitQuery *string
// The maximum size of the connection pool for each target in a target group. The
// value is expressed as a percentage of the max_connections setting for the RDS
// DB instance or Aurora DB cluster used by the target group.
MaxConnectionsPercent int32
// Controls how actively the proxy closes idle database connections in the
// connection pool. The value is expressed as a percentage of the max_connections
// setting for the RDS DB instance or Aurora DB cluster used by the target group.
// With a high value, the proxy leaves a high percentage of idle database
// connections open. A low value causes the proxy to close more idle connections
// and return them to the database.
MaxIdleConnectionsPercent int32
// Each item in the list represents a class of SQL operations that normally cause
// all later statements in a session using a proxy to be pinned to the same
// underlying database connection. Including an item in the list exempts that class
// of SQL operations from the pinning behavior. This setting is only supported for
// MySQL engine family databases. Currently, the only allowed value is
// EXCLUDE_VARIABLE_SETS .
SessionPinningFilters []string
noSmithyDocumentSerde
}
// A value that indicates the AMI information.
type CustomDBEngineVersionAMI struct {
// A value that indicates the ID of the AMI.
ImageId *string
// A value that indicates the status of a custom engine version (CEV).
Status *string
noSmithyDocumentSerde
}
// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For
// an Amazon Aurora DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , PromoteReadReplicaDBCluster ,
// RestoreDBClusterFromS3 , RestoreDBClusterFromSnapshot ,
// RestoreDBClusterToPointInTime , StartDBCluster , and StopDBCluster . For a
// Multi-AZ DB cluster, this data type is used as a response element in the
// operations CreateDBCluster , DeleteDBCluster , DescribeDBClusters ,
// FailoverDBCluster , ModifyDBCluster , RebootDBCluster ,
// RestoreDBClusterFromSnapshot , and RestoreDBClusterToPointInTime . For more
// information on Amazon Aurora DB clusters, see What is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)
// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters,
// see Multi-AZ deployments with two readable standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
type DBCluster struct {
// The name of the Amazon Kinesis data stream used for the database activity
// stream.
ActivityStreamKinesisStreamName *string
// The Amazon Web Services KMS key identifier used for encrypting messages in the
// database activity stream. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
ActivityStreamKmsKeyId *string
// The mode of the database activity stream. Database events such as a change or
// access generate an activity stream event. The database session can handle these
// events either synchronously or asynchronously.
ActivityStreamMode ActivityStreamMode
// The status of the database activity stream.
ActivityStreamStatus ActivityStreamStatus
// For all database engines except Amazon Aurora, AllocatedStorage specifies the
// allocated storage size in gibibytes (GiB). For Aurora, AllocatedStorage always
// returns 1, because Aurora DB cluster storage size isn't fixed, but instead
// automatically adjusts as needed.
AllocatedStorage *int32
// A list of the Amazon Web Services Identity and Access Management (IAM) roles
// that are associated with the DB cluster. IAM roles that are associated with a DB
// cluster grant permission for the DB cluster to access other Amazon Web Services
// on your behalf.
AssociatedRoles []DBClusterRole
// Indicates whether minor version patches are applied automatically. This setting
// is only for non-Aurora Multi-AZ DB clusters.
AutoMinorVersionUpgrade bool
// The time when a stopped DB cluster is restarted automatically.
AutomaticRestartTime *time.Time
// The list of Availability Zones (AZs) where instances in the DB cluster can be
// created.
AvailabilityZones []string
// The number of change records stored for Backtrack.
BacktrackConsumedChangeRecords *int64
// The target backtrack window, in seconds. If this value is set to 0 ,
// backtracking is disabled for the DB cluster. Otherwise, backtracking is enabled.
BacktrackWindow *int64
// The number of days for which automatic DB snapshots are retained.
BackupRetentionPeriod *int32
// The current capacity of an Aurora Serverless v1 DB cluster. The capacity is 0
// (zero) when the cluster is paused. For more information about Aurora Serverless
// v1, see Using Amazon Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
// in the Amazon Aurora User Guide.
Capacity *int32
// If present, specifies the name of the character set that this cluster is
// associated with.
CharacterSetName *string
// The ID of the clone group with which the DB cluster is associated.
CloneGroupId *string
// The time when the DB cluster was created, in Universal Coordinated Time (UTC).
ClusterCreateTime *time.Time
// Indicates whether tags are copied from the DB cluster to snapshots of the DB
// cluster.
CopyTagsToSnapshot *bool
// Indicates whether the DB cluster is a clone of a DB cluster owned by a
// different Amazon Web Services account.
CrossAccountClone *bool
// The custom endpoints associated with the DB cluster.
CustomEndpoints []string
// The Amazon Resource Name (ARN) for the DB cluster.
DBClusterArn *string
// The user-supplied identifier for the DB cluster. This identifier is the unique
// key that identifies a DB cluster.
DBClusterIdentifier *string
// The name of the compute and memory capacity class of the DB instance. This
// setting is only for non-Aurora Multi-AZ DB clusters.
DBClusterInstanceClass *string
// The list of DB instances that make up the DB cluster.
DBClusterMembers []DBClusterMember
// The list of option group memberships for this DB cluster.
DBClusterOptionGroupMemberships []DBClusterOptionGroupStatus
// The name of the DB cluster parameter group for the DB cluster.
DBClusterParameterGroup *string
// Information about the subnet group associated with the DB cluster, including
// the name, description, and subnets in the subnet group.
DBSubnetGroup *string
// Reserved for future use.
DBSystemId *string
// The name of the initial database that was specified for the DB cluster when it
// was created, if one was provided. This same name is returned for the life of the
// DB cluster.
DatabaseName *string
// The Amazon Web Services Region-unique, immutable identifier for the DB cluster.
// This identifier is found in Amazon Web Services CloudTrail log entries whenever
// the KMS key for the DB cluster is accessed.
DbClusterResourceId *string
// Indicates whether the DB cluster has deletion protection enabled. The database
// can't be deleted when deletion protection is enabled.
DeletionProtection *bool
// The Active Directory Domain membership records associated with the DB cluster.
DomainMemberships []DomainMembership
// The earliest time to which a DB cluster can be backtracked.
EarliestBacktrackTime *time.Time
// The earliest time to which a database can be restored with point-in-time
// restore.
EarliestRestorableTime *time.Time
// A list of log types that this DB cluster is configured to export to CloudWatch
// Logs. Log types vary by DB engine. For information about the log types for each
// DB engine, see Amazon RDS Database Log Files (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html)
// in the Amazon Aurora User Guide.
EnabledCloudwatchLogsExports []string
// The connection endpoint for the primary instance of the DB cluster.
Endpoint *string
// The database engine used for this DB cluster.
Engine *string
// The DB engine mode of the DB cluster, either provisioned or serverless . For
// more information, see CreateDBCluster (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html)
// .
EngineMode *string
// The version of the database engine.
EngineVersion *string
// Specifies whether write forwarding is enabled for a secondary cluster in an
// Aurora global database. Because write forwarding takes time to enable, check the
// value of GlobalWriteForwardingStatus to confirm that the request has completed
// before using the write forwarding feature for this cluster.
GlobalWriteForwardingRequested *bool
// The status of write forwarding for a secondary cluster in an Aurora global
// database.
GlobalWriteForwardingStatus WriteForwardingStatus
// The ID that Amazon Route 53 assigns when you create a hosted zone.
HostedZoneId *string
// Indicates whether the HTTP endpoint for an Aurora Serverless v1 DB cluster is
// enabled. When enabled, the HTTP endpoint provides a connectionless web service
// API for running SQL queries on the Aurora Serverless v1 DB cluster. You can also
// query your database from inside the RDS console with the query editor. For more
// information, see Using the Data API for Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
// in the Amazon Aurora User Guide.
HttpEndpointEnabled *bool
// Indicates whether the mapping of Amazon Web Services Identity and Access
// Management (IAM) accounts to database accounts is enabled.
IAMDatabaseAuthenticationEnabled *bool
// The next time you can modify the DB cluster to use the aurora-iopt1 storage
// type. This setting is only for Aurora DB clusters.
IOOptimizedNextAllowedModificationTime *time.Time
// The Provisioned IOPS (I/O operations per second) value. This setting is only
// for non-Aurora Multi-AZ DB clusters.
Iops *int32
// If StorageEncrypted is enabled, the Amazon Web Services KMS key identifier for
// the encrypted DB cluster. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
KmsKeyId *string
// The latest time to which a database can be restored with point-in-time restore.
LatestRestorableTime *time.Time
// The secret managed by RDS in Amazon Web Services Secrets Manager for the master
// user password. For more information, see Password management with Amazon Web
// Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide and Password management with Amazon Web Services
// Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html)
// in the Amazon Aurora User Guide.
MasterUserSecret *MasterUserSecret
// The master username for the DB cluster.
MasterUsername *string
// The interval, in seconds, between points when Enhanced Monitoring metrics are
// collected for the DB cluster. This setting is only for non-Aurora Multi-AZ DB
// clusters.
MonitoringInterval *int32
// The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics
// to Amazon CloudWatch Logs. This setting is only for non-Aurora Multi-AZ DB
// clusters.
MonitoringRoleArn *string
// Indicates whether the DB cluster has instances in multiple Availability Zones.
MultiAZ *bool
// The network type of the DB instance. The network type is determined by the
// DBSubnetGroup specified for the DB cluster. A DBSubnetGroup can support only
// the IPv4 protocol or the IPv4 and the IPv6 protocols ( DUAL ). For more
// information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide. This setting is only for Aurora DB clusters.
// Valid Values: IPV4 | DUAL
NetworkType *string
// Information about pending changes to the DB cluster. This information is
// returned only when there are pending changes. Specific changes are identified by
// subelements.
PendingModifiedValues *ClusterPendingModifiedValues
// The progress of the operation as a percentage.
PercentProgress *string
// Indicates whether Performance Insights is enabled for the DB cluster. This
// setting is only for non-Aurora Multi-AZ DB clusters.
PerformanceInsightsEnabled *bool
// The Amazon Web Services KMS key identifier for encryption of Performance
// Insights data. The Amazon Web Services KMS key identifier is the key ARN, key
// ID, alias ARN, or alias name for the KMS key. This setting is only for
// non-Aurora Multi-AZ DB clusters.
PerformanceInsightsKMSKeyId *string
// The number of days to retain Performance Insights data. This setting is only
// for non-Aurora Multi-AZ DB clusters. Valid Values:
// - 7
// - month * 31, where month is a number of months from 1-23. Examples: 93 (3
// months * 31), 341 (11 months * 31), 589 (19 months * 31)
// - 731
// Default: 7 days
PerformanceInsightsRetentionPeriod *int32
// The port that the database engine is listening on.
Port *int32
// The daily time range during which automated backups are created if automated
// backups are enabled, as determined by the BackupRetentionPeriod .
PreferredBackupWindow *string
// The weekly time range during which system maintenance can occur, in Universal
// Coordinated Time (UTC).
PreferredMaintenanceWindow *string
// Indicates whether the DB cluster is publicly accessible. When the DB cluster is
// publicly accessible, its Domain Name System (DNS) endpoint resolves to the
// private IP address from within the DB cluster's virtual private cloud (VPC). It
// resolves to the public IP address from outside of the DB cluster's VPC. Access
// to the DB cluster is ultimately controlled by the security group it uses. That
// public access isn't permitted if the security group assigned to the DB cluster
// doesn't permit it. When the DB cluster isn't publicly accessible, it is an
// internal DB cluster with a DNS name that resolves to a private IP address. For
// more information, see CreateDBCluster . This setting is only for non-Aurora
// Multi-AZ DB clusters.
PubliclyAccessible *bool
// Contains one or more identifiers of the read replicas associated with this DB
// cluster.
ReadReplicaIdentifiers []string
// The reader endpoint for the DB cluster. The reader endpoint for a DB cluster
// load-balances connections across the Aurora Replicas that are available in a DB
// cluster. As clients request new connections to the reader endpoint, Aurora
// distributes the connection requests among the Aurora Replicas in the DB cluster.
// This functionality can help balance your read workload across multiple Aurora
// Replicas in your DB cluster. If a failover occurs, and the Aurora Replica that
// you are connected to is promoted to be the primary instance, your connection is
// dropped. To continue sending your read workload to other Aurora Replicas in the
// cluster, you can then reconnect to the reader endpoint.
ReaderEndpoint *string
// The identifier of the source DB cluster if this DB cluster is a read replica.
ReplicationSourceIdentifier *string
// The scaling configuration for an Aurora DB cluster in serverless DB engine
// mode. For more information, see Using Amazon Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
// in the Amazon Aurora User Guide.
ScalingConfigurationInfo *ScalingConfigurationInfo
// The scaling configuration for an Aurora Serverless v2 DB cluster. For more
// information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
ServerlessV2ScalingConfiguration *ServerlessV2ScalingConfigurationInfo
// The current state of this DB cluster.
Status *string
// Indicates whether the DB cluster is encrypted.
StorageEncrypted bool
// The storage type associated with the DB cluster.
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// The list of VPC security groups that the DB cluster belongs to.
VpcSecurityGroups []VpcSecurityGroupMembership
noSmithyDocumentSerde
}
// This data type is used as a response element in the DescribeDBClusterBacktracks
// action.
type DBClusterBacktrack struct {
// Contains the backtrack identifier.
BacktrackIdentifier *string
// The timestamp of the time at which the backtrack was requested.
BacktrackRequestCreationTime *time.Time
// The timestamp of the time to which the DB cluster was backtracked.
BacktrackTo *time.Time
// The timestamp of the time from which the DB cluster was backtracked.
BacktrackedFrom *time.Time
// Contains a user-supplied DB cluster identifier. This identifier is the unique
// key that identifies a DB cluster.
DBClusterIdentifier *string
// The status of the backtrack. This property returns one of the following values:
// - applying - The backtrack is currently being applied to or rolled back from
// the DB cluster.
// - completed - The backtrack has successfully been applied to or rolled back
// from the DB cluster.
// - failed - An error occurred while the backtrack was applied to or rolled back
// from the DB cluster.
// - pending - The backtrack is currently pending application to or rollback from
// the DB cluster.
Status *string
noSmithyDocumentSerde
}
// This data type represents the information you need to connect to an Amazon
// Aurora DB cluster. This data type is used as a response element in the following
// actions:
// - CreateDBClusterEndpoint
// - DescribeDBClusterEndpoints
// - ModifyDBClusterEndpoint
// - DeleteDBClusterEndpoint
//
// For the data structure that represents Amazon RDS DB instance endpoints, see
// Endpoint .
type DBClusterEndpoint struct {
// The type associated with a custom endpoint. One of: READER , WRITER , ANY .
CustomEndpointType *string
// The Amazon Resource Name (ARN) for the endpoint.
DBClusterEndpointArn *string
// The identifier associated with the endpoint. This parameter is stored as a
// lowercase string.
DBClusterEndpointIdentifier *string
// A unique system-generated identifier for an endpoint. It remains the same for
// the whole life of the endpoint.
DBClusterEndpointResourceIdentifier *string
// The DB cluster identifier of the DB cluster associated with the endpoint. This
// parameter is stored as a lowercase string.
DBClusterIdentifier *string
// The DNS address of the endpoint.
Endpoint *string
// The type of the endpoint. One of: READER , WRITER , CUSTOM .
EndpointType *string
// List of DB instance identifiers that aren't part of the custom endpoint group.
// All other eligible instances are reachable through the custom endpoint. Only
// relevant if the list of static members is empty.
ExcludedMembers []string
// List of DB instance identifiers that are part of the custom endpoint group.
StaticMembers []string
// The current status of the endpoint. One of: creating , available , deleting ,
// inactive , modifying . The inactive state applies to an endpoint that can't be
// used for a certain kind of cluster, such as a writer endpoint for a read-only
// secondary cluster in a global database.
Status *string
noSmithyDocumentSerde
}
// Contains information about an instance that is part of a DB cluster.
type DBClusterMember struct {
// Specifies the status of the DB cluster parameter group for this member of the
// DB cluster.
DBClusterParameterGroupStatus *string
// Specifies the instance identifier for this member of the DB cluster.
DBInstanceIdentifier *string
// Value that is true if the cluster member is the primary instance for the DB
// cluster and false otherwise.
IsClusterWriter bool
// A value that specifies the order in which an Aurora Replica is promoted to the
// primary instance after a failure of the existing primary instance. For more
// information, see Fault Tolerance for an Aurora DB Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance)
// in the Amazon Aurora User Guide.
PromotionTier *int32
noSmithyDocumentSerde
}
// Contains status information for a DB cluster option group.
type DBClusterOptionGroupStatus struct {
// Specifies the name of the DB cluster option group.
DBClusterOptionGroupName *string
// Specifies the status of the DB cluster option group.
Status *string
noSmithyDocumentSerde
}
// Contains the details of an Amazon RDS DB cluster parameter group. This data
// type is used as a response element in the DescribeDBClusterParameterGroups
// action.
type DBClusterParameterGroup struct {
// The Amazon Resource Name (ARN) for the DB cluster parameter group.
DBClusterParameterGroupArn *string
// The name of the DB cluster parameter group.
DBClusterParameterGroupName *string
// The name of the DB parameter group family that this DB cluster parameter group
// is compatible with.
DBParameterGroupFamily *string
// Provides the customer-specified description for this DB cluster parameter group.
Description *string
noSmithyDocumentSerde
}
// Describes an Amazon Web Services Identity and Access Management (IAM) role that
// is associated with a DB cluster.
type DBClusterRole struct {
// The name of the feature associated with the Amazon Web Services Identity and
// Access Management (IAM) role. For information about supported feature names, see
// DBEngineVersion .
FeatureName *string
// The Amazon Resource Name (ARN) of the IAM role that is associated with the DB
// cluster.
RoleArn *string
// Describes the state of association between the IAM role and the DB cluster. The
// Status property returns one of the following values:
// - ACTIVE - the IAM role ARN is associated with the DB cluster and can be used
// to access other Amazon Web Services on your behalf.
// - PENDING - the IAM role ARN is being associated with the DB cluster.
// - INVALID - the IAM role ARN is associated with the DB cluster, but the DB
// cluster is unable to assume the IAM role in order to access other Amazon Web
// Services on your behalf.
Status *string
noSmithyDocumentSerde
}
// Contains the details for an Amazon RDS DB cluster snapshot This data type is
// used as a response element in the DescribeDBClusterSnapshots action.
type DBClusterSnapshot struct {
// Specifies the allocated storage size in gibibytes (GiB).
AllocatedStorage int32
// Provides the list of Availability Zones (AZs) where instances in the DB cluster
// snapshot can be restored.
AvailabilityZones []string
// Specifies the time when the DB cluster was created, in Universal Coordinated
// Time (UTC).
ClusterCreateTime *time.Time
// Specifies the DB cluster identifier of the DB cluster that this DB cluster
// snapshot was created from.
DBClusterIdentifier *string
// The Amazon Resource Name (ARN) for the DB cluster snapshot.
DBClusterSnapshotArn *string
// Specifies the identifier for the DB cluster snapshot.
DBClusterSnapshotIdentifier *string
// Reserved for future use.
DBSystemId *string
// Specifies the name of the database engine for this DB cluster snapshot.
Engine *string
// Provides the engine mode of the database engine for this DB cluster snapshot.
EngineMode *string
// Provides the version of the database engine for this DB cluster snapshot.
EngineVersion *string
// True if mapping of Amazon Web Services Identity and Access Management (IAM)
// accounts to database accounts is enabled, and otherwise false.
IAMDatabaseAuthenticationEnabled bool
// If StorageEncrypted is true, the Amazon Web Services KMS key identifier for the
// encrypted DB cluster snapshot. The Amazon Web Services KMS key identifier is the
// key ARN, key ID, alias ARN, or alias name for the KMS key.
KmsKeyId *string
// Provides the license model information for this DB cluster snapshot.
LicenseModel *string
// Provides the master username for this DB cluster snapshot.
MasterUsername *string
// Specifies the percentage of the estimated data that has been transferred.
PercentProgress int32
// Specifies the port that the DB cluster was listening on at the time of the
// snapshot.
Port int32
// Provides the time when the snapshot was taken, in Universal Coordinated Time
// (UTC).
SnapshotCreateTime *time.Time
// Provides the type of the DB cluster snapshot.
SnapshotType *string
// If the DB cluster snapshot was copied from a source DB cluster snapshot, the
// Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null
// value.
SourceDBClusterSnapshotArn *string
// Specifies the status of this DB cluster snapshot. Valid statuses are the
// following:
// - available
// - copying
// - creating
Status *string
// Specifies whether the DB cluster snapshot is encrypted.
StorageEncrypted bool
// The storage type associated with the DB cluster snapshot. This setting is only
// for Aurora DB clusters.
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// Provides the VPC ID associated with the DB cluster snapshot.
VpcId *string
noSmithyDocumentSerde
}
// Contains the name and values of a manual DB cluster snapshot attribute. Manual
// DB cluster snapshot attributes are used to authorize other Amazon Web Services
// accounts to restore a manual DB cluster snapshot. For more information, see the
// ModifyDBClusterSnapshotAttribute API action.
type DBClusterSnapshotAttribute struct {
// The name of the manual DB cluster snapshot attribute. The attribute named
// restore refers to the list of Amazon Web Services accounts that have permission
// to copy or restore the manual DB cluster snapshot. For more information, see the
// ModifyDBClusterSnapshotAttribute API action.
AttributeName *string
// The value(s) for the manual DB cluster snapshot attribute. If the AttributeName
// field is set to restore , then this element returns a list of IDs of the Amazon
// Web Services accounts that are authorized to copy or restore the manual DB
// cluster snapshot. If a value of all is in the list, then the manual DB cluster
// snapshot is public and available for any Amazon Web Services account to copy or
// restore.
AttributeValues []string
noSmithyDocumentSerde
}
// Contains the results of a successful call to the
// DescribeDBClusterSnapshotAttributes API action. Manual DB cluster snapshot
// attributes are used to authorize other Amazon Web Services accounts to copy or
// restore a manual DB cluster snapshot. For more information, see the
// ModifyDBClusterSnapshotAttribute API action.
type DBClusterSnapshotAttributesResult struct {
// The list of attributes and values for the manual DB cluster snapshot.
DBClusterSnapshotAttributes []DBClusterSnapshotAttribute
// The identifier of the manual DB cluster snapshot that the attributes apply to.
DBClusterSnapshotIdentifier *string
noSmithyDocumentSerde
}
// This data type is used as a response element in the action
// DescribeDBEngineVersions .
type DBEngineVersion struct {
// The creation time of the DB engine version.
CreateTime *time.Time
// JSON string that lists the installation files and parameters that RDS Custom
// uses to create a custom engine version (CEV). RDS Custom applies the patches in
// the order in which they're listed in the manifest. You can set the Oracle home,
// Oracle base, and UNIX/Linux user and group using the installation parameters.
// For more information, see JSON fields in the CEV manifest (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html#custom-cev.preparing.manifest.fields)
// in the Amazon RDS User Guide.
CustomDBEngineVersionManifest *string
// The description of the database engine.
DBEngineDescription *string
// A value that indicates the source media provider of the AMI based on the usage
// operation. Applicable for RDS Custom for SQL Server.
DBEngineMediaType *string
// The ARN of the custom engine version.
DBEngineVersionArn *string
// The description of the database engine version.
DBEngineVersionDescription *string
// The name of the DB parameter group family for the database engine.
DBParameterGroupFamily *string
// The name of the Amazon S3 bucket that contains your database installation files.
DatabaseInstallationFilesS3BucketName *string
// The Amazon S3 directory that contains the database installation files. If not
// specified, then no prefix is assumed.
DatabaseInstallationFilesS3Prefix *string
// The default character set for new instances of this engine version, if the
// CharacterSetName parameter of the CreateDBInstance API isn't specified.
DefaultCharacterSet *CharacterSet
// The name of the database engine.
Engine *string
// The version number of the database engine.
EngineVersion *string
// The types of logs that the database engine has available for export to
// CloudWatch Logs.
ExportableLogTypes []string
// The EC2 image
Image *CustomDBEngineVersionAMI
// The Amazon Web Services KMS key identifier for an encrypted CEV. This parameter
// is required for RDS Custom, but optional for Amazon RDS.
KMSKeyId *string
// The major engine version of the CEV.
MajorEngineVersion *string
// The status of the DB engine version, either available or deprecated .
Status *string
// A list of the supported CA certificate identifiers. For more information, see
// Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
SupportedCACertificateIdentifiers []string
// A list of the character sets supported by this engine for the CharacterSetName
// parameter of the CreateDBInstance operation.
SupportedCharacterSets []CharacterSet
// A list of the supported DB engine modes.
SupportedEngineModes []string
// A list of features supported by the DB engine. The supported features vary by
// DB engine and DB engine version. To determine the supported features for a
// specific DB engine and DB engine version using the CLI, use the following
// command: aws rds describe-db-engine-versions --engine --engine-version For
// example, to determine the supported features for RDS for PostgreSQL version 13.3
// using the CLI, use the following command: aws rds describe-db-engine-versions
// --engine postgres --engine-version 13.3 The supported features are listed under
// SupportedFeatureNames in the output.
SupportedFeatureNames []string
// A list of the character sets supported by the Oracle DB engine for the
// NcharCharacterSetName parameter of the CreateDBInstance operation.
SupportedNcharCharacterSets []CharacterSet
// A list of the time zones supported by this engine for the Timezone parameter of
// the CreateDBInstance action.
SupportedTimezones []Timezone
// A value that indicates whether the engine version supports Babelfish for Aurora
// PostgreSQL.
SupportsBabelfish bool
// A value that indicates whether the engine version supports rotating the server
// certificate without rebooting the DB instance.
SupportsCertificateRotationWithoutRestart *bool
// A value that indicates whether you can use Aurora global databases with a
// specific DB engine version.
SupportsGlobalDatabases bool
// A value that indicates whether the engine version supports exporting the log
// types specified by ExportableLogTypes to CloudWatch Logs.
SupportsLogExportsToCloudwatchLogs bool
// A value that indicates whether you can use Aurora parallel query with a
// specific DB engine version.
SupportsParallelQuery bool
// Indicates whether the database engine version supports read replicas.
SupportsReadReplica bool
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// A list of engine versions that this database engine version can be upgraded to.
ValidUpgradeTarget []UpgradeTarget
noSmithyDocumentSerde
}
// Contains the details of an Amazon RDS DB instance. This data type is used as a
// response element in the operations CreateDBInstance ,
// CreateDBInstanceReadReplica , DeleteDBInstance , DescribeDBInstances ,
// ModifyDBInstance , PromoteReadReplica , RebootDBInstance ,
// RestoreDBInstanceFromDBSnapshot , RestoreDBInstanceFromS3 ,
// RestoreDBInstanceToPointInTime , StartDBInstance , and StopDBInstance .
type DBInstance struct {
// Indicates whether engine-native audit fields are included in the database
// activity stream.
ActivityStreamEngineNativeAuditFieldsIncluded *bool
// The name of the Amazon Kinesis data stream used for the database activity
// stream.
ActivityStreamKinesisStreamName *string
// The Amazon Web Services KMS key identifier used for encrypting messages in the
// database activity stream. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
ActivityStreamKmsKeyId *string
// The mode of the database activity stream. Database events such as a change or
// access generate an activity stream event. RDS for Oracle always handles these
// events asynchronously.
ActivityStreamMode ActivityStreamMode
// The status of the policy state of the activity stream.
ActivityStreamPolicyStatus ActivityStreamPolicyStatus
// The status of the database activity stream.
ActivityStreamStatus ActivityStreamStatus
// The amount of storage in gibibytes (GiB) allocated for the DB instance.
AllocatedStorage int32
// The Amazon Web Services Identity and Access Management (IAM) roles associated
// with the DB instance.
AssociatedRoles []DBInstanceRole
// Indicates whether minor version patches are applied automatically.
AutoMinorVersionUpgrade bool
// The time when a stopped DB instance is restarted automatically.
AutomaticRestartTime *time.Time
// The automation mode of the RDS Custom DB instance: full or all paused . If full
// , the DB instance automates monitoring and instance recovery. If all paused ,
// the instance pauses automation for the duration set by
// --resume-full-automation-mode-minutes .
AutomationMode AutomationMode
// The name of the Availability Zone where the DB instance is located.
AvailabilityZone *string
// The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services
// Backup.
AwsBackupRecoveryPointArn *string
// The number of days for which automatic DB snapshots are retained.
BackupRetentionPeriod int32
// The location where automated backups and manual snapshots are stored: Amazon
// Web Services Outposts or the Amazon Web Services Region.
BackupTarget *string
// The identifier of the CA certificate for this DB instance. For more
// information, see Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
CACertificateIdentifier *string
// The details of the DB instance's server certificate.
CertificateDetails *CertificateDetails
// If present, specifies the name of the character set that this instance is
// associated with.
CharacterSetName *string
// Indicates whether tags are copied from the DB instance to snapshots of the DB
// instance. This setting doesn't apply to Amazon Aurora DB instances. Copying tags
// to snapshots is managed by the DB cluster. Setting this value for an Aurora DB
// instance has no effect on the DB cluster setting. For more information, see
// DBCluster .
CopyTagsToSnapshot bool
// The instance profile associated with the underlying Amazon EC2 instance of an
// RDS Custom DB instance. The instance profile must meet the following
// requirements:
// - The profile must exist in your account.
// - The profile must have an IAM role that Amazon EC2 has permissions to
// assume.
// - The instance profile name and the associated IAM role name must start with
// the prefix AWSRDSCustom .
// For the list of permissions required for the IAM role, see Configure IAM and
// your VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc)
// in the Amazon RDS User Guide.
CustomIamInstanceProfile *string
// Indicates whether a customer-owned IP address (CoIP) is enabled for an RDS on
// Outposts DB instance. A CoIP provides local or external connectivity to
// resources in your Outpost subnets through your on-premises network. For some use
// cases, a CoIP can provide lower latency for connections to the DB instance from
// outside of its virtual private cloud (VPC) on your local network. For more
// information about RDS on Outposts, see Working with Amazon RDS on Amazon Web
// Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide. For more information about CoIPs, see
// Customer-owned IP addresses (https://docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing)
// in the Amazon Web Services Outposts User Guide.
CustomerOwnedIpEnabled *bool
// If the DB instance is a member of a DB cluster, indicates the name of the DB
// cluster that the DB instance is a member of.
DBClusterIdentifier *string
// The Amazon Resource Name (ARN) for the DB instance.
DBInstanceArn *string
// The list of replicated automated backups associated with the DB instance.
DBInstanceAutomatedBackupsReplications []DBInstanceAutomatedBackupsReplication
// The name of the compute and memory capacity class of the DB instance.
DBInstanceClass *string
// The user-supplied database identifier. This identifier is the unique key that
// identifies a DB instance.
DBInstanceIdentifier *string
// The current state of this database. For information about DB instance statuses,
// see Viewing DB instance status (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/accessing-monitoring.html#Overview.DBInstance.Status)
// in the Amazon RDS User Guide.
DBInstanceStatus *string
// The meaning of this parameter differs depending on the database engine.
// - For RDS for MariaDB, Microsoft SQL Server, MySQL, and PostgreSQL - The name
// of the initial database specified for this DB instance when it was created, if
// one was provided. This same name is returned for the life of the DB instance.
// - For RDS for Oracle - The Oracle System ID (SID) of the created DB instance.
// This value is only returned when the object returned is an Oracle DB instance.
DBName *string
// The list of DB parameter groups applied to this DB instance.
DBParameterGroups []DBParameterGroupStatus
// A list of DB security group elements containing DBSecurityGroup.Name and
// DBSecurityGroup.Status subelements.
DBSecurityGroups []DBSecurityGroupMembership
// Information about the subnet group associated with the DB instance, including
// the name, description, and subnets in the subnet group.
DBSubnetGroup *DBSubnetGroup
// The Oracle system ID (Oracle SID) for a container database (CDB). The Oracle
// SID is also the name of the CDB. This setting is only valid for RDS Custom DB
// instances.
DBSystemId *string
// The port that the DB instance listens on. If the DB instance is part of a DB
// cluster, this can be a different port than the DB cluster port.
DbInstancePort int32
// The Amazon Web Services Region-unique, immutable identifier for the DB
// instance. This identifier is found in Amazon Web Services CloudTrail log entries
// whenever the Amazon Web Services KMS key for the DB instance is accessed.
DbiResourceId *string
// Indicates whether the DB instance has deletion protection enabled. The database
// can't be deleted when deletion protection is enabled. For more information, see
// Deleting a DB Instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html)
// .
DeletionProtection bool
// The Active Directory Domain membership records associated with the DB instance.
DomainMemberships []DomainMembership
// A list of log types that this DB instance is configured to export to CloudWatch
// Logs. Log types vary by DB engine. For information about the log types for each
// DB engine, see Monitoring Amazon RDS log files (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html)
// in the Amazon RDS User Guide.
EnabledCloudwatchLogsExports []string
// The connection endpoint for the DB instance. The endpoint might not be shown
// for instances with the status of creating .
Endpoint *Endpoint
// The database engine used for this DB instance.
Engine *string
// The version of the database engine.
EngineVersion *string
// The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that
// receives the Enhanced Monitoring metrics data for the DB instance.
EnhancedMonitoringResourceArn *string
// Indicates whether mapping of Amazon Web Services Identity and Access Management
// (IAM) accounts to database accounts is enabled for the DB instance. For a list
// of engine versions that support IAM database authentication, see IAM database
// authentication (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RDS_Fea_Regions_DB-eng.Feature.IamDatabaseAuthentication.html)
// in the Amazon RDS User Guide and IAM database authentication in Aurora (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.Aurora_Fea_Regions_DB-eng.Feature.IAMdbauth.html)
// in the Amazon Aurora User Guide.
IAMDatabaseAuthenticationEnabled bool
// The date and time when the DB instance was created.
InstanceCreateTime *time.Time
// The Provisioned IOPS (I/O operations per second) value for the DB instance.
Iops *int32
// If StorageEncrypted is enabled, the Amazon Web Services KMS key identifier for
// the encrypted DB instance. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
KmsKeyId *string
// The latest time to which a database in this DB instance can be restored with
// point-in-time restore.
LatestRestorableTime *time.Time
// The license model information for this DB instance. This setting doesn't apply
// to RDS Custom DB instances.
LicenseModel *string
// The listener connection endpoint for SQL Server Always On.
ListenerEndpoint *Endpoint
// The secret managed by RDS in Amazon Web Services Secrets Manager for the master
// user password. For more information, see Password management with Amazon Web
// Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide.
MasterUserSecret *MasterUserSecret
// The master username for the DB instance.
MasterUsername *string
// The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale
// the storage of the DB instance.
MaxAllocatedStorage *int32
// The interval, in seconds, between points when Enhanced Monitoring metrics are
// collected for the DB instance.
MonitoringInterval *int32
// The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics
// to Amazon CloudWatch Logs.
MonitoringRoleArn *string
// Indicates whether the DB instance is a Multi-AZ deployment. This setting
// doesn't apply to RDS Custom DB instances.
MultiAZ bool
// The name of the NCHAR character set for the Oracle DB instance. This character
// set specifies the Unicode encoding for data stored in table columns of type
// NCHAR, NCLOB, or NVARCHAR2.
NcharCharacterSetName *string
// The network type of the DB instance. The network type is determined by the
// DBSubnetGroup specified for the DB instance. A DBSubnetGroup can support only
// the IPv4 protocol or the IPv4 and the IPv6 protocols ( DUAL ). For more
// information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide and Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon Aurora User Guide. Valid Values: IPV4 | DUAL
NetworkType *string
// The list of option group memberships for this DB instance.
OptionGroupMemberships []OptionGroupMembership
// Information about pending changes to the DB instance. This information is
// returned only when there are pending changes. Specific changes are identified by
// subelements.
PendingModifiedValues *PendingModifiedValues
// Indicates whether Performance Insights is enabled for the DB instance.
PerformanceInsightsEnabled *bool
// The Amazon Web Services KMS key identifier for encryption of Performance
// Insights data. The Amazon Web Services KMS key identifier is the key ARN, key
// ID, alias ARN, or alias name for the KMS key.
PerformanceInsightsKMSKeyId *string
// The number of days to retain Performance Insights data. Valid Values:
// - 7
// - month * 31, where month is a number of months from 1-23. Examples: 93 (3
// months * 31), 341 (11 months * 31), 589 (19 months * 31)
// - 731
// Default: 7 days
PerformanceInsightsRetentionPeriod *int32
// The daily time range during which automated backups are created if automated
// backups are enabled, as determined by the BackupRetentionPeriod .
PreferredBackupWindow *string
// The weekly time range during which system maintenance can occur, in Universal
// Coordinated Time (UTC).
PreferredMaintenanceWindow *string
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance.
ProcessorFeatures []ProcessorFeature
// The order of priority in which an Aurora Replica is promoted to the primary
// instance after a failure of the existing primary instance. For more information,
// see Fault Tolerance for an Aurora DB Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Aurora.Managing.FaultTolerance)
// in the Amazon Aurora User Guide.
PromotionTier *int32
// Indicates whether the DB instance is publicly accessible. When the DB cluster
// is publicly accessible, its Domain Name System (DNS) endpoint resolves to the
// private IP address from within the DB cluster's virtual private cloud (VPC). It
// resolves to the public IP address from outside of the DB cluster's VPC. Access
// to the DB cluster is ultimately controlled by the security group it uses. That
// public access isn't permitted if the security group assigned to the DB cluster
// doesn't permit it. When the DB instance isn't publicly accessible, it is an
// internal DB instance with a DNS name that resolves to a private IP address. For
// more information, see CreateDBInstance .
PubliclyAccessible bool
// The identifiers of Aurora DB clusters to which the RDS DB instance is
// replicated as a read replica. For example, when you create an Aurora read
// replica of an RDS for MySQL DB instance, the Aurora MySQL DB cluster for the
// Aurora read replica is shown. This output doesn't contain information about
// cross-Region Aurora read replicas. Currently, each RDS DB instance can have only
// one Aurora read replica.
ReadReplicaDBClusterIdentifiers []string
// The identifiers of the read replicas associated with this DB instance.
ReadReplicaDBInstanceIdentifiers []string
// The identifier of the source DB cluster if this DB instance is a read replica.
ReadReplicaSourceDBClusterIdentifier *string
// The identifier of the source DB instance if this DB instance is a read replica.
ReadReplicaSourceDBInstanceIdentifier *string
// The open mode of an Oracle read replica. The default is open-read-only . For
// more information, see Working with Oracle Read Replicas for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html)
// in the Amazon RDS User Guide. This attribute is only supported in RDS for
// Oracle.
ReplicaMode ReplicaMode
// The number of minutes to pause the automation. When the time period ends, RDS
// Custom resumes full automation. The minimum value is 60 (default). The maximum
// value is 1,440.
ResumeFullAutomationModeTime *time.Time
// If present, specifies the name of the secondary Availability Zone for a DB
// instance with multi-AZ support.
SecondaryAvailabilityZone *string
// The status of a read replica. If the DB instance isn't a read replica, the
// value is blank.
StatusInfos []DBInstanceStatusInfo
// Indicates whether the DB instance is encrypted.
StorageEncrypted bool
// The storage throughput for the DB instance. This setting applies only to the gp3
// storage type.
StorageThroughput *int32
// The storage type associated with the DB instance.
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// The ARN from the key store with which the instance is associated for TDE
// encryption.
TdeCredentialArn *string
// The time zone of the DB instance. In most cases, the Timezone element is empty.
// Timezone content appears only for Microsoft SQL Server DB instances that were
// created with a time zone specified.
Timezone *string
// The list of Amazon EC2 VPC security groups that the DB instance belongs to.
VpcSecurityGroups []VpcSecurityGroupMembership
noSmithyDocumentSerde
}
// An automated backup of a DB instance. It consists of system backups,
// transaction logs, and the database instance properties that existed at the time
// you deleted the source instance.
type DBInstanceAutomatedBackup struct {
// Specifies the allocated storage size in gibibytes (GiB).
AllocatedStorage int32
// The Availability Zone that the automated backup was created in. For information
// on Amazon Web Services Regions and Availability Zones, see Regions and
// Availability Zones (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html)
// .
AvailabilityZone *string
// The retention period for the automated backups.
BackupRetentionPeriod *int32
// Specifies where automated backups are stored: Amazon Web Services Outposts or
// the Amazon Web Services Region.
BackupTarget *string
// The Amazon Resource Name (ARN) for the automated backups.
DBInstanceArn *string
// The Amazon Resource Name (ARN) for the replicated automated backups.
DBInstanceAutomatedBackupsArn *string
// The list of replications to different Amazon Web Services Regions associated
// with the automated backup.
DBInstanceAutomatedBackupsReplications []DBInstanceAutomatedBackupsReplication
// The customer id of the instance that is/was associated with the automated
// backup.
DBInstanceIdentifier *string
// The identifier for the source DB instance, which can't be changed and which is
// unique to an Amazon Web Services Region.
DbiResourceId *string
// Specifies whether the automated backup is encrypted.
Encrypted bool
// The name of the database engine for this automated backup.
Engine *string
// The version of the database engine for the automated backup.
EngineVersion *string
// True if mapping of Amazon Web Services Identity and Access Management (IAM)
// accounts to database accounts is enabled, and otherwise false.
IAMDatabaseAuthenticationEnabled bool
// Provides the date and time that the DB instance was created.
InstanceCreateTime *time.Time
// The IOPS (I/O operations per second) value for the automated backup.
Iops *int32
// The Amazon Web Services KMS key ID for an automated backup. The Amazon Web
// Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for
// the KMS key.
KmsKeyId *string
// License model information for the automated backup.
LicenseModel *string
// The license model of an automated backup.
MasterUsername *string
// The option group the automated backup is associated with. If omitted, the
// default option group for the engine specified is used.
OptionGroupName *string
// The port number that the automated backup used for connections. Default:
// Inherits from the source DB instance Valid Values: 1150-65535
Port int32
// The Amazon Web Services Region associated with the automated backup.
Region *string
// Earliest and latest time an instance can be restored to.
RestoreWindow *RestoreWindow
// Provides a list of status information for an automated backup:
// - active - automated backups for current instances
// - retained - automated backups for deleted instances
// - creating - automated backups that are waiting for the first automated
// snapshot to be available.
Status *string
// Specifies the storage throughput for the automated backup.
StorageThroughput *int32
// Specifies the storage type associated with the automated backup.
StorageType *string
// The ARN from the key store with which the automated backup is associated for
// TDE encryption.
TdeCredentialArn *string
// The time zone of the automated backup. In most cases, the Timezone element is
// empty. Timezone content appears only for Microsoft SQL Server DB instances that
// were created with a time zone specified.
Timezone *string
// Provides the VPC ID associated with the DB instance.
VpcId *string
noSmithyDocumentSerde
}
// Automated backups of a DB instance replicated to another Amazon Web Services
// Region. They consist of system backups, transaction logs, and database instance
// properties.
type DBInstanceAutomatedBackupsReplication struct {
// The Amazon Resource Name (ARN) of the replicated automated backups.
DBInstanceAutomatedBackupsArn *string
noSmithyDocumentSerde
}
// Describes an Amazon Web Services Identity and Access Management (IAM) role that
// is associated with a DB instance.
type DBInstanceRole struct {
// The name of the feature associated with the Amazon Web Services Identity and
// Access Management (IAM) role. For information about supported feature names, see
// DBEngineVersion .
FeatureName *string
// The Amazon Resource Name (ARN) of the IAM role that is associated with the DB
// instance.
RoleArn *string
// Describes the state of association between the IAM role and the DB instance.
// The Status property returns one of the following values:
// - ACTIVE - the IAM role ARN is associated with the DB instance and can be used
// to access other Amazon Web Services services on your behalf.
// - PENDING - the IAM role ARN is being associated with the DB instance.
// - INVALID - the IAM role ARN is associated with the DB instance, but the DB
// instance is unable to assume the IAM role in order to access other Amazon Web
// Services services on your behalf.
Status *string
noSmithyDocumentSerde
}
// Provides a list of status information for a DB instance.
type DBInstanceStatusInfo struct {
// Details of the error if there is an error for the instance. If the instance
// isn't in an error state, this value is blank.
Message *string
// Boolean value that is true if the instance is operating normally, or false if
// the instance is in an error state.
Normal bool
// Status of the DB instance. For a StatusType of read replica, the values can be
// replicating, replication stop point set, replication stop point reached, error,
// stopped, or terminated.
Status *string
// This value is currently "read replication."
StatusType *string
noSmithyDocumentSerde
}
// Contains the details of an Amazon RDS DB parameter group. This data type is
// used as a response element in the DescribeDBParameterGroups action.
type DBParameterGroup struct {
// The Amazon Resource Name (ARN) for the DB parameter group.
DBParameterGroupArn *string
// The name of the DB parameter group family that this DB parameter group is
// compatible with.
DBParameterGroupFamily *string
// The name of the DB parameter group.
DBParameterGroupName *string
// Provides the customer-specified description for this DB parameter group.
Description *string
noSmithyDocumentSerde
}
// The status of the DB parameter group. This data type is used as a response
// element in the following actions:
// - CreateDBInstance
// - CreateDBInstanceReadReplica
// - DeleteDBInstance
// - ModifyDBInstance
// - RebootDBInstance
// - RestoreDBInstanceFromDBSnapshot
type DBParameterGroupStatus struct {
// The name of the DB parameter group.
DBParameterGroupName *string
// The status of parameter updates.
ParameterApplyStatus *string
noSmithyDocumentSerde
}
// The data structure representing a proxy managed by the RDS Proxy. This data
// type is used as a response element in the DescribeDBProxies action.
type DBProxy struct {
// One or more data structures specifying the authorization mechanism to connect
// to the associated RDS DB instance or Aurora DB cluster.
Auth []UserAuthConfigInfo
// The date and time when the proxy was first created.
CreatedDate *time.Time
// The Amazon Resource Name (ARN) for the proxy.
DBProxyArn *string
// The identifier for the proxy. This name must be unique for all proxies owned by
// your Amazon Web Services account in the specified Amazon Web Services Region.
DBProxyName *string
// Whether the proxy includes detailed information about SQL statements in its
// logs. This information helps you to debug issues involving SQL behavior or the
// performance and scalability of the proxy connections. The debug information
// includes the text of SQL statements that you submit through the proxy. Thus,
// only enable this setting when needed for debugging, and only when you have
// security measures in place to safeguard any sensitive information that appears
// in the logs.
DebugLogging bool
// The endpoint that you can use to connect to the DB proxy. You include the
// endpoint value in the connection string for a database client application.
Endpoint *string
// The kinds of databases that the proxy can connect to. This value determines
// which database network protocol the proxy recognizes when it interprets network
// traffic to and from the database. MYSQL supports Aurora MySQL, RDS for MariaDB,
// and RDS for MySQL databases. POSTGRESQL supports Aurora PostgreSQL and RDS for
// PostgreSQL databases. SQLSERVER supports RDS for Microsoft SQL Server databases.
EngineFamily *string
// The number of seconds a connection to the proxy can have no activity before the
// proxy drops the client connection. The proxy keeps the underlying database
// connection open and puts it back into the connection pool for reuse by later
// connection requests. Default: 1800 (30 minutes) Constraints: 1 to 28,800
IdleClientTimeout int32
// Indicates whether Transport Layer Security (TLS) encryption is required for
// connections to the proxy.
RequireTLS bool
// The Amazon Resource Name (ARN) for the IAM role that the proxy uses to access
// Amazon Secrets Manager.
RoleArn *string
// The current status of this proxy. A status of available means the proxy is
// ready to handle requests. Other values indicate that you must wait for the proxy
// to be ready, or take some action to resolve an issue.
Status DBProxyStatus
// The date and time when the proxy was last updated.
UpdatedDate *time.Time
// Provides the VPC ID of the DB proxy.
VpcId *string
// Provides a list of VPC security groups that the proxy belongs to.
VpcSecurityGroupIds []string
// The EC2 subnet IDs for the proxy.
VpcSubnetIds []string
noSmithyDocumentSerde
}
// The data structure representing an endpoint associated with a DB proxy. RDS
// automatically creates one endpoint for each DB proxy. For Aurora DB clusters,
// you can associate additional endpoints with the same DB proxy. These endpoints
// can be read/write or read-only. They can also reside in different VPCs than the
// associated DB proxy. This data type is used as a response element in the
// DescribeDBProxyEndpoints operation.
type DBProxyEndpoint struct {
// The date and time when the DB proxy endpoint was first created.
CreatedDate *time.Time
// The Amazon Resource Name (ARN) for the DB proxy endpoint.
DBProxyEndpointArn *string
// The name for the DB proxy endpoint. An identifier must begin with a letter and
// must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen
// or contain two consecutive hyphens.
DBProxyEndpointName *string
// The identifier for the DB proxy that is associated with this DB proxy endpoint.
DBProxyName *string
// The endpoint that you can use to connect to the DB proxy. You include the
// endpoint value in the connection string for a database client application.
Endpoint *string
// A value that indicates whether this endpoint is the default endpoint for the
// associated DB proxy. Default DB proxy endpoints always have read/write
// capability. Other endpoints that you associate with the DB proxy can be either
// read/write or read-only.
IsDefault bool
// The current status of this DB proxy endpoint. A status of available means the
// endpoint is ready to handle requests. Other values indicate that you must wait
// for the endpoint to be ready, or take some action to resolve an issue.
Status DBProxyEndpointStatus
// A value that indicates whether the DB proxy endpoint can be used for read/write
// or read-only operations.
TargetRole DBProxyEndpointTargetRole
// Provides the VPC ID of the DB proxy endpoint.
VpcId *string
// Provides a list of VPC security groups that the DB proxy endpoint belongs to.
VpcSecurityGroupIds []string
// The EC2 subnet IDs for the DB proxy endpoint.
VpcSubnetIds []string
noSmithyDocumentSerde
}
// Contains the details for an RDS Proxy target. It represents an RDS DB instance
// or Aurora DB cluster that the proxy can connect to. One or more targets are
// associated with an RDS Proxy target group. This data type is used as a response
// element in the DescribeDBProxyTargets action.
type DBProxyTarget struct {
// The writer endpoint for the RDS DB instance or Aurora DB cluster.
Endpoint *string
// The port that the RDS Proxy uses to connect to the target RDS DB instance or
// Aurora DB cluster.
Port int32
// The identifier representing the target. It can be the instance identifier for
// an RDS DB instance, or the cluster identifier for an Aurora DB cluster.
RdsResourceId *string
// A value that indicates whether the target of the proxy can be used for
// read/write or read-only operations.
Role TargetRole
// The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB cluster.
TargetArn *string
// Information about the connection health of the RDS Proxy target.
TargetHealth *TargetHealth
// The DB cluster identifier when the target represents an Aurora DB cluster. This
// field is blank when the target represents an RDS DB instance.
TrackedClusterId *string
// Specifies the kind of database, such as an RDS DB instance or an Aurora DB
// cluster, that the target represents.
Type TargetType
noSmithyDocumentSerde
}
// Represents a set of RDS DB instances, Aurora DB clusters, or both that a proxy
// can connect to. Currently, each target group is associated with exactly one RDS
// DB instance or Aurora DB cluster. This data type is used as a response element
// in the DescribeDBProxyTargetGroups action.
type DBProxyTargetGroup struct {
// The settings that determine the size and behavior of the connection pool for
// the target group.
ConnectionPoolConfig *ConnectionPoolConfigurationInfo
// The date and time when the target group was first created.
CreatedDate *time.Time
// The identifier for the RDS proxy associated with this target group.
DBProxyName *string
// Whether this target group is the first one used for connection requests by the
// associated proxy. Because each proxy is currently associated with a single
// target group, currently this setting is always true .
IsDefault bool
// The current status of this target group. A status of available means the target
// group is correctly associated with a database. Other values indicate that you
// must wait for the target group to be ready, or take some action to resolve an
// issue.
Status *string
// The Amazon Resource Name (ARN) representing the target group.
TargetGroupArn *string
// The identifier for the target group. This name must be unique for all target
// groups owned by your Amazon Web Services account in the specified Amazon Web
// Services Region.
TargetGroupName *string
// The date and time when the target group was last updated.
UpdatedDate *time.Time
noSmithyDocumentSerde
}
// Contains the details for an Amazon RDS DB security group. This data type is
// used as a response element in the DescribeDBSecurityGroups action.
type DBSecurityGroup struct {
// The Amazon Resource Name (ARN) for the DB security group.
DBSecurityGroupArn *string
// Provides the description of the DB security group.
DBSecurityGroupDescription *string
// Specifies the name of the DB security group.
DBSecurityGroupName *string
// Contains a list of EC2SecurityGroup elements.
EC2SecurityGroups []EC2SecurityGroup
// Contains a list of IPRange elements.
IPRanges []IPRange
// Provides the Amazon Web Services ID of the owner of a specific DB security
// group.
OwnerId *string
// Provides the VpcId of the DB security group.
VpcId *string
noSmithyDocumentSerde
}
// This data type is used as a response element in the following actions:
// - ModifyDBInstance
// - RebootDBInstance
// - RestoreDBInstanceFromDBSnapshot
// - RestoreDBInstanceToPointInTime
type DBSecurityGroupMembership struct {
// The name of the DB security group.
DBSecurityGroupName *string
// The status of the DB security group.
Status *string
noSmithyDocumentSerde
}
// Contains the details of an Amazon RDS DB snapshot. This data type is used as a
// response element in the DescribeDBSnapshots action.
type DBSnapshot struct {
// Specifies the allocated storage size in gibibytes (GiB).
AllocatedStorage int32
// Specifies the name of the Availability Zone the DB instance was located in at
// the time of the DB snapshot.
AvailabilityZone *string
// Specifies the DB instance identifier of the DB instance this DB snapshot was
// created from.
DBInstanceIdentifier *string
// The Amazon Resource Name (ARN) for the DB snapshot.
DBSnapshotArn *string
// Specifies the identifier for the DB snapshot.
DBSnapshotIdentifier *string
// The identifier for the source DB instance, which can't be changed and which is
// unique to an Amazon Web Services Region.
DbiResourceId *string
// Specifies whether the DB snapshot is encrypted.
Encrypted bool
// Specifies the name of the database engine.
Engine *string
// Specifies the version of the database engine.
EngineVersion *string
// True if mapping of Amazon Web Services Identity and Access Management (IAM)
// accounts to database accounts is enabled, and otherwise false.
IAMDatabaseAuthenticationEnabled bool
// Specifies the time in Coordinated Universal Time (UTC) when the DB instance,
// from which the snapshot was taken, was created.
InstanceCreateTime *time.Time
// Specifies the Provisioned IOPS (I/O operations per second) value of the DB
// instance at the time of the snapshot.
Iops *int32
// If Encrypted is true, the Amazon Web Services KMS key identifier for the
// encrypted DB snapshot. The Amazon Web Services KMS key identifier is the key
// ARN, key ID, alias ARN, or alias name for the KMS key.
KmsKeyId *string
// License model information for the restored DB instance.
LicenseModel *string
// Provides the master username for the DB snapshot.
MasterUsername *string
// Provides the option group name for the DB snapshot.
OptionGroupName *string
// Specifies the time of the CreateDBSnapshot operation in Coordinated Universal
// Time (UTC). Doesn't change when the snapshot is copied.
OriginalSnapshotCreateTime *time.Time
// The percentage of the estimated data that has been transferred.
PercentProgress int32
// Specifies the port that the database engine was listening on at the time of the
// snapshot.
Port int32
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance when the DB snapshot was created.
ProcessorFeatures []ProcessorFeature
// Specifies when the snapshot was taken in Coordinated Universal Time (UTC).
// Changes for the copy when the snapshot is copied.
SnapshotCreateTime *time.Time
// The timestamp of the most recent transaction applied to the database that
// you're backing up. Thus, if you restore a snapshot, SnapshotDatabaseTime is the
// most recent transaction in the restored DB instance. In contrast,
// originalSnapshotCreateTime specifies the system time that the snapshot
// completed. If you back up a read replica, you can determine the replica lag by
// comparing SnapshotDatabaseTime with originalSnapshotCreateTime. For example, if
// originalSnapshotCreateTime is two hours later than SnapshotDatabaseTime, then
// the replica lag is two hours.
SnapshotDatabaseTime *time.Time
// Specifies where manual snapshots are stored: Amazon Web Services Outposts or
// the Amazon Web Services Region.
SnapshotTarget *string
// Provides the type of the DB snapshot.
SnapshotType *string
// The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
// from. It only has a value in the case of a cross-account or cross-Region copy.
SourceDBSnapshotIdentifier *string
// The Amazon Web Services Region that the DB snapshot was created in or copied
// from.
SourceRegion *string
// Specifies the status of this DB snapshot.
Status *string
// Specifies the storage throughput for the DB snapshot.
StorageThroughput *int32
// Specifies the storage type associated with DB snapshot.
StorageType *string
// A list of tags. For more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
TagList []Tag
// The ARN from the key store with which to associate the instance for TDE
// encryption.
TdeCredentialArn *string
// The time zone of the DB snapshot. In most cases, the Timezone element is empty.
// Timezone content appears only for snapshots taken from Microsoft SQL Server DB
// instances that were created with a time zone specified.
Timezone *string
// Provides the VPC ID associated with the DB snapshot.
VpcId *string
noSmithyDocumentSerde
}
// Contains the name and values of a manual DB snapshot attribute Manual DB
// snapshot attributes are used to authorize other Amazon Web Services accounts to
// restore a manual DB snapshot. For more information, see the
// ModifyDBSnapshotAttribute API.
type DBSnapshotAttribute struct {
// The name of the manual DB snapshot attribute. The attribute named restore
// refers to the list of Amazon Web Services accounts that have permission to copy
// or restore the manual DB cluster snapshot. For more information, see the
// ModifyDBSnapshotAttribute API action.
AttributeName *string
// The value or values for the manual DB snapshot attribute. If the AttributeName
// field is set to restore , then this element returns a list of IDs of the Amazon
// Web Services accounts that are authorized to copy or restore the manual DB
// snapshot. If a value of all is in the list, then the manual DB snapshot is
// public and available for any Amazon Web Services account to copy or restore.
AttributeValues []string
noSmithyDocumentSerde
}
// Contains the results of a successful call to the DescribeDBSnapshotAttributes
// API action. Manual DB snapshot attributes are used to authorize other Amazon Web
// Services accounts to copy or restore a manual DB snapshot. For more information,
// see the ModifyDBSnapshotAttribute API action.
type DBSnapshotAttributesResult struct {
// The list of attributes and values for the manual DB snapshot.
DBSnapshotAttributes []DBSnapshotAttribute
// The identifier of the manual DB snapshot that the attributes apply to.
DBSnapshotIdentifier *string
noSmithyDocumentSerde
}
// Contains the details of an Amazon RDS DB subnet group. This data type is used
// as a response element in the DescribeDBSubnetGroups action.
type DBSubnetGroup struct {
// The Amazon Resource Name (ARN) for the DB subnet group.
DBSubnetGroupArn *string
// Provides the description of the DB subnet group.
DBSubnetGroupDescription *string
// The name of the DB subnet group.
DBSubnetGroupName *string
// Provides the status of the DB subnet group.
SubnetGroupStatus *string
// Contains a list of Subnet elements.
Subnets []Subnet
// The network type of the DB subnet group. Valid values:
// - IPV4
// - DUAL
// A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6
// protocols ( DUAL ). For more information, see Working with a DB instance in a
// VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide.
SupportedNetworkTypes []string
// Provides the VpcId of the DB subnet group.
VpcId *string
noSmithyDocumentSerde
}
// This data type is used as a response element to DescribeDBLogFiles .
type DescribeDBLogFilesDetails struct {
// A POSIX timestamp when the last log entry was written.
LastWritten int64
// The name of the log file for the specified DB instance.
LogFileName *string
// The size, in bytes, of the log file for the specified DB instance.
Size int64
noSmithyDocumentSerde
}
// An Active Directory Domain membership record associated with the DB instance or
// cluster.
type DomainMembership struct {
// The ARN for the Secrets Manager secret that contains the credentials for the
// user performing the domain join.
AuthSecretArn *string
// The IPv4 DNS IP addresses of your primary and secondary Active Directory domain
// controllers.
DnsIps []string
// The identifier of the Active Directory Domain.
Domain *string
// The fully qualified domain name (FQDN) of the Active Directory Domain.
FQDN *string
// The name of the IAM role to be used when making API calls to the Directory
// Service.
IAMRoleName *string
// The Active Directory organizational unit for your DB instance to join.
OU *string
// The status of the Active Directory Domain membership for the DB instance or
// cluster. Values include joined, pending-join, failed, and so on.
Status *string
noSmithyDocumentSerde
}
// A range of double values.
type DoubleRange struct {
// The minimum value in the range.
From float64
// The maximum value in the range.
To float64
noSmithyDocumentSerde
}
// This data type is used as a response element in the following actions:
// - AuthorizeDBSecurityGroupIngress
// - DescribeDBSecurityGroups
// - RevokeDBSecurityGroupIngress
type EC2SecurityGroup struct {
// Specifies the id of the EC2 security group.
EC2SecurityGroupId *string
// Specifies the name of the EC2 security group.
EC2SecurityGroupName *string
// Specifies the Amazon Web Services ID of the owner of the EC2 security group
// specified in the EC2SecurityGroupName field.
EC2SecurityGroupOwnerId *string
// Provides the status of the EC2 security group. Status can be "authorizing",
// "authorized", "revoking", and "revoked".
Status *string
noSmithyDocumentSerde
}
// This data type represents the information you need to connect to an Amazon RDS
// DB instance. This data type is used as a response element in the following
// actions:
// - CreateDBInstance
// - DescribeDBInstances
// - DeleteDBInstance
//
// For the data structure that represents Amazon Aurora DB cluster endpoints, see
// DBClusterEndpoint .
type Endpoint struct {
// Specifies the DNS address of the DB instance.
Address *string
// Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
HostedZoneId *string
// Specifies the port that the database engine is listening on.
Port int32
noSmithyDocumentSerde
}
// Contains the result of a successful invocation of the
// DescribeEngineDefaultParameters action.
type EngineDefaults struct {
// Specifies the name of the DB parameter group family that the engine default
// parameters apply to.
DBParameterGroupFamily *string
// An optional pagination token provided by a previous EngineDefaults request. If
// this parameter is specified, the response includes only records beyond the
// marker, up to the value specified by MaxRecords .
Marker *string
// Contains a list of engine default parameters.
Parameters []Parameter
noSmithyDocumentSerde
}
// This data type is used as a response element in the DescribeEvents (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html)
// action.
type Event struct {
// Specifies the date and time of the event.
Date *time.Time
// Specifies the category for the event.
EventCategories []string
// Provides the text of this event.
Message *string
// The Amazon Resource Name (ARN) for the event.
SourceArn *string
// Provides the identifier for the source of the event.
SourceIdentifier *string
// Specifies the source type for this event.
SourceType SourceType
noSmithyDocumentSerde
}
// Contains the results of a successful invocation of the DescribeEventCategories (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEventCategories.html)
// operation.
type EventCategoriesMap struct {
// The event categories for the specified source type
EventCategories []string
// The source type that the returned categories belong to
SourceType *string
noSmithyDocumentSerde
}
// Contains the results of a successful invocation of the
// DescribeEventSubscriptions action.
type EventSubscription struct {
// The RDS event notification subscription Id.
CustSubscriptionId *string
// The Amazon Web Services customer account associated with the RDS event
// notification subscription.
CustomerAwsId *string
// A Boolean value indicating if the subscription is enabled. True indicates the
// subscription is enabled.
Enabled bool
// A list of event categories for the RDS event notification subscription.
EventCategoriesList []string
// The Amazon Resource Name (ARN) for the event subscription.
EventSubscriptionArn *string
// The topic ARN of the RDS event notification subscription.
SnsTopicArn *string
// A list of source IDs for the RDS event notification subscription.
SourceIdsList []string
// The source type for the RDS event notification subscription.
SourceType *string
// The status of the RDS event notification subscription. Constraints: Can be one
// of the following: creating | modifying | deleting | active | no-permission |
// topic-not-exist The status "no-permission" indicates that RDS no longer has
// permission to post to the SNS topic. The status "topic-not-exist" indicates that
// the topic was deleted after the subscription was created.
Status *string
// The time the RDS event notification subscription was created.
SubscriptionCreationTime *string
noSmithyDocumentSerde
}
// Contains the details of a snapshot or cluster export to Amazon S3. This data
// type is used as a response element in the DescribeExportTasks action.
type ExportTask struct {
// The data exported from the snapshot or cluster. Valid values are the following:
// - database - Export all the data from a specified database.
// - database.table table-name - Export a table of the snapshot or cluster. This
// format is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL.
// - database.schema schema-name - Export a database schema of the snapshot or
// cluster. This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
//
// - database.schema.table table-name - Export a table of the database schema.
// This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL.
ExportOnly []string
// A unique identifier for the snapshot or cluster export task. This ID isn't an
// identifier for the Amazon S3 bucket where the data is exported.
ExportTaskIdentifier *string
// The reason the export failed, if it failed.
FailureCause *string
// The name of the IAM role that is used to write to Amazon S3 when exporting a
// snapshot or cluster.
IamRoleArn *string
// The key identifier of the Amazon Web Services KMS key that is used to encrypt
// the data when it's exported to Amazon S3. The KMS key identifier is its key ARN,
// key ID, alias ARN, or alias name. The IAM role used for the export must have
// encryption and decryption permissions to use this KMS key.
KmsKeyId *string
// The progress of the snapshot or cluster export task as a percentage.
PercentProgress int32
// The Amazon S3 bucket that the snapshot or cluster is exported to.
S3Bucket *string
// The Amazon S3 bucket prefix that is the file name and path of the exported data.
S3Prefix *string
// The time that the snapshot was created.
SnapshotTime *time.Time
// The Amazon Resource Name (ARN) of the snapshot or cluster exported to Amazon S3.
SourceArn *string
// The type of source for the export.
SourceType ExportSourceType
// The progress status of the export task. The status can be one of the following:
// - CANCELED
// - CANCELING
// - COMPLETE
// - FAILED
// - IN_PROGRESS
// - STARTING
Status *string
// The time that the snapshot or cluster export task ended.
TaskEndTime *time.Time
// The time that the snapshot or cluster export task started.
TaskStartTime *time.Time
// The total amount of data exported, in gigabytes.
TotalExtractedDataInGB int32
// A warning about the snapshot or cluster export task.
WarningMessage *string
noSmithyDocumentSerde
}
// Contains the state of scheduled or in-process failover operations on an Aurora
// global database ( GlobalCluster ). This Data type is empty unless a failover
// operation is scheduled or is currently underway on the Aurora global database.
type FailoverState struct {
// The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being
// demoted, and which is associated with this state.
FromDbClusterArn *string
// The current status of the Aurora global database ( GlobalCluster ). Possible
// values are as follows:
// - pending – A request to fail over the Aurora global database ( GlobalCluster
// ) has been received by the service. The GlobalCluster 's primary DB cluster
// and the specified secondary DB cluster are being verified before the failover
// process can start.
// - failing-over – This status covers the range of Aurora internal operations
// that take place during the failover process, such as demoting the primary Aurora
// DB cluster, promoting the secondary Aurora DB, and synchronizing replicas.
// - cancelling – The request to fail over the Aurora global database (
// GlobalCluster ) was cancelled and the primary Aurora DB cluster and the
// selected secondary Aurora DB cluster are returning to their previous states.
Status FailoverStatus
// The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being
// promoted, and which is associated with this state.
ToDbClusterArn *string
noSmithyDocumentSerde
}
// A filter name and value pair that is used to return a more specific list of
// results from a describe operation. Filters can be used to match a set of
// resources by specific criteria, such as IDs. The filters supported by a describe
// operation are documented with the describe operation. Currently, wildcards are
// not supported in filters. The following actions can be filtered:
// - DescribeDBClusterBacktracks
// - DescribeDBClusterEndpoints
// - DescribeDBClusters
// - DescribeDBInstances
// - DescribePendingMaintenanceActions
type Filter struct {
// The name of the filter. Filter names are case-sensitive.
//
// This member is required.
Name *string
// One or more filter values. Filter values are case-sensitive.
//
// This member is required.
Values []string
noSmithyDocumentSerde
}
// A data type representing an Aurora global database.
type GlobalCluster struct {
// The default database name within the new global database cluster.
DatabaseName *string
// The deletion protection setting for the new global database cluster.
DeletionProtection *bool
// The Aurora database engine used by the global database cluster.
Engine *string
// Indicates the database engine version.
EngineVersion *string
// A data object containing all properties for the current state of an in-process
// or pending failover process for this Aurora global database. This object is
// empty unless the FailoverGlobalCluster API operation has been called on this
// Aurora global database ( GlobalCluster ).
FailoverState *FailoverState
// The Amazon Resource Name (ARN) for the global database cluster.
GlobalClusterArn *string
// Contains a user-supplied global database cluster identifier. This identifier is
// the unique key that identifies a global database cluster.
GlobalClusterIdentifier *string
// The list of primary and secondary clusters within the global database cluster.
GlobalClusterMembers []GlobalClusterMember
// The Amazon Web Services Region-unique, immutable identifier for the global
// database cluster. This identifier is found in Amazon Web Services CloudTrail log
// entries whenever the Amazon Web Services KMS key for the DB cluster is accessed.
GlobalClusterResourceId *string
// Specifies the current state of this global database cluster.
Status *string
// The storage encryption setting for the global database cluster.
StorageEncrypted *bool
noSmithyDocumentSerde
}
// A data structure with information about any primary and secondary clusters
// associated with an Aurora global database.
type GlobalClusterMember struct {
// The Amazon Resource Name (ARN) for each Aurora cluster.
DBClusterArn *string
// Specifies whether a secondary cluster in an Aurora global database has write
// forwarding enabled, not enabled, or is in the process of enabling it.
GlobalWriteForwardingStatus WriteForwardingStatus
// Specifies whether the Aurora cluster is the primary cluster (that is, has
// read-write capability) for the Aurora global database with which it is
// associated.
IsWriter bool
// The Amazon Resource Name (ARN) for each read-only secondary cluster associated
// with the Aurora global database.
Readers []string
noSmithyDocumentSerde
}
// This data type is used as a response element in the DescribeDBSecurityGroups
// action.
type IPRange struct {
// Specifies the IP range.
CIDRIP *string
// Specifies the status of the IP range. Status can be "authorizing",
// "authorized", "revoking", and "revoked".
Status *string
noSmithyDocumentSerde
}
// Contains the secret managed by RDS in Amazon Web Services Secrets Manager for
// the master user password. For more information, see Password management with
// Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
// in the Amazon RDS User Guide and Password management with Amazon Web Services
// Secrets Manager (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html)
// in the Amazon Aurora User Guide.
type MasterUserSecret struct {
// The Amazon Web Services KMS key identifier that is used to encrypt the secret.
KmsKeyId *string
// The Amazon Resource Name (ARN) of the secret.
SecretArn *string
// The status of the secret. The possible status values include the following:
// - creating - The secret is being created.
// - active - The secret is available for normal use and rotation.
// - rotating - The secret is being rotated.
// - impaired - The secret can be used to access database credentials, but it
// can't be rotated. A secret might have this status if, for example, permissions
// are changed so that RDS can no longer access either the secret or the KMS key
// for the secret. When a secret has this status, you can correct the condition
// that caused the status. Alternatively, modify the DB instance to turn off
// automatic management of database credentials, and then modify the DB instance
// again to turn on automatic management of database credentials.
SecretStatus *string
noSmithyDocumentSerde
}
// The minimum DB engine version required for each corresponding allowed value for
// an option setting.
type MinimumEngineVersionPerAllowedValue struct {
// The allowed value for an option setting.
AllowedValue *string
// The minimum DB engine version required for the allowed value.
MinimumEngineVersion *string
noSmithyDocumentSerde
}
// Option details.
type Option struct {
// If the option requires access to a port, then this DB security group allows
// access to the port.
DBSecurityGroupMemberships []DBSecurityGroupMembership
// The description of the option.
OptionDescription *string
// The name of the option.
OptionName *string
// The option settings for this option.
OptionSettings []OptionSetting
// The version of the option.
OptionVersion *string
// Indicate if this option is permanent.
Permanent bool
// Indicate if this option is persistent.
Persistent bool
// If required, the port configured for this option to use.
Port *int32
// If the option requires access to a port, then this VPC security group allows
// access to the port.
VpcSecurityGroupMemberships []VpcSecurityGroupMembership
noSmithyDocumentSerde
}
// A list of all available options
type OptionConfiguration struct {
// The configuration of options to include in a group.
//
// This member is required.
OptionName *string
// A list of DBSecurityGroupMembership name strings used for this option.
DBSecurityGroupMemberships []string
// The option settings to include in an option group.
OptionSettings []OptionSetting
// The version for the option.
OptionVersion *string
// The optional port for the option.
Port *int32
// A list of VpcSecurityGroupMembership name strings used for this option.
VpcSecurityGroupMemberships []string
noSmithyDocumentSerde
}
type OptionGroup struct {
// Indicates whether this option group can be applied to both VPC and non-VPC
// instances. The value true indicates the option group can be applied to both VPC
// and non-VPC instances.
AllowsVpcAndNonVpcInstanceMemberships bool
// Indicates when the option group was copied.
CopyTimestamp *time.Time
// Indicates the name of the engine that this option group can be applied to.
EngineName *string
// Indicates the major engine version associated with this option group.
MajorEngineVersion *string
// Specifies the Amazon Resource Name (ARN) for the option group.
OptionGroupArn *string
// Provides a description of the option group.
OptionGroupDescription *string
// Specifies the name of the option group.
OptionGroupName *string
// Indicates what options are available in the option group.
Options []Option
// Specifies the Amazon Web Services account ID for the option group from which
// this option group is copied.
SourceAccountId *string
// Specifies the name of the option group from which this option group is copied.
SourceOptionGroup *string
// If AllowsVpcAndNonVpcInstanceMemberships is false , this field is blank. If
// AllowsVpcAndNonVpcInstanceMemberships is true and this field is blank, then
// this option group can be applied to both VPC and non-VPC instances. If this
// field contains a value, then this option group can only be applied to instances
// that are in the VPC indicated by this field.
VpcId *string
noSmithyDocumentSerde
}
// Provides information on the option groups the DB instance is a member of.
type OptionGroupMembership struct {
// The name of the option group that the instance belongs to.
OptionGroupName *string
// The status of the DB instance's option group membership. Valid values are:
// in-sync , pending-apply , pending-removal , pending-maintenance-apply ,
// pending-maintenance-removal , applying , removing , and failed .
Status *string
noSmithyDocumentSerde
}
// Available option.
type OptionGroupOption struct {
// Specifies whether the option can be copied across Amazon Web Services accounts.
CopyableCrossAccount *bool
// If the option requires a port, specifies the default port for the option.
DefaultPort *int32
// The description of the option.
Description *string
// The name of the engine that this option can be applied to.
EngineName *string
// Indicates the major engine version that the option is available for.
MajorEngineVersion *string
// The minimum required engine version for the option to be applied.
MinimumRequiredMinorEngineVersion *string
// The name of the option.
Name *string
// The option settings that are available (and the default value) for each option
// in an option group.
OptionGroupOptionSettings []OptionGroupOptionSetting
// The versions that are available for the option.
OptionGroupOptionVersions []OptionVersion
// The options that conflict with this option.
OptionsConflictsWith []string
// The options that are prerequisites for this option.
OptionsDependedOn []string
// Permanent options can never be removed from an option group. An option group
// containing a permanent option can't be removed from a DB instance.
Permanent bool
// Persistent options can't be removed from an option group while DB instances are
// associated with the option group. If you disassociate all DB instances from the
// option group, your can remove the persistent option from the option group.
Persistent bool
// Specifies whether the option requires a port.
PortRequired bool
// If true, you must enable the Auto Minor Version Upgrade setting for your DB
// instance before you can use this option. You can enable Auto Minor Version
// Upgrade when you first create your DB instance, or by modifying your DB instance
// later.
RequiresAutoMinorEngineVersionUpgrade bool
// If true, you can change the option to an earlier version of the option. This
// only applies to options that have different versions available.
SupportsOptionVersionDowngrade *bool
// If true, you can only use this option with a DB instance that is in a VPC.
VpcOnly bool
noSmithyDocumentSerde
}
// Option group option settings are used to display settings available for each
// option with their default values and other information. These values are used
// with the DescribeOptionGroupOptions action.
type OptionGroupOptionSetting struct {
// Indicates the acceptable values for the option group option.
AllowedValues *string
// The DB engine specific parameter type for the option group option.
ApplyType *string
// The default value for the option group option.
DefaultValue *string
// Boolean value where true indicates that this option group option can be changed
// from the default value.
IsModifiable bool
// Boolean value where true indicates that a value must be specified for this
// option setting of the option group option.
IsRequired bool
// The minimum DB engine version required for the corresponding allowed value for
// this option setting.
MinimumEngineVersionPerAllowedValue []MinimumEngineVersionPerAllowedValue
// The description of the option group option.
SettingDescription *string
// The name of the option group option.
SettingName *string
noSmithyDocumentSerde
}
// Option settings are the actual settings being applied or configured for that
// option. It is used when you modify an option group or describe option groups.
// For example, the NATIVE_NETWORK_ENCRYPTION option has a setting called
// SQLNET.ENCRYPTION_SERVER that can have several different values.
type OptionSetting struct {
// The allowed values of the option setting.
AllowedValues *string
// The DB engine specific parameter type.
ApplyType *string
// The data type of the option setting.
DataType *string
// The default value of the option setting.
DefaultValue *string
// The description of the option setting.
Description *string
// Indicates if the option setting is part of a collection.
IsCollection bool
// A Boolean value that, when true, indicates the option setting can be modified
// from the default.
IsModifiable bool
// The name of the option that has settings that you can set.
Name *string
// The current value of the option setting.
Value *string
noSmithyDocumentSerde
}
// The version for an option. Option group option versions are returned by the
// DescribeOptionGroupOptions action.
type OptionVersion struct {
// True if the version is the default version of the option, and otherwise false.
IsDefault bool
// The version of the option.
Version *string
noSmithyDocumentSerde
}
// Contains a list of available options for a DB instance. This data type is used
// as a response element in the DescribeOrderableDBInstanceOptions action.
type OrderableDBInstanceOption struct {
// The Availability Zone group for a DB instance.
AvailabilityZoneGroup *string
// A list of Availability Zones for a DB instance.
AvailabilityZones []AvailabilityZone
// A list of the available processor features for the DB instance class of a DB
// instance.
AvailableProcessorFeatures []AvailableProcessorFeature
// The DB instance class for a DB instance.
DBInstanceClass *string
// The engine type of a DB instance.
Engine *string
// The engine version of a DB instance.
EngineVersion *string
// The license model for a DB instance.
LicenseModel *string
// Maximum total provisioned IOPS for a DB instance.
MaxIopsPerDbInstance *int32
// Maximum provisioned IOPS per GiB for a DB instance.
MaxIopsPerGib *float64
// Maximum storage size for a DB instance.
MaxStorageSize *int32
// Maximum storage throughput for a DB instance.
MaxStorageThroughputPerDbInstance *int32
// Maximum storage throughput to provisioned IOPS ratio for a DB instance.
MaxStorageThroughputPerIops *float64
// Minimum total provisioned IOPS for a DB instance.
MinIopsPerDbInstance *int32
// Minimum provisioned IOPS per GiB for a DB instance.
MinIopsPerGib *float64
// Minimum storage size for a DB instance.
MinStorageSize *int32
// Minimum storage throughput for a DB instance.
MinStorageThroughputPerDbInstance *int32
// Minimum storage throughput to provisioned IOPS ratio for a DB instance.
MinStorageThroughputPerIops *float64
// Indicates whether a DB instance is Multi-AZ capable.
MultiAZCapable bool
// Whether a DB instance supports RDS on Outposts. For more information about RDS
// on Outposts, see Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide.
OutpostCapable bool
// Indicates whether a DB instance can have a read replica.
ReadReplicaCapable bool
// Indicates the storage type for a DB instance.
StorageType *string
// The list of supported modes for Database Activity Streams. Aurora PostgreSQL
// returns the value [sync, async] . Aurora MySQL and RDS for Oracle return [async]
// only. If Database Activity Streams isn't supported, the return value is an empty
// list.
SupportedActivityStreamModes []string
// A list of the supported DB engine modes.
SupportedEngineModes []string
// The network types supported by the DB instance ( IPV4 or DUAL ). A DB instance
// can support only the IPv4 protocol or the IPv4 and the IPv6 protocols ( DUAL ).
// For more information, see Working with a DB instance in a VPC (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html)
// in the Amazon RDS User Guide.
SupportedNetworkTypes []string
// Whether DB instances can be configured as a Multi-AZ DB cluster. For more
// information on Multi-AZ DB clusters, see Multi-AZ deployments with two readable
// standby DB instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html)
// in the Amazon RDS User Guide.
SupportsClusters bool
// Indicates whether a DB instance supports Enhanced Monitoring at intervals from
// 1 to 60 seconds.
SupportsEnhancedMonitoring bool
// A value that indicates whether you can use Aurora global databases with a
// specific combination of other DB engine attributes.
SupportsGlobalDatabases bool
// Indicates whether a DB instance supports IAM database authentication.
SupportsIAMDatabaseAuthentication bool
// Indicates whether a DB instance supports provisioned IOPS.
SupportsIops bool
// Whether a DB instance supports Kerberos Authentication.
SupportsKerberosAuthentication *bool
// True if a DB instance supports Performance Insights, otherwise false.
SupportsPerformanceInsights bool
// Whether Amazon RDS can automatically scale storage for DB instances that use
// the specified DB instance class.
SupportsStorageAutoscaling *bool
// Indicates whether a DB instance supports encrypted storage.
SupportsStorageEncryption bool
// Indicates whether a DB instance supports storage throughput.
SupportsStorageThroughput bool
// Indicates whether a DB instance is in a VPC.
Vpc bool
noSmithyDocumentSerde
}
// A data type that represents an Outpost. For more information about RDS on
// Outposts, see Amazon RDS on Amazon Web Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide.
type Outpost struct {
// The Amazon Resource Name (ARN) of the Outpost.
Arn *string
noSmithyDocumentSerde
}
// This data type is used as a request parameter in the ModifyDBParameterGroup and
// ResetDBParameterGroup actions. This data type is used as a response element in
// the DescribeEngineDefaultParameters and DescribeDBParameters actions.
type Parameter struct {
// Specifies the valid range of values for the parameter.
AllowedValues *string
// Indicates when to apply parameter updates.
ApplyMethod ApplyMethod
// Specifies the engine specific parameters type.
ApplyType *string
// Specifies the valid data type for the parameter.
DataType *string
// Provides a description of the parameter.
Description *string
// Indicates whether ( true ) or not ( false ) 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
// Specifies the name of the parameter.
ParameterName *string
// Specifies the value of the parameter.
ParameterValue *string
// Indicates the source of the parameter value.
Source *string
// The valid DB engine modes.
SupportedEngineModes []string
noSmithyDocumentSerde
}
// A list of the log types whose configuration is still pending. In other words,
// these log types are in the process of being activated or deactivated.
type PendingCloudwatchLogsExports struct {
// Log types that are in the process of being enabled. After they are enabled,
// these log types are exported to CloudWatch Logs.
LogTypesToDisable []string
// Log types that are in the process of being deactivated. After they are
// deactivated, these log types aren't exported to CloudWatch Logs.
LogTypesToEnable []string
noSmithyDocumentSerde
}
// Provides information about a pending maintenance action for a resource.
type PendingMaintenanceAction struct {
// The type of pending maintenance action that is available for the resource.
// Valid actions are system-update , db-upgrade , hardware-maintenance , and
// ca-certificate-rotation .
Action *string
// The date of the maintenance window when the action is applied. The maintenance
// action is applied to the resource during its first maintenance window after this
// date.
AutoAppliedAfterDate *time.Time
// The effective date when the pending maintenance action is applied to the
// resource. This date takes into account opt-in requests received from the
// ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate , and the
// ForcedApplyDate . This value is blank if an opt-in request has not been received
// and nothing has been specified as AutoAppliedAfterDate or ForcedApplyDate .
CurrentApplyDate *time.Time
// A description providing more detail about the maintenance action.
Description *string
// The date when the maintenance action is automatically applied. On this date,
// the maintenance action is applied to the resource as soon as possible,
// regardless of the maintenance window for the resource. There might be a delay of
// one or more days from this date before the maintenance action is applied.
ForcedApplyDate *time.Time
// Indicates the type of opt-in request that has been received for the resource.
OptInStatus *string
noSmithyDocumentSerde
}
// This data type is used as a response element in the ModifyDBInstance operation
// and contains changes that will be applied during the next maintenance window.
type PendingModifiedValues struct {
// The allocated storage size for the DB instance specified in gibibytes (GiB).
AllocatedStorage *int32
// The automation mode of the RDS Custom DB instance: full or all-paused . If full
// , the DB instance automates monitoring and instance recovery. If all-paused ,
// the instance pauses automation for the duration set by
// --resume-full-automation-mode-minutes .
AutomationMode AutomationMode
// The number of days for which automated backups are retained.
BackupRetentionPeriod *int32
// The identifier of the CA certificate for the DB instance. For more information,
// see Using SSL/TLS to encrypt a connection to a DB instance (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
// in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB
// cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html)
// in the Amazon Aurora User Guide.
CACertificateIdentifier *string
// The name of the compute and memory capacity class for the DB instance.
DBInstanceClass *string
// The database identifier for the DB instance.
DBInstanceIdentifier *string
// The DB subnet group for the DB instance.
DBSubnetGroupName *string
// The database engine of the DB instance.
Engine *string
// The database engine version.
EngineVersion *string
// Whether mapping of Amazon Web Services Identity and Access Management (IAM)
// accounts to database accounts is enabled.
IAMDatabaseAuthenticationEnabled *bool
// The Provisioned IOPS value for the DB instance.
Iops *int32
// The license model for the DB instance. Valid values: license-included |
// bring-your-own-license | general-public-license
LicenseModel *string
// The master credentials for the DB instance.
MasterUserPassword *string
// A value that indicates that the Single-AZ DB instance will change to a Multi-AZ
// deployment.
MultiAZ *bool
// A list of the log types whose configuration is still pending. In other words,
// these log types are in the process of being activated or deactivated.
PendingCloudwatchLogsExports *PendingCloudwatchLogsExports
// The port for the DB instance.
Port *int32
// The number of CPU cores and the number of threads per core for the DB instance
// class of the DB instance.
ProcessorFeatures []ProcessorFeature
// The number of minutes to pause the automation. When the time period ends, RDS
// Custom resumes full automation. The minimum value is 60 (default). The maximum
// value is 1,440.
ResumeFullAutomationModeTime *time.Time
// The storage throughput of the DB instance.
StorageThroughput *int32
// The storage type of the DB instance.
StorageType *string
noSmithyDocumentSerde
}
// Contains the processor features of a DB instance class. To specify the number
// of CPU cores, use the coreCount feature name for the Name parameter. To specify
// the number of threads per core, use the threadsPerCore feature name for the Name
// parameter. You can set the processor features of the DB instance class for a DB
// instance when you call one of the following actions:
// - CreateDBInstance
// - ModifyDBInstance
// - RestoreDBInstanceFromDBSnapshot
// - RestoreDBInstanceFromS3
// - RestoreDBInstanceToPointInTime
//
// You can view the valid processor values for a particular instance class by
// calling the DescribeOrderableDBInstanceOptions action and specifying the
// instance class for the DBInstanceClass parameter. In addition, you can use the
// following actions for DB instance class processor information:
// - DescribeDBInstances
// - DescribeDBSnapshots
// - DescribeValidDBInstanceModifications
//
// If you call DescribeDBInstances , ProcessorFeature returns non-null values only
// if the following conditions are met:
// - You are accessing an Oracle DB instance.
// - Your Oracle DB instance class supports configuring the number of CPU cores
// and threads per core.
// - The current number CPU cores and threads is set to a non-default value.
//
// For more information, see Configuring the Processor of the DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor)
// in the Amazon RDS User Guide.
type ProcessorFeature struct {
// The name of the processor feature. Valid names are coreCount and threadsPerCore .
Name *string
// The value of a processor feature name.
Value *string
noSmithyDocumentSerde
}
// A range of integer values.
type Range struct {
// The minimum value in the range.
From int32
// The step value for the range. For example, if you have a range of 5,000 to
// 10,000, with a step value of 1,000, the valid values start at 5,000 and step up
// by 1,000. Even though 7,500 is within the range, it isn't a valid value for the
// range. The valid values are 5,000, 6,000, 7,000, 8,000...
Step *int32
// The maximum value in the range.
To int32
noSmithyDocumentSerde
}
// This data type is used as a response element in the DescribeReservedDBInstances
// and DescribeReservedDBInstancesOfferings actions.
type RecurringCharge struct {
// The amount of the recurring charge.
RecurringChargeAmount float64
// The frequency of the recurring charge.
RecurringChargeFrequency *string
noSmithyDocumentSerde
}
// This data type is used as a response element in the DescribeReservedDBInstances
// and PurchaseReservedDBInstancesOffering actions.
type ReservedDBInstance struct {
// The currency code for the reserved DB instance.
CurrencyCode *string
// The DB instance class for the reserved DB instance.
DBInstanceClass *string
// The number of reserved DB instances.
DBInstanceCount int32
// The duration of the reservation in seconds.
Duration int32
// The fixed price charged for this reserved DB instance.
FixedPrice float64
// The unique identifier for the lease associated with the reserved DB instance.
// Amazon Web Services Support might request the lease ID for an issue related to a
// reserved DB instance.
LeaseId *string
// Indicates if the reservation applies to Multi-AZ deployments.
MultiAZ bool
// The offering type of this reserved DB instance.
OfferingType *string
// The description of the reserved DB instance.
ProductDescription *string
// The recurring price charged to run this reserved DB instance.
RecurringCharges []RecurringCharge
// The Amazon Resource Name (ARN) for the reserved DB instance.
ReservedDBInstanceArn *string
// The unique identifier for the reservation.
ReservedDBInstanceId *string
// The offering identifier.
ReservedDBInstancesOfferingId *string
// The time the reservation started.
StartTime *time.Time
// The state of the reserved DB instance.
State *string
// The hourly price charged for this reserved DB instance.
UsagePrice float64
noSmithyDocumentSerde
}
// This data type is used as a response element in the
// DescribeReservedDBInstancesOfferings action.
type ReservedDBInstancesOffering struct {
// The currency code for the reserved DB instance offering.
CurrencyCode *string
// The DB instance class for the reserved DB instance.
DBInstanceClass *string
// The duration of the offering in seconds.
Duration int32
// The fixed price charged for this offering.
FixedPrice float64
// Indicates if the offering applies to Multi-AZ deployments.
MultiAZ bool
// The offering type.
OfferingType *string
// The database engine used by the offering.
ProductDescription *string
// The recurring price charged to run this reserved DB instance.
RecurringCharges []RecurringCharge
// The offering identifier.
ReservedDBInstancesOfferingId *string
// The hourly price charged for this offering.
UsagePrice float64
noSmithyDocumentSerde
}
// Describes the pending maintenance actions for a resource.
type ResourcePendingMaintenanceActions struct {
// A list that provides details about the pending maintenance actions for the
// resource.
PendingMaintenanceActionDetails []PendingMaintenanceAction
// The ARN of the resource that has pending maintenance actions.
ResourceIdentifier *string
noSmithyDocumentSerde
}
// Earliest and latest time an instance can be restored to:
type RestoreWindow struct {
// The earliest time you can restore an instance to.
EarliestTime *time.Time
// The latest time you can restore an instance to.
LatestTime *time.Time
noSmithyDocumentSerde
}
// Contains the scaling configuration of an Aurora Serverless v1 DB cluster. For
// more information, see Using Amazon Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
// in the Amazon Aurora User Guide.
type ScalingConfiguration struct {
// A value that indicates whether to allow or disallow automatic pause for an
// Aurora DB cluster in serverless DB engine mode. A DB cluster can be paused only
// when it's idle (it has no connections). If a DB cluster is paused for more than
// seven days, the DB cluster might be backed up with a snapshot. In this case, the
// DB cluster is restored when there is a request to connect to it.
AutoPause *bool
// The maximum capacity for an Aurora DB cluster in serverless DB engine mode. For
// Aurora MySQL, valid capacity values are 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , and
// 256 . For Aurora PostgreSQL, valid capacity values are 2 , 4 , 8 , 16 , 32 , 64
// , 192 , and 384 . The maximum capacity must be greater than or equal to the
// minimum capacity.
MaxCapacity *int32
// The minimum capacity for an Aurora DB cluster in serverless DB engine mode. For
// Aurora MySQL, valid capacity values are 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , and
// 256 . For Aurora PostgreSQL, valid capacity values are 2 , 4 , 8 , 16 , 32 , 64
// , 192 , and 384 . The minimum capacity must be less than or equal to the maximum
// capacity.
MinCapacity *int32
// The amount of time, in seconds, that Aurora Serverless v1 tries to find a
// scaling point to perform seamless scaling before enforcing the timeout action.
// The default is 300. Specify a value between 60 and 600 seconds.
SecondsBeforeTimeout *int32
// The time, in seconds, before an Aurora DB cluster in serverless mode is paused.
// Specify a value between 300 and 86,400 seconds.
SecondsUntilAutoPause *int32
// The action to take when the timeout is reached, either ForceApplyCapacityChange
// or RollbackCapacityChange . ForceApplyCapacityChange sets the capacity to the
// specified value as soon as possible. RollbackCapacityChange , the default,
// ignores the capacity change if a scaling point isn't found in the timeout
// period. If you specify ForceApplyCapacityChange , connections that prevent
// Aurora Serverless v1 from finding a scaling point might be dropped. For more
// information, see Autoscaling for Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling)
// in the Amazon Aurora User Guide.
TimeoutAction *string
noSmithyDocumentSerde
}
// The scaling configuration for an Aurora DB cluster in serverless DB engine
// mode. For more information, see Using Amazon Aurora Serverless v1 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
// in the Amazon Aurora User Guide.
type ScalingConfigurationInfo struct {
// A value that indicates whether automatic pause is allowed for the Aurora DB
// cluster in serverless DB engine mode. When the value is set to false for an
// Aurora Serverless v1 DB cluster, the DB cluster automatically resumes.
AutoPause *bool
// The maximum capacity for an Aurora DB cluster in serverless DB engine mode.
MaxCapacity *int32
// The minimum capacity for an Aurora DB cluster in serverless DB engine mode.
MinCapacity *int32
// The number of seconds before scaling times out. What happens when an attempted
// scaling action times out is determined by the TimeoutAction setting.
SecondsBeforeTimeout *int32
// The remaining amount of time, in seconds, before the Aurora DB cluster in
// serverless mode is paused. A DB cluster can be paused only when it's idle (it
// has no connections).
SecondsUntilAutoPause *int32
// The action that occurs when Aurora times out while attempting to change the
// capacity of an Aurora Serverless v1 cluster. The value is either
// ForceApplyCapacityChange or RollbackCapacityChange . ForceApplyCapacityChange ,
// the default, sets the capacity to the specified value as soon as possible.
// RollbackCapacityChange ignores the capacity change if a scaling point isn't
// found in the timeout period.
TimeoutAction *string
noSmithyDocumentSerde
}
// Contains the scaling configuration of an Aurora Serverless v2 DB cluster. For
// more information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
type ServerlessV2ScalingConfiguration struct {
// The maximum number of Aurora capacity units (ACUs) for a DB instance in an
// Aurora Serverless v2 cluster. You can specify ACU values in half-step
// increments, such as 40, 40.5, 41, and so on. The largest value that you can use
// is 128.
MaxCapacity *float64
// The minimum number of Aurora capacity units (ACUs) for a DB instance in an
// Aurora Serverless v2 cluster. You can specify ACU values in half-step
// increments, such as 8, 8.5, 9, and so on. The smallest value that you can use is
// 0.5.
MinCapacity *float64
noSmithyDocumentSerde
}
// The scaling configuration for an Aurora Serverless v2 DB cluster. For more
// information, see Using Amazon Aurora Serverless v2 (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)
// in the Amazon Aurora User Guide.
type ServerlessV2ScalingConfigurationInfo struct {
// The maximum number of Aurora capacity units (ACUs) for a DB instance in an
// Aurora Serverless v2 cluster. You can specify ACU values in half-step
// increments, such as 40, 40.5, 41, and so on. The largest value that you can use
// is 128.
MaxCapacity *float64
// The minimum number of Aurora capacity units (ACUs) for a DB instance in an
// Aurora Serverless v2 cluster. You can specify ACU values in half-step
// increments, such as 8, 8.5, 9, and so on. The smallest value that you can use is
// 0.5.
MinCapacity *float64
noSmithyDocumentSerde
}
// Contains an Amazon Web Services Region name as the result of a successful call
// to the DescribeSourceRegions action.
type SourceRegion struct {
// The endpoint for the source Amazon Web Services Region endpoint.
Endpoint *string
// The name of the source Amazon Web Services Region.
RegionName *string
// The status of the source Amazon Web Services Region.
Status *string
// Whether the source Amazon Web Services Region supports replicating automated
// backups to the current Amazon Web Services Region.
SupportsDBInstanceAutomatedBackupsReplication bool
noSmithyDocumentSerde
}
// This data type is used as a response element for the DescribeDBSubnetGroups
// operation.
type Subnet struct {
// Contains Availability Zone information. This data type is used as an element in
// the OrderableDBInstanceOption data type.
SubnetAvailabilityZone *AvailabilityZone
// The identifier of the subnet.
SubnetIdentifier *string
// If the subnet is associated with an Outpost, this value specifies the Outpost.
// For more information about RDS on Outposts, see Amazon RDS on Amazon Web
// Services Outposts (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html)
// in the Amazon RDS User Guide.
SubnetOutpost *Outpost
// The status of the subnet.
SubnetStatus *string
noSmithyDocumentSerde
}
// Contains the details about a blue/green deployment. For more information, see
// Using Amazon RDS Blue/Green Deployments for database updates (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)
// in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for
// database updates (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html)
// in the Amazon Aurora User Guide.
type SwitchoverDetail struct {
// The Amazon Resource Name (ARN) of a resource in the blue environment.
SourceMember *string
// The switchover status of a resource in a blue/green deployment. Values:
// - PROVISIONING - The resource is being prepared to switch over.
// - AVAILABLE - The resource is ready to switch over.
// - SWITCHOVER_IN_PROGRESS - The resource is being switched over.
// - SWITCHOVER_COMPLETED - The resource has been switched over.
// - SWITCHOVER_FAILED - The resource attempted to switch over but failed.
// - MISSING_SOURCE - The source resource has been deleted.
// - MISSING_TARGET - The target resource has been deleted.
Status *string
// The Amazon Resource Name (ARN) of a resource in the green environment.
TargetMember *string
noSmithyDocumentSerde
}
// Metadata assigned to an Amazon RDS resource consisting of a key-value pair. For
// more information, see Tagging Amazon RDS Resources (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html)
// in the Amazon RDS User Guide.
type Tag struct {
// A key is the required name of the tag. The string value can be from 1 to 128
// Unicode characters in length and can't be prefixed with aws: or rds: . The
// string can only contain only the set of Unicode letters, digits, white-space,
// '_', '.', ':', '/', '=', '+', '-', '@' (Java regex:
// "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$").
Key *string
// A value is the optional value of the tag. The string value can be from 1 to 256
// Unicode characters in length and can't be prefixed with aws: or rds: . The
// string can only contain only the set of Unicode letters, digits, white-space,
// '_', '.', ':', '/', '=', '+', '-', '@' (Java regex:
// "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$").
Value *string
noSmithyDocumentSerde
}
// Information about the connection health of an RDS Proxy target.
type TargetHealth struct {
// A description of the health of the RDS Proxy target. If the State is AVAILABLE ,
// a description is not included.
Description *string
// The reason for the current health State of the RDS Proxy target.
Reason TargetHealthReason
// The current state of the connection health lifecycle for the RDS Proxy target.
// The following is a typical lifecycle example for the states of an RDS Proxy
// target: registering > unavailable > available > unavailable > available
State TargetState
noSmithyDocumentSerde
}
// A time zone associated with a DBInstance or a DBSnapshot . This data type is an
// element in the response to the DescribeDBInstances , the DescribeDBSnapshots ,
// and the DescribeDBEngineVersions actions.
type Timezone struct {
// The name of the time zone.
TimezoneName *string
noSmithyDocumentSerde
}
// The version of the database engine that a DB instance can be upgraded to.
type UpgradeTarget struct {
// A value that indicates whether the target version is applied to any source DB
// instances that have AutoMinorVersionUpgrade set to true.
AutoUpgrade bool
// The version of the database engine that a DB instance can be upgraded to.
Description *string
// The name of the upgrade target database engine.
Engine *string
// The version number of the upgrade target database engine.
EngineVersion *string
// A value that indicates whether upgrading to the target version requires
// upgrading the major version of the database engine.
IsMajorVersionUpgrade bool
// A list of the supported DB engine modes for the target engine version.
SupportedEngineModes []string
// A value that indicates whether you can use Babelfish for Aurora PostgreSQL with
// the target engine version.
SupportsBabelfish *bool
// A value that indicates whether you can use Aurora global databases with the
// target engine version.
SupportsGlobalDatabases *bool
// A value that indicates whether you can use Aurora parallel query with the
// target engine version.
SupportsParallelQuery *bool
noSmithyDocumentSerde
}
// Specifies the details of authentication used by a proxy to log in as a specific
// database user.
type UserAuthConfig struct {
// The type of authentication that the proxy uses for connections from the proxy
// to the underlying database.
AuthScheme AuthScheme
// The type of authentication the proxy uses for connections from clients.
ClientPasswordAuthType ClientPasswordAuthType
// A user-specified description about the authentication used by a proxy to log in
// as a specific database user.
Description *string
// Whether to require or disallow Amazon Web Services Identity and Access
// Management (IAM) authentication for connections to the proxy. The ENABLED value
// is valid only for proxies with RDS for Microsoft SQL Server.
IAMAuth IAMAuthMode
// The Amazon Resource Name (ARN) representing the secret that the proxy uses to
// authenticate to the RDS DB instance or Aurora DB cluster. These secrets are
// stored within Amazon Secrets Manager.
SecretArn *string
// The name of the database user to which the proxy connects.
UserName *string
noSmithyDocumentSerde
}
// Returns the details of authentication used by a proxy to log in as a specific
// database user.
type UserAuthConfigInfo struct {
// The type of authentication that the proxy uses for connections from the proxy
// to the underlying database.
AuthScheme AuthScheme
// The type of authentication the proxy uses for connections from clients.
ClientPasswordAuthType ClientPasswordAuthType
// A user-specified description about the authentication used by a proxy to log in
// as a specific database user.
Description *string
// Whether to require or disallow Amazon Web Services Identity and Access
// Management (IAM) authentication for connections to the proxy. The ENABLED value
// is valid only for proxies with RDS for Microsoft SQL Server.
IAMAuth IAMAuthMode
// The Amazon Resource Name (ARN) representing the secret that the proxy uses to
// authenticate to the RDS DB instance or Aurora DB cluster. These secrets are
// stored within Amazon Secrets Manager.
SecretArn *string
// The name of the database user to which the proxy connects.
UserName *string
noSmithyDocumentSerde
}
// Information about valid modifications that you can make to your DB instance.
// Contains the result of a successful call to the
// DescribeValidDBInstanceModifications action. You can use this information when
// you call ModifyDBInstance .
type ValidDBInstanceModificationsMessage struct {
// Valid storage options for your DB instance.
Storage []ValidStorageOptions
// Valid processor features for your DB instance.
ValidProcessorFeatures []AvailableProcessorFeature
noSmithyDocumentSerde
}
// Information about valid modifications that you can make to your DB instance.
// Contains the result of a successful call to the
// DescribeValidDBInstanceModifications action.
type ValidStorageOptions struct {
// The valid range of Provisioned IOPS to gibibytes of storage multiplier. For
// example, 3-10, which means that provisioned IOPS can be between 3 and 10 times
// storage.
IopsToStorageRatio []DoubleRange
// The valid range of provisioned IOPS. For example, 1000-256,000.
ProvisionedIops []Range
// The valid range of provisioned storage throughput. For example, 500-4,000
// mebibytes per second (MiBps).
ProvisionedStorageThroughput []Range
// The valid range of storage in gibibytes (GiB). For example, 100 to 16,384.
StorageSize []Range
// The valid range of storage throughput to provisioned IOPS ratios. For example,
// 0-0.25.
StorageThroughputToIopsRatio []DoubleRange
// The valid storage types for your DB instance. For example: gp2, gp3, io1.
StorageType *string
// Whether or not Amazon RDS can automatically scale storage for DB instances that
// use the new instance class.
SupportsStorageAutoscaling bool
noSmithyDocumentSerde
}
// This data type is used as a response element for queries on VPC security group
// membership.
type VpcSecurityGroupMembership struct {
// The membership status of the VPC security group. Currently, the only valid
// status is active .
Status *string
// The name of the VPC security group.
VpcSecurityGroupId *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
| 3,865 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rdsdata
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 = "RDS Data"
const ServiceAPIVersion = "2018-08-01"
// Client provides the API client to make operations call for AWS RDS DataService.
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, "rdsdata", 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 rdsdata
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 rdsdata
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/rdsdata/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Runs a batch SQL statement over an array of data. You can run bulk update and
// insert operations for multiple records using a DML statement with different
// parameter sets. Bulk operations can provide a significant performance
// improvement over individual insert and update operations. If a call isn't part
// of a transaction because it doesn't include the transactionID parameter,
// changes that result from the call are committed automatically. There isn't a
// fixed upper limit on the number of parameter sets. However, the maximum size of
// the HTTP request submitted through the Data API is 4 MiB. If the request exceeds
// this limit, the Data API returns an error and doesn't process the request. This
// 4-MiB limit includes the size of the HTTP headers and the JSON notation in the
// request. Thus, the number of parameter sets that you can include depends on a
// combination of factors, such as the size of the SQL statement and the size of
// each parameter set. The response size limit is 1 MiB. If the call returns more
// than 1 MiB of response data, the call is terminated.
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
}
// The request parameters represent the input of a SQL statement over an array of
// data.
type BatchExecuteStatementInput struct {
// The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
//
// This member is required.
ResourceArn *string
// The ARN of the secret that enables access to the DB cluster. Enter the database
// user name and password for the credentials in the secret. For information about
// creating the secret, see Create a database secret (https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html)
// .
//
// This member is required.
SecretArn *string
// The SQL statement to run. Don't include a semicolon (;) at the end of the SQL
// statement.
//
// This member is required.
Sql *string
// The name of the database.
Database *string
// The parameter set for the batch operation. The SQL statement is executed as
// many times as the number of parameter sets provided. To execute a SQL statement
// with no parameters, use one of the following options:
// - Specify one or more empty parameter sets.
// - Use the ExecuteStatement operation instead of the BatchExecuteStatement
// operation.
// Array parameters are not supported.
ParameterSets [][]types.SqlParameter
// The name of the database schema. Currently, the schema parameter isn't
// supported.
Schema *string
// The identifier of a transaction that was started by using the BeginTransaction
// operation. Specify the transaction ID of the transaction that you want to
// include the SQL statement in. If the SQL statement is not part of a transaction,
// don't set this parameter.
TransactionId *string
noSmithyDocumentSerde
}
// The response elements represent the output of a SQL statement over an array of
// data.
type BatchExecuteStatementOutput struct {
// The execution results of each batch entry.
UpdateResults []types.UpdateResult
// 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(&awsRestjson1_serializeOpBatchExecuteStatement{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_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 = 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
}
func newServiceMetadataMiddleware_opBatchExecuteStatement(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds-data",
OperationName: "BatchExecuteStatement",
}
}
| 178 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package rdsdata
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"
)
// Starts a SQL transaction. A transaction can run for a maximum of 24 hours. A
// transaction is terminated and rolled back automatically after 24 hours. A
// transaction times out if no calls use its transaction ID in three minutes. If a
// transaction times out before it's committed, it's rolled back automatically. DDL
// statements inside a transaction cause an implicit commit. We recommend that you
// run each DDL statement in a separate ExecuteStatement call with
// continueAfterTimeout enabled.
func (c *Client) BeginTransaction(ctx context.Context, params *BeginTransactionInput, optFns ...func(*Options)) (*BeginTransactionOutput, error) {
if params == nil {
params = &BeginTransactionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "BeginTransaction", params, optFns, c.addOperationBeginTransactionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*BeginTransactionOutput)
out.ResultMetadata = metadata
return out, nil
}
// The request parameters represent the input of a request to start a SQL
// transaction.
type BeginTransactionInput struct {
// The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
//
// This member is required.
ResourceArn *string
// The name or ARN of the secret that enables access to the DB cluster.
//
// This member is required.
SecretArn *string
// The name of the database.
Database *string
// The name of the database schema.
Schema *string
noSmithyDocumentSerde
}
// The response elements represent the output of a request to start a SQL
// transaction.
type BeginTransactionOutput struct {
// The transaction ID of the transaction started by the call.
TransactionId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationBeginTransactionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpBeginTransaction{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBeginTransaction{}, 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 = addOpBeginTransactionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBeginTransaction(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_opBeginTransaction(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "rds-data",
OperationName: "BeginTransaction",
}
}
| 145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.