From 7340532d4545f48c8d50428dbeaa7c5669b7faf2 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 29 Mar 2023 18:14:09 +0000 Subject: [PATCH] Regenerated Clients --- .../7508594ca8d846d59f8cf655c51063af.json | 8 + .../c3dce3422f974d53be269b5ff14c3e81.json | 8 + .../internal/endpoints/endpoints.go | 6 + .../api_op_CreateSecurityConfig.go | 3 +- .../api_op_ListAccessPolicies.go | 2 +- .../api_op_UpdateAccountSettings.go | 10 +- service/opensearchserverless/deserializers.go | 210 ++++++++++++++++++ service/opensearchserverless/types/errors.go | 64 +++++- service/opensearchserverless/types/types.go | 15 +- service/rds/api_op_CreateDBCluster.go | 8 +- .../rds/api_op_CreateDBInstanceReadReplica.go | 199 +++++++++-------- service/rds/api_op_DeleteDBCluster.go | 4 +- service/rds/api_op_ModifyDBCluster.go | 11 +- service/rds/api_op_ModifyDBInstance.go | 8 +- ...opDBInstanceAutomatedBackupsReplication.go | 2 +- service/rds/deserializers.go | 19 ++ service/rds/serializers.go | 5 + service/rds/types/types.go | 4 + service/rds/validators.go | 3 - .../internal/endpoints/endpoints.go | 3 + .../internal/endpoints/endpoints.go | 9 + 21 files changed, 480 insertions(+), 121 deletions(-) create mode 100644 .changelog/7508594ca8d846d59f8cf655c51063af.json create mode 100644 .changelog/c3dce3422f974d53be269b5ff14c3e81.json diff --git a/.changelog/7508594ca8d846d59f8cf655c51063af.json b/.changelog/7508594ca8d846d59f8cf655c51063af.json new file mode 100644 index 00000000000..da32965be1e --- /dev/null +++ b/.changelog/7508594ca8d846d59f8cf655c51063af.json @@ -0,0 +1,8 @@ +{ + "id": "7508594c-a8d8-46d5-9f8c-f655c51063af", + "type": "feature", + "description": "Add support for creating a read replica DB instance from a Multi-AZ DB cluster.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/c3dce3422f974d53be269b5ff14c3e81.json b/.changelog/c3dce3422f974d53be269b5ff14c3e81.json new file mode 100644 index 00000000000..2a022880d7f --- /dev/null +++ b/.changelog/c3dce3422f974d53be269b5ff14c3e81.json @@ -0,0 +1,8 @@ +{ + "id": "c3dce342-2f97-4d53-be26-9b5ff14c3e81", + "type": "feature", + "description": "This release includes two new exception types \"ServiceQuotaExceededException\" and \"OcuLimitExceededException\".", + "modules": [ + "service/opensearchserverless" + ] +} \ No newline at end of file diff --git a/service/arczonalshift/internal/endpoints/endpoints.go b/service/arczonalshift/internal/endpoints/endpoints.go index c7466ccbc09..1d0c15092ea 100644 --- a/service/arczonalshift/internal/endpoints/endpoints.go +++ b/service/arczonalshift/internal/endpoints/endpoints.go @@ -138,6 +138,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -156,6 +159,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, diff --git a/service/opensearchserverless/api_op_CreateSecurityConfig.go b/service/opensearchserverless/api_op_CreateSecurityConfig.go index 8568ee63bf1..34e530fbe98 100644 --- a/service/opensearchserverless/api_op_CreateSecurityConfig.go +++ b/service/opensearchserverless/api_op_CreateSecurityConfig.go @@ -48,7 +48,8 @@ type CreateSecurityConfigInput struct { // A description of the security configuration. Description *string - // Describes SAML options in in the form of a key-value map. + // Describes SAML options in in the form of a key-value map. This field is required + // if you specify saml for the type parameter. SamlOptions *types.SamlConfigOptions noSmithyDocumentSerde diff --git a/service/opensearchserverless/api_op_ListAccessPolicies.go b/service/opensearchserverless/api_op_ListAccessPolicies.go index 81136236044..bb5fb37a111 100644 --- a/service/opensearchserverless/api_op_ListAccessPolicies.go +++ b/service/opensearchserverless/api_op_ListAccessPolicies.go @@ -44,7 +44,7 @@ type ListAccessPoliciesInput struct { // which returns results in the next page. NextToken *string - // Resource filters (can be collection or indexes) that policies can apply to. + // Resource filters (can be collections or indexes) that policies can apply to. Resource []string noSmithyDocumentSerde diff --git a/service/opensearchserverless/api_op_UpdateAccountSettings.go b/service/opensearchserverless/api_op_UpdateAccountSettings.go index 73ba45f8484..7fc32a32f1b 100644 --- a/service/opensearchserverless/api_op_UpdateAccountSettings.go +++ b/service/opensearchserverless/api_op_UpdateAccountSettings.go @@ -12,8 +12,9 @@ import ( ) // Update the OpenSearch Serverless settings for the current Amazon Web Services -// account. For more information, see Autoscaling -// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-scaling). +// account. For more information, see Managing capacity limits for Amazon +// OpenSearch Serverless +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-scaling.html). func (c *Client) UpdateAccountSettings(ctx context.Context, params *UpdateAccountSettingsInput, optFns ...func(*Options)) (*UpdateAccountSettingsOutput, error) { if params == nil { params = &UpdateAccountSettingsInput{} @@ -33,8 +34,9 @@ type UpdateAccountSettingsInput struct { // The maximum capacity limits for all OpenSearch Serverless collections, in // OpenSearch Compute Units (OCUs). These limits are used to scale your collections - // based on the current workload. For more information, see Autoscaling - // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-scaling). + // based on the current workload. For more information, see Managing capacity + // limits for Amazon OpenSearch Serverless + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-scaling.html). CapacityLimits *types.CapacityLimits noSmithyDocumentSerde diff --git a/service/opensearchserverless/deserializers.go b/service/opensearchserverless/deserializers.go index 96ac2f8d981..2bfc91481e1 100644 --- a/service/opensearchserverless/deserializers.go +++ b/service/opensearchserverless/deserializers.go @@ -352,6 +352,9 @@ func awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -469,6 +472,12 @@ func awsAwsjson10_deserializeOpErrorCreateCollection(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("OcuLimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorOcuLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -586,6 +595,9 @@ func awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -703,6 +715,9 @@ func awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -820,6 +835,9 @@ func awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response *smithyhttp.Respo case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2803,6 +2821,9 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3514,6 +3535,9 @@ func awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response *smithyhttp.Re case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3714,6 +3738,41 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R return output } +func awsAwsjson10_deserializeErrorOcuLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OcuLimitExceededException{} + err := awsAwsjson10_deserializeDocumentOcuLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3749,6 +3808,41 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp return output } +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4894,6 +4988,46 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsAwsjson10_deserializeDocumentOcuLimitExceededException(v **types.OcuLimitExceededException, 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.OcuLimitExceededException + if *v == nil { + sv = &types.OcuLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5592,6 +5726,82 @@ func awsAwsjson10_deserializeDocumentSecurityPolicySummary(v **types.SecurityPol return nil } +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, 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.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentSubnetIds(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearchserverless/types/errors.go b/service/opensearchserverless/types/errors.go index a37f72cd5c7..8e689d580b3 100644 --- a/service/opensearchserverless/types/errors.go +++ b/service/opensearchserverless/types/errors.go @@ -7,9 +7,9 @@ import ( smithy "github.com/aws/smithy-go" ) -// When creating a collection, thrown when a collection with the same name already -// exists or is being created. When deleting a collection, thrown when the -// collection is not in the ACTIVE or FAILED state. +// When creating a resource, thrown when a resource with the same name already +// exists or is being created. When deleting a resource, thrown when the resource +// is not in the ACTIVE or FAILED state. type ConflictException struct { Message *string @@ -61,6 +61,32 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// OCU Limit Exceeded for service limits +type OcuLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OcuLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OcuLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OcuLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OcuLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *OcuLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Thrown when accessing or deleting a resource that does not exist. type ResourceNotFoundException struct { Message *string @@ -87,6 +113,38 @@ func (e *ResourceNotFoundException) ErrorCode() string { } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Thrown when you attempt to create more resources than the service allows based +// on service quotas. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceType *string + ServiceCode *string + QuotaCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Thrown when the HTTP request contains invalid input or is missing required // input. type ValidationException struct { diff --git a/service/opensearchserverless/types/types.go b/service/opensearchserverless/types/types.go index 5fb343dca41..9cbab850d28 100644 --- a/service/opensearchserverless/types/types.go +++ b/service/opensearchserverless/types/types.go @@ -72,8 +72,9 @@ type AccountSettingsDetail struct { // The maximum capacity limits for all OpenSearch Serverless collections, in // OpenSearch Compute Units (OCUs). These limits are used to scale your collections - // based on the current workload. For more information, see Autoscaling - // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-scaling). + // based on the current workload. For more information, see Managing capacity + // limits for Amazon OpenSearch Serverless + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-scaling.html). CapacityLimits *CapacityLimits noSmithyDocumentSerde @@ -81,8 +82,9 @@ type AccountSettingsDetail struct { // The maximum capacity limits for all OpenSearch Serverless collections, in // OpenSearch Compute Units (OCUs). These limits are used to scale your collections -// based on the current workload. For more information, see Autoscaling -// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-scaling). +// based on the current workload. For more information, see Managing capacity +// limits for Amazon OpenSearch Serverless +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-scaling.html). type CapacityLimits struct { // The maximum indexing capacity for collections. @@ -280,8 +282,7 @@ type SamlConfigOptions struct { // The group attribute for this SAML integration. GroupAttribute *string - // The session timeout, in minutes. Minimum is 15 minutes and maximum is 1440 - // minutes (24 hours or 1 day). Default is 60 minutes. + // The session timeout, in minutes. Default is 60 minutes (12 hours). SessionTimeout *int32 // A user attribute for this SAML integration. @@ -506,7 +507,7 @@ type VpcEndpointDetail struct { // The ID of the subnets from which you access OpenSearch Serverless. SubnetIds []string - // The ID of the VPC from which you access OpenSearch Serverless + // The ID of the VPC from which you access OpenSearch Serverless. VpcId *string noSmithyDocumentSerde diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 633240d6fac..255342fd687 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -20,13 +20,13 @@ import ( // operation. If you create a Multi-AZ DB cluster, the request creates a writer and // two reader DB instances for you, each in a different Availability Zone. You can // use the ReplicationSourceIdentifier parameter to create an Amazon Aurora DB -// cluster as a read replica of another DB cluster or Amazon RDS MySQL or +// cluster as a read replica of another DB cluster or Amazon RDS for MySQL or // PostgreSQL DB instance. For more information about Amazon Aurora, see What is // Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. You can also use the // ReplicationSourceIdentifier parameter to create a Multi-AZ DB cluster read -// replica with an RDS for PostgreSQL DB instance as the source. For more +// replica with an RDS for MySQL or PostgreSQL DB instance as the source. For more // information about 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. @@ -556,8 +556,8 @@ type CreateDBClusterInput struct { PubliclyAccessible *bool // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this - // DB cluster is created as a read replica. Valid for: Aurora DB clusters and RDS - // for PostgreSQL Multi-AZ DB clusters + // DB cluster is created as a read replica. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters ReplicationSourceIdentifier *string // For DB clusters in serverless DB engine mode, the scaling properties of the DB diff --git a/service/rds/api_op_CreateDBInstanceReadReplica.go b/service/rds/api_op_CreateDBInstanceReadReplica.go index 2115754caaa..c82c84c6fce 100644 --- a/service/rds/api_op_CreateDBInstanceReadReplica.go +++ b/service/rds/api_op_CreateDBInstanceReadReplica.go @@ -14,16 +14,19 @@ import ( ) // Creates a new DB instance that acts as a read replica for an existing source DB -// instance. You can create a read replica for a DB instance running MySQL, -// MariaDB, Oracle, PostgreSQL, or SQL Server. For more information, see Working -// with Read Replicas -// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) in -// the Amazon RDS User Guide. Amazon Aurora doesn't support this operation. Call +// instance or Multi-AZ DB cluster. You can create a read replica for a DB instance +// running MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server. You can create a read +// replica for a Multi-AZ DB cluster running MySQL or PostgreSQL. For more +// information, see Working with read replicas +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) and +// Migrating from a Multi-AZ DB cluster to a DB instance using a read replica +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html#multi-az-db-clusters-migrating-to-instance-with-read-replica) +// in the Amazon RDS User Guide. Amazon Aurora doesn't support this operation. Call // the CreateDBInstance operation to create a DB instance for an Aurora DB cluster. -// All read replica DB instances are created with backups disabled. All other DB -// instance attributes (including DB security groups and DB parameter groups) are -// inherited from the source DB instance, except as specified. Your source DB -// instance must have backup retention enabled. +// All read replica DB instances are created with backups disabled. All other +// attributes (including DB security groups and DB parameter groups) are inherited +// from the source DB instance or cluster, except as specified. Your source DB +// instance or cluster must have backup retention enabled. func (c *Client) CreateDBInstanceReadReplica(ctx context.Context, params *CreateDBInstanceReadReplicaInput, optFns ...func(*Options)) (*CreateDBInstanceReadReplicaOutput, error) { if params == nil { params = &CreateDBInstanceReadReplicaInput{} @@ -48,47 +51,6 @@ type CreateDBInstanceReadReplicaInput struct { // This member is required. DBInstanceIdentifier *string - // The identifier of the DB instance that will act as the source for the read - // replica. Each DB instance can have up to five read replicas. Constraints: - // - // * - // Must be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL - // Server DB instance. - // - // * Can specify a DB instance that is a MySQL read replica - // only if the source is running MySQL 5.6 or later. - // - // * For the limitations of - // Oracle read replicas, see Read Replica Limitations with Oracle - // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) - // in the Amazon RDS User Guide. - // - // * For the limitations of SQL Server read - // replicas, see Read Replica Limitations with Microsoft SQL Server - // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html) - // in the Amazon RDS User Guide. - // - // * Can specify a PostgreSQL DB instance only if - // the source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for - // cross-Region replication). - // - // * The specified DB instance must have automatic - // backups enabled, that is, its backup retention period must be greater than 0. - // - // * - // If the source DB instance is in the same Amazon Web Services Region as the read - // replica, specify a valid DB instance identifier. - // - // * If the source DB instance is - // in a different Amazon Web Services Region from the read replica, specify a valid - // DB instance ARN. For more information, 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 doesn't apply to SQL Server or RDS Custom, - // which don't support cross-Region replicas. - // - // This member is required. - SourceDBInstanceIdentifier *string - // The amount of storage (in gibibytes) to allocate initially for the read replica. // Follow the allocation rules specified in CreateDBInstance. Be sure to allocate // enough storage for your read replica so that the create operation can succeed. @@ -196,8 +158,8 @@ type CreateDBInstanceReadReplicaInput struct { // in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom. Domain *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. + // 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 list of logs that the new DB instance is to export to CloudWatch Logs. The @@ -242,16 +204,17 @@ type CreateDBInstanceReadReplicaInput struct { // The Amazon Web Services KMS key identifier for an encrypted read replica. The // Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or // alias name for the KMS key. If you create an encrypted read replica in the same - // Amazon Web Services Region as the source DB instance, then do not specify a - // value for this parameter. A read replica in the same Amazon Web Services Region - // is always encrypted with the same KMS key as the source DB instance. If you - // create an encrypted read replica in a different Amazon Web Services Region, then - // you must specify a KMS key identifier for the destination Amazon Web Services - // Region. KMS keys are specific to the Amazon Web Services Region that they are - // created in, and you can't use KMS keys from one Amazon Web Services Region in - // another Amazon Web Services Region. You can't create an encrypted read replica - // from an unencrypted DB instance. This setting doesn't apply to RDS Custom, which - // uses the same KMS key as the primary replica. + // Amazon Web Services Region as the source DB instance or Multi-AZ DB cluster, + // don't specify a value for this parameter. A read replica in the same Amazon Web + // Services Region is always encrypted with the same KMS key as the source DB + // instance or cluster. If you create an encrypted read replica in a different + // Amazon Web Services Region, then you must specify a KMS key identifier for the + // destination Amazon Web Services Region. KMS keys are specific to the Amazon Web + // Services Region that they are created in, and you can't use KMS keys from one + // Amazon Web Services Region in another Amazon Web Services Region. You can't + // create an encrypted read replica from an unencrypted DB instance or Multi-AZ DB + // cluster. This setting doesn't apply to RDS Custom, which uses the same KMS key + // as the primary replica. KmsKeyId *string // The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale @@ -283,8 +246,8 @@ type CreateDBInstanceReadReplicaInput struct { // can create a read replica as a Multi-AZ DB instance. RDS creates a standby of // your replica in another Availability Zone for failover support for the replica. // Creating your read replica as a Multi-AZ DB instance is independent of whether - // the source database is a Multi-AZ DB instance. This setting doesn't apply to RDS - // Custom. + // the source is a Multi-AZ DB instance or a Multi-AZ DB cluster. This setting + // doesn't apply to RDS Custom. MultiAZ *bool // The network type of the DB instance. Valid values: @@ -302,9 +265,9 @@ type CreateDBInstanceReadReplicaInput struct { NetworkType *string // The option group the DB instance is associated with. If omitted, the option - // group associated with the source instance is used. For SQL Server, you must use - // the option group associated with the source instance. This setting doesn't apply - // to RDS Custom. + // group associated with the source instance or cluster is used. For SQL Server, + // you must use the option group associated with the source. This setting doesn't + // apply to RDS Custom. OptionGroupName *string // The Amazon Web Services KMS key identifier for encryption of Performance @@ -352,29 +315,31 @@ type CreateDBInstanceReadReplicaInput struct { // CreateDBInstanceReadReplica API operation in the source Amazon Web Services // Region that contains the source DB instance. This setting applies only to Amazon // Web Services GovCloud (US) Regions and China Amazon Web Services Regions. It's - // ignored in other Amazon Web Services Regions. You must specify this parameter - // when you create an encrypted read replica from another Amazon Web Services - // Region by using the Amazon RDS API. Don't specify PreSignedUrl when you are - // creating an encrypted read replica in the same Amazon Web Services Region. The - // presigned URL must be a valid request for the CreateDBInstanceReadReplica API - // operation that can run in the source Amazon Web Services Region that contains - // the encrypted source DB instance. The presigned URL request must contain the - // following parameter values: - // - // * DestinationRegion - The Amazon Web Services - // Region that the encrypted read replica is created in. This Amazon Web Services - // Region is the same one where the CreateDBInstanceReadReplica operation is called - // that contains this presigned URL. For example, if you create an encrypted DB - // instance in the us-west-1 Amazon Web Services Region, from a source DB instance - // in the us-east-2 Amazon Web Services Region, then you call the - // CreateDBInstanceReadReplica operation in the us-east-1 Amazon Web Services - // Region and provide a presigned URL that contains a call to the - // CreateDBInstanceReadReplica operation in the us-west-2 Amazon Web Services - // Region. For this example, the DestinationRegion in the presigned URL must be set - // to the us-east-1 Amazon Web Services Region. - // - // * KmsKeyId - The KMS key - // identifier for the key to use to encrypt the read replica in the destination + // ignored in other Amazon Web Services Regions. This setting applies only when + // replicating from a source DB instance. Source DB clusters aren't supported in + // Amazon Web Services GovCloud (US) Regions and China Amazon Web Services Regions. + // You must specify this parameter when you create an encrypted read replica from + // another Amazon Web Services Region by using the Amazon RDS API. Don't specify + // PreSignedUrl when you are creating an encrypted read replica in the same Amazon + // Web Services Region. The presigned URL must be a valid request for the + // CreateDBInstanceReadReplica API operation that can run in the source Amazon Web + // Services Region that contains the encrypted source DB instance. The presigned + // URL request must contain the following parameter values: + // + // * DestinationRegion - + // The Amazon Web Services Region that the encrypted read replica is created in. + // This Amazon Web Services Region is the same one where the + // CreateDBInstanceReadReplica operation is called that contains this presigned + // URL. For example, if you create an encrypted DB instance in the us-west-1 Amazon + // Web Services Region, from a source DB instance in the us-east-2 Amazon Web + // Services Region, then you call the CreateDBInstanceReadReplica operation in the + // us-east-1 Amazon Web Services Region and provide a presigned URL that contains a + // call to the CreateDBInstanceReadReplica operation in the us-west-2 Amazon Web + // Services Region. For this example, the DestinationRegion in the presigned URL + // must be set to the us-east-1 Amazon Web Services Region. + // + // * KmsKeyId - The KMS + // key identifier for the key to use to encrypt the read replica in the destination // Amazon Web Services Region. This is the same identifier for both the // CreateDBInstanceReadReplica operation that is called in the destination Amazon // Web Services Region, and the operation contained in the presigned URL. @@ -433,6 +398,60 @@ type CreateDBInstanceReadReplicaInput struct { // creation, you can manage the open mode manually. ReplicaMode types.ReplicaMode + // The identifier of the Multi-AZ DB cluster that will act as the source for the + // read replica. Each DB cluster can have up to 15 read replicas. Constraints: + // + // * + // Must be the identifier of an existing Multi-AZ DB cluster. + // + // * Can't be specified + // if the SourceDBInstanceIdentifier parameter is also specified. + // + // * The specified + // DB cluster must have automatic backups enabled, that is, its backup retention + // period must be greater than 0. + // + // * The source DB cluster must be in the same + // Amazon Web Services Region as the read replica. Cross-Region replication isn't + // supported. + SourceDBClusterIdentifier *string + + // The identifier of the DB instance that will act as the source for the read + // replica. Each DB instance can have up to 15 read replicas, with the exception of + // Oracle and SQL Server, which can have up to five. Constraints: + // + // * Must be the + // identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server DB + // instance. + // + // * Can't be specified if the SourceDBClusterIdentifier parameter is + // also specified. + // + // * For the limitations of Oracle read replicas, see Version and + // licensing considerations for RDS for Oracle replicas + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.limitations.html#oracle-read-replicas.limitations.versions-and-licenses) + // in the Amazon RDS User Guide. + // + // * For the limitations of SQL Server read + // replicas, see Read replica limitations with SQL Server + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.html#SQLServer.ReadReplicas.Limitations) + // in the Amazon RDS User Guide. + // + // * The specified DB instance must have automatic + // backups enabled, that is, its backup retention period must be greater than 0. + // + // * + // If the source DB instance is in the same Amazon Web Services Region as the read + // replica, specify a valid DB instance identifier. + // + // * If the source DB instance is + // in a different Amazon Web Services Region from the read replica, specify a valid + // DB instance ARN. For more information, 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 doesn't apply to SQL Server or RDS Custom, + // which don't support cross-Region replicas. + SourceDBInstanceIdentifier *string + // The AWS region the resource is in. The presigned URL will be created with this // region, if the PresignURL member is empty set. SourceRegion *string diff --git a/service/rds/api_op_DeleteDBCluster.go b/service/rds/api_op_DeleteDBCluster.go index 50c65a1be1a..e96563eee4b 100644 --- a/service/rds/api_op_DeleteDBCluster.go +++ b/service/rds/api_op_DeleteDBCluster.go @@ -14,7 +14,9 @@ import ( // The DeleteDBCluster action deletes a previously provisioned DB cluster. When you // delete a DB cluster, all automated backups for that DB cluster are deleted and // can't be recovered. Manual DB cluster snapshots of the specified DB cluster are -// not deleted. For more information on Amazon Aurora, see What is Amazon Aurora? +// not deleted. If you're deleting a Multi-AZ DB cluster with read replicas, all +// cluster members are terminated and read replicas are promoted to standalone +// instances. 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. For more information on Multi-AZ DB clusters, // see Multi-AZ DB cluster deployments diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index b305e30511c..c5c11c2762c 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -195,11 +195,16 @@ type ModifyDBClusterInput struct { // 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 version 2 (5.7-compatible) and - // version 3 (MySQL 8.0-compatible), use the following command: aws rds + // 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 version 2 (5.7-compatible) + // and version 3 (MySQL 8.0-compatible), 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 MySQL 5.6-compatible Aurora, use the following command: aws rds + // describe-db-engine-versions --engine aurora --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 diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index 1898e203934..fec36f58251 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -286,9 +286,11 @@ type ModifyDBInstanceInput struct { // that DB parameter group family. If you specify only a major version, Amazon RDS // will update 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. In RDS Custom for Oracle, - // this parameter is supported for read replicas only if they are in the - // PATCH_DB_FAILURE lifecycle. + // 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 later 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. diff --git a/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go b/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go index d6ae4480304..a166dbdeeea 100644 --- a/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go +++ b/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go @@ -34,7 +34,7 @@ func (c *Client) StopDBInstanceAutomatedBackupsReplication(ctx context.Context, type StopDBInstanceAutomatedBackupsReplicationInput struct { // The Amazon Resource Name (ARN) of the source DB instance for which to stop - // replicating automated backups, for example, + // replicating automate backups, for example, // arn:aws:rds:us-west-2:123456789012:db:mydatabase. // // This member is required. diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index 6db91e3c2ef..21e5add8e36 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -2461,6 +2461,9 @@ func awsAwsquery_deserializeOpErrorCreateDBInstanceReadReplica(response *smithyh } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("DBClusterNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorDBClusterNotFoundFault(response, errorBody) + case strings.EqualFold("DBInstanceAlreadyExists", errorCode): return awsAwsquery_deserializeErrorDBInstanceAlreadyExistsFault(response, errorBody) @@ -2491,6 +2494,9 @@ func awsAwsquery_deserializeOpErrorCreateDBInstanceReadReplica(response *smithyh case strings.EqualFold("InsufficientDBInstanceCapacity", errorCode): return awsAwsquery_deserializeErrorInsufficientDBInstanceCapacityFault(response, errorBody) + case strings.EqualFold("InvalidDBClusterStateFault", errorCode): + return awsAwsquery_deserializeErrorInvalidDBClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidDBInstanceState", errorCode): return awsAwsquery_deserializeErrorInvalidDBInstanceStateFault(response, errorBody) @@ -28565,6 +28571,19 @@ func awsAwsquery_deserializeDocumentDBInstance(v **types.DBInstance, decoder smi return err } + case strings.EqualFold("ReadReplicaSourceDBClusterIdentifier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReadReplicaSourceDBClusterIdentifier = ptr.String(xtv) + } + case strings.EqualFold("ReadReplicaSourceDBInstanceIdentifier", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/rds/serializers.go b/service/rds/serializers.go index d258040cf7a..db02b6e1b10 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -10915,6 +10915,11 @@ func awsAwsquery_serializeOpDocumentCreateDBInstanceReadReplicaInput(v *CreateDB 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) diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 32895bcaa58..c2b5720eb12 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -1663,6 +1663,10 @@ type DBInstance struct { // instance. ReadReplicaDBInstanceIdentifiers []string + // Contains the identifier of the source DB cluster if this DB instance is a read + // replica. + ReadReplicaSourceDBClusterIdentifier *string + // Contains the identifier of the source DB instance if this DB instance is a read // replica. ReadReplicaSourceDBInstanceIdentifier *string diff --git a/service/rds/validators.go b/service/rds/validators.go index cc34fbaa12d..21c15975197 100644 --- a/service/rds/validators.go +++ b/service/rds/validators.go @@ -3679,9 +3679,6 @@ func validateOpCreateDBInstanceReadReplicaInput(v *CreateDBInstanceReadReplicaIn if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } - if v.SourceDBInstanceIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceDBInstanceIdentifier")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sagemakerruntime/internal/endpoints/endpoints.go b/service/sagemakerruntime/internal/endpoints/endpoints.go index f388abfc5c9..c5f6440d038 100644 --- a/service/sagemakerruntime/internal/endpoints/endpoints.go +++ b/service/sagemakerruntime/internal/endpoints/endpoints.go @@ -177,6 +177,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/servicecatalog/internal/endpoints/endpoints.go b/service/servicecatalog/internal/endpoints/endpoints.go index 970a075f31f..2173a4acba2 100644 --- a/service/servicecatalog/internal/endpoints/endpoints.go +++ b/service/servicecatalog/internal/endpoints/endpoints.go @@ -153,6 +153,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -168,12 +171,18 @@ var defaultPartitions = endpoints.Partitions{ 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{},