diff --git a/.changelog/160724e0566d46d3b3b08dcb709af946.json b/.changelog/160724e0566d46d3b3b08dcb709af946.json new file mode 100644 index 00000000000..a60b962396f --- /dev/null +++ b/.changelog/160724e0566d46d3b3b08dcb709af946.json @@ -0,0 +1,8 @@ +{ + "id": "160724e0-566d-46d3-b3b0-8dcb709af946", + "type": "feature", + "description": "Allow customers to manage outbound traffic from their Kx Environment when attaching a transit gateway by providing network acl entries. Allow the customer to choose how they want to update the databases on a cluster allowing updates to possibly be faster than usual.", + "modules": [ + "service/finspace" + ] +} \ No newline at end of file diff --git a/.changelog/4f46c447478a44589ab72eeee1d1673f.json b/.changelog/4f46c447478a44589ab72eeee1d1673f.json new file mode 100644 index 00000000000..025040e5815 --- /dev/null +++ b/.changelog/4f46c447478a44589ab72eeee1d1673f.json @@ -0,0 +1,8 @@ +{ + "id": "4f46c447-478a-4458-9ab7-2eeee1d1673f", + "type": "documentation", + "description": "Fixed typos in description fields", + "modules": [ + "service/route53domains" + ] +} \ No newline at end of file diff --git a/.changelog/520b63ea218f4053b056ecd064b26f03.json b/.changelog/520b63ea218f4053b056ecd064b26f03.json new file mode 100644 index 00000000000..e46599e5263 --- /dev/null +++ b/.changelog/520b63ea218f4053b056ecd064b26f03.json @@ -0,0 +1,8 @@ +{ + "id": "520b63ea-218f-4053-b056-ecd064b26f03", + "type": "feature", + "description": "Adding support for RDS Aurora Global Database Unplanned Failover", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/9a5dd259c59e4a9d8798fa5da95fd984.json b/.changelog/9a5dd259c59e4a9d8798fa5da95fd984.json new file mode 100644 index 00000000000..911c87d4aca --- /dev/null +++ b/.changelog/9a5dd259c59e4a9d8798fa5da95fd984.json @@ -0,0 +1,8 @@ +{ + "id": "9a5dd259-c59e-4a9d-8798-fa5da95fd984", + "type": "feature", + "description": "The DeleteKeyPair API has been updated to return the keyPairId when an existing key pair is deleted.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/cfe1b17e7593421db461569151077c73.json b/.changelog/cfe1b17e7593421db461569151077c73.json new file mode 100644 index 00000000000..39906db2308 --- /dev/null +++ b/.changelog/cfe1b17e7593421db461569151077c73.json @@ -0,0 +1,8 @@ +{ + "id": "cfe1b17e-7593-421d-b461-569151077c73", + "type": "documentation", + "description": "Doc only update to add Ubuntu 22.04 as an Image ID option for Cloud9", + "modules": [ + "service/cloud9" + ] +} \ No newline at end of file diff --git a/service/ec2/api_op_DeleteKeyPair.go b/service/ec2/api_op_DeleteKeyPair.go index 7f18a0811de..efb1b62c8fa 100644 --- a/service/ec2/api_op_DeleteKeyPair.go +++ b/service/ec2/api_op_DeleteKeyPair.go @@ -49,6 +49,13 @@ type DeleteKeyPairInput struct { } type DeleteKeyPairOutput struct { + + // The ID of the key pair. + KeyPairId *string + + // Is true if the request succeeds, and an error otherwise. + Return *bool + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index c44db2b12c9..dfb48428173 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -13834,10 +13834,33 @@ func (m *awsEc2query_deserializeOpDeleteKeyPair) HandleDeserialize(ctx context.C output := &DeleteKeyPairOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentDeleteKeyPairOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err @@ -140976,6 +140999,71 @@ func awsEc2query_deserializeOpDocumentDeleteIpamScopeOutput(v **DeleteIpamScopeO return nil } +func awsEc2query_deserializeOpDocumentDeleteKeyPairOutput(v **DeleteKeyPairOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteKeyPairOutput + if *v == nil { + sv = &DeleteKeyPairOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("keyPairId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KeyPairId = ptr.String(xtv) + } + + case strings.EqualFold("return", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Return = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentDeleteLaunchTemplateOutput(v **DeleteLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/finspace/api_op_CreateKxCluster.go b/service/finspace/api_op_CreateKxCluster.go index 6e979a77c59..7cbbca50e13 100644 --- a/service/finspace/api_op_CreateKxCluster.go +++ b/service/finspace/api_op_CreateKxCluster.go @@ -43,9 +43,8 @@ type CreateKxClusterInput struct { // This member is required. AzMode types.KxAzMode - // A structure for the metadata of a cluster. It includes information about like - // the CPUs needed, memory of instances, number of instances, and the port used - // while establishing a connection. + // A structure for the metadata of a cluster. It includes information like the + // CPUs needed, memory of instances, and number of instances. // // This member is required. CapacityConfiguration *types.CapacityConfiguration @@ -159,8 +158,7 @@ type CreateKxClusterOutput struct { CacheStorageConfigurations []types.KxCacheStorageConfiguration // A structure for the metadata of a cluster. It includes information like the - // CPUs needed, memory of instances, number of instances, and the port used while - // establishing a connection. + // CPUs needed, memory of instances, and number of instances. CapacityConfiguration *types.CapacityConfiguration // A description of the cluster. diff --git a/service/finspace/api_op_CreateKxUser.go b/service/finspace/api_op_CreateKxUser.go index b26da5153b0..b5001a7b607 100644 --- a/service/finspace/api_op_CreateKxUser.go +++ b/service/finspace/api_op_CreateKxUser.go @@ -67,8 +67,8 @@ type CreateKxUserOutput struct { IamRole *string // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User - // Guide. + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. UserArn *string // A unique identifier for the user. diff --git a/service/finspace/api_op_GetKxCluster.go b/service/finspace/api_op_GetKxCluster.go index 19879785b39..85da8e304f5 100644 --- a/service/finspace/api_op_GetKxCluster.go +++ b/service/finspace/api_op_GetKxCluster.go @@ -68,8 +68,7 @@ type GetKxClusterOutput struct { CacheStorageConfigurations []types.KxCacheStorageConfiguration // A structure for the metadata of a cluster. It includes information like the - // CPUs needed, memory of instances, number of instances, and the port used while - // establishing a connection. + // CPUs needed, memory of instances, and number of instances. CapacityConfiguration *types.CapacityConfiguration // A description of the cluster. diff --git a/service/finspace/api_op_GetKxConnectionString.go b/service/finspace/api_op_GetKxConnectionString.go index 9eaba5daaec..17c61939f4a 100644 --- a/service/finspace/api_op_GetKxConnectionString.go +++ b/service/finspace/api_op_GetKxConnectionString.go @@ -45,8 +45,8 @@ type GetKxConnectionStringInput struct { EnvironmentId *string // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User - // Guide. + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. // // This member is required. UserArn *string diff --git a/service/finspace/api_op_GetKxUser.go b/service/finspace/api_op_GetKxUser.go index a4c223674f5..2fbbefc8b0a 100644 --- a/service/finspace/api_op_GetKxUser.go +++ b/service/finspace/api_op_GetKxUser.go @@ -55,8 +55,8 @@ type GetKxUserOutput struct { IamRole *string // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User - // Guide. + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. UserArn *string // A unique identifier for the user. diff --git a/service/finspace/api_op_UpdateKxClusterDatabases.go b/service/finspace/api_op_UpdateKxClusterDatabases.go index 5fc435b5b17..b3cf80dffb8 100644 --- a/service/finspace/api_op_UpdateKxClusterDatabases.go +++ b/service/finspace/api_op_UpdateKxClusterDatabases.go @@ -56,6 +56,10 @@ type UpdateKxClusterDatabasesInput struct { // A token that ensures idempotency. This token expires in 10 minutes. ClientToken *string + // The configuration that allows you to choose how you want to update the + // databases on a cluster. + DeploymentConfiguration *types.KxDeploymentConfiguration + noSmithyDocumentSerde } @@ -120,6 +124,9 @@ func (c *Client) addOperationUpdateKxClusterDatabasesMiddlewares(stack *middlewa if err = addUpdateKxClusterDatabasesResolveEndpointMiddleware(stack, options); err != nil { return err } + if err = addIdempotencyToken_opUpdateKxClusterDatabasesMiddleware(stack, options); err != nil { + return err + } if err = addOpUpdateKxClusterDatabasesValidationMiddleware(stack); err != nil { return err } @@ -144,6 +151,39 @@ func (c *Client) addOperationUpdateKxClusterDatabasesMiddlewares(stack *middlewa return nil } +type idempotencyToken_initializeOpUpdateKxClusterDatabases struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateKxClusterDatabases) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateKxClusterDatabases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateKxClusterDatabasesInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateKxClusterDatabasesInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateKxClusterDatabasesMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateKxClusterDatabases{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opUpdateKxClusterDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_UpdateKxUser.go b/service/finspace/api_op_UpdateKxUser.go index 5361bae9e58..8788bf0de1a 100644 --- a/service/finspace/api_op_UpdateKxUser.go +++ b/service/finspace/api_op_UpdateKxUser.go @@ -64,8 +64,8 @@ type UpdateKxUserOutput struct { IamRole *string // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User - // Guide. + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. UserArn *string // A unique identifier for the user. diff --git a/service/finspace/deserializers.go b/service/finspace/deserializers.go index 6069da5245a..f33223eb246 100644 --- a/service/finspace/deserializers.go +++ b/service/finspace/deserializers.go @@ -5302,6 +5302,9 @@ func awsRestjson1_deserializeOpErrorUpdateKxClusterDatabases(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6331,6 +6334,37 @@ func awsRestjson1_deserializeOpDocumentUpdateKxUserOutput(v **UpdateKxUserOutput func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output } @@ -6588,6 +6622,37 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output } @@ -6649,6 +6714,15 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie for key, value := range shape { switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + default: _, _ = key, value @@ -7568,6 +7642,63 @@ func awsRestjson1_deserializeDocumentFederationParameters(v **types.FederationPa return nil } +func awsRestjson1_deserializeDocumentIcmpTypeCode(v **types.IcmpTypeCode, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IcmpTypeCode + if *v == nil { + sv = &types.IcmpTypeCode{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IcmpTypeOrCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Code = int32(i64) + } + + case "type": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IcmpTypeOrCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Type = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8945,6 +9076,178 @@ func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExcee return nil } +func awsRestjson1_deserializeDocumentNetworkACLConfiguration(v *[]types.NetworkACLEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NetworkACLEntry + if *v == nil { + cv = []types.NetworkACLEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NetworkACLEntry + destAddr := &col + if err := awsRestjson1_deserializeDocumentNetworkACLEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkACLEntry(v **types.NetworkACLEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkACLEntry + if *v == nil { + sv = &types.NetworkACLEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cidrBlock": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidCIDRBlock to be of type string, got %T instead", value) + } + sv.CidrBlock = ptr.String(jtv) + } + + case "icmpTypeCode": + if err := awsRestjson1_deserializeDocumentIcmpTypeCode(&sv.IcmpTypeCode, value); err != nil { + return err + } + + case "portRange": + if err := awsRestjson1_deserializeDocumentPortRange(&sv.PortRange, value); err != nil { + return err + } + + case "protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) + } + sv.Protocol = ptr.String(jtv) + } + + case "ruleAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAction to be of type string, got %T instead", value) + } + sv.RuleAction = types.RuleAction(jtv) + } + + case "ruleNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RuleNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RuleNumber = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPortRange(v **types.PortRange, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PortRange + if *v == nil { + sv = &types.PortRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "from": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.From = int32(i64) + } + + case "to": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.To = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9195,6 +9498,15 @@ func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingExc for key, value := range shape { switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + default: _, _ = key, value @@ -9226,6 +9538,11 @@ func awsRestjson1_deserializeDocumentTransitGatewayConfiguration(v **types.Trans for key, value := range shape { switch key { + case "attachmentNetworkAclConfiguration": + if err := awsRestjson1_deserializeDocumentNetworkACLConfiguration(&sv.AttachmentNetworkAclConfiguration, value); err != nil { + return err + } + case "routableCIDRSpace": if value != nil { jtv, ok := value.(string) diff --git a/service/finspace/serializers.go b/service/finspace/serializers.go index 7af228fc2fc..800d9dbb1f2 100644 --- a/service/finspace/serializers.go +++ b/service/finspace/serializers.go @@ -2550,6 +2550,13 @@ func awsRestjson1_serializeOpDocumentUpdateKxClusterDatabasesInput(v *UpdateKxCl } } + if v.DeploymentConfiguration != nil { + ok := object.Key("deploymentConfiguration") + if err := awsRestjson1_serializeDocumentKxDeploymentConfiguration(v.DeploymentConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -3209,6 +3216,23 @@ func awsRestjson1_serializeDocumentFederationParameters(v *types.FederationParam return nil } +func awsRestjson1_serializeDocumentIcmpTypeCode(v *types.IcmpTypeCode, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("code") + ok.Integer(v.Code) + } + + { + ok := object.Key("type") + ok.Integer(v.Type) + } + + return nil +} + func awsRestjson1_serializeDocumentKxCacheStorageConfiguration(v *types.KxCacheStorageConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3338,6 +3362,18 @@ func awsRestjson1_serializeDocumentKxDatabaseConfigurations(v []types.KxDatabase return nil } +func awsRestjson1_serializeDocumentKxDeploymentConfiguration(v *types.KxDeploymentConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DeploymentStrategy) > 0 { + ok := object.Key("deploymentStrategy") + ok.String(string(v.DeploymentStrategy)) + } + + return nil +} + func awsRestjson1_serializeDocumentKxSavedownStorageConfiguration(v *types.KxSavedownStorageConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3355,6 +3391,77 @@ func awsRestjson1_serializeDocumentKxSavedownStorageConfiguration(v *types.KxSav return nil } +func awsRestjson1_serializeDocumentNetworkACLConfiguration(v []types.NetworkACLEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentNetworkACLEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkACLEntry(v *types.NetworkACLEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CidrBlock != nil { + ok := object.Key("cidrBlock") + ok.String(*v.CidrBlock) + } + + if v.IcmpTypeCode != nil { + ok := object.Key("icmpTypeCode") + if err := awsRestjson1_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, ok); err != nil { + return err + } + } + + if v.PortRange != nil { + ok := object.Key("portRange") + if err := awsRestjson1_serializeDocumentPortRange(v.PortRange, ok); err != nil { + return err + } + } + + if v.Protocol != nil { + ok := object.Key("protocol") + ok.String(*v.Protocol) + } + + if len(v.RuleAction) > 0 { + ok := object.Key("ruleAction") + ok.String(string(v.RuleAction)) + } + + { + ok := object.Key("ruleNumber") + ok.Integer(v.RuleNumber) + } + + return nil +} + +func awsRestjson1_serializeDocumentPortRange(v *types.PortRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("from") + ok.Integer(v.From) + } + + { + ok := object.Key("to") + ok.Integer(v.To) + } + + return nil +} + func awsRestjson1_serializeDocumentSecurityGroupIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3414,6 +3521,13 @@ func awsRestjson1_serializeDocumentTransitGatewayConfiguration(v *types.TransitG object := value.Object() defer object.Close() + if v.AttachmentNetworkAclConfiguration != nil { + ok := object.Key("attachmentNetworkAclConfiguration") + if err := awsRestjson1_serializeDocumentNetworkACLConfiguration(v.AttachmentNetworkAclConfiguration, ok); err != nil { + return err + } + } + if v.RoutableCIDRSpace != nil { ok := object.Key("routableCIDRSpace") ok.String(*v.RoutableCIDRSpace) diff --git a/service/finspace/types/enums.go b/service/finspace/types/enums.go index e2d971353ba..d73b71f2e01 100644 --- a/service/finspace/types/enums.go +++ b/service/finspace/types/enums.go @@ -254,6 +254,24 @@ func (KxClusterType) Values() []KxClusterType { } } +type KxDeploymentStrategy string + +// Enum values for KxDeploymentStrategy +const ( + KxDeploymentStrategyNoRestart KxDeploymentStrategy = "NO_RESTART" + KxDeploymentStrategyRolling KxDeploymentStrategy = "ROLLING" +) + +// Values returns all known values for KxDeploymentStrategy. 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 (KxDeploymentStrategy) Values() []KxDeploymentStrategy { + return []KxDeploymentStrategy{ + "NO_RESTART", + "ROLLING", + } +} + type KxSavedownStorageType string // Enum values for KxSavedownStorageType @@ -270,6 +288,24 @@ func (KxSavedownStorageType) Values() []KxSavedownStorageType { } } +type RuleAction string + +// Enum values for RuleAction +const ( + RuleActionAllow RuleAction = "allow" + RuleActionDeny RuleAction = "deny" +) + +// Values returns all known values for RuleAction. 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 (RuleAction) Values() []RuleAction { + return []RuleAction{ + "allow", + "deny", + } +} + type TgwStatus string // Enum values for TgwStatus diff --git a/service/finspace/types/types.go b/service/finspace/types/types.go index d35d784ba3f..17e4201a8b8 100644 --- a/service/finspace/types/types.go +++ b/service/finspace/types/types.go @@ -42,8 +42,7 @@ type AutoScalingConfiguration struct { } // A structure for the metadata of a cluster. It includes information like the -// CPUs needed, memory of instances, number of instances, and the port used while -// establishing a connection. +// CPUs needed, memory of instances, and number of instances. type CapacityConfiguration struct { // The number of instances running in a cluster. @@ -214,6 +213,22 @@ type FederationParameters struct { noSmithyDocumentSerde } +// Defines the ICMP protocol that consists of the ICMP type and code. +type IcmpTypeCode struct { + + // The ICMP code. A value of -1 means all codes for the specified ICMP type. + // + // This member is required. + Code int32 + + // The ICMP type. A value of -1 means all types. + // + // This member is required. + Type int32 + + noSmithyDocumentSerde +} + // The configuration for read only disk cache associated with a cluster. type KxCacheStorageConfiguration struct { @@ -269,7 +284,7 @@ type KxCluster struct { AvailabilityZoneId *string // The number of availability zones assigned per cluster. This can be one of the - // following + // following: // - SINGLE – Assigns one availability zone per cluster. // - MULTI – Assigns all the availability zones per cluster. AzMode KxAzMode @@ -406,6 +421,24 @@ type KxDatabaseListEntry struct { noSmithyDocumentSerde } +// The configuration that allows you to choose how you want to update the +// databases on a cluster. Depending on the option you choose, you can reduce the +// time it takes to update the database changesets on to a cluster. +type KxDeploymentConfiguration struct { + + // The type of deployment that you want on a cluster. + // - ROLLING – This options loads the updated database by stopping the exiting q + // process and starting a new q process with updated configuration. + // - NO_RESTART – This option loads the updated database on the running q + // process without stopping it. This option is quicker as it reduces the turn + // around time to update a kdb database changeset configuration on a cluster. + // + // This member is required. + DeploymentStrategy KxDeploymentStrategy + + noSmithyDocumentSerde +} + // The details of a kdb environment. type KxEnvironment struct { @@ -504,7 +537,7 @@ type KxNode struct { // cluster node is restarted. type KxSavedownStorageConfiguration struct { - // The size of temporary storage in bytes. + // The size of temporary storage in gibibytes. // // This member is required. Size int32 @@ -532,8 +565,8 @@ type KxUser struct { UpdateTimestamp *time.Time // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User - // Guide. + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. UserArn *string // A unique identifier for the user. @@ -542,6 +575,62 @@ type KxUser struct { noSmithyDocumentSerde } +// The network access control list (ACL) is an optional layer of security for your +// VPC that acts as a firewall for controlling traffic in and out of one or more +// subnets. The entry is a set of numbered ingress and egress rules that determine +// whether a packet should be allowed in or out of a subnet associated with the +// ACL. We process the entries in the ACL according to the rule numbers, in +// ascending order. +type NetworkACLEntry struct { + + // The IPv4 network range to allow or deny, in CIDR notation. For example, + // 172.16.0.0/24 . We modify the specified CIDR block to its canonical form. For + // example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 . + // + // This member is required. + CidrBlock *string + + // The protocol number. A value of -1 means all the protocols. + // + // This member is required. + Protocol *string + + // Indicates whether to allow or deny the traffic that matches the rule. + // + // This member is required. + RuleAction RuleAction + + // The rule number for the entry. For example 100. All the network ACL entries are + // processed in ascending order by rule number. + // + // This member is required. + RuleNumber int32 + + // Defines the ICMP protocol that consists of the ICMP type and code. + IcmpTypeCode *IcmpTypeCode + + // The range of ports the rule applies to. + PortRange *PortRange + + noSmithyDocumentSerde +} + +// The range of ports the rule applies to. +type PortRange struct { + + // The first port in the range. + // + // This member is required. + From int32 + + // The last port in the range. + // + // This member is required. + To int32 + + noSmithyDocumentSerde +} + // Configuration information for the superuser. type SuperuserParameters struct { @@ -581,6 +670,10 @@ type TransitGatewayConfiguration struct { // This member is required. TransitGatewayID *string + // The rules that define how you manage the outbound traffic from kdb network to + // your internal network. + AttachmentNetworkAclConfiguration []NetworkACLEntry + noSmithyDocumentSerde } diff --git a/service/finspace/validators.go b/service/finspace/validators.go index f8f54bd2801..cf2645abc6b 100644 --- a/service/finspace/validators.go +++ b/service/finspace/validators.go @@ -848,6 +848,18 @@ func validateCustomDNSServer(v *types.CustomDNSServer) error { } } +func validateIcmpTypeCode(v *types.IcmpTypeCode) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IcmpTypeCode"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateKxCacheStorageConfiguration(v *types.KxCacheStorageConfiguration) error { if v == nil { return nil @@ -955,6 +967,21 @@ func validateKxDatabaseConfigurations(v []types.KxDatabaseConfiguration) error { } } +func validateKxDeploymentConfiguration(v *types.KxDeploymentConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KxDeploymentConfiguration"} + if len(v.DeploymentStrategy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DeploymentStrategy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateKxSavedownStorageConfiguration(v *types.KxSavedownStorageConfiguration) error { if v == nil { return nil @@ -970,6 +997,66 @@ func validateKxSavedownStorageConfiguration(v *types.KxSavedownStorageConfigurat } } +func validateNetworkACLConfiguration(v []types.NetworkACLEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NetworkACLConfiguration"} + for i := range v { + if err := validateNetworkACLEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNetworkACLEntry(v *types.NetworkACLEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NetworkACLEntry"} + if v.Protocol == nil { + invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } + if len(v.RuleAction) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) + } + if v.PortRange != nil { + if err := validatePortRange(v.PortRange); err != nil { + invalidParams.AddNested("PortRange", err.(smithy.InvalidParamsError)) + } + } + if v.IcmpTypeCode != nil { + if err := validateIcmpTypeCode(v.IcmpTypeCode); err != nil { + invalidParams.AddNested("IcmpTypeCode", err.(smithy.InvalidParamsError)) + } + } + if v.CidrBlock == nil { + invalidParams.Add(smithy.NewErrParamRequired("CidrBlock")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePortRange(v *types.PortRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PortRange"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSuperuserParameters(v *types.SuperuserParameters) error { if v == nil { return nil @@ -1002,6 +1089,11 @@ func validateTransitGatewayConfiguration(v *types.TransitGatewayConfiguration) e if v.RoutableCIDRSpace == nil { invalidParams.Add(smithy.NewErrParamRequired("RoutableCIDRSpace")) } + if v.AttachmentNetworkAclConfiguration != nil { + if err := validateNetworkACLConfiguration(v.AttachmentNetworkAclConfiguration); err != nil { + invalidParams.AddNested("AttachmentNetworkAclConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1540,6 +1632,11 @@ func validateOpUpdateKxClusterDatabasesInput(v *UpdateKxClusterDatabasesInput) e invalidParams.AddNested("Databases", err.(smithy.InvalidParamsError)) } } + if v.DeploymentConfiguration != nil { + if err := validateKxDeploymentConfiguration(v.DeploymentConfiguration); err != nil { + invalidParams.AddNested("DeploymentConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/fms/internal/endpoints/endpoints.go b/service/fms/internal/endpoints/endpoints.go index 2a834aadccd..10b18175a53 100644 --- a/service/fms/internal/endpoints/endpoints.go +++ b/service/fms/internal/endpoints/endpoints.go @@ -448,6 +448,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/mediaconvert/internal/endpoints/endpoints.go b/service/mediaconvert/internal/endpoints/endpoints.go index da21a24aeed..d3428b8093a 100644 --- a/service/mediaconvert/internal/endpoints/endpoints.go +++ b/service/mediaconvert/internal/endpoints/endpoints.go @@ -148,6 +148,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, @@ -157,6 +160,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 3820ad96460..dcf82f6cea9 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -480,6 +480,9 @@ type CreateDBClusterInput struct { // Default: // - Aurora DB clusters - aurora // - Multi-AZ DB clusters - io1 + // When you create an Aurora DB cluster with the storage type set to aurora-iopt1 , + // the storage type is returned in the response. The storage type isn't returned + // when you set it to aurora . StorageType *string // Tags to assign to the DB cluster. Valid for Cluster Type: Aurora DB clusters diff --git a/service/rds/api_op_FailoverGlobalCluster.go b/service/rds/api_op_FailoverGlobalCluster.go index 84de39c9398..d26b95ff19e 100644 --- a/service/rds/api_op_FailoverGlobalCluster.go +++ b/service/rds/api_op_FailoverGlobalCluster.go @@ -16,18 +16,37 @@ import ( 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. +// Promotes the specified secondary DB cluster to be the primary DB cluster in the +// global database cluster to fail over or switch over a global database. +// Switchover operations were previously called "managed planned failovers." +// Although this operation can be used either to fail over or to switch over a +// global database cluster, its intended use is for global database failover. To +// switch over a global database cluster, we recommend that you use the +// SwitchoverGlobalCluster operation instead. How you use this operation depends on +// whether you are failing over or switching over your global database cluster: +// - Failing over - Specify the AllowDataLoss parameter and don't specify the +// Switchover parameter. +// - Switching over - Specify the Switchover parameter or omit it, but don't +// specify the AllowDataLoss parameter. +// +// About failing over and switching over While failing over and switching over a +// global database cluster both change the primary DB cluster, you use these +// operations for different reasons: +// - Failing over - Use this operation to respond to an unplanned event, such as +// a Regional disaster in the primary Region. Failing over can result in a loss of +// write transaction data that wasn't replicated to the chosen secondary before the +// failover event occurred. However, the recovery process that promotes a DB +// instance on the chosen seconday DB cluster to be the primary writer DB instance +// guarantees that the data is in a transactionally consistent state. For more +// information about failing over an Amazon Aurora global database, see +// Performing managed failovers for Aurora global databases (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-disaster-recovery.html#aurora-global-database-failover.managed-unplanned) +// in the Amazon Aurora User Guide. +// - Switching over - Use this operation on a healthy global database cluster +// for planned events, such as Regional rotation or to fail back to the original +// primary DB cluster after a failover operation. With this operation, there is no +// data loss. For more information about switching over an Amazon Aurora global +// database, see Performing switchovers for 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. func (c *Client) FailoverGlobalCluster(ctx context.Context, params *FailoverGlobalClusterInput, optFns ...func(*Options)) (*FailoverGlobalClusterOutput, error) { if params == nil { params = &FailoverGlobalClusterInput{} @@ -45,24 +64,34 @@ func (c *Client) FailoverGlobalCluster(ctx context.Context, params *FailoverGlob 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). + // The identifier of the global database cluster (Aurora global database) this + // operation should apply to. The identifier is the unique key assigned by the user + // when the Aurora global database is created. In other words, it's the name of the + // Aurora global database. Constraints: + // - Must match the identifier of an existing global database cluster. // // 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. + // The identifier of the secondary Aurora DB cluster that you want to promote to + // the primary for the global database cluster. 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 + // Specifies whether to allow data loss for this global database cluster + // operation. Allowing data loss triggers a global failover operation. If you don't + // specify AllowDataLoss , the global database cluster operation defaults to a + // switchover. Constraints: + // - Can't be specified together with the Switchover parameter. + AllowDataLoss *bool + + // Specifies whether to switch over this global database cluster. Constraints: + // - Can't be specified together with the AllowDataLoss parameter. + Switchover *bool + noSmithyDocumentSerde } diff --git a/service/rds/api_op_ModifyGlobalCluster.go b/service/rds/api_op_ModifyGlobalCluster.go index 85a41648068..6386755b302 100644 --- a/service/rds/api_op_ModifyGlobalCluster.go +++ b/service/rds/api_op_ModifyGlobalCluster.go @@ -16,10 +16,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Modifies 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) +// Modifies a setting for an Amazon Aurora global database 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 operation only applies to Aurora global // database clusters. func (c *Client) ModifyGlobalCluster(ctx context.Context, params *ModifyGlobalClusterInput, optFns ...func(*Options)) (*ModifyGlobalClusterOutput, error) { diff --git a/service/rds/api_op_SwitchoverGlobalCluster.go b/service/rds/api_op_SwitchoverGlobalCluster.go new file mode 100644 index 00000000000..8ad02f1c411 --- /dev/null +++ b/service/rds/api_op_SwitchoverGlobalCluster.go @@ -0,0 +1,285 @@ +// 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" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/rds/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Switches over the specified secondary DB cluster to be the new primary DB +// cluster in the global database cluster. Switchover operations were previously +// called "managed planned failovers." Aurora promotes the specified secondary +// cluster to assume full read/write capabilities and demotes the current primary +// cluster to a secondary (read-only) cluster, maintaining the orginal replication +// topology. All secondary clusters are synchronized with the primary at the +// beginning of the process so the new primary continues operations for the Aurora +// global database without losing any data. Your database is unavailable for a +// short time while the primary and selected secondary clusters are assuming their +// new roles. For more information about switching over an Aurora global database, +// see Performing switchovers 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 operation is intended for controlled +// environments, for operations such as "regional rotation" or to fall back to the +// original primary after a global database failover. +func (c *Client) SwitchoverGlobalCluster(ctx context.Context, params *SwitchoverGlobalClusterInput, optFns ...func(*Options)) (*SwitchoverGlobalClusterOutput, error) { + if params == nil { + params = &SwitchoverGlobalClusterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SwitchoverGlobalCluster", params, optFns, c.addOperationSwitchoverGlobalClusterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SwitchoverGlobalClusterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SwitchoverGlobalClusterInput struct { + + // The identifier of the global database cluster to switch over. This parameter + // isn't case-sensitive. Constraints: + // - Must match the identifier of an existing global database cluster (Aurora + // global database). + // + // This member is required. + GlobalClusterIdentifier *string + + // The identifier of the secondary Aurora DB cluster to promote to the new primary + // for the global database cluster. 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 SwitchoverGlobalClusterOutput 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) addOperationSwitchoverGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpSwitchoverGlobalCluster{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSwitchoverGlobalCluster{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSwitchoverGlobalClusterResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpSwitchoverGlobalClusterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSwitchoverGlobalCluster(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 + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSwitchoverGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rds", + OperationName: "SwitchoverGlobalCluster", + } +} + +type opSwitchoverGlobalClusterResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opSwitchoverGlobalClusterResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opSwitchoverGlobalClusterResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "rds" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "rds" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("rds") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addSwitchoverGlobalClusterResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opSwitchoverGlobalClusterResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index b92d43c8ea4..6eedd128faf 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -16273,6 +16273,123 @@ func awsAwsquery_deserializeOpErrorSwitchoverBlueGreenDeployment(response *smith } } +type awsAwsquery_deserializeOpSwitchoverGlobalCluster struct { +} + +func (*awsAwsquery_deserializeOpSwitchoverGlobalCluster) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpSwitchoverGlobalCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorSwitchoverGlobalCluster(response, &metadata) + } + output := &SwitchoverGlobalClusterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("SwitchoverGlobalClusterResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentSwitchoverGlobalClusterOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorSwitchoverGlobalCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DBClusterNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorDBClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("GlobalClusterNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorGlobalClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidDBClusterStateFault", errorCode): + return awsAwsquery_deserializeErrorInvalidDBClusterStateFault(response, errorBody) + + case strings.EqualFold("InvalidGlobalClusterStateFault", errorCode): + return awsAwsquery_deserializeErrorInvalidGlobalClusterStateFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpSwitchoverReadReplica struct { } @@ -36770,6 +36887,22 @@ func awsAwsquery_deserializeDocumentFailoverState(v **types.FailoverState, decod sv.FromDbClusterArn = ptr.String(xtv) } + case strings.EqualFold("IsDataLossAllowed", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.IsDataLossAllowed = xtv + } + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -37248,6 +37381,19 @@ func awsAwsquery_deserializeDocumentGlobalClusterMember(v **types.GlobalClusterM return err } + case strings.EqualFold("SynchronizationStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SynchronizationStatus = types.GlobalClusterMemberSynchronizationStatus(xtv) + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -55687,6 +55833,48 @@ func awsAwsquery_deserializeOpDocumentSwitchoverBlueGreenDeploymentOutput(v **Sw return nil } +func awsAwsquery_deserializeOpDocumentSwitchoverGlobalClusterOutput(v **SwitchoverGlobalClusterOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *SwitchoverGlobalClusterOutput + if *v == nil { + sv = &SwitchoverGlobalClusterOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("GlobalCluster", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGlobalCluster(&sv.GlobalCluster, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentSwitchoverReadReplicaOutput(v **SwitchoverReadReplicaOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rds/generated.json b/service/rds/generated.json index 689e35f5e89..733a7c8ee85 100644 --- a/service/rds/generated.json +++ b/service/rds/generated.json @@ -157,6 +157,7 @@ "api_op_StopDBInstance.go", "api_op_StopDBInstanceAutomatedBackupsReplication.go", "api_op_SwitchoverBlueGreenDeployment.go", + "api_op_SwitchoverGlobalCluster.go", "api_op_SwitchoverReadReplica.go", "deserializers.go", "doc.go", diff --git a/service/rds/serializers.go b/service/rds/serializers.go index c4e40cbe853..42631881f87 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -9101,6 +9101,70 @@ func (m *awsAwsquery_serializeOpSwitchoverBlueGreenDeployment) HandleSerialize(c return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpSwitchoverGlobalCluster struct { +} + +func (*awsAwsquery_serializeOpSwitchoverGlobalCluster) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpSwitchoverGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SwitchoverGlobalClusterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("SwitchoverGlobalCluster") + body.Key("Version").String("2014-10-31") + + if err := awsAwsquery_serializeOpDocumentSwitchoverGlobalClusterInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, 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 { } @@ -13183,11 +13247,21 @@ func awsAwsquery_serializeOpDocumentFailoverGlobalClusterInput(v *FailoverGlobal object := value.Object() _ = object + if v.AllowDataLoss != nil { + objectKey := object.Key("AllowDataLoss") + objectKey.Boolean(*v.AllowDataLoss) + } + if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } + if v.Switchover != nil { + objectKey := object.Key("Switchover") + objectKey.Boolean(*v.Switchover) + } + if v.TargetDbClusterIdentifier != nil { objectKey := object.Key("TargetDbClusterIdentifier") objectKey.String(*v.TargetDbClusterIdentifier) @@ -15929,6 +16003,23 @@ func awsAwsquery_serializeOpDocumentSwitchoverBlueGreenDeploymentInput(v *Switch return nil } +func awsAwsquery_serializeOpDocumentSwitchoverGlobalClusterInput(v *SwitchoverGlobalClusterInput, 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_serializeOpDocumentSwitchoverReadReplicaInput(v *SwitchoverReadReplicaInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/rds/types/enums.go b/service/rds/types/enums.go index 64c843d7843..f8929f32179 100644 --- a/service/rds/types/enums.go +++ b/service/rds/types/enums.go @@ -310,6 +310,25 @@ func (FailoverStatus) Values() []FailoverStatus { } } +type GlobalClusterMemberSynchronizationStatus string + +// Enum values for GlobalClusterMemberSynchronizationStatus +const ( + GlobalClusterMemberSynchronizationStatusConnected GlobalClusterMemberSynchronizationStatus = "connected" + GlobalClusterMemberSynchronizationStatusPendingResync GlobalClusterMemberSynchronizationStatus = "pending-resync" +) + +// Values returns all known values for GlobalClusterMemberSynchronizationStatus. +// 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 (GlobalClusterMemberSynchronizationStatus) Values() []GlobalClusterMemberSynchronizationStatus { + return []GlobalClusterMemberSynchronizationStatus{ + "connected", + "pending-resync", + } +} + type IAMAuthMode string // Enum values for IAMAuthMode diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 74a0456b982..f6a615dff60 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -2614,27 +2614,31 @@ type ExportTask struct { 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. +// Contains the state of scheduled or in-process operations on a global cluster +// (Aurora global database). This data type is empty unless a switchover or +// failover operation is scheduled or is in progress 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. + // Indicates whether the operation is a global switchover or a global failover. If + // data loss is allowed, then the operation is a global failover. Otherwise, it's a + // switchover. + IsDataLossAllowed bool + + // The current status of the global cluster. Possible values are as follows: + // - pending – The service received a request to switch over or fail over the + // global cluster. The global cluster's primary DB cluster and the specified + // secondary DB cluster are being verified before the operation starts. // - 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. + // that take place during the switchover or failover process, such as demoting the + // primary Aurora DB cluster, promoting the secondary Aurora DB cluster, and + // synchronizing replicas. + // - cancelling – The request to switch over or fail over the global cluster 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 @@ -2685,9 +2689,9 @@ type GlobalCluster struct { 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 ). + // or pending switchover or failover process for this global cluster (Aurora global + // database). This object is empty unless the SwitchoverGlobalCluster or + // FailoverGlobalCluster operation was called on this global cluster. FailoverState *FailoverState // The Amazon Resource Name (ARN) for the global database cluster. @@ -2715,25 +2719,27 @@ type GlobalCluster struct { } // A data structure with information about any primary and secondary clusters -// associated with an Aurora global database. +// associated with a global cluster (Aurora global database). type GlobalClusterMember struct { - // The Amazon Resource Name (ARN) for each Aurora cluster. + // The Amazon Resource Name (ARN) for each Aurora DB cluster in the global cluster. DBClusterArn *string - // Specifies whether a secondary cluster in an Aurora global database has write + // Specifies whether a secondary cluster in the global cluster 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. + // Specifies whether the Aurora DB cluster is the primary cluster (that is, has + // read-write capability) for the global cluster with which it is associated. IsWriter bool // The Amazon Resource Name (ARN) for each read-only secondary cluster associated - // with the Aurora global database. + // with the global cluster. Readers []string + // The status of synchronization of each Aurora DB cluster in the global cluster. + SynchronizationStatus GlobalClusterMemberSynchronizationStatus + noSmithyDocumentSerde } diff --git a/service/rds/validators.go b/service/rds/validators.go index 9718e674826..69224cbc9b1 100644 --- a/service/rds/validators.go +++ b/service/rds/validators.go @@ -2710,6 +2710,26 @@ func (m *validateOpSwitchoverBlueGreenDeployment) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpSwitchoverGlobalCluster struct { +} + +func (*validateOpSwitchoverGlobalCluster) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSwitchoverGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SwitchoverGlobalClusterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSwitchoverGlobalClusterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSwitchoverReadReplica struct { } @@ -3270,6 +3290,10 @@ func addOpSwitchoverBlueGreenDeploymentValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpSwitchoverBlueGreenDeployment{}, middleware.After) } +func addOpSwitchoverGlobalClusterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSwitchoverGlobalCluster{}, middleware.After) +} + func addOpSwitchoverReadReplicaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSwitchoverReadReplica{}, middleware.After) } @@ -5709,6 +5733,24 @@ func validateOpSwitchoverBlueGreenDeploymentInput(v *SwitchoverBlueGreenDeployme } } +func validateOpSwitchoverGlobalClusterInput(v *SwitchoverGlobalClusterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SwitchoverGlobalClusterInput"} + 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 validateOpSwitchoverReadReplicaInput(v *SwitchoverReadReplicaInput) error { if v == nil { return nil diff --git a/service/route53domains/api_op_ListOperations.go b/service/route53domains/api_op_ListOperations.go index 31e16496966..fc6972617ab 100644 --- a/service/route53domains/api_op_ListOperations.go +++ b/service/route53domains/api_op_ListOperations.go @@ -52,7 +52,7 @@ type ListOperationsInput struct { // The sort type for returned values. SortBy types.ListOperationsSortAttributeName - // The sort order ofr returned values, either ascending or descending. + // The sort order for returned values, either ascending or descending. SortOrder types.SortOrder // The status of the operations. diff --git a/service/route53domains/types/types.go b/service/route53domains/types/types.go index 46b36552d66..f42cd8fc200 100644 --- a/service/route53domains/types/types.go +++ b/service/route53domains/types/types.go @@ -252,7 +252,7 @@ type DomainTransferability struct { // TRANSFERABLE The domain name can be transferred to Route 53. UNTRANSFERRABLE The // domain name can't be transferred to Route 53. DONT_KNOW Reserved for future use. // DOMAIN_IN_OWN_ACCOUNT The domain already exists in the current Amazon Web - // Services account. DOMAIN_IN_ANOTHER_ACCOUNT The domain exists in another Amazon + // Services account. DOMAIN_IN_ANOTHER_ACCOUNT the domain exists in another Amazon // Web Services account. PREMIUM_DOMAIN Premium domain transfer is not supported. Transferable Transferable