diff --git a/.changelog/496a68e64bb44b2eb214dcf1c9b4ac3f.json b/.changelog/496a68e64bb44b2eb214dcf1c9b4ac3f.json new file mode 100644 index 00000000000..ef5ee995b5c --- /dev/null +++ b/.changelog/496a68e64bb44b2eb214dcf1c9b4ac3f.json @@ -0,0 +1,8 @@ +{ + "id": "496a68e6-4bb4-4b2e-b214-dcf1c9b4ac3f", + "type": "feature", + "description": "Removed Required trait for DataSet.OriginDetails.ProductId.", + "modules": [ + "service/dataexchange" + ] +} \ No newline at end of file diff --git a/.changelog/68151049b2be4a3cafe5940dda30d1f3.json b/.changelog/68151049b2be4a3cafe5940dda30d1f3.json new file mode 100644 index 00000000000..59a222a0068 --- /dev/null +++ b/.changelog/68151049b2be4a3cafe5940dda30d1f3.json @@ -0,0 +1,8 @@ +{ + "id": "68151049-b2be-4a3c-afe5-940dda30d1f3", + "type": "feature", + "description": "This release enables customers to call the AWS Transcribe streaming service with the capability of identifying multiple languages in the stream.", + "modules": [ + "service/transcribestreaming" + ] +} \ No newline at end of file diff --git a/.changelog/9160ad155d0e4199a5a8f64fcb2d2e7c.json b/.changelog/9160ad155d0e4199a5a8f64fcb2d2e7c.json new file mode 100644 index 00000000000..ebb278218e1 --- /dev/null +++ b/.changelog/9160ad155d0e4199a5a8f64fcb2d2e7c.json @@ -0,0 +1,8 @@ +{ + "id": "9160ad15-5d0e-4199-a5a8-f64fcb2d2e7c", + "type": "feature", + "description": "Updated GetClusterSessionCredentials API to allow Amazon SageMaker Studio to connect to EMR on EC2 clusters to support IdentityCenter/PEZ integration.", + "modules": [ + "service/emr" + ] +} \ No newline at end of file diff --git a/.changelog/96efc39fc4084b7b9ea645d1894d663d.json b/.changelog/96efc39fc4084b7b9ea645d1894d663d.json new file mode 100644 index 00000000000..5e5fdb906eb --- /dev/null +++ b/.changelog/96efc39fc4084b7b9ea645d1894d663d.json @@ -0,0 +1,8 @@ +{ + "id": "96efc39f-c408-4b7b-9ea6-45d1894d663d", + "type": "feature", + "description": "Added new Db2 LUW Target endpoint with related endpoint settings. New executeTimeout endpoint setting for mysql endpoint. New ReplicationDeprovisionTime field for serverless describe-replications.", + "modules": [ + "service/databasemigrationservice" + ] +} \ No newline at end of file diff --git a/.changelog/a9480c4f161042a6bb5f826167c1654f.json b/.changelog/a9480c4f161042a6bb5f826167c1654f.json new file mode 100644 index 00000000000..5a4d594ce68 --- /dev/null +++ b/.changelog/a9480c4f161042a6bb5f826167c1654f.json @@ -0,0 +1,8 @@ +{ + "id": "a9480c4f-1610-42a6-bb5f-826167c1654f", + "type": "feature", + "description": "When the customer associates a resource collection to their application with this new feature, then a new application tag will be applied to all supported resources that are part of that collection. This allows customers to more easily find the application that is associated with those resources.", + "modules": [ + "service/servicecatalogappregistry" + ] +} \ No newline at end of file diff --git a/.changelog/dc5c12efab1a4d1abc9503ce53f1b062.json b/.changelog/dc5c12efab1a4d1abc9503ce53f1b062.json new file mode 100644 index 00000000000..df3407e4d98 --- /dev/null +++ b/.changelog/dc5c12efab1a4d1abc9503ce53f1b062.json @@ -0,0 +1,8 @@ +{ + "id": "dc5c12ef-ab1a-4d1a-bc95-03ce53f1b062", + "type": "feature", + "description": "Adds the new EC2 DescribeInstanceTopology API, which you can use to retrieve the network topology of your running instances on select platform types to determine their relative proximity to each other.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/ffbeec09f6c341bd82f026ef87064626.json b/.changelog/ffbeec09f6c341bd82f026ef87064626.json new file mode 100644 index 00000000000..21a389777ff --- /dev/null +++ b/.changelog/ffbeec09f6c341bd82f026ef87064626.json @@ -0,0 +1,8 @@ +{ + "id": "ffbeec09-f6c3-41bd-82f0-26ef87064626", + "type": "feature", + "description": "Adds a Client Token parameter to the ECS RunTask API. The Client Token parameter allows for idempotent RunTask requests.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/internal/ini/go.mod b/internal/ini/go.mod index 8762aa08689..27599c1e1c6 100644 --- a/internal/ini/go.mod +++ b/internal/ini/go.mod @@ -2,6 +2,4 @@ module github.com/aws/aws-sdk-go-v2/internal/ini go 1.19 -require github.com/aws/aws-sdk-go-v2 v1.22.2 - replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/codepipeline/internal/endpoints/endpoints.go b/service/codepipeline/internal/endpoints/endpoints.go index f77cb4e4ac4..bee42120e5d 100644 --- a/service/codepipeline/internal/endpoints/endpoints.go +++ b/service/codepipeline/internal/endpoints/endpoints.go @@ -151,9 +151,15 @@ 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{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -235,6 +241,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/databasemigrationservice/api_op_CreateDataProvider.go b/service/databasemigrationservice/api_op_CreateDataProvider.go index 5d1ab7a8189..0a4f3c354ea 100644 --- a/service/databasemigrationservice/api_op_CreateDataProvider.go +++ b/service/databasemigrationservice/api_op_CreateDataProvider.go @@ -36,8 +36,9 @@ func (c *Client) CreateDataProvider(ctx context.Context, params *CreateDataProvi type CreateDataProviderInput struct { // The type of database engine for the data provider. Valid values include "aurora" - // , "aurora_postgresql" , "mysql" , "oracle" , "postgres" , and "sqlserver" . A - // value of "aurora" represents Amazon Aurora MySQL-Compatible Edition. + // , "aurora-postgresql" , "mysql" , "oracle" , "postgres" , "sqlserver" , redshift + // , mariadb , mongodb , and docdb . A value of "aurora" represents Amazon Aurora + // MySQL-Compatible Edition. // // This member is required. Engine *string diff --git a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go index 0cf43b06a67..c3f97746218 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go @@ -56,7 +56,7 @@ type CreateReplicationSubnetGroupInput struct { // This member is required. ReplicationSubnetGroupIdentifier *string - // One or more subnet IDs to be assigned to the subnet group. + // Two or more subnet IDs to be assigned to the subnet group. // // This member is required. SubnetIds []string diff --git a/service/databasemigrationservice/api_op_DescribeDataProviders.go b/service/databasemigrationservice/api_op_DescribeDataProviders.go index 3111af8ca85..7a65c0c9b24 100644 --- a/service/databasemigrationservice/api_op_DescribeDataProviders.go +++ b/service/databasemigrationservice/api_op_DescribeDataProviders.go @@ -36,6 +36,7 @@ func (c *Client) DescribeDataProviders(ctx context.Context, params *DescribeData type DescribeDataProvidersInput struct { // Filters applied to the data providers described in the form of key-value pairs. + // Valid filter names: data-provider-identifier Filters []types.Filter // Specifies the unique pagination token that makes it possible to display the diff --git a/service/databasemigrationservice/api_op_ModifyDataProvider.go b/service/databasemigrationservice/api_op_ModifyDataProvider.go index bd8bed18207..c0416775f6a 100644 --- a/service/databasemigrationservice/api_op_ModifyDataProvider.go +++ b/service/databasemigrationservice/api_op_ModifyDataProvider.go @@ -49,8 +49,9 @@ type ModifyDataProviderInput struct { Description *string // The type of database engine for the data provider. Valid values include "aurora" - // , "aurora_postgresql" , "mysql" , "oracle" , "postgres" , and "sqlserver" . A - // value of "aurora" represents Amazon Aurora MySQL-Compatible Edition. + // , "aurora-postgresql" , "mysql" , "oracle" , "postgres" , "sqlserver" , redshift + // , mariadb , mongodb , and docdb . A value of "aurora" represents Amazon Aurora + // MySQL-Compatible Edition. Engine *string // If this attribute is Y, the current call to ModifyDataProvider replaces all diff --git a/service/databasemigrationservice/deserializers.go b/service/databasemigrationservice/deserializers.go index fd999a5aa15..992db0399eb 100644 --- a/service/databasemigrationservice/deserializers.go +++ b/service/databasemigrationservice/deserializers.go @@ -17063,6 +17063,41 @@ func awsAwsjson11_deserializeDocumentIBMDb2Settings(v **types.IBMDb2Settings, va sv.DatabaseName = ptr.String(jtv) } + case "KeepCsvFiles": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", value) + } + sv.KeepCsvFiles = ptr.Bool(jtv) + } + + case "LoadTimeout": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LoadTimeout = ptr.Int32(int32(i64)) + } + + case "MaxFileSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxFileSize = ptr.Int32(int32(i64)) + } + case "MaxKBytesPerRead": if value != nil { jtv, ok := value.(json.Number) @@ -17143,6 +17178,19 @@ func awsAwsjson11_deserializeDocumentIBMDb2Settings(v **types.IBMDb2Settings, va sv.Username = ptr.String(jtv) } + case "WriteBufferSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WriteBufferSize = ptr.Int32(int32(i64)) + } + default: _, _ = key, value @@ -19284,6 +19332,19 @@ func awsAwsjson11_deserializeDocumentMySQLSettings(v **types.MySQLSettings, valu sv.EventsPollInterval = ptr.Int32(int32(i64)) } + case "ExecuteTimeout": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExecuteTimeout = ptr.Int32(int32(i64)) + } + case "MaxFileSize": if value != nil { jtv, ok := value.(json.Number) @@ -22108,6 +22169,22 @@ func awsAwsjson11_deserializeDocumentReplication(v **types.Replication, value in } } + case "ReplicationDeprovisionTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReplicationDeprovisionTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value) + + } + } + case "ReplicationLastStopTime": if value != nil { switch jtv := value.(type) { diff --git a/service/databasemigrationservice/endpoints.go b/service/databasemigrationservice/endpoints.go index c36752096ed..5c095388797 100644 --- a/service/databasemigrationservice/endpoints.go +++ b/service/databasemigrationservice/endpoints.go @@ -430,8 +430,8 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - if "aws-us-gov" == _PartitionResult.Name { + if _PartitionResult.SupportsFIPS == true { + if _PartitionResult.Name == "aws-us-gov" { uriString := func() string { var out strings.Builder out.WriteString("https://dms.") @@ -450,7 +450,7 @@ func (r *resolver) ResolveEndpoint( Headers: http.Header{}, }, nil } - if "aws-iso" == _PartitionResult.Name { + if _PartitionResult.Name == "aws-iso" { uriString := func() string { var out strings.Builder out.WriteString("https://dms.") @@ -469,7 +469,7 @@ func (r *resolver) ResolveEndpoint( Headers: http.Header{}, }, nil } - if "aws-iso-b" == _PartitionResult.Name { + if _PartitionResult.Name == "aws-iso-b" { uriString := func() string { var out strings.Builder out.WriteString("https://dms.") diff --git a/service/databasemigrationservice/serializers.go b/service/databasemigrationservice/serializers.go index ef01abfbe09..002a59a6dcf 100644 --- a/service/databasemigrationservice/serializers.go +++ b/service/databasemigrationservice/serializers.go @@ -6333,6 +6333,21 @@ func awsAwsjson11_serializeDocumentIBMDb2Settings(v *types.IBMDb2Settings, value ok.String(*v.DatabaseName) } + if v.KeepCsvFiles != nil { + ok := object.Key("KeepCsvFiles") + ok.Boolean(*v.KeepCsvFiles) + } + + if v.LoadTimeout != nil { + ok := object.Key("LoadTimeout") + ok.Integer(*v.LoadTimeout) + } + + if v.MaxFileSize != nil { + ok := object.Key("MaxFileSize") + ok.Integer(*v.MaxFileSize) + } + if v.MaxKBytesPerRead != nil { ok := object.Key("MaxKBytesPerRead") ok.Integer(*v.MaxKBytesPerRead) @@ -6373,6 +6388,11 @@ func awsAwsjson11_serializeDocumentIBMDb2Settings(v *types.IBMDb2Settings, value ok.String(*v.Username) } + if v.WriteBufferSize != nil { + ok := object.Key("WriteBufferSize") + ok.Integer(*v.WriteBufferSize) + } + return nil } @@ -6909,6 +6929,11 @@ func awsAwsjson11_serializeDocumentMySQLSettings(v *types.MySQLSettings, value s ok.Integer(*v.EventsPollInterval) } + if v.ExecuteTimeout != nil { + ok := object.Key("ExecuteTimeout") + ok.Integer(*v.ExecuteTimeout) + } + if v.MaxFileSize != nil { ok := object.Key("MaxFileSize") ok.Integer(*v.MaxFileSize) diff --git a/service/databasemigrationservice/types/types.go b/service/databasemigrationservice/types/types.go index 108cd168dd2..7ef29b5764a 100644 --- a/service/databasemigrationservice/types/types.go +++ b/service/databasemigrationservice/types/types.go @@ -375,8 +375,9 @@ type DataProvider struct { Description *string // The type of database engine for the data provider. Valid values include "aurora" - // , "aurora_postgresql" , "mysql" , "oracle" , "postgres" , and "sqlserver" . A - // value of "aurora" represents Amazon Aurora MySQL-Compatible Edition. + // , "aurora-postgresql" , "mysql" , "oracle" , "postgres" , "sqlserver" , redshift + // , mariadb , mongodb , and docdb . A value of "aurora" represents Amazon Aurora + // MySQL-Compatible Edition. Engine *string // The settings in JSON format for a data provider. @@ -720,9 +721,9 @@ type Endpoint struct { // The database engine name. Valid values, depending on the EndpointType, include // "mysql" , "oracle" , "postgres" , "mariadb" , "aurora" , "aurora-postgresql" , - // "redshift" , "s3" , "db2" , "db2-zos" , "azuredb" , "sybase" , "dynamodb" , - // "mongodb" , "kinesis" , "kafka" , "elasticsearch" , "documentdb" , "sqlserver" , - // "neptune" , and "babelfish" . + // "redshift" , "redshift-serverless" , "s3" , "db2" , "db2-zos" , "azuredb" , + // "sybase" , "dynamodb" , "mongodb" , "kinesis" , "kafka" , "elasticsearch" , + // "documentdb" , "sqlserver" , "neptune" , and "babelfish" . EngineName *string // Value returned by a call to CreateEndpoint that can be used for cross-account @@ -1164,6 +1165,19 @@ type IBMDb2Settings struct { // Database name for the endpoint. DatabaseName *string + // If true, DMS saves any .csv files to the Db2 LUW target that were used to + // replicate data. DMS uses these files for analysis and troubleshooting. The + // default value is false. + KeepCsvFiles *bool + + // The amount of time (in milliseconds) before DMS times out operations performed + // by DMS on the Db2 target. The default value is 1200 (20 minutes). + LoadTimeout *int32 + + // Specifies the maximum size (in KB) of .csv files used to transfer data to Db2 + // LUW. + MaxFileSize *int32 + // Maximum number of bytes per read, as a NUMBER value. The default is 64 KB. MaxKBytesPerRead *int32 @@ -1200,6 +1214,11 @@ type IBMDb2Settings struct { // Endpoint connection user name. Username *string + // The size (in KB) of the in-memory file write buffer used when generating .csv + // files on the local disk on the DMS replication instance. The default value is + // 1024 (1 MB). + WriteBufferSize *int32 + noSmithyDocumentSerde } @@ -1821,6 +1840,9 @@ type MySQLSettings struct { // In the example, DMS checks for changes in the binary logs every five seconds. EventsPollInterval *int32 + // Sets the client statement timeout (in seconds) for a MySQL source endpoint. + ExecuteTimeout *int32 + // Specifies the maximum size (in KB) of any .csv file used to transfer data to a // MySQL-compatible database. Example: maxFileSize=512 MaxFileSize *int32 @@ -2977,6 +2999,9 @@ type Replication struct { // The time the serverless replication was created. ReplicationCreateTime *time.Time + // The timestamp when DMS will deprovision the replication. + ReplicationDeprovisionTime *time.Time + // The timestamp when replication was last stopped. ReplicationLastStopTime *time.Time diff --git a/service/dataexchange/types/types.go b/service/dataexchange/types/types.go index cb60a007f1a..65ac766c3e6 100644 --- a/service/dataexchange/types/types.go +++ b/service/dataexchange/types/types.go @@ -1107,8 +1107,6 @@ type NotificationDetails struct { type OriginDetails struct { // The product ID of the origin of the data set. - // - // This member is required. ProductId *string noSmithyDocumentSerde diff --git a/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go b/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go index 704fe585999..359e111767d 100644 --- a/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go @@ -61,10 +61,10 @@ type AttachVerifiedAccessTrustProviderInput struct { type AttachVerifiedAccessTrustProviderOutput struct { - // The ID of the Verified Access instance. + // Details about the Verified Access instance. VerifiedAccessInstance *types.VerifiedAccessInstance - // The ID of the Verified Access trust provider. + // Details about the Verified Access trust provider. VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_CreateImage.go b/service/ec2/api_op_CreateImage.go index bb1c6cde1c2..70edfe8b2dc 100644 --- a/service/ec2/api_op_CreateImage.go +++ b/service/ec2/api_op_CreateImage.go @@ -53,9 +53,17 @@ type CreateImageInput struct { // This member is required. Name *string - // The block device mappings. This parameter cannot be used to modify the - // encryption status of existing volumes or snapshots. To create an AMI with - // encrypted snapshots, use the CopyImage action. + // The block device mappings. When using the CreateImage action: + // - You can't change the volume size using the VolumeSize parameter. If you + // want a different volume size, you must first change the volume size of the + // source instance. + // - You can't modify the encryption status of existing volumes or snapshots. To + // create an AMI with volumes or snapshots that have a different encryption status + // (for example, where the source volume and snapshots are unencrypted, and you + // want to create an AMI with encrypted volumes or snapshots), use the CopyImage + // action. + // - The only option that can be changed for existing mappings or snapshots is + // DeleteOnTermination . BlockDeviceMappings []types.BlockDeviceMapping // A description for the new image. diff --git a/service/ec2/api_op_CreateVerifiedAccessEndpoint.go b/service/ec2/api_op_CreateVerifiedAccessEndpoint.go index d215fbe6d90..0e0560e32dd 100644 --- a/service/ec2/api_op_CreateVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_CreateVerifiedAccessEndpoint.go @@ -94,9 +94,10 @@ type CreateVerifiedAccessEndpointInput struct { PolicyDocument *string // The IDs of the security groups to associate with the Verified Access endpoint. + // Required if AttachmentType is set to vpc . SecurityGroupIds []string - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest // The tags to assign to the Verified Access endpoint. @@ -107,7 +108,7 @@ type CreateVerifiedAccessEndpointInput struct { type CreateVerifiedAccessEndpointOutput struct { - // The ID of the Verified Access endpoint. + // Details about the Verified Access endpoint. VerifiedAccessEndpoint *types.VerifiedAccessEndpoint // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_CreateVerifiedAccessGroup.go b/service/ec2/api_op_CreateVerifiedAccessGroup.go index c254c5b539f..b9313649b8b 100644 --- a/service/ec2/api_op_CreateVerifiedAccessGroup.go +++ b/service/ec2/api_op_CreateVerifiedAccessGroup.go @@ -61,7 +61,7 @@ type CreateVerifiedAccessGroupInput struct { // The Verified Access policy document. PolicyDocument *string - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest // The tags to assign to the Verified Access group. @@ -72,7 +72,7 @@ type CreateVerifiedAccessGroupInput struct { type CreateVerifiedAccessGroupOutput struct { - // The ID of the Verified Access group. + // Details about the Verified Access group. VerifiedAccessGroup *types.VerifiedAccessGroup // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_CreateVerifiedAccessInstance.go b/service/ec2/api_op_CreateVerifiedAccessInstance.go index 33e0ea095de..fb2d15f4bc8 100644 --- a/service/ec2/api_op_CreateVerifiedAccessInstance.go +++ b/service/ec2/api_op_CreateVerifiedAccessInstance.go @@ -62,7 +62,7 @@ type CreateVerifiedAccessInstanceInput struct { type CreateVerifiedAccessInstanceOutput struct { - // The ID of the Verified Access instance. + // Details about the Verified Access instance. VerifiedAccessInstance *types.VerifiedAccessInstance // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go b/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go index 062bf369a02..c0fda259205 100644 --- a/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go @@ -73,7 +73,7 @@ type CreateVerifiedAccessTrustProviderInput struct { // parameter is required when the provider type is user . OidcOptions *types.CreateVerifiedAccessTrustProviderOidcOptions - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest // The tags to assign to the Verified Access trust provider. @@ -88,7 +88,7 @@ type CreateVerifiedAccessTrustProviderInput struct { type CreateVerifiedAccessTrustProviderOutput struct { - // The ID of the Verified Access trust provider. + // Details about the Verified Access trust provider. VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go b/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go index 3d5f2654411..cad94385359 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go @@ -55,7 +55,7 @@ type DeleteVerifiedAccessEndpointInput struct { type DeleteVerifiedAccessEndpointOutput struct { - // The ID of the Verified Access endpoint. + // Details about the Verified Access endpoint. VerifiedAccessEndpoint *types.VerifiedAccessEndpoint // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DeleteVerifiedAccessGroup.go b/service/ec2/api_op_DeleteVerifiedAccessGroup.go index a61bff3dd30..45e5a6e8d7e 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessGroup.go +++ b/service/ec2/api_op_DeleteVerifiedAccessGroup.go @@ -55,7 +55,7 @@ type DeleteVerifiedAccessGroupInput struct { type DeleteVerifiedAccessGroupOutput struct { - // The ID of the Verified Access group. + // Details about the Verified Access group. VerifiedAccessGroup *types.VerifiedAccessGroup // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DeleteVerifiedAccessInstance.go b/service/ec2/api_op_DeleteVerifiedAccessInstance.go index 44db5459648..8457e3b442f 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessInstance.go +++ b/service/ec2/api_op_DeleteVerifiedAccessInstance.go @@ -55,7 +55,7 @@ type DeleteVerifiedAccessInstanceInput struct { type DeleteVerifiedAccessInstanceOutput struct { - // The ID of the Verified Access instance. + // Details about the Verified Access instance. VerifiedAccessInstance *types.VerifiedAccessInstance // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go b/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go index 17532ba27b8..dd668e96279 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go @@ -55,7 +55,7 @@ type DeleteVerifiedAccessTrustProviderInput struct { type DeleteVerifiedAccessTrustProviderOutput struct { - // The ID of the Verified Access trust provider. + // Details about the Verified Access trust provider. VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DeleteVpcPeeringConnection.go b/service/ec2/api_op_DeleteVpcPeeringConnection.go index 449fb6b7513..20be7b447b0 100644 --- a/service/ec2/api_op_DeleteVpcPeeringConnection.go +++ b/service/ec2/api_op_DeleteVpcPeeringConnection.go @@ -19,7 +19,7 @@ import ( // owner of the accepter VPC can delete the VPC peering connection if it's in the // active state. The owner of the requester VPC can delete a VPC peering connection // in the pending-acceptance state. You cannot delete a VPC peering connection -// that's in the failed state. +// that's in the failed or rejected state. func (c *Client) DeleteVpcPeeringConnection(ctx context.Context, params *DeleteVpcPeeringConnectionInput, optFns ...func(*Options)) (*DeleteVpcPeeringConnectionOutput, error) { if params == nil { params = &DeleteVpcPeeringConnectionInput{} diff --git a/service/ec2/api_op_DescribeFastLaunchImages.go b/service/ec2/api_op_DescribeFastLaunchImages.go index 9dff234fe3a..13f7dce93ce 100644 --- a/service/ec2/api_op_DescribeFastLaunchImages.go +++ b/service/ec2/api_op_DescribeFastLaunchImages.go @@ -16,7 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describe details for Windows AMIs that are configured for faster launching. +// Describe details for Windows AMIs that are configured for Windows fast launch. func (c *Client) DescribeFastLaunchImages(ctx context.Context, params *DescribeFastLaunchImagesInput, optFns ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) { if params == nil { params = &DescribeFastLaunchImagesInput{} @@ -42,13 +42,11 @@ type DescribeFastLaunchImagesInput struct { // Use the following filters to streamline results. // - resource-type - The resource type for pre-provisioning. - // - launch-template - The launch template that is associated with the - // pre-provisioned Windows AMI. // - owner-id - The owner ID for the pre-provisioning resource. // - state - The current state of fast launching for the Windows AMI. Filters []types.Filter - // Details for one or more Windows AMI image IDs. + // Specify one or more Windows AMI image IDs for the request. ImageIds []string // The maximum number of items to return for this request. To get the next page of diff --git a/service/ec2/api_op_DescribeInstanceTopology.go b/service/ec2/api_op_DescribeInstanceTopology.go new file mode 100644 index 00000000000..284cc22af8f --- /dev/null +++ b/service/ec2/api_op_DescribeInstanceTopology.go @@ -0,0 +1,405 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +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/ec2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a tree-based hierarchy that represents the physical host placement of +// your EC2 instances within an Availability Zone or Local Zone. You can use this +// information to determine the relative proximity of your EC2 instances within the +// Amazon Web Services network to support your tightly coupled workloads. +// Limitations +// - Supported zones +// - Availability Zone +// - Local Zone +// - Supported instance types +// - hpc6a.48xlarge | hpc6id.32xlarge | hpc7a.12xlarge | hpc7a.24xlarge | +// hpc7a.48xlarge | hpc7a.96xlarge | hpc7g.4xlarge | hpc7g.8xlarge | +// hpc7g.16xlarge +// - p3dn.24xlarge | p4d.24xlarge | p4de.24xlarge | p5.48xlarge +// - trn1.2xlarge | trn1.32xlarge | trn1n.32xlarge +// +// For more information, see Amazon EC2 instance topology (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html) +// in the Amazon EC2 User Guide. +func (c *Client) DescribeInstanceTopology(ctx context.Context, params *DescribeInstanceTopologyInput, optFns ...func(*Options)) (*DescribeInstanceTopologyOutput, error) { + if params == nil { + params = &DescribeInstanceTopologyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTopology", params, optFns, c.addOperationDescribeInstanceTopologyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstanceTopologyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstanceTopologyInput struct { + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + // The filters. + // - availability-zone - The name of the Availability Zone (for example, + // us-west-2a ) or Local Zone (for example, us-west-2-lax-1b ) that the instance + // is in. + // - instance-type - The instance type (for example, p4d.24xlarge ) or instance + // family (for example, p4d* ). You can use the * wildcard to match zero or more + // characters, or the ? wildcard to match zero or one character. + // - zone-id - The ID of the Availability Zone (for example, usw2-az2 ) or Local + // Zone (for example, usw2-lax1-az1 ) that the instance is in. + Filters []types.Filter + + // The name of the placement group that each instance is in. Constraints: Maximum + // 100 explicitly specified placement group names. + GroupNames []string + + // The instance IDs. Default: Describes all your instances. Constraints: Maximum + // 100 explicitly specified instance IDs. + InstanceIds []string + + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) + // . You can't specify this parameter and the instance IDs parameter in the same + // request. Default: 20 + MaxResults *int32 + + // The token returned from a previous paginated request. Pagination continues from + // the end of the items returned by the previous request. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstanceTopologyOutput struct { + + // Information about the topology of each instance. + Instances []types.InstanceTopology + + // The token to include in another request to get the next page of items. This + // value is null when there are no more items to return. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstanceTopologyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTopology{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTopology{}, 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 = addDescribeInstanceTopologyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTopology(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 +} + +// DescribeInstanceTopologyAPIClient is a client that implements the +// DescribeInstanceTopology operation. +type DescribeInstanceTopologyAPIClient interface { + DescribeInstanceTopology(context.Context, *DescribeInstanceTopologyInput, ...func(*Options)) (*DescribeInstanceTopologyOutput, error) +} + +var _ DescribeInstanceTopologyAPIClient = (*Client)(nil) + +// DescribeInstanceTopologyPaginatorOptions is the paginator options for +// DescribeInstanceTopology +type DescribeInstanceTopologyPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) + // . You can't specify this parameter and the instance IDs parameter in the same + // request. Default: 20 + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstanceTopologyPaginator is a paginator for DescribeInstanceTopology +type DescribeInstanceTopologyPaginator struct { + options DescribeInstanceTopologyPaginatorOptions + client DescribeInstanceTopologyAPIClient + params *DescribeInstanceTopologyInput + nextToken *string + firstPage bool +} + +// NewDescribeInstanceTopologyPaginator returns a new +// DescribeInstanceTopologyPaginator +func NewDescribeInstanceTopologyPaginator(client DescribeInstanceTopologyAPIClient, params *DescribeInstanceTopologyInput, optFns ...func(*DescribeInstanceTopologyPaginatorOptions)) *DescribeInstanceTopologyPaginator { + if params == nil { + params = &DescribeInstanceTopologyInput{} + } + + options := DescribeInstanceTopologyPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstanceTopologyPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstanceTopologyPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceTopology page. +func (p *DescribeInstanceTopologyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTopologyOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.DescribeInstanceTopology(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeInstanceTopology(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "DescribeInstanceTopology", + } +} + +type opDescribeInstanceTopologyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDescribeInstanceTopologyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDescribeInstanceTopologyResolveEndpointMiddleware) 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 := "ec2" + 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 = "ec2" + } 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("ec2") + } + 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 addDescribeInstanceTopologyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDescribeInstanceTopologyResolveEndpointMiddleware{ + 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/ec2/api_op_DescribeVerifiedAccessEndpoints.go b/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go index 0203170f032..44bc848f470 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go +++ b/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go @@ -68,7 +68,7 @@ type DescribeVerifiedAccessEndpointsOutput struct { // there are no more results to return. NextToken *string - // The ID of the Verified Access endpoint. + // Details about the Verified Access endpoints. VerifiedAccessEndpoints []types.VerifiedAccessEndpoint // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DescribeVerifiedAccessGroups.go b/service/ec2/api_op_DescribeVerifiedAccessGroups.go index b7da79874ef..c2e3b3e52e2 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessGroups.go +++ b/service/ec2/api_op_DescribeVerifiedAccessGroups.go @@ -65,7 +65,7 @@ type DescribeVerifiedAccessGroupsOutput struct { // there are no more results to return. NextToken *string - // The ID of the Verified Access group. + // Details about the Verified Access groups. VerifiedAccessGroups []types.VerifiedAccessGroup // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go b/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go index 8ef00c68206..19e05589104 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go +++ b/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go @@ -58,7 +58,7 @@ type DescribeVerifiedAccessInstanceLoggingConfigurationsInput struct { type DescribeVerifiedAccessInstanceLoggingConfigurationsOutput struct { - // The current logging configuration for the Verified Access instances. + // The logging configuration for the Verified Access instances. LoggingConfigurations []types.VerifiedAccessInstanceLoggingConfiguration // The token to use to retrieve the next page of results. This value is null when diff --git a/service/ec2/api_op_DescribeVerifiedAccessInstances.go b/service/ec2/api_op_DescribeVerifiedAccessInstances.go index cfc16fdaf80..dc30ae5e949 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessInstances.go +++ b/service/ec2/api_op_DescribeVerifiedAccessInstances.go @@ -62,7 +62,7 @@ type DescribeVerifiedAccessInstancesOutput struct { // there are no more results to return. NextToken *string - // The IDs of the Verified Access instances. + // Details about the Verified Access instances. VerifiedAccessInstances []types.VerifiedAccessInstance // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go b/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go index 9648245da9e..96e7faddc4d 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go +++ b/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go @@ -62,7 +62,7 @@ type DescribeVerifiedAccessTrustProvidersOutput struct { // there are no more results to return. NextToken *string - // The IDs of the Verified Access trust providers. + // Details about the Verified Access trust providers. VerifiedAccessTrustProviders []types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go b/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go index d39999d33cc..39cb71933b7 100644 --- a/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go @@ -61,10 +61,10 @@ type DetachVerifiedAccessTrustProviderInput struct { type DetachVerifiedAccessTrustProviderOutput struct { - // The ID of the Verified Access instance. + // Details about the Verified Access instance. VerifiedAccessInstance *types.VerifiedAccessInstance - // The ID of the Verified Access trust provider. + // Details about the Verified Access trust provider. VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DisableFastLaunch.go b/service/ec2/api_op_DisableFastLaunch.go index 6ac674ce57f..e7c193be8ba 100644 --- a/service/ec2/api_op_DisableFastLaunch.go +++ b/service/ec2/api_op_DisableFastLaunch.go @@ -17,11 +17,12 @@ import ( "time" ) -// Discontinue faster launching for a Windows AMI, and clean up existing -// pre-provisioned snapshots. When you disable faster launching, the AMI uses the -// standard launch process for each instance. All pre-provisioned snapshots must be -// removed before you can enable faster launching again. To change these settings, -// you must own the AMI. +// Discontinue Windows fast launch for a Windows AMI, and clean up existing +// pre-provisioned snapshots. After you disable Windows fast launch, the AMI uses +// the standard launch process for each new instance. Amazon EC2 must remove all +// pre-provisioned snapshots before you can enable Windows fast launch again. You +// can only change these settings for Windows AMIs that you own or that have been +// shared with you. func (c *Client) DisableFastLaunch(ctx context.Context, params *DisableFastLaunchInput, optFns ...func(*Options)) (*DisableFastLaunchOutput, error) { if params == nil { params = &DisableFastLaunchInput{} @@ -39,8 +40,7 @@ func (c *Client) DisableFastLaunch(ctx context.Context, params *DisableFastLaunc type DisableFastLaunchInput struct { - // The ID of the image for which you’re turning off faster launching, and removing - // pre-provisioned snapshots. + // Specify the ID of the image for which to disable Windows fast launch. // // This member is required. ImageId *string @@ -51,7 +51,7 @@ type DisableFastLaunchInput struct { // UnauthorizedOperation . DryRun *bool - // Forces the image settings to turn off faster launching for your Windows AMI. + // Forces the image settings to turn off Windows fast launch for your Windows AMI. // This parameter overrides any errors that are encountered while cleaning up // resources in your account. Force *bool @@ -61,7 +61,7 @@ type DisableFastLaunchInput struct { type DisableFastLaunchOutput struct { - // The ID of the image for which faster-launching has been turned off. + // The ID of the image for which Windows fast launch was disabled. ImageId *string // The launch template that was used to launch Windows instances from @@ -69,27 +69,27 @@ type DisableFastLaunchOutput struct { LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationResponse // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows faster launching. + // create pre-provisioned snapshots for Windows fast launch. MaxParallelLaunches *int32 - // The owner of the Windows AMI for which faster launching was turned off. + // The owner of the Windows AMI for which Windows fast launch was disabled. OwnerId *string // The pre-provisioning resource type that must be cleaned after turning off - // faster launching for the Windows AMI. Supported values include: snapshot . + // Windows fast launch for the Windows AMI. Supported values include: snapshot . ResourceType types.FastLaunchResourceType - // Parameters that were used for faster launching for the Windows AMI before - // faster launching was turned off. This informs the clean-up process. + // Parameters that were used for Windows fast launch for the Windows AMI before + // Windows fast launch was disabled. This informs the clean-up process. SnapshotConfiguration *types.FastLaunchSnapshotConfigurationResponse - // The current state of faster launching for the specified Windows AMI. + // The current state of Windows fast launch for the specified Windows AMI. State types.FastLaunchStateCode - // The reason that the state changed for faster launching for the Windows AMI. + // The reason that the state changed for Windows fast launch for the Windows AMI. StateTransitionReason *string - // The time that the state changed for faster launching for the Windows AMI. + // The time that the state changed for Windows fast launch for the Windows AMI. StateTransitionTime *time.Time // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_DisableImage.go b/service/ec2/api_op_DisableImage.go index 67022c9d269..0594ca16387 100644 --- a/service/ec2/api_op_DisableImage.go +++ b/service/ec2/api_op_DisableImage.go @@ -17,10 +17,10 @@ import ( // Sets the AMI state to disabled and removes all launch permissions from the AMI. // A disabled AMI can't be used for instance launches. A disabled AMI can't be -// shared. If a public or shared AMI was previously shared, it is made private. If -// an AMI was shared with an Amazon Web Services account, organization, or -// Organizational Unit, they lose access to the disabled AMI. A disabled AMI does -// not appear in DescribeImages (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) +// shared. If an AMI was public or previously shared, it is made private. If an AMI +// was shared with an Amazon Web Services account, organization, or Organizational +// Unit, they lose access to the disabled AMI. A disabled AMI does not appear in +// DescribeImages (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) // API calls by default. Only the AMI owner can disable an AMI. You can re-enable a // disabled AMI using EnableImage (http://amazonaws.com/AWSEC2/latest/APIReference/API_EnableImage.html) // . For more information, see Disable an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html) diff --git a/service/ec2/api_op_EnableFastLaunch.go b/service/ec2/api_op_EnableFastLaunch.go index 52c2732a267..0e5b579a646 100644 --- a/service/ec2/api_op_EnableFastLaunch.go +++ b/service/ec2/api_op_EnableFastLaunch.go @@ -17,13 +17,14 @@ import ( "time" ) -// When you enable faster launching for a Windows AMI, images are pre-provisioned, -// using snapshots to launch instances up to 65% faster. To create the optimized -// Windows image, Amazon EC2 launches an instance and runs through Sysprep steps, -// rebooting as required. Then it creates a set of reserved snapshots that are used -// for subsequent launches. The reserved snapshots are automatically replenished as -// they are used, depending on your settings for launch frequency. To change these -// settings, you must own the AMI. +// When you enable Windows fast launch for a Windows AMI, images are +// pre-provisioned, using snapshots to launch instances up to 65% faster. To create +// the optimized Windows image, Amazon EC2 launches an instance and runs through +// Sysprep steps, rebooting as required. Then it creates a set of reserved +// snapshots that are used for subsequent launches. The reserved snapshots are +// automatically replenished as they are used, depending on your settings for +// launch frequency. You can only change these settings for Windows AMIs that you +// own or that have been shared with you. func (c *Client) EnableFastLaunch(ctx context.Context, params *EnableFastLaunchInput, optFns ...func(*Options)) (*EnableFastLaunchOutput, error) { if params == nil { params = &EnableFastLaunchInput{} @@ -41,7 +42,7 @@ func (c *Client) EnableFastLaunch(ctx context.Context, params *EnableFastLaunchI type EnableFastLaunchInput struct { - // The ID of the image for which you’re enabling faster launching. + // Specify the ID of the image for which to enable Windows fast launch. // // This member is required. ImageId *string @@ -58,16 +59,16 @@ type EnableFastLaunchInput struct { LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationRequest // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows faster launching. Value must be 6 - // or greater. + // create pre-provisioned snapshots for Windows fast launch. Value must be 6 or + // greater. MaxParallelLaunches *int32 - // The type of resource to use for pre-provisioning the Windows AMI for faster - // launching. Supported values include: snapshot , which is the default value. + // The type of resource to use for pre-provisioning the AMI for Windows fast + // launch. Supported values include: snapshot , which is the default value. ResourceType *string // Configuration settings for creating and managing the snapshots that are used - // for pre-provisioning the Windows AMI for faster launching. The associated + // for pre-provisioning the AMI for Windows fast launch. The associated // ResourceType must be snapshot . SnapshotConfiguration *types.FastLaunchSnapshotConfigurationRequest @@ -76,8 +77,7 @@ type EnableFastLaunchInput struct { type EnableFastLaunchOutput struct { - // The image ID that identifies the Windows AMI for which faster launching was - // enabled. + // The image ID that identifies the AMI for which Windows fast launch was enabled. ImageId *string // The launch template that is used when launching Windows instances from @@ -85,14 +85,14 @@ type EnableFastLaunchOutput struct { LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationResponse // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows faster launching. + // create pre-provisioned snapshots for Windows fast launch. MaxParallelLaunches *int32 - // The owner ID for the Windows AMI for which faster launching was enabled. + // The owner ID for the AMI for which Windows fast launch was enabled. OwnerId *string - // The type of resource that was defined for pre-provisioning the Windows AMI for - // faster launching. + // The type of resource that was defined for pre-provisioning the AMI for Windows + // fast launch. ResourceType types.FastLaunchResourceType // Settings to create and manage the pre-provisioned snapshots that Amazon EC2 @@ -100,13 +100,13 @@ type EnableFastLaunchOutput struct { // the associated resourceType is snapshot . SnapshotConfiguration *types.FastLaunchSnapshotConfigurationResponse - // The current state of faster launching for the specified Windows AMI. + // The current state of Windows fast launch for the specified AMI. State types.FastLaunchStateCode - // The reason that the state changed for faster launching for the Windows AMI. + // The reason that the state changed for Windows fast launch for the AMI. StateTransitionReason *string - // The time that the state changed for faster launching for the Windows AMI. + // The time that the state changed for Windows fast launch for the AMI. StateTransitionTime *time.Time // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_GetCoipPoolUsage.go b/service/ec2/api_op_GetCoipPoolUsage.go index aca067471b8..29210e4aed0 100644 --- a/service/ec2/api_op_GetCoipPoolUsage.go +++ b/service/ec2/api_op_GetCoipPoolUsage.go @@ -75,6 +75,10 @@ type GetCoipPoolUsageOutput struct { // The ID of the local gateway route table. LocalGatewayRouteTableId *string + // The token to use to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go b/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go index 1c8fb6c005a..f2d361fe0b1 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go @@ -69,7 +69,7 @@ type ModifyVerifiedAccessEndpointInput struct { type ModifyVerifiedAccessEndpointOutput struct { - // The Verified Access endpoint details. + // Details about the Verified Access endpoint. VerifiedAccessEndpoint *types.VerifiedAccessEndpoint // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go b/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go index ab43dfbc0e5..4c0eb22fbb7 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go +++ b/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go @@ -56,7 +56,7 @@ type ModifyVerifiedAccessEndpointPolicyInput struct { // The status of the Verified Access policy. PolicyEnabled *bool - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest noSmithyDocumentSerde @@ -70,7 +70,7 @@ type ModifyVerifiedAccessEndpointPolicyOutput struct { // The status of the Verified Access policy. PolicyEnabled *bool - // Describes the options in use for server side encryption. + // The options in use for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationResponse // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVerifiedAccessGroup.go b/service/ec2/api_op_ModifyVerifiedAccessGroup.go index 35b6ef92f6e..5c6eca2434d 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessGroup.go +++ b/service/ec2/api_op_ModifyVerifiedAccessGroup.go @@ -61,7 +61,7 @@ type ModifyVerifiedAccessGroupInput struct { type ModifyVerifiedAccessGroupOutput struct { - // Details of Verified Access group. + // Details about the Verified Access group. VerifiedAccessGroup *types.VerifiedAccessGroup // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go b/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go index ec96cde8163..4016be774ba 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go +++ b/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go @@ -56,7 +56,7 @@ type ModifyVerifiedAccessGroupPolicyInput struct { // The status of the Verified Access policy. PolicyEnabled *bool - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest noSmithyDocumentSerde @@ -70,7 +70,7 @@ type ModifyVerifiedAccessGroupPolicyOutput struct { // The status of the Verified Access policy. PolicyEnabled *bool - // Describes the options in use for server side encryption. + // The options in use for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationResponse // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVerifiedAccessInstance.go b/service/ec2/api_op_ModifyVerifiedAccessInstance.go index b0fcf5f2e52..8c19ef9a897 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessInstance.go +++ b/service/ec2/api_op_ModifyVerifiedAccessInstance.go @@ -59,7 +59,7 @@ type ModifyVerifiedAccessInstanceInput struct { type ModifyVerifiedAccessInstanceOutput struct { - // The ID of the Verified Access instance. + // Details about the Verified Access instance. VerifiedAccessInstance *types.VerifiedAccessInstance // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go b/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go index af68d5a68cf..1ae1bba1667 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go @@ -57,7 +57,7 @@ type ModifyVerifiedAccessTrustProviderInput struct { // The options for an OpenID Connect-compatible user-identity trust provider. OidcOptions *types.ModifyVerifiedAccessTrustProviderOidcOptions - // Options for server side encryption. + // The options for server side encryption. SseSpecification *types.VerifiedAccessSseSpecificationRequest noSmithyDocumentSerde @@ -65,7 +65,7 @@ type ModifyVerifiedAccessTrustProviderInput struct { type ModifyVerifiedAccessTrustProviderOutput struct { - // The ID of the Verified Access trust provider. + // Details about the Verified Access trust provider. VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider // Metadata pertaining to the operation's result. diff --git a/service/ec2/api_op_ModifyVpnTunnelOptions.go b/service/ec2/api_op_ModifyVpnTunnelOptions.go index 33ac85f44f1..6ff483d1080 100644 --- a/service/ec2/api_op_ModifyVpnTunnelOptions.go +++ b/service/ec2/api_op_ModifyVpnTunnelOptions.go @@ -59,7 +59,8 @@ type ModifyVpnTunnelOptionsInput struct { // UnauthorizedOperation . DryRun *bool - // Choose whether or not to trigger immediate tunnel replacement. Valid values: + // Choose whether or not to trigger immediate tunnel replacement. This is only + // applicable when turning on or off EnableTunnelLifecycleControl . Valid values: // True | False SkipTunnelReplacement *bool diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index 8d0559ec83c..d39a800d459 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -23882,6 +23882,97 @@ func awsEc2query_deserializeOpErrorDescribeInstanceStatus(response *smithyhttp.R } } +type awsEc2query_deserializeOpDescribeInstanceTopology struct { +} + +func (*awsEc2query_deserializeOpDescribeInstanceTopology) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpDescribeInstanceTopology) 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, awsEc2query_deserializeOpErrorDescribeInstanceTopology(response, &metadata) + } + output := &DescribeInstanceTopologyOutput{} + 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) + err = awsEc2query_deserializeOpDocumentDescribeInstanceTopologyOutput(&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 awsEc2query_deserializeOpErrorDescribeInstanceTopology(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 := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpDescribeInstanceTypeOfferings struct { } @@ -83931,6 +84022,74 @@ func awsEc2query_deserializeDocumentInstanceRequirements(v **types.InstanceRequi return nil } +func awsEc2query_deserializeDocumentInstanceSet(v *[]types.InstanceTopology, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.InstanceTopology + if *v == nil { + sv = make([]types.InstanceTopology, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.InstanceTopology + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentInstanceTopology(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentInstanceSetUnwrapped(v *[]types.InstanceTopology, decoder smithyxml.NodeDecoder) error { + var sv []types.InstanceTopology + if *v == nil { + sv = make([]types.InstanceTopology, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.InstanceTopology + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentInstanceTopology(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentInstanceState(v **types.InstanceState, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -84912,6 +85071,113 @@ func awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(v **types.I return nil } +func awsEc2query_deserializeDocumentInstanceTopology(v **types.InstanceTopology, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InstanceTopology + if *v == nil { + sv = &types.InstanceTopology{} + } 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("availabilityZone", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AvailabilityZone = ptr.String(xtv) + } + + case strings.EqualFold("groupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = ptr.String(xtv) + } + + case strings.EqualFold("instanceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceId = ptr.String(xtv) + } + + case strings.EqualFold("instanceType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceType = ptr.String(xtv) + } + + case strings.EqualFold("networkNodeSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentNetworkNodesList(&sv.NetworkNodes, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("zoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ZoneId = ptr.String(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_deserializeDocumentInstanceTypeInfo(v **types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -101032,6 +101298,86 @@ func awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressListUnwrappe *v = sv return nil } +func awsEc2query_deserializeDocumentNetworkNodesList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("item", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentNetworkNodesListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentNitroTpmInfo(v **types.NitroTpmInfo, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -147924,6 +148270,61 @@ func awsEc2query_deserializeOpDocumentDescribeInstanceStatusOutput(v **DescribeI return nil } +func awsEc2query_deserializeOpDocumentDescribeInstanceTopologyOutput(v **DescribeInstanceTopologyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeInstanceTopologyOutput + if *v == nil { + sv = &DescribeInstanceTopologyOutput{} + } 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("instanceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentInstanceSet(&sv.Instances, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(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_deserializeOpDocumentDescribeInstanceTypeOfferingsOutput(v **DescribeInstanceTypeOfferingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -156165,6 +156566,19 @@ func awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(v **GetCoipPoolUsag sv.LocalGatewayRouteTableId = ptr.String(xtv) } + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() diff --git a/service/ec2/generated.json b/service/ec2/generated.json index 8b3c81dde7a..c2df6865be1 100644 --- a/service/ec2/generated.json +++ b/service/ec2/generated.json @@ -280,6 +280,7 @@ "api_op_DescribeInstanceEventNotificationAttributes.go", "api_op_DescribeInstanceEventWindows.go", "api_op_DescribeInstanceStatus.go", + "api_op_DescribeInstanceTopology.go", "api_op_DescribeInstanceTypeOfferings.go", "api_op_DescribeInstanceTypes.go", "api_op_DescribeInstances.go", diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index b6ac361ab71..5b435ae9142 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -17233,6 +17233,70 @@ func (m *awsEc2query_serializeOpDescribeInstanceStatus) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDescribeInstanceTopology struct { +} + +func (*awsEc2query_serializeOpDescribeInstanceTopology) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDescribeInstanceTopology) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstanceTopologyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeInstanceTopology") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpDescribeInstanceTypeOfferings struct { } @@ -39932,6 +39996,26 @@ func awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v *types return nil } +func awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v []string, value query.Value) error { + array := value.Array("Member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v []string, value query.Value) error { + array := value.Array("Member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsEc2query_serializeDocumentDestinationOptionsRequest(v *types.DestinationOptionsRequest, value query.Value) error { object := value.Object() _ = object @@ -56167,6 +56251,49 @@ func awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(v *DescribeInsta return nil } +func awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(v *DescribeInstanceTopologyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.Filters != nil { + objectKey := object.FlatKey("Filter") + if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { + return err + } + } + + if v.GroupNames != nil { + objectKey := object.FlatKey("GroupName") + if err := awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v.GroupNames, objectKey); err != nil { + return err + } + } + + if v.InstanceIds != nil { + objectKey := object.FlatKey("InstanceId") + if err := awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v.InstanceIds, objectKey); err != nil { + return err + } + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + return nil +} + func awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(v *DescribeInstanceTypeOfferingsInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 193d698d061..51ef51d1d02 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -6,9 +6,9 @@ type AcceleratorManufacturer string // Enum values for AcceleratorManufacturer const ( - AcceleratorManufacturerNvidia AcceleratorManufacturer = "nvidia" - AcceleratorManufacturerAmd AcceleratorManufacturer = "amd" AcceleratorManufacturerAmazonWebServices AcceleratorManufacturer = "amazon-web-services" + AcceleratorManufacturerAmd AcceleratorManufacturer = "amd" + AcceleratorManufacturerNvidia AcceleratorManufacturer = "nvidia" AcceleratorManufacturerXilinx AcceleratorManufacturer = "xilinx" ) @@ -17,9 +17,9 @@ const ( // ordering of this slice is not guaranteed to be stable across updates. func (AcceleratorManufacturer) Values() []AcceleratorManufacturer { return []AcceleratorManufacturer{ - "nvidia", - "amd", "amazon-web-services", + "amd", + "nvidia", "xilinx", } } @@ -29,14 +29,14 @@ type AcceleratorName string // Enum values for AcceleratorName const ( AcceleratorNameA100 AcceleratorName = "a100" - AcceleratorNameV100 AcceleratorName = "v100" + AcceleratorNameInferentia AcceleratorName = "inferentia" + AcceleratorNameK520 AcceleratorName = "k520" AcceleratorNameK80 AcceleratorName = "k80" - AcceleratorNameT4 AcceleratorName = "t4" AcceleratorNameM60 AcceleratorName = "m60" AcceleratorNameRadeonProV520 AcceleratorName = "radeon-pro-v520" + AcceleratorNameT4 AcceleratorName = "t4" AcceleratorNameVu9p AcceleratorName = "vu9p" - AcceleratorNameInferentia AcceleratorName = "inferentia" - AcceleratorNameK520 AcceleratorName = "k520" + AcceleratorNameV100 AcceleratorName = "v100" ) // Values returns all known values for AcceleratorName. Note that this can be @@ -45,14 +45,14 @@ const ( func (AcceleratorName) Values() []AcceleratorName { return []AcceleratorName{ "a100", - "v100", + "inferentia", + "k520", "k80", - "t4", "m60", "radeon-pro-v520", + "t4", "vu9p", - "inferentia", - "k520", + "v100", } } diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 3abd1b3128f..8a7f11dcf4c 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -2492,41 +2492,40 @@ type DeregisterInstanceTagAttributeRequest struct { noSmithyDocumentSerde } -// Describe details about a fast-launch enabled Windows image that meets the -// requested criteria. Criteria are defined by the DescribeFastLaunchImages action -// filters. +// Describe details about a Windows image with Windows fast launch enabled that +// meets the requested criteria. Criteria are defined by the +// DescribeFastLaunchImages action filters. type DescribeFastLaunchImagesSuccessItem struct { - // The image ID that identifies the fast-launch enabled Windows image. + // The image ID that identifies the Windows fast launch enabled image. ImageId *string - // The launch template that the fast-launch enabled Windows AMI uses when it + // The launch template that the Windows fast launch enabled AMI uses when it // launches Windows instances from pre-provisioned snapshots. LaunchTemplate *FastLaunchLaunchTemplateSpecificationResponse // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows faster launching. + // create pre-provisioned snapshots for Windows fast launch. MaxParallelLaunches *int32 - // The owner ID for the fast-launch enabled Windows AMI. + // The owner ID for the Windows fast launch enabled AMI. OwnerId *string - // The resource type that is used for pre-provisioning the Windows AMI. Supported - // values include: snapshot . + // The resource type that Amazon EC2 uses for pre-provisioning the Windows AMI. + // Supported values include: snapshot . ResourceType FastLaunchResourceType // A group of parameters that are used for pre-provisioning the associated Windows // AMI using snapshots. SnapshotConfiguration *FastLaunchSnapshotConfigurationResponse - // The current state of faster launching for the specified Windows AMI. + // The current state of Windows fast launch for the specified Windows AMI. State FastLaunchStateCode - // The reason that faster launching for the Windows AMI changed to the current - // state. + // The reason that Windows fast launch for the AMI changed to the current state. StateTransitionReason *string - // The time that faster launching for the Windows AMI changed to the current state. + // The time that Windows fast launch for the AMI changed to the current state. StateTransitionTime *time.Time noSmithyDocumentSerde @@ -3876,61 +3875,60 @@ type FailedQueuedPurchaseDeletion struct { noSmithyDocumentSerde } -// Request to create a launch template for a fast-launch enabled Windows AMI. Note +// Request to create a launch template for a Windows fast launch enabled AMI. Note // - You can specify either the LaunchTemplateName or the LaunchTemplateId , but // not both. type FastLaunchLaunchTemplateSpecificationRequest struct { - // The version of the launch template to use for faster launching for a Windows - // AMI. + // Specify the version of the launch template that the AMI should use for Windows + // fast launch. // // This member is required. Version *string - // The ID of the launch template to use for faster launching for a Windows AMI. + // Specify the ID of the launch template that the AMI should use for Windows fast + // launch. LaunchTemplateId *string - // The name of the launch template to use for faster launching for a Windows AMI. + // Specify the name of the launch template that the AMI should use for Windows + // fast launch. LaunchTemplateName *string noSmithyDocumentSerde } -// Identifies the launch template to use for faster launching of the Windows AMI. +// Identifies the launch template that the AMI uses for Windows fast launch. type FastLaunchLaunchTemplateSpecificationResponse struct { - // The ID of the launch template for faster launching of the associated Windows - // AMI. + // The ID of the launch template that the AMI uses for Windows fast launch. LaunchTemplateId *string - // The name of the launch template for faster launching of the associated Windows - // AMI. + // The name of the launch template that the AMI uses for Windows fast launch. LaunchTemplateName *string - // The version of the launch template for faster launching of the associated - // Windows AMI. + // The version of the launch template that the AMI uses for Windows fast launch. Version *string noSmithyDocumentSerde } // Configuration settings for creating and managing pre-provisioned snapshots for -// a fast-launch enabled Windows AMI. +// a Windows fast launch enabled AMI. type FastLaunchSnapshotConfigurationRequest struct { - // The number of pre-provisioned snapshots to keep on hand for a fast-launch - // enabled Windows AMI. + // The number of pre-provisioned snapshots to keep on hand for a Windows fast + // launch enabled AMI. TargetResourceCount *int32 noSmithyDocumentSerde } // Configuration settings for creating and managing pre-provisioned snapshots for -// a fast-launch enabled Windows AMI. +// a Windows fast launch enabled Windows AMI. type FastLaunchSnapshotConfigurationResponse struct { - // The number of pre-provisioned snapshots requested to keep on hand for a - // fast-launch enabled Windows AMI. + // The number of pre-provisioned snapshots requested to keep on hand for a Windows + // fast launch enabled AMI. TargetResourceCount *int32 noSmithyDocumentSerde @@ -7004,6 +7002,32 @@ type InstanceTagNotificationAttribute struct { noSmithyDocumentSerde } +// Information about the instance topology. +type InstanceTopology struct { + + // The name of the Availability Zone or Local Zone that the instance is in. + AvailabilityZone *string + + // The name of the placement group that the instance is in. + GroupName *string + + // The instance ID. + InstanceId *string + + // The instance type. + InstanceType *string + + // The network nodes. The nodes are hashed based on your account. Instances from + // different accounts running under the same droplet will return a different hashed + // list of strings. + NetworkNodes []string + + // The ID of the Availability Zone or Local Zone that the instance is in. + ZoneId *string + + noSmithyDocumentSerde +} + // Describes the instance type. type InstanceTypeInfo struct { @@ -9750,8 +9774,10 @@ type ModifyVpnTunnelOptionsSpecification struct { // restart Default: clear DPDTimeoutAction *string - // The number of seconds after which a DPD timeout occurs. Constraints: A value - // greater than or equal to 30. Default: 30 + // The number of seconds after which a DPD timeout occurs. A DPD timeout of 40 + // seconds means that the VPN endpoint will consider the peer dead 30 seconds after + // the first failed keep-alive. Constraints: A value greater than or equal to 30. + // Default: 40 DPDTimeoutSeconds *int32 // Turn on or off tunnel endpoint lifecycle control feature. @@ -16705,7 +16731,7 @@ type VerifiedAccessEndpoint struct { // The IDs of the security groups for the endpoint. SecurityGroupIds []string - // Describes the options in use for server side encryption. + // The options in use for server side encryption. SseSpecification *VerifiedAccessSseSpecificationResponse // The endpoint status. @@ -16790,7 +16816,7 @@ type VerifiedAccessGroup struct { // The Amazon Web Services account number that owns the group. Owner *string - // Describes the options in use for server side encryption. + // The options in use for server side encryption. SseSpecification *VerifiedAccessSseSpecificationResponse // The tags. @@ -16817,7 +16843,7 @@ type VerifiedAccessInstance struct { // A description for the Amazon Web Services Verified Access instance. Description *string - // Describes whether support for Federal Information Processing Standards (FIPS) + // Indicates whether support for Federal Information Processing Standards (FIPS) // is enabled on the instance. FipsEnabled *bool @@ -16924,13 +16950,13 @@ type VerifiedAccessLogOptions struct { // Sends Verified Access logs to CloudWatch Logs. CloudWatchLogs *VerifiedAccessLogCloudWatchLogsDestinationOptions - // Include trust data sent by trust providers into the logs. + // Indicates whether to include trust data sent by trust providers in the logs. IncludeTrustContext *bool // Sends Verified Access logs to Kinesis. KinesisDataFirehose *VerifiedAccessLogKinesisDataFirehoseDestinationOptions - // The logging version to use. Valid values: ocsf-0.1 | ocsf-1.0.0-rc.2 + // The logging version. Valid values: ocsf-0.1 | ocsf-1.0.0-rc.2 LogVersion *string // Sends Verified Access logs to Amazon S3. @@ -16945,13 +16971,13 @@ type VerifiedAccessLogs struct { // CloudWatch Logs logging destination. CloudWatchLogs *VerifiedAccessLogCloudWatchLogsDestination - // Describes current setting for including trust data into the logs. + // Indicates whether trust data is included in the logs. IncludeTrustContext *bool // Kinesis logging destination. KinesisDataFirehose *VerifiedAccessLogKinesisDataFirehoseDestination - // Describes current setting for the logging version. + // The log version. LogVersion *string // Amazon S3 logging options. @@ -17016,14 +17042,14 @@ type VerifiedAccessSseSpecificationRequest struct { noSmithyDocumentSerde } -// Describes the options in use for server side encryption. +// The options in use for server side encryption. type VerifiedAccessSseSpecificationResponse struct { - // Describes the use of customer managed KMS keys for server side encryption. - // Valid values: True | False + // Indicates whether customer managed KMS keys are in use for server side + // encryption. Valid values: True | False CustomerManagedKeyEnabled *bool - // Describes the ARN of the KMS key. + // The ARN of the KMS key. KmsKeyArn *string noSmithyDocumentSerde @@ -17053,7 +17079,7 @@ type VerifiedAccessTrustProvider struct { // The identifier to be used when working with policy rules. PolicyReferenceName *string - // Describes the options in use for server side encryption. + // The options in use for server side encryption. SseSpecification *VerifiedAccessSseSpecificationResponse // The tags. @@ -17101,7 +17127,8 @@ type VgwTelemetry struct { // The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate. CertificateArn *string - // The date and time of the last change in status. + // The date and time of the last change in status. This field is updated when + // changes in IKE (Phase 1), IPSec (Phase 2), or BGP status are detected. LastStatusChange *time.Time // The Internet-routable IP address of the virtual private gateway's outside diff --git a/service/ecs/api_client.go b/service/ecs/api_client.go index d8d3afeb7af..09430026e4c 100644 --- a/service/ecs/api_client.go +++ b/service/ecs/api_client.go @@ -4,6 +4,7 @@ package ecs import ( "context" + cryptorand "crypto/rand" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -16,6 +17,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -47,6 +49,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -101,6 +105,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger @@ -442,6 +450,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -480,6 +495,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index e21dfcfe62b..d61434b5fef 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -130,7 +130,8 @@ type CreateServiceInput struct { CapacityProviderStrategy []types.CapacityProviderStrategyItem // An identifier that you provide to ensure the idempotency of the request. It - // must be unique and is case sensitive. Up to 32 ASCII characters are allowed. + // must be unique and is case sensitive. Up to 36 ASCII characters in the range of + // 33-126 (inclusive) are allowed. ClientToken *string // The short name or full Amazon Resource Name (ARN) of the cluster that you run diff --git a/service/ecs/api_op_CreateTaskSet.go b/service/ecs/api_op_CreateTaskSet.go index bcc6e8f61ca..252fc405952 100644 --- a/service/ecs/api_op_CreateTaskSet.go +++ b/service/ecs/api_op_CreateTaskSet.go @@ -74,9 +74,9 @@ type CreateTaskSetInput struct { // cluster is created. CapacityProviderStrategy []types.CapacityProviderStrategyItem - // The identifier that you provide to ensure the idempotency of the request. It's - // case sensitive and must be unique. It can be up to 32 ASCII characters are - // allowed. + // An identifier that you provide to ensure the idempotency of the request. It + // must be unique and is case sensitive. Up to 36 ASCII characters in the range of + // 33-126 (inclusive) are allowed. ClientToken *string // An optional non-unique tag that identifies this task set in external systems. diff --git a/service/ecs/api_op_RunTask.go b/service/ecs/api_op_RunTask.go index 9ad447be169..f32750486e2 100644 --- a/service/ecs/api_op_RunTask.go +++ b/service/ecs/api_op_RunTask.go @@ -91,6 +91,13 @@ type RunTaskInput struct { // capacity provider strategy may contain a maximum of 6 capacity providers. CapacityProviderStrategy []types.CapacityProviderStrategyItem + // An identifier that you provide to ensure the idempotency of the request. It + // must be unique and is case sensitive. Up to 64 characters are allowed. The valid + // characters are characters in the range of 33-126, inclusive. For more + // information, see Ensuring idempotency (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html) + // . + ClientToken *string + // The short name or full Amazon Resource Name (ARN) of the cluster to run your // task on. If you do not specify a cluster, the default cluster is assumed. Cluster *string @@ -176,7 +183,7 @@ type RunTaskInput struct { // automatically trigger a task to run a batch process job, you could apply a // unique identifier for that job to your task with the startedBy parameter. You // can then identify which tasks belong to that job by filtering the results of a - // ListTasks call with the startedBy value. Up to 36 letters (uppercase and + // ListTasks call with the startedBy value. Up to 128 letters (uppercase and // lowercase), numbers, hyphens (-), and underscores (_) are allowed. If a task is // started by an Amazon ECS service, then the startedBy parameter contains the // deployment ID of the service that starts it. @@ -270,6 +277,9 @@ func (c *Client) addOperationRunTaskMiddlewares(stack *middleware.Stack, options if err = addRunTaskResolveEndpointMiddleware(stack, options); err != nil { return err } + if err = addIdempotencyToken_opRunTaskMiddleware(stack, options); err != nil { + return err + } if err = addOpRunTaskValidationMiddleware(stack); err != nil { return err } @@ -294,6 +304,39 @@ func (c *Client) addOperationRunTaskMiddlewares(stack *middleware.Stack, options return nil } +type idempotencyToken_initializeOpRunTask struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRunTask) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRunTask) 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.(*RunTaskInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RunTaskInput ") + } + + 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_opRunTaskMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRunTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opRunTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/deserializers.go b/service/ecs/deserializers.go index b4556b0080a..7dffa04a755 100644 --- a/service/ecs/deserializers.go +++ b/service/ecs/deserializers.go @@ -4858,6 +4858,9 @@ func awsAwsjson11_deserializeOpErrorRunTask(response *smithyhttp.Response, metad case strings.EqualFold("ClusterNotFoundException", errorCode): return awsAwsjson11_deserializeErrorClusterNotFoundException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -7152,6 +7155,41 @@ func awsAwsjson11_deserializeErrorClusterNotFoundException(response *smithyhttp. return output } +func awsAwsjson11_deserializeErrorConflictException(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.ConflictException{} + err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9011,6 +9049,51 @@ func awsAwsjson11_deserializeDocumentCompatibilityList(v *[]types.Compatibility, return nil } +func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, 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.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } 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 "resourceIds": + if err := awsAwsjson11_deserializeDocumentResourceIds(&sv.ResourceIds, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentContainer(v **types.Container, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13814,6 +13897,42 @@ func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interfac return nil } +func awsAwsjson11_deserializeDocumentResourceIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ecs/serializers.go b/service/ecs/serializers.go index 487002c9cd9..0f74e9a1304 100644 --- a/service/ecs/serializers.go +++ b/service/ecs/serializers.go @@ -6849,6 +6849,11 @@ func awsAwsjson11_serializeOpDocumentRunTaskInput(v *RunTaskInput, value smithyj } } + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + if v.Cluster != nil { ok := object.Key("cluster") ok.String(*v.Cluster) diff --git a/service/ecs/types/errors.go b/service/ecs/types/errors.go index be03e583674..88a82117767 100644 --- a/service/ecs/types/errors.go +++ b/service/ecs/types/errors.go @@ -90,7 +90,7 @@ func (e *BlockedException) ErrorFault() smithy.ErrorFault { return smithy.FaultC // These errors are usually caused by a client action. This client action might be // using an action or resource on behalf of a user that doesn't have permissions to -// use the action or resource,. Or, it might be specifying an identifier that isn't +// use the action or resource. Or, it might be specifying an identifier that isn't // valid. type ClientException struct { Message *string @@ -228,6 +228,39 @@ func (e *ClusterNotFoundException) ErrorCode() string { } func (e *ClusterNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The RunTask request could not be processed due to conflicts. The provided +// clientToken is already in use with a different RunTask request. The resourceIds +// are the existing task ARNs which are already associated with the clientToken . +// To fix this issue: +// - Run RunTask with a unique clientToken . +// - Run RunTask with the clientToken and the original set of parameters +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + ResourceIds []string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The specified parameter isn't valid. Review the available parameters for the // API request. type InvalidParameterException struct { diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index c98a0d00ed2..8f88031606d 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -2617,12 +2617,14 @@ type PortMapping struct { // Connect proxy. If you set this parameter, Amazon ECS adds protocol-specific // telemetry in the Amazon ECS console and CloudWatch. If you don't set a value for // this parameter, then TCP is used. However, Amazon ECS doesn't add - // protocol-specific telemetry for TCP. Tasks that run in a namespace can use short - // names to connect to services in the namespace. Tasks can connect to services - // across all of the clusters in the namespace. Tasks connect through a managed - // proxy container that collects logs and metrics for increased visibility. Only - // the tasks that Amazon ECS services create are supported with Service Connect. - // For more information, see Service Connect (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) + // protocol-specific telemetry for TCP. appProtocol is immutable in a Service + // Connect service. Updating this field requires a service deletion and + // redeployment. Tasks that run in a namespace can use short names to connect to + // services in the namespace. Tasks can connect to services across all of the + // clusters in the namespace. Tasks connect through a managed proxy container that + // collects logs and metrics for increased visibility. Only the tasks that Amazon + // ECS services create are supported with Service Connect. For more information, + // see Service Connect (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) // in the Amazon Elastic Container Service Developer Guide. AppProtocol ApplicationProtocol @@ -2710,7 +2712,8 @@ type PortMapping struct { Name *string // The protocol used for the port mapping. Valid values are tcp and udp . The - // default is tcp . + // default is tcp . protocol is immutable in a Service Connect service. Updating + // this field requires a service deletion and redeployment. Protocol TransportProtocol noSmithyDocumentSerde diff --git a/service/emr/api_op_GetClusterSessionCredentials.go b/service/emr/api_op_GetClusterSessionCredentials.go index 8dc4d149d58..b63f3225fa3 100644 --- a/service/emr/api_op_GetClusterSessionCredentials.go +++ b/service/emr/api_op_GetClusterSessionCredentials.go @@ -47,8 +47,6 @@ type GetClusterSessionCredentialsInput struct { // submission on the cluster. The runtime role can be a cross-account IAM role. The // runtime role ARN is a combination of account ID, role name, and role type using // the following format: arn:partition:service:region:account:resource . - // - // This member is required. ExecutionRoleArn *string noSmithyDocumentSerde diff --git a/service/emr/validators.go b/service/emr/validators.go index 5dcdffa954b..aaae32e8231 100644 --- a/service/emr/validators.go +++ b/service/emr/validators.go @@ -2230,9 +2230,6 @@ func validateOpGetClusterSessionCredentialsInput(v *GetClusterSessionCredentials if v.ClusterId == nil { invalidParams.Add(smithy.NewErrParamRequired("ClusterId")) } - if v.ExecutionRoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExecutionRoleArn")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/servicecatalogappregistry/api_op_AssociateResource.go b/service/servicecatalogappregistry/api_op_AssociateResource.go index 5ec3e3a22af..466a05ff136 100644 --- a/service/servicecatalogappregistry/api_op_AssociateResource.go +++ b/service/servicecatalogappregistry/api_op_AssociateResource.go @@ -17,7 +17,24 @@ import ( ) // Associates a resource with an application. The resource can be specified by its -// ARN or name. The application can be specified by ARN, ID, or name. +// ARN or name. The application can be specified by ARN, ID, or name. Minimum +// permissions You must have the following permissions to associate a resource +// using the OPTIONS parameter set to APPLY_APPLICATION_TAG . +// - tag:GetResources +// - tag:TagResources +// +// You must also have these additional permissions if you don't use the +// AWSServiceCatalogAppRegistryFullAccess policy. For more information, see +// AWSServiceCatalogAppRegistryFullAccess (https://docs.aws.amazon.com/servicecatalog/latest/arguide/full.html) +// in the AppRegistry Administrator Guide. +// - resource-groups:DisassociateResource +// - cloudformation:UpdateStack +// - cloudformation:DescribeStacks +// +// In addition, you must have the tagging permission defined by the Amazon Web +// Services service that creates the resource. For more information, see +// TagResources (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html) +// in the Resource Groups Tagging API Reference. func (c *Client) AssociateResource(ctx context.Context, params *AssociateResourceInput, optFns ...func(*Options)) (*AssociateResourceOutput, error) { if params == nil { params = &AssociateResourceInput{} @@ -50,6 +67,9 @@ type AssociateResourceInput struct { // This member is required. ResourceType types.ResourceType + // Determines whether an application tag is applied or skipped. + Options []types.AssociationOption + noSmithyDocumentSerde } @@ -59,6 +79,9 @@ type AssociateResourceOutput struct { // attributes. ApplicationArn *string + // Determines whether an application tag is applied or skipped. + Options []types.AssociationOption + // The Amazon resource name (ARN) that specifies the resource. ResourceArn *string diff --git a/service/servicecatalogappregistry/api_op_DisassociateResource.go b/service/servicecatalogappregistry/api_op_DisassociateResource.go index 0330662dc16..cab735ab4a5 100644 --- a/service/servicecatalogappregistry/api_op_DisassociateResource.go +++ b/service/servicecatalogappregistry/api_op_DisassociateResource.go @@ -17,7 +17,25 @@ import ( ) // Disassociates a resource from application. Both the resource and the -// application can be specified either by ID or name. +// application can be specified either by ID or name. Minimum permissions You must +// have the following permissions to remove a resource that's been associated with +// an application using the APPLY_APPLICATION_TAG option for AssociateResource (https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_AssociateResource.html) +// . +// - tag:GetResources +// - tag:UntagResources +// +// You must also have the following permissions if you don't use the +// AWSServiceCatalogAppRegistryFullAccess policy. For more information, see +// AWSServiceCatalogAppRegistryFullAccess (https://docs.aws.amazon.com/servicecatalog/latest/arguide/full.html) +// in the AppRegistry Administrator Guide. +// - resource-groups:DisassociateResource +// - cloudformation:UpdateStack +// - cloudformation:DescribeStacks +// +// In addition, you must have the tagging permission defined by the Amazon Web +// Services service that creates the resource. For more information, see +// UntagResources (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_UntTagResources.html) +// in the Resource Groups Tagging API Reference. func (c *Client) DisassociateResource(ctx context.Context, params *DisassociateResourceInput, optFns ...func(*Options)) (*DisassociateResourceOutput, error) { if params == nil { params = &DisassociateResourceInput{} diff --git a/service/servicecatalogappregistry/api_op_GetApplication.go b/service/servicecatalogappregistry/api_op_GetApplication.go index 8f1e25c1424..ab3e823ca48 100644 --- a/service/servicecatalogappregistry/api_op_GetApplication.go +++ b/service/servicecatalogappregistry/api_op_GetApplication.go @@ -49,6 +49,9 @@ type GetApplicationInput struct { type GetApplicationOutput struct { + // A key-value pair that identifies an associated resource. + ApplicationTag map[string]string + // The Amazon resource name (ARN) that specifies the application across services. Arn *string diff --git a/service/servicecatalogappregistry/api_op_GetAssociatedResource.go b/service/servicecatalogappregistry/api_op_GetAssociatedResource.go index ba950cf8ec5..c4f4e8eb457 100644 --- a/service/servicecatalogappregistry/api_op_GetAssociatedResource.go +++ b/service/servicecatalogappregistry/api_op_GetAssociatedResource.go @@ -49,11 +49,29 @@ type GetAssociatedResourceInput struct { // This member is required. ResourceType types.ResourceType + // The maximum number of results to return. If the parameter is omitted, it + // defaults to 25. The value is optional. + MaxResults *int32 + + // A unique pagination token for each page of results. Make the call again with + // the returned token to retrieve the next page of results. + NextToken *string + + // States whether an application tag is applied, not applied, in the process of + // being applied, or skipped. + ResourceTagStatus []types.ResourceItemStatus + noSmithyDocumentSerde } type GetAssociatedResourceOutput struct { + // The result of the application that's tag applied to a resource. + ApplicationTagResult *types.ApplicationTagResult + + // Determines whether an application tag is applied or skipped. + Options []types.AssociationOption + // The resource associated with the application. Resource *types.Resource diff --git a/service/servicecatalogappregistry/deserializers.go b/service/servicecatalogappregistry/deserializers.go index 3dc3173e06c..f0a0c8ce184 100644 --- a/service/servicecatalogappregistry/deserializers.go +++ b/service/servicecatalogappregistry/deserializers.go @@ -349,6 +349,11 @@ func awsRestjson1_deserializeOpDocumentAssociateResourceOutput(v **AssociateReso sv.ApplicationArn = ptr.String(jtv) } + case "options": + if err := awsRestjson1_deserializeDocumentOptions(&sv.Options, value); err != nil { + return err + } + case "resourceArn": if value != nil { jtv, ok := value.(string) @@ -1465,6 +1470,11 @@ func awsRestjson1_deserializeOpDocumentGetApplicationOutput(v **GetApplicationOu for key, value := range shape { switch key { + case "applicationTag": + if err := awsRestjson1_deserializeDocumentApplicationTagDefinition(&sv.ApplicationTag, value); err != nil { + return err + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -1698,6 +1708,16 @@ func awsRestjson1_deserializeOpDocumentGetAssociatedResourceOutput(v **GetAssoci for key, value := range shape { switch key { + case "applicationTagResult": + if err := awsRestjson1_deserializeDocumentApplicationTagResult(&sv.ApplicationTagResult, value); err != nil { + return err + } + + case "options": + if err := awsRestjson1_deserializeDocumentOptions(&sv.Options, value); err != nil { + return err + } + case "resource": if err := awsRestjson1_deserializeDocumentResource(&sv.Resource, value); err != nil { return err @@ -4059,6 +4079,11 @@ func awsRestjson1_deserializeDocumentApplication(v **types.Application, value in for key, value := range shape { switch key { + case "applicationTag": + if err := awsRestjson1_deserializeDocumentApplicationTagDefinition(&sv.ApplicationTag, value); err != nil { + return err + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -4262,6 +4287,105 @@ func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSum return nil } +func awsRestjson1_deserializeDocumentApplicationTagDefinition(v *map[string]string, 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 mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationTagResult(v **types.ApplicationTagResult, 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.ApplicationTagResult + if *v == nil { + sv = &types.ApplicationTagResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationTagStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationTagStatus to be of type string, got %T instead", value) + } + sv.ApplicationTagStatus = types.ApplicationTagStatus(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resources": + if err := awsRestjson1_deserializeDocumentResourcesList(&sv.Resources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAppRegistryConfiguration(v **types.AppRegistryConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4731,6 +4855,11 @@ func awsRestjson1_deserializeDocumentIntegrations(v **types.Integrations, value for key, value := range shape { switch key { + case "applicationTagResourceGroup": + if err := awsRestjson1_deserializeDocumentResourceGroup(&sv.ApplicationTagResourceGroup, value); err != nil { + return err + } + case "resourceGroup": if err := awsRestjson1_deserializeDocumentResourceGroup(&sv.ResourceGroup, value); err != nil { return err @@ -4785,6 +4914,42 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentOptions(v *[]types.AssociationOption, 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.AssociationOption + if *v == nil { + cv = []types.AssociationOption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationOption + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationOption to be of type string, got %T instead", value) + } + col = types.AssociationOption(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4811,7 +4976,7 @@ func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StackArn to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -4990,6 +5155,11 @@ func awsRestjson1_deserializeDocumentResourceInfo(v **types.ResourceInfo, value sv.Name = ptr.String(jtv) } + case "options": + if err := awsRestjson1_deserializeDocumentOptions(&sv.Options, value); err != nil { + return err + } + case "resourceDetails": if err := awsRestjson1_deserializeDocumentResourceDetails(&sv.ResourceDetails, value); err != nil { return err @@ -5123,6 +5293,107 @@ func awsRestjson1_deserializeDocumentResources(v *[]types.ResourceInfo, value in return nil } +func awsRestjson1_deserializeDocumentResourcesList(v *[]types.ResourcesListItem, 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.ResourcesListItem + if *v == nil { + cv = []types.ResourcesListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourcesListItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourcesListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourcesListItem(v **types.ResourcesListItem, 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.ResourcesListItem + if *v == nil { + sv = &types.ResourcesListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourcesListItemErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceItemType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/servicecatalogappregistry/endpoints_test.go b/service/servicecatalogappregistry/endpoints_test.go index c0a0a2d4af4..1346f6e6c73 100644 --- a/service/servicecatalogappregistry/endpoints_test.go +++ b/service/servicecatalogappregistry/endpoints_test.go @@ -1868,3 +1868,23 @@ func TestEndpointCase50(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Partition doesn't support DualStack +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/servicecatalogappregistry/serializers.go b/service/servicecatalogappregistry/serializers.go index 8099c42748c..ad4b6d86f70 100644 --- a/service/servicecatalogappregistry/serializers.go +++ b/service/servicecatalogappregistry/serializers.go @@ -129,6 +129,17 @@ func (m *awsRestjson1_serializeOpAssociateResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAssociateResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -171,6 +182,20 @@ func awsRestjson1_serializeOpHttpBindingsAssociateResourceInput(v *AssociateReso return nil } +func awsRestjson1_serializeOpDocumentAssociateResourceInput(v *AssociateResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Options != nil { + ok := object.Key("options") + if err := awsRestjson1_serializeDocumentOptions(v.Options, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateApplication struct { } @@ -774,6 +799,14 @@ func awsRestjson1_serializeOpHttpBindingsGetAssociatedResourceInput(v *GetAssoci } } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + if v.Resource == nil || len(*v.Resource) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resource must not be empty")} } @@ -783,6 +816,12 @@ func awsRestjson1_serializeOpHttpBindingsGetAssociatedResourceInput(v *GetAssoci } } + if v.ResourceTagStatus != nil { + for i := range v.ResourceTagStatus { + encoder.AddQuery("resourceTagStatus").String(string(v.ResourceTagStatus[i])) + } + } + if len(v.ResourceType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceType must not be empty")} } @@ -1841,6 +1880,17 @@ func awsRestjson1_serializeDocumentAppRegistryConfiguration(v *types.AppRegistry return nil } +func awsRestjson1_serializeDocumentOptions(v []types.AssociationOption, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentTagQueryConfiguration(v *types.TagQueryConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/servicecatalogappregistry/types/enums.go b/service/servicecatalogappregistry/types/enums.go index a6d72035d4b..a1c07328114 100644 --- a/service/servicecatalogappregistry/types/enums.go +++ b/service/servicecatalogappregistry/types/enums.go @@ -2,6 +2,44 @@ package types +type ApplicationTagStatus string + +// Enum values for ApplicationTagStatus +const ( + ApplicationTagStatusInProgress ApplicationTagStatus = "IN_PROGRESS" + ApplicationTagStatusSuccess ApplicationTagStatus = "SUCCESS" + ApplicationTagStatusFailure ApplicationTagStatus = "FAILURE" +) + +// Values returns all known values for ApplicationTagStatus. 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 (ApplicationTagStatus) Values() []ApplicationTagStatus { + return []ApplicationTagStatus{ + "IN_PROGRESS", + "SUCCESS", + "FAILURE", + } +} + +type AssociationOption string + +// Enum values for AssociationOption +const ( + AssociationOptionApplyApplicationTag AssociationOption = "APPLY_APPLICATION_TAG" + AssociationOptionSkipApplicationTag AssociationOption = "SKIP_APPLICATION_TAG" +) + +// Values returns all known values for AssociationOption. 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 (AssociationOption) Values() []AssociationOption { + return []AssociationOption{ + "APPLY_APPLICATION_TAG", + "SKIP_APPLICATION_TAG", + } +} + type ResourceGroupState string // Enum values for ResourceGroupState @@ -28,6 +66,28 @@ func (ResourceGroupState) Values() []ResourceGroupState { } } +type ResourceItemStatus string + +// Enum values for ResourceItemStatus +const ( + ResourceItemStatusSuccess ResourceItemStatus = "SUCCESS" + ResourceItemStatusFailed ResourceItemStatus = "FAILED" + ResourceItemStatusInProgress ResourceItemStatus = "IN_PROGRESS" + ResourceItemStatusSkipped ResourceItemStatus = "SKIPPED" +) + +// Values returns all known values for ResourceItemStatus. 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 (ResourceItemStatus) Values() []ResourceItemStatus { + return []ResourceItemStatus{ + "SUCCESS", + "FAILED", + "IN_PROGRESS", + "SKIPPED", + } +} + type ResourceType string // Enum values for ResourceType diff --git a/service/servicecatalogappregistry/types/types.go b/service/servicecatalogappregistry/types/types.go index 068b66eac14..25646ffb600 100644 --- a/service/servicecatalogappregistry/types/types.go +++ b/service/servicecatalogappregistry/types/types.go @@ -11,6 +11,9 @@ import ( // is the top-level node in a hierarchy of related cloud resource abstractions. type Application struct { + // A key-value pair that identifies an associated resource. + ApplicationTag map[string]string + // The Amazon resource name (ARN) that specifies the application across services. Arn *string @@ -63,6 +66,26 @@ type ApplicationSummary struct { noSmithyDocumentSerde } +// The result of the application tag that's applied to a resource. +type ApplicationTagResult struct { + + // The application tag is in the process of being applied to a resource, was + // successfully applied to a resource, or failed to apply to a resource. + ApplicationTagStatus ApplicationTagStatus + + // The message returned if the call fails. + ErrorMessage *string + + // A unique pagination token for each page of results. Make the call again with + // the returned token to retrieve the next page of results. + NextToken *string + + // The resources associated with an application + Resources []ResourcesListItem + + noSmithyDocumentSerde +} + // Includes all of the AppRegistry settings. type AppRegistryConfiguration struct { @@ -117,9 +140,6 @@ type AttributeGroupDetails struct { // This field is no longer supported. We recommend you don't use the field when // using ListAttributeGroupsForApplication . The name of the attribute group. - // - // Deprecated: This field is deprecated. We recommend not using the field when - // using ListAttributeGroupsForApplication. Name *string noSmithyDocumentSerde @@ -158,6 +178,9 @@ type AttributeGroupSummary struct { // The information about the service integration. type Integrations struct { + // The information about the resource group integration. + ApplicationTagResourceGroup *ResourceGroup + // The information about the resource group integration. ResourceGroup *ResourceGroup @@ -221,6 +244,9 @@ type ResourceInfo struct { // The name of the resource. Name *string + // Determines whether an application tag is applied or skipped. + Options []AssociationOption + // The details related to the resource. ResourceDetails *ResourceDetails @@ -239,6 +265,24 @@ type ResourceIntegrations struct { noSmithyDocumentSerde } +// The resource in a list of resources. +type ResourcesListItem struct { + + // The message returned if the call fails. + ErrorMessage *string + + // The Amazon resource name (ARN) of the resource. + ResourceArn *string + + // Provides information about the AppRegistry resource type. + ResourceType *string + + // The status of the list item. + Status *string + + noSmithyDocumentSerde +} + // The definition of tagQuery . Specifies which resources are associated with an // application. type TagQueryConfiguration struct { diff --git a/service/transcribestreaming/api_op_StartStreamTranscription.go b/service/transcribestreaming/api_op_StartStreamTranscription.go index d7697dbddb7..29b709e2a22 100644 --- a/service/transcribestreaming/api_op_StartStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartStreamTranscription.go @@ -23,7 +23,7 @@ import ( // Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to // Amazon Transcribe and the transcription results are streamed to your // application. The following parameters are required: -// - language-code or identify-language +// - language-code or identify-language or identify-multiple-language // - media-encoding // - sample-rate // @@ -109,11 +109,26 @@ type StartStreamTranscriptionInput struct { // omit this parameter. If you have multi-channel audio that contains different // languages on each channel, and you've enabled channel identification, automatic // language identification identifies the dominant language on each audio channel. - // Note that you must include either LanguageCode or IdentifyLanguage in your - // request. If you include both parameters, your request fails. Streaming language - // identification can't be combined with custom language models or redaction. + // Note that you must include either LanguageCode or IdentifyLanguage or + // IdentifyMultipleLanguages in your request. If you include more than one of these + // parameters, your transcription job fails. Streaming language identification + // can't be combined with custom language models or redaction. IdentifyLanguage bool + // Enables automatic multi-language identification in your transcription job + // request. Use this parameter if your stream contains more than one language. If + // your stream contains only one language, use IdentifyLanguage instead. If you + // include IdentifyMultipleLanguages , you can optionally include a list of + // language codes, using LanguageOptions , that you think may be present in your + // stream. Including LanguageOptions restricts IdentifyMultipleLanguages to only + // the language options that you specify, which can improve transcription accuracy. + // If you want to apply a custom vocabulary or a custom vocabulary filter to your + // automatic multiple language identification request, include VocabularyNames or + // VocabularyFilterNames . Note that you must include one of LanguageCode , + // IdentifyLanguage , or IdentifyMultipleLanguages in your request. If you include + // more than one of these parameters, your transcription job fails. + IdentifyMultipleLanguages bool + // Specify the language code that represents the language spoken in your audio. If // you're unsure of the language spoken in your audio, consider using // IdentifyLanguage to enable automatic language identification. For a list of @@ -250,6 +265,10 @@ type StartStreamTranscriptionOutput struct { // transcription. IdentifyLanguage bool + // Shows whether automatic multi-language identification was enabled for your + // transcription. + IdentifyMultipleLanguages bool + // Provides the language code that you specified in your request. LanguageCode types.LanguageCode diff --git a/service/transcribestreaming/deserializers.go b/service/transcribestreaming/deserializers.go index ab107ffabeb..4f6fa311e36 100644 --- a/service/transcribestreaming/deserializers.go +++ b/service/transcribestreaming/deserializers.go @@ -534,6 +534,15 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta v.IdentifyLanguage = vv } + if headerValues := response.Header.Values("x-amzn-transcribe-identify-multiple-languages"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.IdentifyMultipleLanguages = vv + } + if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.LanguageCode = types.LanguageCode(headerValues[0]) diff --git a/service/transcribestreaming/endpoints.go b/service/transcribestreaming/endpoints.go index 632977491a6..ffceb3e356b 100644 --- a/service/transcribestreaming/endpoints.go +++ b/service/transcribestreaming/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://transcribestreaming-fips.") diff --git a/service/transcribestreaming/serializers.go b/service/transcribestreaming/serializers.go index 41daa49b8e9..8bf1d521d97 100644 --- a/service/transcribestreaming/serializers.go +++ b/service/transcribestreaming/serializers.go @@ -331,6 +331,11 @@ func awsRestjson1_serializeOpHttpBindingsStartStreamTranscriptionInput(v *StartS encoder.SetHeader(locationName).Boolean(v.IdentifyLanguage) } + if v.IdentifyMultipleLanguages { + locationName := "X-Amzn-Transcribe-Identify-Multiple-Languages" + encoder.SetHeader(locationName).Boolean(v.IdentifyMultipleLanguages) + } + if len(v.LanguageCode) > 0 { locationName := "X-Amzn-Transcribe-Language-Code" encoder.SetHeader(locationName).String(string(v.LanguageCode))