diff --git a/CHANGELOG.md b/CHANGELOG.md index 11d043c461f..57cdbe7aafe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,41 @@ +# Release (2024-06-06) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.17.0](service/account/CHANGELOG.md#v1170-2024-06-06) + * **Feature**: This release adds 3 new APIs (AcceptPrimaryEmailUpdate, GetPrimaryEmail, and StartPrimaryEmailUpdate) used to centrally manage the root user email address of member accounts within an AWS organization. +* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.29.0](service/firehose/CHANGELOG.md#v1290-2024-06-06) + * **Feature**: Adds integration with Secrets Manager for Redshift, Splunk, HttpEndpoint, and Snowflake destinations +* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.44.0](service/fsx/CHANGELOG.md#v1440-2024-06-06) + * **Feature**: This release adds support to increase metadata performance on FSx for Lustre file systems beyond the default level provisioned when a file system is created. This can be done by specifying MetadataConfiguration during the creation of Persistent_2 file systems or by updating it on demand. +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.84.0](service/glue/CHANGELOG.md#v1840-2024-06-06) + * **Feature**: This release adds support for creating and updating Glue Data Catalog Views. +* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.39.0](service/iotwireless/CHANGELOG.md#v1390-2024-06-06) + * **Feature**: Adds support for wireless device to be in Conflict FUOTA Device Status due to a FUOTA Task, so it couldn't be attached to a new one. +* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.38.0](service/location/CHANGELOG.md#v1380-2024-06-06) + * **Feature**: Added two new APIs, VerifyDevicePosition and ForecastGeofenceEvents. Added support for putting larger geofences up to 100,000 vertices with Geobuf fields. +* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.29.10](service/sns/CHANGELOG.md#v12910-2024-06-06) + * **Documentation**: Doc-only update for SNS. These changes include customer-reported issues and TXC3 updates. +* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.32.5](service/sqs/CHANGELOG.md#v1325-2024-06-06) + * **Documentation**: Doc only updates for SQS. These updates include customer-reported issues and TCX3 modifications. +* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.29.0](service/storagegateway/CHANGELOG.md#v1290-2024-06-06) + * **Feature**: Adds SoftwareUpdatePreferences to DescribeMaintenanceStartTime and UpdateMaintenanceStartTime, a structure which contains AutomaticUpdatePolicy. + +# Release (2024-06-05) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.14.0](feature/dynamodb/attributevalue/CHANGELOG.md#v1140-2024-06-05) + * **Feature**: Add codec options to use encoding.Text/Binary(Un)Marshaler when present on targets. +* `github.com/aws/aws-sdk-go-v2/service/globalaccelerator`: [v1.24.0](service/globalaccelerator/CHANGELOG.md#v1240-2024-06-05) + * **Feature**: This release contains a new optional ip-addresses input field for the update accelerator and update custom routing accelerator apis. This input enables consumers to replace IPv4 addresses on existing accelerators with addresses provided in the input. +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.83.0](service/glue/CHANGELOG.md#v1830-2024-06-05) + * **Feature**: AWS Glue now supports native SaaS connectivity: Salesforce connector available now +* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.55.0](service/s3/CHANGELOG.md#v1550-2024-06-05) + * **Feature**: Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality. + * **Bug Fix**: Add S3-specific smithy protocol tests. + # Release (2024-06-04) ## Module Highlights diff --git a/codegen/sdk-codegen/aws-models/account.json b/codegen/sdk-codegen/aws-models/account.json index 814604516d5..95a0177d57b 100644 --- a/codegen/sdk-codegen/aws-models/account.json +++ b/codegen/sdk-codegen/aws-models/account.json @@ -1,6 +1,86 @@ { "smithy": "2.0", "shapes": { + "com.amazonaws.account#AcceptPrimaryEmailUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdateRequest" + }, + "output": { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#ConflictException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known\n as the root user email address) for the specified account.

", + "smithy.api#http": { + "uri": "/acceptPrimaryEmailUpdate", + "method": "POST", + "code": 200 + } + } + }, + "com.amazonaws.account#AcceptPrimaryEmailUpdateRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + }, + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

The new primary email address for use with the specified account. This must\n match the PrimaryEmail from the StartPrimaryEmailUpdate API\n call.

", + "smithy.api#required": {} + } + }, + "Otp": { + "target": "com.amazonaws.account#Otp", + "traits": { + "smithy.api#documentation": "

The OTP code sent to the PrimaryEmail specified on the\n StartPrimaryEmailUpdate API call.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#AcceptPrimaryEmailUpdateResponse": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.account#PrimaryEmailUpdateStatus", + "traits": { + "smithy.api#documentation": "

Retrieves the status of the accepted primary email update request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.account#AccessDeniedException": { "type": "structure", "members": { @@ -27,6 +107,9 @@ { "target": "com.amazonaws.account#ContactInformationResource" }, + { + "target": "com.amazonaws.account#PrimaryEmailResource" + }, { "target": "com.amazonaws.account#RegionOptResource" } @@ -94,7 +177,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -137,7 +219,8 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -150,7 +233,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -164,7 +246,6 @@ "assign": "PartitionResult" } ], - "type": "tree", "rules": [ { "conditions": [ @@ -289,7 +370,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -324,7 +404,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -335,14 +414,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -356,14 +437,12 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { "fn": "getAttr", "argv": [ @@ -372,11 +451,11 @@ }, "supportsFIPS" ] - } + }, + true ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -387,14 +466,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -408,7 +489,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -428,7 +508,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -439,14 +518,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [], @@ -457,9 +538,11 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" } - ] + ], + "type": "tree" }, { "conditions": [], @@ -1016,7 +1099,7 @@ "StateOrRegion": { "target": "com.amazonaws.account#StateOrRegion", "traits": { - "smithy.api#documentation": "

The state or region of the primary contact address. This field is required in selected countries.

" + "smithy.api#documentation": "

The state or region of the primary contact address. If the mailing address is within the United States (US), the\n value in this field can be either a two character state code (for example, NJ) or the full state name\n (for example, New Jersey). This field is required in the following countries: US,\n CA, GB, DE, JP, IN,\n and BR.

" } }, "DistrictOrCounty": { @@ -1042,14 +1125,14 @@ "PhoneNumber": { "target": "com.amazonaws.account#ContactInformationPhoneNumber", "traits": { - "smithy.api#documentation": "

The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.

", + "smithy.api#documentation": "

The phone number of the primary contact information. The number will be validated and,\n in some countries, checked for activation.

", "smithy.api#required": {} } }, "CompanyName": { "target": "com.amazonaws.account#CompanyName", "traits": { - "smithy.api#documentation": "

The name of the company associated with the primary contact information, if any.

" + "smithy.api#documentation": "

The name of the company associated with the primary contact information, if\n any.

" } }, "WebsiteUrl": { @@ -1060,7 +1143,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

" + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

" } }, "com.amazonaws.account#ContactInformationPhoneNumber": { @@ -1180,7 +1263,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disables (opts-out) a particular Region for an account.

", + "smithy.api#documentation": "

Disables (opts-out) a particular Region for an account.

\n \n

The act of disabling a Region will remove all IAM access to any resources that\n reside in that Region.

\n
", "smithy.api#http": { "uri": "/disableRegion", "method": "POST", @@ -1194,13 +1277,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). When\n you disable a Region, Amazon Web Services performs actions to deactivate that Region in your account, such\n as destroying IAM resources in the Region. This process takes a few minutes for most\n accounts, but this can take several hours. You cannot enable the Region until the\n disabling process is fully completed.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). When you disable a Region, Amazon Web Services performs actions to\n deactivate that Region in your account, such as destroying IAM resources in the Region.\n This process takes a few minutes for most accounts, but this can take several hours. You\n cannot enable the Region until the disabling process is fully completed.

", "smithy.api#required": {} } } @@ -1270,13 +1353,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). When\n you enable a Region, Amazon Web Services performs actions to prepare your account in that Region, such\n as distributing your IAM resources to the Region. This process takes a few minutes for\n most accounts, but it can take several hours. You cannot use the Region until this\n process is complete. Furthermore, you cannot disable the Region until the enabling\n process is fully completed.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). When you enable a Region, Amazon Web Services performs actions to\n prepare your account in that Region, such as distributing your IAM resources to the\n Region. This process takes a few minutes for most accounts, but it can take several\n hours. You cannot use the Region until this process is complete. Furthermore, you cannot\n disable the Region until the enabling process is fully completed.

", "smithy.api#required": {} } } @@ -1412,7 +1495,7 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to\n the account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } } }, @@ -1426,7 +1509,74 @@ "ContactInformation": { "target": "com.amazonaws.account#ContactInformation", "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

" + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.account#GetPrimaryEmail": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#GetPrimaryEmailRequest" + }, + "output": { + "target": "com.amazonaws.account#GetPrimaryEmailResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the primary email address for the specified account.

", + "smithy.api#http": { + "uri": "/getPrimaryEmail", + "method": "POST", + "code": 200 + }, + "smithy.api#readonly": {}, + "smithy.api#suppress": [ + "HttpMethodSemantics" + ] + } + }, + "com.amazonaws.account#GetPrimaryEmailRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#GetPrimaryEmailResponse": { + "type": "structure", + "members": { + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

Retrieves the primary email address associated with the specified\n account.

" } } }, @@ -1475,13 +1625,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). This\n function will return the status of whatever Region you pass into this parameter.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). This function will return the status of whatever Region\n you pass into this parameter.

", "smithy.api#required": {} } } @@ -1574,7 +1724,7 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "MaxResults": { @@ -1637,6 +1787,13 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#Otp": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-zA-Z0-9]{6}$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.account#PhoneNumber": { "type": "string", "traits": { @@ -1658,6 +1815,50 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#PrimaryEmailAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#PrimaryEmailResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdate" + }, + { + "target": "com.amazonaws.account#GetPrimaryEmail" + }, + { + "target": "com.amazonaws.account#StartPrimaryEmailUpdate" + } + ], + "traits": { + "aws.api#arn": { + "template": "PrimaryEmail" + } + } + }, + "com.amazonaws.account#PrimaryEmailUpdateStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "ACCEPTED", + "name": "ACCEPTED" + } + ] + } + }, "com.amazonaws.account#PutAlternateContact": { "type": "operation", "input": { @@ -1762,7 +1963,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the primary contact information of an Amazon Web Services account.

\n

For complete details about how to use the primary contact operations, see Update\n the primary and alternate contact information.

", + "smithy.api#documentation": "

Updates the primary contact information of an Amazon Web Services account.

\n

For complete details about how to use the primary contact operations, see Update\n the primary and alternate contact information.

", "smithy.api#http": { "uri": "/putContactInformation", "method": "POST", @@ -1777,14 +1978,14 @@ "ContactInformation": { "target": "com.amazonaws.account#ContactInformation", "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

", + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

", "smithy.api#required": {} } }, "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to\n the account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } } }, @@ -1804,7 +2005,7 @@ "RegionOptStatus": { "target": "com.amazonaws.account#RegionOptStatus", "traits": { - "smithy.api#documentation": "

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling,\n Enabled_By_Default).

" + "smithy.api#documentation": "

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled,\n Disabling, Enabled_By_Default).

" } } }, @@ -1904,6 +2105,79 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#StartPrimaryEmailUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#StartPrimaryEmailUpdateRequest" + }, + "output": { + "target": "com.amazonaws.account#StartPrimaryEmailUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#ConflictException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts the process to update the primary email address for the specified\n account.

", + "smithy.api#http": { + "uri": "/startPrimaryEmailUpdate", + "method": "POST", + "code": 200 + } + } + }, + "com.amazonaws.account#StartPrimaryEmailUpdateRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + }, + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

The new primary email address (also known as the root user email address) to\n use in the specified account.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#StartPrimaryEmailUpdateResponse": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.account#PrimaryEmailUpdateStatus", + "traits": { + "smithy.api#documentation": "

The status of the primary email update request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.account#StateOrRegion": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/firehose.json b/codegen/sdk-codegen/aws-models/firehose.json index 09628529c9f..b31afc12c01 100644 --- a/codegen/sdk-codegen/aws-models/firehose.json +++ b/codegen/sdk-codegen/aws-models/firehose.json @@ -2614,7 +2614,7 @@ "name": "firehose" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Amazon Data Firehose\n \n

Amazon Data Firehose was previously known as Amazon Kinesis Data Firehose.

\n
\n

Amazon Data Firehose is a fully managed service that delivers real-time\n streaming data to destinations such as Amazon Simple Storage Service (Amazon S3), Amazon\n OpenSearch Service, Amazon Redshift, Splunk, and various other supportd\n destinations.

", + "smithy.api#documentation": "Amazon Data Firehose\n \n

Amazon Data Firehose was previously known as Amazon Kinesis Data Firehose.

\n
\n

Amazon Data Firehose is a fully managed service that delivers real-time streaming\n data to destinations such as Amazon Simple Storage Service (Amazon S3), Amazon OpenSearch\n Service, Amazon Redshift, Splunk, and various other supported destinations.

", "smithy.api#title": "Amazon Kinesis Firehose", "smithy.api#xmlNamespace": { "uri": "http://firehose.amazonaws.com/doc/2015-08-04" @@ -3834,7 +3834,7 @@ "RequestConfiguration": { "target": "com.amazonaws.firehose#HttpEndpointRequestConfiguration", "traits": { - "smithy.api#documentation": "

The configuration of the requeste sent to the HTTP endpoint specified as the\n destination.

" + "smithy.api#documentation": "

The configuration of the request sent to the HTTP endpoint that is specified as the\n destination.

" } }, "ProcessingConfiguration": { @@ -3863,6 +3863,12 @@ "traits": { "smithy.api#required": {} } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for HTTP Endpoint destination.\n

" + } } }, "traits": { @@ -3916,6 +3922,12 @@ }, "S3DestinationDescription": { "target": "com.amazonaws.firehose#S3DestinationDescription" + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for HTTP Endpoint destination.\n

" + } } }, "traits": { @@ -3969,6 +3981,12 @@ }, "S3Update": { "target": "com.amazonaws.firehose#S3DestinationUpdate" + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for HTTP Endpoint destination.\n

" + } } }, "traits": { @@ -4769,7 +4787,7 @@ } }, "traits": { - "smithy.api#documentation": "

A serializer to use for converting data to the Parquet format before storing it in\n Amazon S3. For more information, see Apache Parquet.

" + "smithy.api#documentation": "

A serializer to use for converting data to the Parquet format before storing it in\n Amazon S3. For more information, see Apache Parquet.

" } }, "com.amazonaws.firehose#ParquetWriterVersion": { @@ -5267,15 +5285,13 @@ "Username": { "target": "com.amazonaws.firehose#Username", "traits": { - "smithy.api#documentation": "

The name of the user.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The name of the user.

" } }, "Password": { "target": "com.amazonaws.firehose#Password", "traits": { - "smithy.api#documentation": "

The user password.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The user password.

" } }, "RetryOptions": { @@ -5314,6 +5330,12 @@ "traits": { "smithy.api#documentation": "

The CloudWatch logging options for your delivery stream.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Amazon Redshift.\n

" + } } }, "traits": { @@ -5347,8 +5369,7 @@ "Username": { "target": "com.amazonaws.firehose#Username", "traits": { - "smithy.api#documentation": "

The name of the user.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The name of the user.

" } }, "RetryOptions": { @@ -5387,6 +5408,12 @@ "traits": { "smithy.api#documentation": "

The Amazon CloudWatch logging options for your delivery stream.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Amazon Redshift.\n

" + } } }, "traits": { @@ -5461,6 +5488,12 @@ "traits": { "smithy.api#documentation": "

The Amazon CloudWatch logging options for your delivery stream.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Amazon Redshift.\n

" + } } }, "traits": { @@ -5806,6 +5839,43 @@ "smithy.api#documentation": "

Specifies the schema to which you want Firehose to configure your data\n before it writes it to Amazon S3. This parameter is required if Enabled is set\n to true.

" } }, + "com.amazonaws.firehose#SecretARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:" + } + }, + "com.amazonaws.firehose#SecretsManagerConfiguration": { + "type": "structure", + "members": { + "SecretARN": { + "target": "com.amazonaws.firehose#SecretARN", + "traits": { + "smithy.api#documentation": "

The ARN of the secret that stores your credentials. It must be in the same region as the\n Firehose stream and the role. The secret ARN can reside in a different account than the delivery stream and role as Firehose supports cross-account secret access. This parameter is required when Enabled is set to True.

" + } + }, + "RoleARN": { + "target": "com.amazonaws.firehose#RoleARN", + "traits": { + "smithy.api#documentation": "

\n Specifies the role that Firehose assumes when calling the Secrets Manager API operation. When you provide the role, it overrides any destination specific role defined in the destination configuration. If you do not provide the then we use the destination specific role. This parameter is required for Splunk.\n

" + } + }, + "Enabled": { + "target": "com.amazonaws.firehose#BooleanObject", + "traits": { + "smithy.api#documentation": "

Specifies whether you want to use the the secrets manager feature. When set as\n True the secrets manager configuration overwrites the existing secrets in\n the destination configuration. When it's set to False Firehose falls back to\n the credentials in the destination configuration.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The structure that defines how Firehose accesses the secret.

" + } + }, "com.amazonaws.firehose#SecurityGroupIdList": { "type": "list", "member": { @@ -5930,8 +6000,7 @@ "PrivateKey": { "target": "com.amazonaws.firehose#SnowflakePrivateKey", "traits": { - "smithy.api#documentation": "

The private key used to encrypt your Snowflake client. For information, see Using Key Pair Authentication & Key Rotation.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The private key used to encrypt your Snowflake client. For information, see Using Key Pair Authentication & Key Rotation.

" } }, "KeyPassphrase": { @@ -5943,8 +6012,7 @@ "User": { "target": "com.amazonaws.firehose#SnowflakeUser", "traits": { - "smithy.api#documentation": "

User login name for the Snowflake account.

", - "smithy.api#required": {} + "smithy.api#documentation": "

User login name for the Snowflake account.

" } }, "Database": { @@ -6028,6 +6096,12 @@ "traits": { "smithy.api#required": {} } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Snowflake.\n

" + } } }, "traits": { @@ -6123,6 +6197,12 @@ }, "S3DestinationDescription": { "target": "com.amazonaws.firehose#S3DestinationDescription" + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Snowflake.\n

" + } } }, "traits": { @@ -6224,6 +6304,12 @@ }, "S3Update": { "target": "com.amazonaws.firehose#S3DestinationUpdate" + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n Describes the Secrets Manager configuration in Snowflake.\n

" + } } }, "traits": { @@ -6465,8 +6551,7 @@ "HECToken": { "target": "com.amazonaws.firehose#HECToken", "traits": { - "smithy.api#documentation": "

This is a GUID that you obtain from your Splunk cluster when you create a new HEC\n endpoint.

", - "smithy.api#required": {} + "smithy.api#documentation": "

This is a GUID that you obtain from your Splunk cluster when you create a new HEC\n endpoint.

" } }, "HECAcknowledgmentTimeoutInSeconds": { @@ -6511,6 +6596,12 @@ "traits": { "smithy.api#documentation": "

The buffering options. If no value is specified, the default values for Splunk are used.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Splunk.\n

" + } } }, "traits": { @@ -6579,6 +6670,12 @@ "traits": { "smithy.api#documentation": "

The buffering options. If no value is specified, the default values for Splunk are used.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Splunk.\n

" + } } }, "traits": { @@ -6647,6 +6744,12 @@ "traits": { "smithy.api#documentation": "

The buffering options. If no value is specified, the default values for Splunk are used.

" } + }, + "SecretsManagerConfiguration": { + "target": "com.amazonaws.firehose#SecretsManagerConfiguration", + "traits": { + "smithy.api#documentation": "

\n The configuration that defines how you access secrets for Splunk.\n

" + } } }, "traits": { @@ -6719,7 +6822,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables server-side encryption (SSE) for the delivery stream.

\n

This operation is asynchronous. It returns immediately. When you invoke it, Firehose first sets the encryption status of the stream to ENABLING, and then\n to ENABLED. The encryption status of a delivery stream is the\n Status property in DeliveryStreamEncryptionConfiguration.\n If the operation fails, the encryption status changes to ENABLING_FAILED. You\n can continue to read and write data to your delivery stream while the encryption status is\n ENABLING, but the data is not encrypted. It can take up to 5 seconds after\n the encryption status changes to ENABLED before all records written to the\n delivery stream are encrypted. To find out whether a record or a batch of records was\n encrypted, check the response elements PutRecordOutput$Encrypted and\n PutRecordBatchOutput$Encrypted, respectively.

\n

To check the encryption status of a delivery stream, use DescribeDeliveryStream.

\n

Even if encryption is currently enabled for a delivery stream, you can still invoke this\n operation on it to change the ARN of the CMK or both its type and ARN. If you invoke this\n method to change the CMK, and the old CMK is of type CUSTOMER_MANAGED_CMK,\n Firehose schedules the grant it had on the old CMK for retirement. If the new\n CMK is of type CUSTOMER_MANAGED_CMK, Firehose creates a grant\n that enables it to use the new CMK to encrypt and decrypt data and to manage the\n grant.

\n

For the KMS grant creation to be successful, Firehose APIs StartDeliveryStreamEncryption and CreateDeliveryStream should not be called with session credentials that are more than 6 hours old.

\n

If a delivery stream already has encryption enabled and then you invoke this operation\n to change the ARN of the CMK or both its type and ARN and you get\n ENABLING_FAILED, this only means that the attempt to change the CMK failed.\n In this case, encryption remains enabled with the old CMK.

\n

If the encryption status of your delivery stream is ENABLING_FAILED, you\n can invoke this operation again with a valid CMK. The CMK must be enabled and the key\n policy mustn't explicitly deny the permission for Firehose to invoke KMS\n encrypt and decrypt operations.

\n

You can enable SSE for a delivery stream only if it's a delivery stream that uses\n DirectPut as its source.

\n

The StartDeliveryStreamEncryption and\n StopDeliveryStreamEncryption operations have a combined limit of 25 calls\n per delivery stream per 24 hours. For example, you reach the limit if you call\n StartDeliveryStreamEncryption 13 times and\n StopDeliveryStreamEncryption 12 times for the same delivery stream in a\n 24-hour period.

" + "smithy.api#documentation": "

Enables server-side encryption (SSE) for the delivery stream.

\n

This operation is asynchronous. It returns immediately. When you invoke it, Firehose first sets the encryption status of the stream to ENABLING, and then\n to ENABLED. The encryption status of a delivery stream is the\n Status property in DeliveryStreamEncryptionConfiguration.\n If the operation fails, the encryption status changes to ENABLING_FAILED. You\n can continue to read and write data to your delivery stream while the encryption status is\n ENABLING, but the data is not encrypted. It can take up to 5 seconds after\n the encryption status changes to ENABLED before all records written to the\n delivery stream are encrypted. To find out whether a record or a batch of records was\n encrypted, check the response elements PutRecordOutput$Encrypted and\n PutRecordBatchOutput$Encrypted, respectively.

\n

To check the encryption status of a delivery stream, use DescribeDeliveryStream.

\n

Even if encryption is currently enabled for a delivery stream, you can still invoke this\n operation on it to change the ARN of the CMK or both its type and ARN. If you invoke this\n method to change the CMK, and the old CMK is of type CUSTOMER_MANAGED_CMK,\n Firehose schedules the grant it had on the old CMK for retirement. If the new\n CMK is of type CUSTOMER_MANAGED_CMK, Firehose creates a grant\n that enables it to use the new CMK to encrypt and decrypt data and to manage the\n grant.

\n

For the KMS grant creation to be successful, the Firehose API operations\n StartDeliveryStreamEncryption and CreateDeliveryStream should\n not be called with session credentials that are more than 6 hours old.

\n

If a delivery stream already has encryption enabled and then you invoke this operation\n to change the ARN of the CMK or both its type and ARN and you get\n ENABLING_FAILED, this only means that the attempt to change the CMK failed.\n In this case, encryption remains enabled with the old CMK.

\n

If the encryption status of your delivery stream is ENABLING_FAILED, you\n can invoke this operation again with a valid CMK. The CMK must be enabled and the key\n policy mustn't explicitly deny the permission for Firehose to invoke KMS\n encrypt and decrypt operations.

\n

You can enable SSE for a delivery stream only if it's a delivery stream that uses\n DirectPut as its source.

\n

The StartDeliveryStreamEncryption and\n StopDeliveryStreamEncryption operations have a combined limit of 25 calls\n per delivery stream per 24 hours. For example, you reach the limit if you call\n StartDeliveryStreamEncryption 13 times and\n StopDeliveryStreamEncryption 12 times for the same delivery stream in a\n 24-hour period.

" } }, "com.amazonaws.firehose#StartDeliveryStreamEncryptionInput": { @@ -7100,7 +7203,7 @@ "SnowflakeDestinationUpdate": { "target": "com.amazonaws.firehose#SnowflakeDestinationUpdate", "traits": { - "smithy.api#documentation": "

Update to the Snowflake destination condiguration settings

" + "smithy.api#documentation": "

Update to the Snowflake destination configuration settings.

" } } }, diff --git a/codegen/sdk-codegen/aws-models/fsx.json b/codegen/sdk-codegen/aws-models/fsx.json index 42c5e7570be..29023e09dd0 100644 --- a/codegen/sdk-codegen/aws-models/fsx.json +++ b/codegen/sdk-codegen/aws-models/fsx.json @@ -3013,7 +3013,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new, empty Amazon FSx file system. You can create the following supported \n Amazon FSx file systems using the CreateFileSystem API operation:

\n \n

This operation requires a client request token in the request that Amazon FSx uses\n to ensure idempotent creation. This means that calling the operation multiple times with\n the same client request token has no effect. By using the idempotent operation, you can\n retry a CreateFileSystem operation without the risk of creating an extra\n file system. This approach can be useful when an initial call fails in a way that makes\n it unclear whether a file system was created. Examples are if a transport level timeout\n occurred, or your connection was reset. If you use the same client request token and the\n initial call created a file system, the client receives success as long as the\n parameters are the same.

\n

If a file system with the specified client request token exists and the parameters\n match, CreateFileSystem returns the description of the existing file\n system. If a file system with the specified client request token exists and the\n parameters don't match, this call returns IncompatibleParameterError. If a\n file system with the specified client request token doesn't exist,\n CreateFileSystem does the following:

\n \n \n

The CreateFileSystem call returns while the file system's lifecycle\n state is still CREATING. You can check the file-system creation status\n by calling the DescribeFileSystems operation, which returns the file system state\n along with other information.

\n
" + "smithy.api#documentation": "

Creates a new, empty Amazon FSx file system. You can create the following supported \n Amazon FSx file systems using the CreateFileSystem API operation:

\n \n

This operation requires a client request token in the request that Amazon FSx uses\n to ensure idempotent creation. This means that calling the operation multiple times with\n the same client request token has no effect. By using the idempotent operation, you can\n retry a CreateFileSystem operation without the risk of creating an extra\n file system. This approach can be useful when an initial call fails in a way that makes\n it unclear whether a file system was created. Examples are if a transport level timeout\n occurred, or your connection was reset. If you use the same client request token and the\n initial call created a file system, the client receives success as long as the\n parameters are the same.

\n

If a file system with the specified client request token exists and the parameters\n match, CreateFileSystem returns the description of the existing file\n system. If a file system with the specified client request token exists and the\n parameters don't match, this call returns IncompatibleParameterError. If a\n file system with the specified client request token doesn't exist,\n CreateFileSystem does the following:

\n \n \n

The CreateFileSystem call returns while the file system's lifecycle\n state is still CREATING. You can check the file-system creation status\n by calling the DescribeFileSystems operation, which returns the file system state\n along with other information.

\n
" } }, "com.amazonaws.fsx#CreateFileSystemFromBackup": { @@ -3181,7 +3181,7 @@ "DeploymentType": { "target": "com.amazonaws.fsx#LustreDeploymentType", "traits": { - "smithy.api#documentation": "

(Optional) Choose SCRATCH_1 and SCRATCH_2 deployment \n types when you need temporary storage and shorter-term processing of data. \n The SCRATCH_2 deployment type provides in-transit encryption of data and higher burst \n throughput capacity than SCRATCH_1.

\n

Choose PERSISTENT_1 for longer-term storage and for throughput-focused \n workloads that aren’t latency-sensitive.\n PERSISTENT_1 supports encryption of data in transit, and is available in all \n Amazon Web Services Regions in which FSx for Lustre is available.

\n

Choose PERSISTENT_2 for longer-term storage and for latency-sensitive workloads \n that require the highest levels of IOPS/throughput. PERSISTENT_2 supports \n SSD storage, and offers higher PerUnitStorageThroughput (up to 1000 MB/s/TiB). PERSISTENT_2 \n is available in a limited number of Amazon Web Services Regions. \n For more information, and an up-to-date list of Amazon Web Services Regions in which \n PERSISTENT_2 is available, see \n File \n system deployment options for FSx for Lustre in the Amazon FSx for Lustre User Guide.

\n \n

If you choose PERSISTENT_2, and you set FileSystemTypeVersion to\n 2.10, the CreateFileSystem operation fails.

\n
\n

Encryption of data in transit is automatically turned on when you access\n SCRATCH_2, PERSISTENT_1 and PERSISTENT_2 file\n systems from Amazon EC2 instances that support automatic encryption in\n the Amazon Web Services Regions where they are available. For more information about\n encryption in transit for FSx for Lustre file systems, see Encrypting data in\n transit in the Amazon FSx for Lustre User Guide.

\n

(Default = SCRATCH_1)

" + "smithy.api#documentation": "

(Optional) Choose SCRATCH_1 and SCRATCH_2 deployment \n types when you need temporary storage and shorter-term processing of data. \n The SCRATCH_2 deployment type provides in-transit encryption of data and higher burst \n throughput capacity than SCRATCH_1.

\n

Choose PERSISTENT_1 for longer-term storage and for throughput-focused \n workloads that aren’t latency-sensitive.\n PERSISTENT_1 supports encryption of data in transit, and is available in all \n Amazon Web Services Regions in which FSx for Lustre is available.

\n

Choose PERSISTENT_2 for longer-term storage and for latency-sensitive workloads \n that require the highest levels of IOPS/throughput. PERSISTENT_2 supports \n SSD storage, and offers higher PerUnitStorageThroughput (up to 1000 MB/s/TiB).\n You can optionally specify a metadata configuration mode for PERSISTENT_2\n which supports increasing metadata performance. PERSISTENT_2 is available\n in a limited number of Amazon Web Services Regions. For more information, and an up-to-date\n list of Amazon Web Services Regions in which PERSISTENT_2 is available, see \n File \n system deployment options for FSx for Lustre in the Amazon FSx for Lustre User Guide.

\n \n

If you choose PERSISTENT_2, and you set FileSystemTypeVersion to\n 2.10, the CreateFileSystem operation fails.

\n
\n

Encryption of data in transit is automatically turned on when you access\n SCRATCH_2, PERSISTENT_1, and PERSISTENT_2 file\n systems from Amazon EC2 instances that support automatic encryption in\n the Amazon Web Services Regions where they are available. For more information about\n encryption in transit for FSx for Lustre file systems, see Encrypting data in\n transit in the Amazon FSx for Lustre User Guide.

\n

(Default = SCRATCH_1)

" } }, "AutoImportPolicy": { @@ -3234,12 +3234,40 @@ "traits": { "smithy.api#documentation": "

The Lustre root squash configuration used when creating an Amazon FSx for Lustre\n file system. When enabled, root squash restricts root-level access from clients that\n try to access your file system as a root user.

" } + }, + "MetadataConfiguration": { + "target": "com.amazonaws.fsx#CreateFileSystemLustreMetadataConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration for the creation of an\n FSx for Lustre file system using a PERSISTENT_2\n deployment type.

" + } } }, "traits": { "smithy.api#documentation": "

The Lustre configuration for the file system being created.

\n \n

The following parameters are not supported for file systems\n with a data repository association created with\n .

\n \n
" } }, + "com.amazonaws.fsx#CreateFileSystemLustreMetadataConfiguration": { + "type": "structure", + "members": { + "Iops": { + "target": "com.amazonaws.fsx#MetadataIops", + "traits": { + "smithy.api#documentation": "

(USER_PROVISIONED mode only) Specifies the number of Metadata IOPS to provision\n for the file system. This parameter sets the maximum rate of metadata disk IOPS\n supported by the file system. Valid values are 1500, 3000,\n 6000, 12000, and multiples of 12000\n up to a maximum of 192000.

\n \n

Iops doesn’t have a default value. If you're using USER_PROVISIONED mode,\n you can choose to specify a valid value. If you're using AUTOMATIC mode,\n you cannot specify a value because FSx for Lustre automatically sets\n the value based on your file system storage capacity.\n

\n
" + } + }, + "Mode": { + "target": "com.amazonaws.fsx#MetadataConfigurationMode", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The metadata configuration mode for provisioning Metadata IOPS for\n an FSx for Lustre file system using a PERSISTENT_2\n deployment type.

\n ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration for the creation of an\n Amazon FSx for Lustre file system using a PERSISTENT_2\n deployment type. The configuration uses a Metadata IOPS value to set the\n maximum rate of metadata disk IOPS supported by the file system.

\n

After creation, the file system supports increasing metadata performance.\n For more information on Metadata IOPS, see Lustre\n metadata performance configuration in the Amazon FSx for Lustre User Guide.

" + } + }, "com.amazonaws.fsx#CreateFileSystemOntapConfiguration": { "type": "structure", "members": { @@ -3299,7 +3327,7 @@ "HAPairs": { "target": "com.amazonaws.fsx#HAPairs", "traits": { - "smithy.api#documentation": "

Specifies how many high-availability (HA) pairs of file servers will power your file system. Scale-up file systems are powered by 1 HA pair. The default value is 1. \n FSx for ONTAP scale-out file systems are powered by up to 12 HA pairs. The value of this property affects the values of StorageCapacity, \n Iops, and ThroughputCapacity. For more information, see \n High-availability (HA) pairs in the FSx for ONTAP user guide.

\n

Amazon FSx responds with an HTTP status code 400 (Bad Request) for the following conditions:

\n " + "smithy.api#documentation": "

Specifies how many high-availability (HA) pairs of file servers will power your file system. Scale-up file systems are powered by 1 HA pair. The default value is 1. \n FSx for ONTAP scale-out file systems are powered by up to 12 HA pairs. The value of this property affects the values of StorageCapacity, \n Iops, and ThroughputCapacity. For more information, see \n High-availability (HA) pairs in the FSx for ONTAP user guide.

\n

Amazon FSx responds with an HTTP status code 400 (Bad Request) for the following conditions:

\n " } }, "ThroughputCapacityPerHAPair": { @@ -3407,14 +3435,14 @@ "target": "com.amazonaws.fsx#StorageCapacity", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

Sets the storage capacity of the file system that you're creating, in gibibytes (GiB).

\n

\n FSx for Lustre file systems - The amount of\n storage capacity that you can configure depends on the value that you set for\n StorageType and the Lustre DeploymentType, as\n follows:

\n \n

\n FSx for ONTAP file systems - The amount of storage capacity \n that you can configure depends on the value of the HAPairs property. The minimum value is calculated as 1,024 * HAPairs and the maximum is calculated as 524,288 * HAPairs.

\n

\n FSx for OpenZFS file systems - The amount of storage capacity that \n you can configure is from 64 GiB up to 524,288 GiB (512 TiB).

\n

\n FSx for Windows File Server file systems - The amount\n of storage capacity that you can configure depends on the value that you set for\n StorageType as follows:

\n ", + "smithy.api#documentation": "

Sets the storage capacity of the file system that you're creating, in gibibytes (GiB).

\n

\n FSx for Lustre file systems - The amount of\n storage capacity that you can configure depends on the value that you set for\n StorageType and the Lustre DeploymentType, as\n follows:

\n \n

\n FSx for ONTAP file systems - The amount of storage capacity \n that you can configure depends on the value of the HAPairs property. The minimum value is calculated as 1,024 * HAPairs and the maximum is calculated as 524,288 * HAPairs.

\n

\n FSx for OpenZFS file systems - The amount of storage capacity that \n you can configure is from 64 GiB up to 524,288 GiB (512 TiB).

\n

\n FSx for Windows File Server file systems - The amount\n of storage capacity that you can configure depends on the value that you set for\n StorageType as follows:

\n ", "smithy.api#required": {} } }, "StorageType": { "target": "com.amazonaws.fsx#StorageType", "traits": { - "smithy.api#documentation": "

Sets the storage type for the file system that you're creating. Valid values are\n SSD and HDD.

\n \n

Default value is SSD. For more information, see Storage\n type options in the FSx for Windows File Server User\n Guide and Multiple storage\n options in the FSx for Lustre User\n Guide.

" + "smithy.api#documentation": "

Sets the storage type for the file system that you're creating. Valid values are\n SSD and HDD.

\n \n

Default value is SSD. For more information, see Storage\n type options in the FSx for Windows File Server User\n Guide and Multiple storage\n options in the FSx for Lustre User\n Guide.

" } }, "SubnetIds": { @@ -3455,7 +3483,7 @@ "FileSystemTypeVersion": { "target": "com.amazonaws.fsx#FileSystemTypeVersion", "traits": { - "smithy.api#documentation": "

(Optional) For FSx for Lustre file systems, sets the Lustre version\n for the file system that you're creating. Valid values are 2.10, \n 2.12, and 2.15:

\n \n

Default value = 2.10, except when DeploymentType is set to \n PERSISTENT_2, then the default is 2.12.

\n \n

If you set FileSystemTypeVersion to 2.10 for a \n PERSISTENT_2 Lustre deployment type, the CreateFileSystem \n operation fails.

\n
" + "smithy.api#documentation": "

For FSx for Lustre file systems, sets the Lustre version for the file system\n that you're creating. Valid values are 2.10, 2.12, and\n 2.15:

\n \n

Default value is 2.10, except for the following deployments:

\n " } }, "OpenZFSConfiguration": { @@ -3576,7 +3604,7 @@ "SecurityStyle": { "target": "com.amazonaws.fsx#SecurityStyle", "traits": { - "smithy.api#documentation": "

Specifies the security style for the volume. If a volume's security style is not specified, \n it is automatically set to the root volume's security style. The security style determines the type of permissions \n that FSx for ONTAP uses to control data access. For more information, see \n Volume security style \n in the Amazon FSx for NetApp ONTAP User Guide.\n Specify one of the following values:

\n \n

For more information, see Volume security style in the \n FSx for ONTAP User Guide.

" + "smithy.api#documentation": "

Specifies the security style for the volume. If a volume's security style is not specified, \n it is automatically set to the root volume's security style. The security style determines the type of permissions \n that FSx for ONTAP uses to control data access. Specify one of the following values:

\n \n

For more information, see Volume security style in the \n FSx for ONTAP User Guide.

" } }, "SizeInMegabytes": { @@ -3608,7 +3636,7 @@ "OntapVolumeType": { "target": "com.amazonaws.fsx#InputOntapVolumeType", "traits": { - "smithy.api#documentation": "

Specifies the type of volume you are creating. Valid values are the following:

\n \n

For more information, see Volume types \n in the Amazon FSx for NetApp ONTAP User Guide.

" + "smithy.api#documentation": "

Specifies the type of volume you are creating. Valid values are the following:

\n \n

For more information, see Volume types \n in the Amazon FSx for NetApp ONTAP User Guide.

" } }, "SnapshotPolicy": { @@ -3632,7 +3660,7 @@ "VolumeStyle": { "target": "com.amazonaws.fsx#VolumeStyle", "traits": { - "smithy.api#documentation": "

Use to specify the style of an ONTAP volume. FSx for ONTAP offers two styles of volumes that you can use for different purposes, \n FlexVol and FlexGroup volumes. For more information, see \n Volume styles in the Amazon FSx for NetApp ONTAP User Guide.

" + "smithy.api#documentation": "

Use to specify the style of an ONTAP volume. FSx for ONTAP offers two styles of volumes that you can use for different purposes, \n FlexVol and FlexGroup volumes. For more information, see \n Volume styles in the Amazon FSx for NetApp ONTAP User Guide.

" } }, "AggregateConfiguration": { @@ -3942,7 +3970,7 @@ "RootVolumeSecurityStyle": { "target": "com.amazonaws.fsx#StorageVirtualMachineRootVolumeSecurityStyle", "traits": { - "smithy.api#documentation": "

The security style of the root volume of the SVM. Specify one of the following values:

\n \n

" + "smithy.api#documentation": "

The security style of the root volume of the SVM. Specify one of the following values:

\n \n

" } } }, @@ -5096,7 +5124,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a file system. After deletion, the file system no longer exists, and its data\n is gone. Any existing automatic backups and snapshots are also deleted.

\n

To delete an Amazon FSx for NetApp ONTAP file system, first delete all the\n volumes and storage virtual machines (SVMs) on the file system. Then provide a\n FileSystemId value to the DeleFileSystem operation.

\n

By default, when you delete an Amazon FSx for Windows File Server file system,\n a final backup is created upon deletion. This final backup isn't subject to the file\n system's retention policy, and must be manually deleted.

\n

To delete an Amazon FSx for Lustre file system, first \n unmount\n it from every connected Amazon EC2 instance, then provide a FileSystemId\n value to the DeleFileSystem operation. By default, Amazon FSx will not\n take a final backup when the DeleteFileSystem operation is invoked. On file systems\n not linked to an Amazon S3 bucket, set SkipFinalBackup to false\n to take a final backup of the file system you are deleting. Backups cannot be enabled on S3-linked\n file systems. To ensure all of your data is written back to S3 before deleting your file system,\n you can either monitor for the\n AgeOfOldestQueuedMessage\n metric to be zero (if using automatic export) or you can run an\n export data repository task.\n If you have automatic export enabled and want to use an export data repository task, you have\n to disable automatic export before executing the export data repository task.

\n

The DeleteFileSystem operation returns while the file system has the\n DELETING status. You can check the file system deletion status by\n calling the DescribeFileSystems operation, which returns a list of file systems in your\n account. If you pass the file system ID for a deleted file system, the\n DescribeFileSystems operation returns a FileSystemNotFound\n error.

\n \n

If a data repository task is in a PENDING or EXECUTING state,\n deleting an Amazon FSx for Lustre file system will fail with an HTTP status\n code 400 (Bad Request).

\n
\n \n

The data in a deleted file system is also deleted and can't be recovered by\n any means.

\n
", + "smithy.api#documentation": "

Deletes a file system. After deletion, the file system no longer exists, and its data\n is gone. Any existing automatic backups and snapshots are also deleted.

\n

To delete an Amazon FSx for NetApp ONTAP file system, first delete all the\n volumes and storage virtual machines (SVMs) on the file system. Then provide a\n FileSystemId value to the DeleteFileSystem operation.

\n

By default, when you delete an Amazon FSx for Windows File Server file system,\n a final backup is created upon deletion. This final backup isn't subject to the file\n system's retention policy, and must be manually deleted.

\n

To delete an Amazon FSx for Lustre file system, first \n unmount\n it from every connected Amazon EC2 instance, then provide a FileSystemId\n value to the DeleteFileSystem operation. By default, Amazon FSx will not\n take a final backup when the DeleteFileSystem operation is invoked. On file systems\n not linked to an Amazon S3 bucket, set SkipFinalBackup to false\n to take a final backup of the file system you are deleting. Backups cannot be enabled on S3-linked\n file systems. To ensure all of your data is written back to S3 before deleting your file system,\n you can either monitor for the\n AgeOfOldestQueuedMessage\n metric to be zero (if using automatic export) or you can run an\n export data repository task.\n If you have automatic export enabled and want to use an export data repository task, you have\n to disable automatic export before executing the export data repository task.

\n

The DeleteFileSystem operation returns while the file system has the\n DELETING status. You can check the file system deletion status by\n calling the DescribeFileSystems operation, which returns a list of file systems in your\n account. If you pass the file system ID for a deleted file system, the\n DescribeFileSystems operation returns a FileSystemNotFound\n error.

\n \n

If a data repository task is in a PENDING or EXECUTING state,\n deleting an Amazon FSx for Lustre file system will fail with an HTTP status\n code 400 (Bad Request).

\n
\n \n

The data in a deleted file system is also deleted and can't be recovered by\n any means.

\n
", "smithy.api#examples": [ { "title": "To delete a file system", @@ -6783,7 +6811,7 @@ "target": "com.amazonaws.fsx#ArchivePath", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The path to the S3 or NFS data repository that links to the\n cache. You must provide one of the following paths:

\n ", + "smithy.api#documentation": "

The path to the S3 or NFS data repository that links to the\n cache. You must provide one of the following paths:

\n ", "smithy.api#required": {} } }, @@ -7263,6 +7291,28 @@ "smithy.api#documentation": "

The lifecycle status of the file system.

" } }, + "com.amazonaws.fsx#FileSystemLustreMetadataConfiguration": { + "type": "structure", + "members": { + "Iops": { + "target": "com.amazonaws.fsx#MetadataIops", + "traits": { + "smithy.api#documentation": "

The number of Metadata IOPS provisioned for the file system. Valid values\n are 1500, 3000, 6000, 12000,\n and multiples of 12000 up to a maximum of 192000.

" + } + }, + "Mode": { + "target": "com.amazonaws.fsx#MetadataConfigurationMode", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The metadata configuration mode for provisioning Metadata IOPS for the\n file system.

\n ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration of an Amazon FSx for Lustre\n file system using a PERSISTENT_2 deployment type. The configuration\n enables the file system to support increasing metadata performance.

" + } + }, "com.amazonaws.fsx#FileSystemMaintenanceOperation": { "type": "enum", "members": { @@ -7982,7 +8032,7 @@ "MountName": { "target": "com.amazonaws.fsx#LustreFileSystemMountName", "traits": { - "smithy.api#documentation": "

You use the MountName value when mounting the file system.

\n

For the SCRATCH_1 deployment type, this value is always \"fsx\". \n For SCRATCH_2, PERSISTENT_1, and PERSISTENT_2 deployment\n types, this value is a string that is unique within an Amazon Web Services Region. \n \n

" + "smithy.api#documentation": "

You use the MountName value when mounting the file system.

\n

For the SCRATCH_1 deployment type, this value is always \"fsx\". \n For SCRATCH_2, PERSISTENT_1, and PERSISTENT_2 deployment\n types, this value is a string that is unique within an Amazon Web Services Region. \n

" } }, "DailyAutomaticBackupStartTime": { @@ -8020,6 +8070,12 @@ "traits": { "smithy.api#documentation": "

The Lustre root squash configuration for an Amazon FSx for Lustre\n file system. When enabled, root squash restricts root-level access from clients that\n try to access your file system as a root user.

" } + }, + "MetadataConfiguration": { + "target": "com.amazonaws.fsx#FileSystemLustreMetadataConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration for an Amazon FSx for Lustre file system\n using a PERSISTENT_2 deployment type.

" + } } }, "traits": { @@ -8161,6 +8217,32 @@ } } }, + "com.amazonaws.fsx#MetadataConfigurationMode": { + "type": "enum", + "members": { + "AUTOMATIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTOMATIC" + } + }, + "USER_PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USER_PROVISIONED" + } + } + } + }, + "com.amazonaws.fsx#MetadataIops": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1500, + "max": 192000 + } + } + }, "com.amazonaws.fsx#MetadataStorageCapacity": { "type": "integer", "traits": { @@ -9677,42 +9759,42 @@ "UserName": { "target": "com.amazonaws.fsx#DirectoryUserName", "traits": { - "smithy.api#documentation": "

Specifies the updated user name for the service account on your self-managed AD domain.\n Amazon FSx uses this account to join to your self-managed AD domain.

\n

This account must have the permissions required to join\n computers to the domain in the organizational unit provided in\n OrganizationalUnitDistinguishedName.

" + "smithy.api#documentation": "

Specifies the updated user name for the service account on your self-managed Active Directory domain.\n Amazon FSx uses this account to join to your self-managed Active Directory domain.

\n

This account must have the permissions required to join\n computers to the domain in the organizational unit provided in\n OrganizationalUnitDistinguishedName.

" } }, "Password": { "target": "com.amazonaws.fsx#DirectoryPassword", "traits": { - "smithy.api#documentation": "

Specifies the updated password for the service account on your self-managed AD domain. \n Amazon FSx uses this account to join to your self-managed AD domain.

" + "smithy.api#documentation": "

Specifies the updated password for the service account on your self-managed Active Directory domain. \n Amazon FSx uses this account to join to your self-managed Active Directory domain.

" } }, "DnsIps": { "target": "com.amazonaws.fsx#DnsIps", "traits": { - "smithy.api#documentation": "

A list of up to three DNS server or domain controller IP addresses in your\n self-managed AD domain.

" + "smithy.api#documentation": "

A list of up to three DNS server or domain controller IP addresses in your\n self-managed Active Directory domain.

" } }, "DomainName": { "target": "com.amazonaws.fsx#ActiveDirectoryFullyQualifiedName", "traits": { - "smithy.api#documentation": "

Specifies an updated fully qualified domain name of your self-managed AD configuration.

" + "smithy.api#documentation": "

Specifies an updated fully qualified domain name of your self-managed Active Directory configuration.

" } }, "OrganizationalUnitDistinguishedName": { "target": "com.amazonaws.fsx#OrganizationalUnitDistinguishedName", "traits": { - "smithy.api#documentation": "

Specifies an updated fully qualified distinguished name of the organization unit within your self-managed AD.

" + "smithy.api#documentation": "

Specifies an updated fully qualified distinguished name of the organization unit within your self-managed Active Directory.

" } }, "FileSystemAdministratorsGroup": { "target": "com.amazonaws.fsx#FileSystemAdministratorsGroupName", "traits": { - "smithy.api#documentation": "

Specifies the updated name of the self-managed AD domain group whose members are granted administrative privileges\n for the Amazon FSx resource.

" + "smithy.api#documentation": "

For FSx for ONTAP file systems only - Specifies the updated name of the self-managed Active Directory domain group whose members are granted administrative privileges\n for the Amazon FSx resource.

" } } }, "traits": { - "smithy.api#documentation": "

Specifies changes you are making to the self-managed Microsoft Active Directory (AD) configuration to which \n an FSx for Windows File Server file system or an FSx for ONTAP SVM is joined.

" + "smithy.api#documentation": "

Specifies changes you are making to the self-managed Microsoft Active Directory configuration to which \n an FSx for Windows File Server file system or an FSx for ONTAP SVM is joined.

" } }, "com.amazonaws.fsx#ServiceLimit": { @@ -11212,7 +11294,7 @@ } ], "traits": { - "smithy.api#documentation": "

Use this operation to update the configuration of an existing Amazon FSx file\n system. You can update multiple properties in a single request.

\n

For FSx for Windows File Server file systems, you can update the following\n properties:

\n \n

For FSx for Lustre file systems, you can update the following\n properties:

\n \n

For FSx for ONTAP file systems, you can update the following\n properties:

\n \n

For FSx for OpenZFS file systems, you can update the following\n properties:

\n " + "smithy.api#documentation": "

Use this operation to update the configuration of an existing Amazon FSx file\n system. You can update multiple properties in a single request.

\n

For FSx for Windows File Server file systems, you can update the following\n properties:

\n \n

For FSx for Lustre file systems, you can update the following\n properties:

\n \n

For FSx for ONTAP file systems, you can update the following\n properties:

\n \n

For FSx for OpenZFS file systems, you can update the following\n properties:

\n " } }, "com.amazonaws.fsx#UpdateFileSystemLustreConfiguration": { @@ -11262,12 +11344,38 @@ "traits": { "smithy.api#documentation": "

The throughput of an Amazon FSx for Lustre Persistent SSD-based file system,\n measured in megabytes per second per tebibyte (MB/s/TiB). You can increase or decrease\n your file system's throughput. Valid values depend on the deployment type of the file\n system, as follows:

\n \n

For more information, see \n \n Managing throughput capacity.

" } + }, + "MetadataConfiguration": { + "target": "com.amazonaws.fsx#UpdateFileSystemLustreMetadataConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration for an Amazon FSx for Lustre\n file system using a PERSISTENT_2 deployment type. When this configuration\n is enabled, the file system supports increasing metadata performance.

" + } } }, "traits": { "smithy.api#documentation": "

The configuration object for Amazon FSx for Lustre file systems used in the\n UpdateFileSystem operation.

" } }, + "com.amazonaws.fsx#UpdateFileSystemLustreMetadataConfiguration": { + "type": "structure", + "members": { + "Iops": { + "target": "com.amazonaws.fsx#MetadataIops", + "traits": { + "smithy.api#documentation": "

(USER_PROVISIONED mode only) Specifies the number of Metadata IOPS to provision\n for your file system. Valid values are 1500, 3000,\n 6000, 12000, and multiples of 12000\n up to a maximum of 192000.

\n

The value you provide must be greater than or equal to the current number of\n Metadata IOPS provisioned for the file system.

" + } + }, + "Mode": { + "target": "com.amazonaws.fsx#MetadataConfigurationMode", + "traits": { + "smithy.api#documentation": "

The metadata configuration mode for provisioning Metadata IOPS for\n an FSx for Lustre file system using a PERSISTENT_2\n deployment type.

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

The Lustre metadata performance configuration update for an Amazon FSx for Lustre\n file system using a PERSISTENT_2 deployment type. You can request\n an increase in your file system's Metadata IOPS and/or switch your file system's\n metadata configuration mode. For more information, see Managing\n metadata performance in the\n Amazon FSx for Lustre User Guide.

" + } + }, "com.amazonaws.fsx#UpdateFileSystemOntapConfiguration": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/global-accelerator.json b/codegen/sdk-codegen/aws-models/global-accelerator.json index 3f8300a1bc4..7374c575f08 100644 --- a/codegen/sdk-codegen/aws-models/global-accelerator.json +++ b/codegen/sdk-codegen/aws-models/global-accelerator.json @@ -5860,6 +5860,12 @@ "smithy.api#documentation": "

The IP address type that an accelerator supports. For a standard accelerator, the value can be IPV4 or DUAL_STACK.

" } }, + "IpAddresses": { + "target": "com.amazonaws.globalaccelerator#IpAddresses", + "traits": { + "smithy.api#documentation": "

The IP addresses for an accelerator.

" + } + }, "Enabled": { "target": "com.amazonaws.globalaccelerator#GenericBoolean", "traits": { @@ -6094,6 +6100,12 @@ "smithy.api#documentation": "

The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.

" } }, + "IpAddresses": { + "target": "com.amazonaws.globalaccelerator#IpAddresses", + "traits": { + "smithy.api#documentation": "

The IP addresses for an accelerator.

" + } + }, "Enabled": { "target": "com.amazonaws.globalaccelerator#GenericBoolean", "traits": { diff --git a/codegen/sdk-codegen/aws-models/glue.json b/codegen/sdk-codegen/aws-models/glue.json index c9158662031..2ac70181bcb 100644 --- a/codegen/sdk-codegen/aws-models/glue.json +++ b/codegen/sdk-codegen/aws-models/glue.json @@ -1655,6 +1655,16 @@ } } }, + "com.amazonaws.glue#AWSManagedClientApplicationReference": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "^\\S+$" + } + }, "com.amazonaws.glue#AccessDeniedException": { "type": "structure", "members": { @@ -2340,6 +2350,111 @@ "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, + "com.amazonaws.glue#AuthenticationConfiguration": { + "type": "structure", + "members": { + "AuthenticationType": { + "target": "com.amazonaws.glue#AuthenticationType", + "traits": { + "smithy.api#documentation": "

A structure containing the authentication configuration.

" + } + }, + "SecretArn": { + "target": "com.amazonaws.glue#SecretArn", + "traits": { + "smithy.api#documentation": "

The secret manager ARN to store credentials.

" + } + }, + "OAuth2Properties": { + "target": "com.amazonaws.glue#OAuth2Properties", + "traits": { + "smithy.api#documentation": "

The properties for OAuth2 authentication.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing the authentication configuration.

" + } + }, + "com.amazonaws.glue#AuthenticationConfigurationInput": { + "type": "structure", + "members": { + "AuthenticationType": { + "target": "com.amazonaws.glue#AuthenticationType", + "traits": { + "smithy.api#documentation": "

A structure containing the authentication configuration in the CreateConnection request.

" + } + }, + "SecretArn": { + "target": "com.amazonaws.glue#SecretArn", + "traits": { + "smithy.api#documentation": "

The secret manager ARN to store credentials in the CreateConnection request.

" + } + }, + "OAuth2Properties": { + "target": "com.amazonaws.glue#OAuth2PropertiesInput", + "traits": { + "smithy.api#documentation": "

The properties for OAuth2 authentication in the CreateConnection request.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing the authentication configuration in the CreateConnection request.

" + } + }, + "com.amazonaws.glue#AuthenticationType": { + "type": "enum", + "members": { + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BASIC" + } + }, + "OAUTH2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OAUTH2" + } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM" + } + } + } + }, + "com.amazonaws.glue#AuthorizationCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + }, + "smithy.api#pattern": "^\\S+$" + } + }, + "com.amazonaws.glue#AuthorizationCodeProperties": { + "type": "structure", + "members": { + "AuthorizationCode": { + "target": "com.amazonaws.glue#AuthorizationCode", + "traits": { + "smithy.api#documentation": "

An authorization code to be used in the third leg of the AUTHORIZATION_CODE grant workflow. This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter.

" + } + }, + "RedirectUri": { + "target": "com.amazonaws.glue#RedirectUri", + "traits": { + "smithy.api#documentation": "

The redirect URI where the user gets redirected to by authorization server when issuing an authorization code. The URI is subsequently used when the authorization code is exchanged for an access token.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The set of properties required for the the OAuth2 AUTHORIZATION_CODE grant type workflow.

" + } + }, "com.amazonaws.glue#BackfillError": { "type": "structure", "members": { @@ -6490,19 +6605,19 @@ "PhysicalConnectionRequirements": { "target": "com.amazonaws.glue#PhysicalConnectionRequirements", "traits": { - "smithy.api#documentation": "

A map of physical connection requirements, such as virtual private cloud (VPC) and\n SecurityGroup, that are needed to make this connection successfully.

" + "smithy.api#documentation": "

The physical connection requirements, such as virtual private cloud (VPC) and SecurityGroup, that are needed to make this connection successfully.

" } }, "CreationTime": { "target": "com.amazonaws.glue#Timestamp", "traits": { - "smithy.api#documentation": "

The time that this connection definition was created.

" + "smithy.api#documentation": "

The timestamp of the time that this connection definition was created.

" } }, "LastUpdatedTime": { "target": "com.amazonaws.glue#Timestamp", "traits": { - "smithy.api#documentation": "

The last time that this connection definition was updated.

" + "smithy.api#documentation": "

The timestamp of the last time the connection definition was updated.

" } }, "LastUpdatedBy": { @@ -6510,6 +6625,30 @@ "traits": { "smithy.api#documentation": "

The user, group, or role that last updated this connection definition.

" } + }, + "Status": { + "target": "com.amazonaws.glue#ConnectionStatus", + "traits": { + "smithy.api#documentation": "

The status of the connection. Can be one of: READY, IN_PROGRESS, or FAILED.

" + } + }, + "StatusReason": { + "target": "com.amazonaws.glue#LongValueString", + "traits": { + "smithy.api#documentation": "

The reason for the connection status.

" + } + }, + "LastConnectionValidationTime": { + "target": "com.amazonaws.glue#Timestamp", + "traits": { + "smithy.api#documentation": "

A timestamp of the time this connection was last validated.

" + } + }, + "AuthenticationConfiguration": { + "target": "com.amazonaws.glue#AuthenticationConfiguration", + "traits": { + "smithy.api#documentation": "

The authentication properties of the connection.

" + } } }, "traits": { @@ -6522,7 +6661,7 @@ "Name": { "target": "com.amazonaws.glue#NameString", "traits": { - "smithy.api#documentation": "

The name of the connection. Connection will not function as expected without a name.

", + "smithy.api#documentation": "

The name of the connection.

", "smithy.api#required": {} } }, @@ -6535,7 +6674,7 @@ "ConnectionType": { "target": "com.amazonaws.glue#ConnectionType", "traits": { - "smithy.api#documentation": "

The type of the connection. Currently, these types are supported:

\n \n

\n SFTP is not supported.

\n

For more information about how optional ConnectionProperties are used to configure features in Glue, consult Glue connection properties.

\n

For more information about how optional ConnectionProperties are used to configure features in Glue Studio, consult Using connectors and connections.

", + "smithy.api#documentation": "

The type of the connection. Currently, these types are supported:

\n \n

\n SFTP is not supported.

\n

For more information about how optional ConnectionProperties are used to configure features in Glue, consult Glue connection properties.

\n

For more information about how optional ConnectionProperties are used to configure features in Glue Studio, consult Using connectors and connections.

", "smithy.api#required": {} } }, @@ -6555,7 +6694,20 @@ "PhysicalConnectionRequirements": { "target": "com.amazonaws.glue#PhysicalConnectionRequirements", "traits": { - "smithy.api#documentation": "

A map of physical connection requirements, such as virtual private cloud (VPC) and\n SecurityGroup, that are needed to successfully make this connection.

" + "smithy.api#documentation": "

The physical connection requirements, such as virtual private cloud (VPC) and SecurityGroup, that are needed to successfully make this connection.

" + } + }, + "AuthenticationConfiguration": { + "target": "com.amazonaws.glue#AuthenticationConfigurationInput", + "traits": { + "smithy.api#documentation": "

The authentication properties of the connection. Used for a Salesforce connection.

" + } + }, + "ValidateCredentials": { + "target": "com.amazonaws.glue#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

A flag to validate the credentials during create connection. Used for a Salesforce connection. Default is true.

" } } }, @@ -6863,6 +7015,35 @@ "traits": { "smithy.api#enumValue": "KAFKA_SASL_GSSAPI_PRINCIPAL" } + }, + "ROLE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLE_ARN" + } + } + } + }, + "com.amazonaws.glue#ConnectionStatus": { + "type": "enum", + "members": { + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } } } }, @@ -6910,6 +7091,12 @@ "traits": { "smithy.api#enumValue": "CUSTOM" } + }, + "SALESFORCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SALESFORCE" + } } } }, @@ -7847,7 +8034,14 @@ }, "com.amazonaws.glue#CreateConnectionResponse": { "type": "structure", - "members": {}, + "members": { + "CreateConnectionStatus": { + "target": "com.amazonaws.glue#ConnectionStatus", + "traits": { + "smithy.api#documentation": "

The status of the connection creation request. The request can take some time for certain authentication types, for example when creating an OAuth connection with token exchange over VPC.

" + } + } + }, "traits": { "smithy.api#output": {} } @@ -8719,7 +8913,7 @@ "Timeout": { "target": "com.amazonaws.glue#Timeout", "traits": { - "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours).

" + "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours) for batch jobs.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" } }, "MaxCapacity": { @@ -14413,6 +14607,30 @@ "com.amazonaws.glue#FederationSourceErrorCode": { "type": "enum", "members": { + "AccessDeniedException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccessDeniedException" + } + }, + "EntityNotFoundException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EntityNotFoundException" + } + }, + "InvalidCredentialsException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidCredentialsException" + } + }, + "InvalidInputException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidInputException" + } + }, "InvalidResponseException": { "target": "smithy.api#Unit", "traits": { @@ -14437,6 +14655,12 @@ "smithy.api#enumValue": "InternalServiceException" } }, + "PartialFailureException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PartialFailureException" + } + }, "ThrottlingException": { "target": "smithy.api#Unit", "traits": { @@ -21999,7 +22223,7 @@ "Timeout": { "target": "com.amazonaws.glue#Timeout", "traits": { - "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours).

" + "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours) for batch jobs.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" } }, "MaxCapacity": { @@ -22343,7 +22567,7 @@ "Timeout": { "target": "com.amazonaws.glue#Timeout", "traits": { - "smithy.api#documentation": "

The JobRun timeout in minutes. This is the maximum time that a job run can\n consume resources before it is terminated and enters TIMEOUT status. This value overrides the timeout value set in the parent job.

\n

The maximum value for timeout for batch jobs is 7 days or 10080 minutes. The default is 2880 minutes (48 hours) for batch jobs.

\n

Any existing Glue jobs that have a greater timeout value are defaulted to 7 days. For instance you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" + "smithy.api#documentation": "

The JobRun timeout in minutes. This is the maximum time that a job run can\n consume resources before it is terminated and enters TIMEOUT status. This value overrides the timeout value set in the parent job.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" } }, "MaxCapacity": { @@ -22559,7 +22783,7 @@ "Timeout": { "target": "com.amazonaws.glue#Timeout", "traits": { - "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours).

" + "smithy.api#documentation": "

The job timeout in minutes. This is the maximum time that a job run\n can consume resources before it is terminated and enters TIMEOUT\n status. The default is 2,880 minutes (48 hours) for batch jobs.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" } }, "MaxCapacity": { @@ -25014,6 +25238,15 @@ "smithy.api#default": 0 } }, + "com.amazonaws.glue#LongValueString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 16384 + } + } + }, "com.amazonaws.glue#MLTransform": { "type": "structure", "members": { @@ -25964,6 +26197,119 @@ "com.amazonaws.glue#NullableString": { "type": "string" }, + "com.amazonaws.glue#OAuth2ClientApplication": { + "type": "structure", + "members": { + "UserManagedClientApplicationClientId": { + "target": "com.amazonaws.glue#UserManagedClientApplicationClientId", + "traits": { + "smithy.api#documentation": "

The client application clientID if the ClientAppType is USER_MANAGED.

" + } + }, + "AWSManagedClientApplicationReference": { + "target": "com.amazonaws.glue#AWSManagedClientApplicationReference", + "traits": { + "smithy.api#documentation": "

The reference to the SaaS-side client app that is Amazon Web Services managed.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The OAuth2 client app used for the connection.

" + } + }, + "com.amazonaws.glue#OAuth2GrantType": { + "type": "enum", + "members": { + "AUTHORIZATION_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTHORIZATION_CODE" + } + }, + "CLIENT_CREDENTIALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLIENT_CREDENTIALS" + } + }, + "JWT_BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JWT_BEARER" + } + } + } + }, + "com.amazonaws.glue#OAuth2Properties": { + "type": "structure", + "members": { + "OAuth2GrantType": { + "target": "com.amazonaws.glue#OAuth2GrantType", + "traits": { + "smithy.api#documentation": "

The OAuth2 grant type. For example, AUTHORIZATION_CODE, JWT_BEARER, or CLIENT_CREDENTIALS.

" + } + }, + "OAuth2ClientApplication": { + "target": "com.amazonaws.glue#OAuth2ClientApplication", + "traits": { + "smithy.api#documentation": "

The client application type. For example, AWS_MANAGED or USER_MANAGED.

" + } + }, + "TokenUrl": { + "target": "com.amazonaws.glue#TokenUrl", + "traits": { + "smithy.api#documentation": "

The URL of the provider's authentication server, to exchange an authorization code for an access token.

" + } + }, + "TokenUrlParametersMap": { + "target": "com.amazonaws.glue#TokenUrlParametersMap", + "traits": { + "smithy.api#documentation": "

A map of parameters that are added to the token GET request.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing properties for OAuth2 authentication.

" + } + }, + "com.amazonaws.glue#OAuth2PropertiesInput": { + "type": "structure", + "members": { + "OAuth2GrantType": { + "target": "com.amazonaws.glue#OAuth2GrantType", + "traits": { + "smithy.api#documentation": "

The OAuth2 grant type in the CreateConnection request. For example, AUTHORIZATION_CODE, JWT_BEARER, or CLIENT_CREDENTIALS.

" + } + }, + "OAuth2ClientApplication": { + "target": "com.amazonaws.glue#OAuth2ClientApplication", + "traits": { + "smithy.api#documentation": "

The client application type in the CreateConnection request. For example, AWS_MANAGED or USER_MANAGED.

" + } + }, + "TokenUrl": { + "target": "com.amazonaws.glue#TokenUrl", + "traits": { + "smithy.api#documentation": "

The URL of the provider's authentication server, to exchange an authorization code for an access token.

" + } + }, + "TokenUrlParametersMap": { + "target": "com.amazonaws.glue#TokenUrlParametersMap", + "traits": { + "smithy.api#documentation": "

A map of parameters that are added to the token GET request.

" + } + }, + "AuthorizationCodeProperties": { + "target": "com.amazonaws.glue#AuthorizationCodeProperties", + "traits": { + "smithy.api#documentation": "

The set of properties required for the the OAuth2 AUTHORIZATION_CODE grant type.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing properties for OAuth2 in the CreateConnection request.

" + } + }, "com.amazonaws.glue#OneInput": { "type": "list", "member": { @@ -26847,12 +27193,12 @@ "AvailabilityZone": { "target": "com.amazonaws.glue#NameString", "traits": { - "smithy.api#documentation": "

The connection's Availability Zone. This field is redundant because the specified subnet\n implies the Availability Zone to be used. Currently the field must be populated, but it will\n be deprecated in the future.

" + "smithy.api#documentation": "

The connection's Availability Zone.

" } } }, "traits": { - "smithy.api#documentation": "

Specifies the physical requirements for a connection.

" + "smithy.api#documentation": "

The OAuth client app in GetConnection response.

" } }, "com.amazonaws.glue#PiiType": { @@ -27735,6 +28081,16 @@ "smithy.api#documentation": "

When crawling an Amazon S3 data source after the first crawl is complete, specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run. For more information, see Incremental Crawls in Glue in the developer guide.

" } }, + "com.amazonaws.glue#RedirectUri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 512 + }, + "smithy.api#pattern": "^(https?):\\/\\/[^\\s/$.?#].[^\\s]*$" + } + }, "com.amazonaws.glue#RedshiftSource": { "type": "structure", "members": { @@ -30190,6 +30546,12 @@ "smithy.api#output": {} } }, + "com.amazonaws.glue#SecretArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-(cn|us-gov|iso(-[bef])?))?:secretsmanager:.*$" + } + }, "com.amazonaws.glue#SecurityConfiguration": { "type": "structure", "members": { @@ -31869,7 +32231,7 @@ "Timeout": { "target": "com.amazonaws.glue#Timeout", "traits": { - "smithy.api#documentation": "

The JobRun timeout in minutes. This is the maximum time that a job run can\n consume resources before it is terminated and enters TIMEOUT status. This value overrides the timeout value set in the parent job.

\n

Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours).

" + "smithy.api#documentation": "

The JobRun timeout in minutes. This is the maximum time that a job run can\n consume resources before it is terminated and enters TIMEOUT status. This value overrides the timeout value set in the parent job.

\n

Streaming jobs must have timeout values less than 7 days or 10080 minutes. When the value is left blank, the job will be restarted after 7 days based if you have not setup a maintenance window. If you have setup maintenance window, it will be restarted during the maintenance window after 7 days.

" } }, "MaxCapacity": { @@ -33194,6 +33556,12 @@ "traits": { "smithy.api#documentation": "

A TableIdentifier structure that describes a target table for resource linking.

" } + }, + "ViewDefinition": { + "target": "com.amazonaws.glue#ViewDefinitionInput", + "traits": { + "smithy.api#documentation": "

A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.

" + } } }, "traits": { @@ -33848,6 +34216,43 @@ "com.amazonaws.glue#Token": { "type": "string" }, + "com.amazonaws.glue#TokenUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]$" + } + }, + "com.amazonaws.glue#TokenUrlParameterKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.glue#TokenUrlParameterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.glue#TokenUrlParametersMap": { + "type": "map", + "key": { + "target": "com.amazonaws.glue#TokenUrlParameterKey" + }, + "value": { + "target": "com.amazonaws.glue#TokenUrlParameterValue" + } + }, "com.amazonaws.glue#Topk": { "type": "integer", "traits": { @@ -36301,6 +36706,19 @@ "traits": { "smithy.api#documentation": "

The version ID at which to update the table contents.

" } + }, + "ViewUpdateAction": { + "target": "com.amazonaws.glue#ViewUpdateAction", + "traits": { + "smithy.api#documentation": "

The operation to be performed when updating the view.

" + } + }, + "Force": { + "target": "com.amazonaws.glue#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.

" + } } }, "traits": { @@ -36685,6 +37103,16 @@ "target": "com.amazonaws.glue#UserDefinedFunction" } }, + "com.amazonaws.glue#UserManagedClientApplicationClientId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "^\\S+$" + } + }, "com.amazonaws.glue#ValidationException": { "type": "structure", "members": { @@ -36797,6 +37225,38 @@ "smithy.api#documentation": "

A structure containing details for representations.

" } }, + "com.amazonaws.glue#ViewDefinitionInput": { + "type": "structure", + "members": { + "IsProtected": { + "target": "com.amazonaws.glue#NullableBoolean", + "traits": { + "smithy.api#documentation": "

You can set this flag as true to instruct the engine not to push user-provided operations into the logical plan of the view during query planning. However, setting this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.

" + } + }, + "Definer": { + "target": "com.amazonaws.glue#ArnString", + "traits": { + "smithy.api#documentation": "

The definer of a view in SQL.

" + } + }, + "Representations": { + "target": "com.amazonaws.glue#ViewRepresentationInputList", + "traits": { + "smithy.api#documentation": "

A list of structures that contains the dialect of the view, and the query that defines the view.

" + } + }, + "SubObjects": { + "target": "com.amazonaws.glue#ViewSubObjectsList", + "traits": { + "smithy.api#documentation": "

A list of base table ARNs that make up the view.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing details for creating or updating an Glue view.

" + } + }, "com.amazonaws.glue#ViewDialect": { "type": "enum", "members": { @@ -36853,7 +37313,13 @@ "ViewExpandedText": { "target": "com.amazonaws.glue#ViewTextString", "traits": { - "smithy.api#documentation": "

The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform ViewOriginalText to ViewExpandedText. For example:

\n " + "smithy.api#documentation": "

The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform ViewOriginalText to ViewExpandedText. For example:

\n " + } + }, + "ValidationConnection": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the connection to be used to validate the specific representation of the view.

" } }, "IsStale": { @@ -36867,6 +37333,56 @@ "smithy.api#documentation": "

A structure that contains the dialect of the view, and the query that defines the view.

" } }, + "com.amazonaws.glue#ViewRepresentationInput": { + "type": "structure", + "members": { + "Dialect": { + "target": "com.amazonaws.glue#ViewDialect", + "traits": { + "smithy.api#documentation": "

A parameter that specifies the engine type of a specific representation.

" + } + }, + "DialectVersion": { + "target": "com.amazonaws.glue#ViewDialectVersionString", + "traits": { + "smithy.api#documentation": "

A parameter that specifies the version of the engine of a specific representation.

" + } + }, + "ViewOriginalText": { + "target": "com.amazonaws.glue#ViewTextString", + "traits": { + "smithy.api#documentation": "

A string that represents the original SQL query that describes the view.

" + } + }, + "ValidationConnection": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the connection to be used to validate the specific representation of the view.

" + } + }, + "ViewExpandedText": { + "target": "com.amazonaws.glue#ViewTextString", + "traits": { + "smithy.api#documentation": "

A string that represents the SQL query that describes the view with expanded resource ARNs

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing details of a representation to update or create a Lake Formation view.

" + } + }, + "com.amazonaws.glue#ViewRepresentationInputList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#ViewRepresentationInput" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, "com.amazonaws.glue#ViewRepresentationList": { "type": "list", "member": { @@ -36900,6 +37416,35 @@ } } }, + "com.amazonaws.glue#ViewUpdateAction": { + "type": "enum", + "members": { + "ADD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADD" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + }, + "ADD_OR_REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADD_OR_REPLACE" + } + }, + "DROP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DROP" + } + } + } + }, "com.amazonaws.glue#WorkerType": { "type": "enum", "members": { diff --git a/codegen/sdk-codegen/aws-models/iot-wireless.json b/codegen/sdk-codegen/aws-models/iot-wireless.json index e703a56407c..7edd03b1933 100644 --- a/codegen/sdk-codegen/aws-models/iot-wireless.json +++ b/codegen/sdk-codegen/aws-models/iot-wireless.json @@ -4479,6 +4479,12 @@ "traits": { "smithy.api#enumValue": "Successful" } + }, + "Device_exist_in_conflict_fuota_task": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Device_exist_in_conflict_fuota_task" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/location.json b/codegen/sdk-codegen/aws-models/location.json index 29c384c36f9..0e2b3d4021f 100644 --- a/codegen/sdk-codegen/aws-models/location.json +++ b/codegen/sdk-codegen/aws-models/location.json @@ -37,7 +37,7 @@ "min": 5, "max": 200 }, - "smithy.api#pattern": "^geo:\\w*\\*?$" + "smithy.api#pattern": "^(geo|geo-routes|geo-places|geo-maps):\\w*\\*?$" } }, "com.amazonaws.location#ApiKeyActionList": { @@ -214,6 +214,15 @@ "type": "structure", "members": {} }, + "com.amazonaws.location#Base64EncodedGeobuf": { + "type": "blob", + "traits": { + "smithy.api#length": { + "max": 600000 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.location#BatchDeleteDevicePositionHistory": { "type": "operation", "input": { @@ -783,7 +792,7 @@ "Geometry": { "target": "com.amazonaws.location#GeofenceGeometry", "traits": { - "smithy.api#documentation": "

Contains the details of the position of the geofence. Can be either a \n polygon or a circle. Including both will return a validation error.

\n \n

Each \n geofence polygon can have a maximum of 1,000 vertices.

\n
", + "smithy.api#documentation": "

Contains the details to specify the position of the geofence. Can be a\n polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.

\n \n

The \n geofence polygon format supports a maximum of 1,000 vertices. The Geofence geobuf format supports a maximum of 100,000 vertices.

\n
", "smithy.api#required": {} } }, @@ -1439,6 +1448,25 @@ "smithy.api#documentation": "

Contains details about additional route preferences for requests that specify\n TravelMode as Truck.

" } }, + "com.amazonaws.location#CellSignals": { + "type": "structure", + "members": { + "LteCellDetails": { + "target": "com.amazonaws.location#LteCellDetailsList", + "traits": { + "smithy.api#documentation": "

Information about the Long-Term Evolution (LTE) network the device is connected to.

", + "smithy.api#length": { + "min": 1, + "max": 16 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The cellular network communication infrastructure that the device uses.

" + } + }, "com.amazonaws.location#Circle": { "type": "structure", "members": { @@ -1479,12 +1507,6 @@ "smithy.api#httpError": 409 } }, - "com.amazonaws.location#CountryCode": { - "type": "string", - "traits": { - "smithy.api#pattern": "^[A-Z]{3}$" - } - }, "com.amazonaws.location#CountryCode3": { "type": "string", "traits": { @@ -1508,7 +1530,7 @@ "com.amazonaws.location#CountryCodeList": { "type": "list", "member": { - "target": "com.amazonaws.location#CountryCode" + "target": "com.amazonaws.location#CountryCode3" }, "traits": { "smithy.api#length": { @@ -1603,7 +1625,7 @@ "target": "com.amazonaws.location#KmsKeyId", "traits": { "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "

A key identifier for an \n Amazon Web Services \n KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.\n\t

" + "smithy.api#documentation": "

A key identifier for an\n Amazon Web Services\n KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.\n\t

" } } } @@ -2682,7 +2704,7 @@ "KmsKeyId": { "target": "com.amazonaws.location#KmsKeyId", "traits": { - "smithy.api#documentation": "

A key identifier for an \n Amazon Web Services \n KMS customer managed key assigned to the Amazon Location resource

" + "smithy.api#documentation": "

A key identifier for an\n Amazon Web Services\n KMS customer managed key assigned to the Amazon Location resource

" } }, "Tags": { @@ -3434,6 +3456,57 @@ "target": "com.amazonaws.location#DevicePositionUpdate" } }, + "com.amazonaws.location#DeviceState": { + "type": "structure", + "members": { + "DeviceId": { + "target": "com.amazonaws.location#Id", + "traits": { + "smithy.api#documentation": "

The device identifier.

", + "smithy.api#required": {} + } + }, + "SampleTime": { + "target": "com.amazonaws.location#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp at which the device's position was determined. Uses ISO 8601 \n format: YYYY-MM-DDThh:mm:ss.sssZ.

", + "smithy.api#required": {} + } + }, + "Position": { + "target": "com.amazonaws.location#Position", + "traits": { + "smithy.api#documentation": "

The last known device position.

", + "smithy.api#required": {} + } + }, + "Accuracy": { + "target": "com.amazonaws.location#PositionalAccuracy" + }, + "Ipv4Address": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The device's Ipv4 address.

", + "smithy.api#pattern": "^(?:(?:25[0-5]|(?:2[0-4]|1\\d|[0-9]|)\\d)\\.?\\b){4}$" + } + }, + "WiFiAccessPoints": { + "target": "com.amazonaws.location#WiFiAccessPointList", + "traits": { + "smithy.api#documentation": "

The Wi-Fi access points the device is using.

" + } + }, + "CellSignals": { + "target": "com.amazonaws.location#CellSignals", + "traits": { + "smithy.api#documentation": "

The cellular network infrastructure that the device is connected to.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The device's position, IP address, and Wi-Fi access points.

" + } + }, "com.amazonaws.location#DimensionUnit": { "type": "string", "traits": { @@ -3521,173 +3594,45 @@ ] } }, - "com.amazonaws.location#FilterPlaceCategoryList": { - "type": "list", - "member": { - "target": "com.amazonaws.location#PlaceCategory" - }, + "com.amazonaws.location#Earfcn": { + "type": "integer", "traits": { - "smithy.api#length": { - "min": 1, - "max": 5 - } - } - }, - "com.amazonaws.location#GenericResource": { - "type": "resource", - "identifiers": { - "ResourceArn": { - "target": "com.amazonaws.location#Arn" - } - }, - "operations": [ - { - "target": "com.amazonaws.location#ListTagsForResource" - }, - { - "target": "com.amazonaws.location#TagResource" - }, - { - "target": "com.amazonaws.location#UntagResource" + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 262143 } - ], - "traits": { - "aws.api#controlPlane": {}, - "aws.iam#disableConditionKeyInference": {} } }, - "com.amazonaws.location#GeoArn": { - "type": "string", + "com.amazonaws.location#EutranCellId": { + "type": "integer", "traits": { - "aws.api#arnReference": {}, - "smithy.api#length": { - "max": 1600 - }, - "smithy.api#pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*):geo(:([a-z0-9]+([.-][a-z0-9]+)*))(:[0-9]+):((\\*)|([-a-z]+[/][*-._\\w]+))$" + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 268435455 + } } }, - "com.amazonaws.location#GeoArnList": { + "com.amazonaws.location#FilterPlaceCategoryList": { "type": "list", "member": { - "target": "com.amazonaws.location#GeoArn" - } - }, - "com.amazonaws.location#GeofenceCollectionResource": { - "type": "resource", - "identifiers": { - "CollectionName": { - "target": "com.amazonaws.location#ResourceName" - } - }, - "put": { - "target": "com.amazonaws.location#CreateGeofenceCollection" - }, - "read": { - "target": "com.amazonaws.location#DescribeGeofenceCollection" - }, - "update": { - "target": "com.amazonaws.location#UpdateGeofenceCollection" - }, - "delete": { - "target": "com.amazonaws.location#DeleteGeofenceCollection" - }, - "list": { - "target": "com.amazonaws.location#ListGeofenceCollections" - }, - "operations": [ - { - "target": "com.amazonaws.location#BatchDeleteGeofence" - }, - { - "target": "com.amazonaws.location#BatchEvaluateGeofences" - }, - { - "target": "com.amazonaws.location#BatchPutGeofence" - }, - { - "target": "com.amazonaws.location#GetGeofence" - }, - { - "target": "com.amazonaws.location#ListGeofences" - }, - { - "target": "com.amazonaws.location#PutGeofence" - } - ], - "traits": { - "aws.api#arn": { - "template": "geofence-collection/{CollectionName}" - }, - "aws.cloudformation#cfnResource": { - "name": "GeofenceCollection" - }, - "aws.iam#disableConditionKeyInference": {} - } - }, - "com.amazonaws.location#GeofenceGeometry": { - "type": "structure", - "members": { - "Polygon": { - "target": "com.amazonaws.location#LinearRings", - "traits": { - "smithy.api#documentation": "

A polygon is a list of linear rings which are each made up of a list of\n vertices.

\n

Each vertex is a 2-dimensional point of the form: [longitude, latitude].\n This is represented as an array of doubles of length 2 (so [double,\n double]).

\n

An array of 4 or more vertices, where the first and last vertex are the same (to form\n a closed boundary), is called a linear ring. The linear ring vertices must be listed in\n counter-clockwise order around the ring’s interior. The linear ring is represented as an\n array of vertices, or an array of arrays of doubles ([[double, double], ...]).

\n

A geofence consists of a single linear ring. To allow for future expansion, the\n Polygon parameter takes an array of linear rings, which is represented as an array of\n arrays of arrays of doubles ([[[double, double], ...], ...]).

\n

A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

" - } - }, - "Circle": { - "target": "com.amazonaws.location#Circle", - "traits": { - "smithy.api#documentation": "

A circle on the earth, as defined by a center point and a radius.

" - } - } + "target": "com.amazonaws.location#PlaceCategory" }, "traits": { - "smithy.api#documentation": "

Contains the geofence geometry details.

\n

A geofence geometry is made up of either a polygon or a circle. Can be either a \n polygon or a circle. Including both will return a validation error.

\n \n

Amazon Location doesn't currently support polygons with holes, multipolygons, polygons\n that are wound clockwise, or that cross the antimeridian.

\n
" - } - }, - "com.amazonaws.location#GetDevicePosition": { - "type": "operation", - "input": { - "target": "com.amazonaws.location#GetDevicePositionRequest" - }, - "output": { - "target": "com.amazonaws.location#GetDevicePositionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.location#AccessDeniedException" - }, - { - "target": "com.amazonaws.location#InternalServerException" - }, - { - "target": "com.amazonaws.location#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.location#ThrottlingException" - }, - { - "target": "com.amazonaws.location#ValidationException" + "smithy.api#length": { + "min": 1, + "max": 5 } - ], - "traits": { - "smithy.api#documentation": "

Retrieves a device's most recent position according to its sample time.

\n \n

Device positions are deleted after 30 days.

\n
", - "smithy.api#endpoint": { - "hostPrefix": "tracking." - }, - "smithy.api#http": { - "uri": "/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest", - "method": "GET" - }, - "smithy.api#readonly": {} } }, - "com.amazonaws.location#GetDevicePositionHistory": { + "com.amazonaws.location#ForecastGeofenceEvents": { "type": "operation", "input": { - "target": "com.amazonaws.location#GetDevicePositionHistoryRequest" + "target": "com.amazonaws.location#ForecastGeofenceEventsRequest" }, "output": { - "target": "com.amazonaws.location#GetDevicePositionHistoryResponse" + "target": "com.amazonaws.location#ForecastGeofenceEventsResponse" }, "errors": [ { @@ -3707,49 +3652,460 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the device position history from a tracker resource within a specified range\n of time.

\n \n

Device positions are deleted after 30 days.

\n
", + "smithy.api#documentation": "

Evaluates device positions against\n geofence geometries from a given geofence collection. The event forecasts three states for which\n a device can be in relative to a geofence:

\n

\n ENTER: If a device is outside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

\n

\n EXIT: If a device is inside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

\n

\n IDLE: If a device is inside of a geofence, and the device is not moving.

", "smithy.api#endpoint": { - "hostPrefix": "tracking." + "hostPrefix": "geofencing." }, "smithy.api#http": { - "uri": "/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions", + "uri": "/geofencing/v0/collections/{CollectionName}/forecast-geofence-events", "method": "POST" }, "smithy.api#paginated": { "pageSize": "MaxResults", "inputToken": "NextToken", "outputToken": "NextToken", - "items": "DevicePositions" + "items": "ForecastedEvents" }, "smithy.api#readonly": {} } }, - "com.amazonaws.location#GetDevicePositionHistoryRequest": { + "com.amazonaws.location#ForecastGeofenceEventsDeviceState": { "type": "structure", "members": { - "TrackerName": { - "target": "com.amazonaws.location#ResourceName", + "Position": { + "target": "com.amazonaws.location#Position", "traits": { - "smithy.api#documentation": "

The tracker resource receiving the request for the device position history.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The device's position.

", "smithy.api#required": {} } }, - "DeviceId": { - "target": "com.amazonaws.location#Id", + "Speed": { + "target": "smithy.api#Double", "traits": { - "smithy.api#documentation": "

The device whose position history you want to retrieve.

", + "smithy.api#documentation": "

The device's speed.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The device's position, IP address, and WiFi access points.

" + } + }, + "com.amazonaws.location#ForecastGeofenceEventsRequest": { + "type": "structure", + "members": { + "CollectionName": { + "target": "com.amazonaws.location#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the geofence collection.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "NextToken": { - "target": "com.amazonaws.location#Token", + "DeviceState": { + "target": "com.amazonaws.location#ForecastGeofenceEventsDeviceState", "traits": { - "smithy.api#documentation": "

The pagination token specifying which page of results to return in the response. If no\n token is provided, the default page is the first page.

\n

Default value: null\n

" + "smithy.api#documentation": "

The device's state, including current position and speed.

", + "smithy.api#required": {} } }, - "StartTimeInclusive": { + "TimeHorizonMinutes": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Specifies the time horizon in minutes for the forecasted events.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "DistanceUnit": { + "target": "com.amazonaws.location#DistanceUnit", + "traits": { + "smithy.api#documentation": "

The distance unit used for the NearestDistance property returned in a forecasted event.\n The measurement system must match for DistanceUnit and SpeedUnit; if Kilometers\n is specified for DistanceUnit, then SpeedUnit must be KilometersPerHour.\n

\n

Default Value: Kilometers\n

" + } + }, + "SpeedUnit": { + "target": "com.amazonaws.location#SpeedUnit", + "traits": { + "smithy.api#documentation": "

The speed unit for the device captured by the device state. The measurement system must match for DistanceUnit and SpeedUnit; if Kilometers\n is specified for DistanceUnit, then SpeedUnit must be KilometersPerHour.

\n

Default Value: KilometersPerHour.

" + } + }, + "NextToken": { + "target": "com.amazonaws.location#LargeToken", + "traits": { + "smithy.api#documentation": "

The pagination token specifying which page of results to return in the response. If no\n token is provided, the default page is the first page.

\n

Default value: null\n

" + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of resources returned in a single call.

\n

Default value: 20\n

", + "smithy.api#range": { + "min": 1, + "max": 20 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.location#ForecastGeofenceEventsResponse": { + "type": "structure", + "members": { + "ForecastedEvents": { + "target": "com.amazonaws.location#ForecastedEventsList", + "traits": { + "smithy.api#documentation": "

The list of forecasted events.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.location#LargeToken", + "traits": { + "smithy.api#documentation": "

The pagination token specifying which page of results to return in the response. If no\n token is provided, the default page is the first page.

" + } + }, + "DistanceUnit": { + "target": "com.amazonaws.location#DistanceUnit", + "traits": { + "smithy.api#documentation": "

The distance unit for the forecasted events.

", + "smithy.api#required": {} + } + }, + "SpeedUnit": { + "target": "com.amazonaws.location#SpeedUnit", + "traits": { + "smithy.api#documentation": "

The speed unit for the forecasted events.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.location#ForecastedEvent": { + "type": "structure", + "members": { + "EventId": { + "target": "com.amazonaws.location#Uuid", + "traits": { + "smithy.api#documentation": "

The forecasted event identifier.

", + "smithy.api#required": {} + } + }, + "GeofenceId": { + "target": "com.amazonaws.location#Id", + "traits": { + "smithy.api#documentation": "

The geofence identifier pertaining to the forecasted event.

", + "smithy.api#required": {} + } + }, + "IsDeviceInGeofence": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates if the device is located within the geofence.

", + "smithy.api#required": {} + } + }, + "NearestDistance": { + "target": "com.amazonaws.location#NearestDistance", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The closest distance from the device's position to the geofence.

", + "smithy.api#required": {} + } + }, + "EventType": { + "target": "com.amazonaws.location#ForecastedGeofenceEventType", + "traits": { + "smithy.api#documentation": "

The event type, forecasting three states for which\n a device can be in relative to a geofence:

\n

\n ENTER: If a device is outside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

\n

\n EXIT: If a device is inside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

\n

\n IDLE: If a device is inside of a geofence, and the device is not moving.

", + "smithy.api#required": {} + } + }, + "ForecastedBreachTime": { + "target": "com.amazonaws.location#Timestamp", + "traits": { + "smithy.api#documentation": "

The forecasted time the device will breach the geofence in ISO 8601\n format: YYYY-MM-DDThh:mm:ss.sssZ\n

" + } + }, + "GeofenceProperties": { + "target": "com.amazonaws.location#PropertyMap", + "traits": { + "smithy.api#documentation": "

The geofence properties.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A forecasted event represents a geofence event in relation to the requested device state, that may occur\n given the provided device state and time horizon.

" + } + }, + "com.amazonaws.location#ForecastedEventsList": { + "type": "list", + "member": { + "target": "com.amazonaws.location#ForecastedEvent" + } + }, + "com.amazonaws.location#ForecastedGeofenceEventType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENTER", + "documentation": "This event type signifies that a device is forecasted to enter the geofence" + }, + { + "value": "EXIT", + "documentation": "This event type signifies that a device is forecasted to exit the geofence" + }, + { + "value": "IDLE", + "documentation": "This event type signifies that a device is stationary in the geofence and an exit/enter cannot be forecasted" + } + ] + } + }, + "com.amazonaws.location#GenericResource": { + "type": "resource", + "identifiers": { + "ResourceArn": { + "target": "com.amazonaws.location#Arn" + } + }, + "operations": [ + { + "target": "com.amazonaws.location#ListTagsForResource" + }, + { + "target": "com.amazonaws.location#TagResource" + }, + { + "target": "com.amazonaws.location#UntagResource" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.location#GeoArn": { + "type": "string", + "traits": { + "aws.api#arnReference": {}, + "smithy.api#length": { + "max": 1600 + }, + "smithy.api#pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*):geo(:([a-z0-9]+([.-][a-z0-9]+)*))(:[0-9]+):((\\*)|([-a-z]+[/][*-._\\w]+))$" + } + }, + "com.amazonaws.location#GeoArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.location#GeoArnV2" + } + }, + "com.amazonaws.location#GeoArnV2": { + "type": "string", + "traits": { + "aws.api#arnReference": {}, + "smithy.api#length": { + "max": 1600 + }, + "smithy.api#pattern": "(^arn(:[a-z0-9]+([.-][a-z0-9]+)*):geo(:([a-z0-9]+([.-][a-z0-9]+)*))(:[0-9]+):((\\*)|([-a-z]+[/][*-._\\w]+))$)|(^arn(:[a-z0-9]+([.-][a-z0-9]+)*):(geo-routes|geo-places|geo-maps)(:((\\*)|([a-z0-9]+([.-][a-z0-9]+)*)))::((provider[\\/][*-._\\w]+))$)" + } + }, + "com.amazonaws.location#GeofenceCollectionResource": { + "type": "resource", + "identifiers": { + "CollectionName": { + "target": "com.amazonaws.location#ResourceName" + } + }, + "put": { + "target": "com.amazonaws.location#CreateGeofenceCollection" + }, + "read": { + "target": "com.amazonaws.location#DescribeGeofenceCollection" + }, + "update": { + "target": "com.amazonaws.location#UpdateGeofenceCollection" + }, + "delete": { + "target": "com.amazonaws.location#DeleteGeofenceCollection" + }, + "list": { + "target": "com.amazonaws.location#ListGeofenceCollections" + }, + "operations": [ + { + "target": "com.amazonaws.location#BatchDeleteGeofence" + }, + { + "target": "com.amazonaws.location#BatchEvaluateGeofences" + }, + { + "target": "com.amazonaws.location#BatchPutGeofence" + }, + { + "target": "com.amazonaws.location#ForecastGeofenceEvents" + }, + { + "target": "com.amazonaws.location#GetGeofence" + }, + { + "target": "com.amazonaws.location#ListGeofences" + }, + { + "target": "com.amazonaws.location#PutGeofence" + } + ], + "traits": { + "aws.api#arn": { + "template": "geofence-collection/{CollectionName}" + }, + "aws.cloudformation#cfnResource": { + "name": "GeofenceCollection" + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.location#GeofenceGeometry": { + "type": "structure", + "members": { + "Polygon": { + "target": "com.amazonaws.location#LinearRings", + "traits": { + "smithy.api#documentation": "

A polygon is a list of linear rings which are each made up of a list of\n vertices.

\n

Each vertex is a 2-dimensional point of the form: [longitude, latitude].\n This is represented as an array of doubles of length 2 (so [double,\n double]).

\n

An array of 4 or more vertices, where the first and last vertex are the same (to form\n a closed boundary), is called a linear ring. The linear ring vertices must be listed in\n counter-clockwise order around the ring’s interior. The linear ring is represented as an\n array of vertices, or an array of arrays of doubles ([[double, double], ...]).

\n

A geofence consists of a single linear ring. To allow for future expansion, the\n Polygon parameter takes an array of linear rings, which is represented as an array of\n arrays of arrays of doubles ([[[double, double], ...], ...]).

\n

A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

" + } + }, + "Circle": { + "target": "com.amazonaws.location#Circle", + "traits": { + "smithy.api#documentation": "

A circle on the earth, as defined by a center point and a radius.

" + } + }, + "Geobuf": { + "target": "com.amazonaws.location#Base64EncodedGeobuf", + "traits": { + "smithy.api#documentation": "

Geobuf is a compact binary encoding for geographic data that provides lossless compression of GeoJSON polygons. The Geobuf must be Base64-encoded.

\n

A polygon in Geobuf format can have up to 100,000 vertices.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the geofence geometry details.

\n

A geofence geometry is made up of either a polygon or a circle. Can be a\n polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.

\n \n

Amazon Location doesn't currently support polygons with holes, multipolygons, polygons\n that are wound clockwise, or that cross the antimeridian.

\n
" + } + }, + "com.amazonaws.location#GetDevicePosition": { + "type": "operation", + "input": { + "target": "com.amazonaws.location#GetDevicePositionRequest" + }, + "output": { + "target": "com.amazonaws.location#GetDevicePositionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.location#AccessDeniedException" + }, + { + "target": "com.amazonaws.location#InternalServerException" + }, + { + "target": "com.amazonaws.location#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.location#ThrottlingException" + }, + { + "target": "com.amazonaws.location#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves a device's most recent position according to its sample time.

\n \n

Device positions are deleted after 30 days.

\n
", + "smithy.api#endpoint": { + "hostPrefix": "tracking." + }, + "smithy.api#http": { + "uri": "/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.location#GetDevicePositionHistory": { + "type": "operation", + "input": { + "target": "com.amazonaws.location#GetDevicePositionHistoryRequest" + }, + "output": { + "target": "com.amazonaws.location#GetDevicePositionHistoryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.location#AccessDeniedException" + }, + { + "target": "com.amazonaws.location#InternalServerException" + }, + { + "target": "com.amazonaws.location#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.location#ThrottlingException" + }, + { + "target": "com.amazonaws.location#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the device position history from a tracker resource within a specified range\n of time.

\n \n

Device positions are deleted after 30 days.

\n
", + "smithy.api#endpoint": { + "hostPrefix": "tracking." + }, + "smithy.api#http": { + "uri": "/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions", + "method": "POST" + }, + "smithy.api#paginated": { + "pageSize": "MaxResults", + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "DevicePositions" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.location#GetDevicePositionHistoryRequest": { + "type": "structure", + "members": { + "TrackerName": { + "target": "com.amazonaws.location#ResourceName", + "traits": { + "smithy.api#documentation": "

The tracker resource receiving the request for the device position history.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.location#Id", + "traits": { + "smithy.api#documentation": "

The device whose position history you want to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.location#Token", + "traits": { + "smithy.api#documentation": "

The pagination token specifying which page of results to return in the response. If no\n token is provided, the default page is the first page.

\n

Default value: null\n

" + } + }, + "StartTimeInclusive": { "target": "com.amazonaws.location#Timestamp", "traits": { "smithy.api#documentation": "

Specify the start time for the position history in ISO 8601\n format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be 24 hours\n prior to the time that the request is made.

\n

Requirement:

\n " @@ -3832,7 +4188,7 @@ "ReceivedTime": { "target": "com.amazonaws.location#Timestamp", "traits": { - "smithy.api#documentation": "

The timestamp for when the tracker resource received the device position in ISO 8601 \n format: YYYY-MM-DDThh:mm:ss.sssZ.

", + "smithy.api#documentation": "

The timestamp for when the tracker resource received the device position. Uses ISO 8601 \n format: YYYY-MM-DDThh:mm:ss.sssZ.

", "smithy.api#required": {} } }, @@ -3883,7 +4239,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the geofence details from a geofence collection.

", + "smithy.api#documentation": "

Retrieves the geofence details from a geofence collection.

\n \n

The returned geometry will always match the geometry format used when the geofence was created.

\n
", "smithy.api#endpoint": { "hostPrefix": "geofencing." }, @@ -4012,7 +4368,7 @@ "FontStack": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

A comma-separated list of fonts to load glyphs from in order of preference. For\n example, Noto Sans Regular, Arial Unicode.

\n

Valid font stacks for Esri styles:

\n \n

Valid font stacks for HERE Technologies styles:

\n \n

Valid font stacks for GrabMaps styles:

\n \n

Valid font stacks for Open Data styles:

\n \n \n

The fonts used by the Open Data map styles are combined fonts\n that use Amazon Ember for most glyphs but Noto Sans \n for glyphs unsupported by Amazon Ember.

\n
", + "smithy.api#documentation": "

A comma-separated list of fonts to load glyphs from in order of preference. For\n example, Noto Sans Regular, Arial Unicode.

\n

Valid font stacks for Esri styles:

\n \n

Valid font stacks for HERE Technologies styles:

\n \n

Valid font stacks for GrabMaps styles:

\n \n

Valid font stacks for Open Data styles:

\n \n \n

The fonts used by the Open Data map styles are combined fonts\n that use Amazon Ember for most glyphs but Noto Sans \n for glyphs unsupported by Amazon Ember.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4405,7 +4761,7 @@ "PlaceId": { "target": "com.amazonaws.location#PlaceId", "traits": { - "smithy.api#documentation": "

The identifier of the place to find.

\n

While you can use PlaceID in subsequent requests, \n PlaceID is not intended to be a permanent \n identifier and the ID can change between consecutive API calls. \n Please see the following PlaceID behaviour for each data provider:

\n ", + "smithy.api#documentation": "

The identifier of the place to find.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4454,6 +4810,39 @@ "target": "com.amazonaws.location#Id" } }, + "com.amazonaws.location#InferredState": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.location#Position", + "traits": { + "smithy.api#documentation": "

The device position inferred by the provided position, IP address, cellular signals, and Wi-Fi- access points.

" + } + }, + "Accuracy": { + "target": "com.amazonaws.location#PositionalAccuracy", + "traits": { + "smithy.api#documentation": "

The level of certainty of the inferred position.

" + } + }, + "DeviationDistance": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

The distance between the inferred position and the device's self-reported position.

" + } + }, + "ProxyDetected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates if a proxy was used.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The inferred state of the device, given the provided position, IP address, cellular signals, and Wi-Fi- access points.

" + } + }, "com.amazonaws.location#IntendedUse": { "type": "string", "traits": { @@ -4505,6 +4894,15 @@ } } }, + "com.amazonaws.location#LargeToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 60000 + } + } + }, "com.amazonaws.location#Leg": { "type": "structure", "members": { @@ -4893,7 +5291,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the geofence collection details.

" + "smithy.api#documentation": "

Contains the geofence collection details.

\n \n

The returned geometry will always match the geometry format used when the geofence was created.

\n
" } }, "com.amazonaws.location#ListGeofenceCollectionsResponseEntryList": { @@ -4948,7 +5346,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains a list of geofences stored in a given geofence collection.

" + "smithy.api#documentation": "

Contains a list of geofences stored in a given geofence collection.

\n \n

The returned geometry will always match the geometry format used when the geofence was created.

\n
" } }, "com.amazonaws.location#ListGeofenceResponseEntryList": { @@ -5012,7 +5410,7 @@ } }, "NextToken": { - "target": "com.amazonaws.location#Token", + "target": "com.amazonaws.location#LargeToken", "traits": { "smithy.api#documentation": "

The pagination token specifying which page of results to return in the response. If no\n token is provided, the default page is the first page.

\n

Default value: null\n

" } @@ -5041,7 +5439,7 @@ } }, "NextToken": { - "target": "com.amazonaws.location#Token", + "target": "com.amazonaws.location#LargeToken", "traits": { "smithy.api#documentation": "

A pagination token indicating there are additional pages available. You can use the\n token in a following request to fetch the next set of results.

" } @@ -6555,15 +6953,187 @@ "Endpoint": "https://example.com" } }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.location#LteCellDetails": { + "type": "structure", + "members": { + "CellId": { + "target": "com.amazonaws.location#EutranCellId", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The E-UTRAN Cell Identifier (ECI).

", + "smithy.api#required": {} + } + }, + "Mcc": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The Mobile Country Code (MCC).

", + "smithy.api#range": { + "min": 200, + "max": 999 + }, + "smithy.api#required": {} + } + }, + "Mnc": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The Mobile Network Code (MNC)

", + "smithy.api#range": { + "min": 0, + "max": 999 + }, + "smithy.api#required": {} + } + }, + "LocalId": { + "target": "com.amazonaws.location#LteLocalId", + "traits": { + "smithy.api#documentation": "

The LTE local identification information (local ID).

" + } + }, + "NetworkMeasurements": { + "target": "com.amazonaws.location#LteNetworkMeasurementsList", + "traits": { + "smithy.api#documentation": "

The network measurements.

", + "smithy.api#length": { + "min": 1, + "max": 32 } - ], - "version": "1.0" + } + }, + "TimingAdvance": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Timing Advance (TA).

", + "smithy.api#range": { + "min": 0, + "max": 1282 + } + } + }, + "NrCapable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the LTE object is capable of supporting NR (new radio).

" + } + }, + "Rsrp": { + "target": "com.amazonaws.location#Rsrp", + "traits": { + "smithy.api#documentation": "

Signal power of the reference signal received, measured in decibel-milliwatts (dBm).

" + } + }, + "Rsrq": { + "target": "com.amazonaws.location#Rsrq", + "traits": { + "smithy.api#documentation": "

Signal quality of the reference Signal received, measured in decibels (dB).

" + } + }, + "Tac": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

LTE Tracking Area Code (TAC).

", + "smithy.api#range": { + "min": 0, + "max": 65535 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the Long-Term Evolution (LTE) network.

" + } + }, + "com.amazonaws.location#LteCellDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.location#LteCellDetails" + } + }, + "com.amazonaws.location#LteLocalId": { + "type": "structure", + "members": { + "Earfcn": { + "target": "com.amazonaws.location#Earfcn", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency channel number (EARFCN).

", + "smithy.api#required": {} + } + }, + "Pci": { + "target": "com.amazonaws.location#Pci", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Physical Cell ID (PCI).

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

LTE local identification information (local ID).

" + } + }, + "com.amazonaws.location#LteNetworkMeasurements": { + "type": "structure", + "members": { + "Earfcn": { + "target": "com.amazonaws.location#Earfcn", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency channel number (EARFCN).

", + "smithy.api#required": {} + } + }, + "CellId": { + "target": "com.amazonaws.location#EutranCellId", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

E-UTRAN Cell Identifier (ECI).

", + "smithy.api#required": {} + } + }, + "Pci": { + "target": "com.amazonaws.location#Pci", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Physical Cell ID (PCI).

", + "smithy.api#required": {} + } + }, + "Rsrp": { + "target": "com.amazonaws.location#Rsrp", + "traits": { + "smithy.api#documentation": "

Signal power of the reference signal received, measured in dBm (decibel-milliwatts).

" + } + }, + "Rsrq": { + "target": "com.amazonaws.location#Rsrq", + "traits": { + "smithy.api#documentation": "

Signal quality of the reference Signal received, measured in decibels (dB).

" + } } + }, + "traits": { + "smithy.api#documentation": "

LTE network measurements.

" + } + }, + "com.amazonaws.location#LteNetworkMeasurementsList": { + "type": "list", + "member": { + "target": "com.amazonaws.location#LteNetworkMeasurements" } }, "com.amazonaws.location#MapConfiguration": { @@ -6572,7 +7142,7 @@ "Style": { "target": "com.amazonaws.location#MapStyle", "traits": { - "smithy.api#documentation": "

Specifies the map style selected from an available data provider.

\n

Valid Esri map styles:

\n \n

Valid HERE\n Technologies map styles:

\n \n

Valid GrabMaps map styles:

\n \n \n

Grab provides maps only for countries in Southeast Asia, and is only available \n in the Asia Pacific (Singapore) Region (ap-southeast-1).\n For more information, see GrabMaps countries and area covered.

\n
\n

Valid Open Data map styles:

\n ", + "smithy.api#documentation": "

Specifies the map style selected from an available data provider.

\n

Valid Esri map styles:

\n \n

Valid HERE\n Technologies map styles:

\n \n

Valid GrabMaps map styles:

\n \n \n

Grab provides maps only for countries in Southeast Asia, and is only available \n in the Asia Pacific (Singapore) Region (ap-southeast-1).\n For more information, see GrabMaps countries and area covered.

\n
\n

Valid Open Data map styles:

\n ", "smithy.api#required": {} } }, @@ -6585,8 +7155,7 @@ "CustomLayers": { "target": "com.amazonaws.location#CustomLayerList", "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "

Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style.\nDefault is unset.

\n \n

Currenlty only VectorEsriNavigation supports CustomLayers. \nFor more information, see Custom Layers.

\n
" + "smithy.api#documentation": "

Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style.\nDefault is unset.

\n \n

Not all map resources or styles support custom layers. See Custom Layers for more information.

\n
" } } }, @@ -6606,8 +7175,7 @@ "CustomLayers": { "target": "com.amazonaws.location#CustomLayerList", "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "

Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style.\nDefault is unset.

\n \n

Currenlty only VectorEsriNavigation supports CustomLayers. \nFor more information, see Custom Layers.

\n
" + "smithy.api#documentation": "

Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style.\nDefault is unset.

\n \n

Not all map resources or styles support custom layers. See Custom Layers for more information.

\n
" } } }, @@ -6671,6 +7239,15 @@ "smithy.api#pattern": "^[-._\\w]+$" } }, + "com.amazonaws.location#NearestDistance": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0 + } + } + }, "com.amazonaws.location#OptimizationMode": { "type": "string", "traits": { @@ -6684,6 +7261,16 @@ ] } }, + "com.amazonaws.location#Pci": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 503 + } + } + }, "com.amazonaws.location#Place": { "type": "structure", "members": { @@ -6762,13 +7349,13 @@ "UnitType": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

For addresses with a UnitNumber, the type of unit. For example,\n Apartment.

\n \n

This property is returned only for a place index that uses Esri as a data provider.

\n
" + "smithy.api#documentation": "

For addresses with a UnitNumber, the type of unit. For example,\n Apartment.

\n \n

Returned only for a place index that uses Esri as a data provider.

\n
" } }, "UnitNumber": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

For addresses with multiple units, the unit identifier. Can include numbers and\n letters, for example 3B or Unit 123.

\n \n

This property is returned only for a place index that uses Esri or Grab as a data provider. It is \n not returned for SearchPlaceIndexForPosition.

\n
" + "smithy.api#documentation": "

For addresses with multiple units, the unit identifier. Can include numbers and\n letters, for example 3B or Unit 123.

\n \n

Returned only for a place index that uses Esri or Grab as a data provider. Is \n not returned for SearchPlaceIndexForPosition.

\n
" } }, "Categories": { @@ -6786,7 +7373,7 @@ "SubMunicipality": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

An area that's part of a larger municipality. For example, Blissville \n is a submunicipality in the Queen County in New York.

\n \n

This property is only returned for a place index that uses Esri as a data provider. The property is represented as a district.

\n
\n

For more information about data providers, see Amazon Location Service data providers.

" + "smithy.api#documentation": "

An area that's part of a larger municipality. For example, Blissville \n is a submunicipality in the Queen County in New York.

\n \n

This property supported by Esri and OpenData. The Esri property is district, and the OpenData property is borough.

\n
" } } }, @@ -6956,7 +7543,7 @@ "smithy.api#documentation": "

Estimated maximum distance, in meters, between the measured position and the true\n position of a device, along the Earth's surface.

", "smithy.api#range": { "min": 0, - "max": 10000 + "max": 10000000 }, "smithy.api#required": {} } @@ -7074,7 +7661,7 @@ "Geometry": { "target": "com.amazonaws.location#GeofenceGeometry", "traits": { - "smithy.api#documentation": "

Contains the details to specify the position of the geofence. Can be either a \n polygon or a circle. Including both will return a validation error.

\n \n

Each \n geofence polygon can have a maximum of 1,000 vertices.

\n
", + "smithy.api#documentation": "

Contains the details to specify the position of the geofence. Can be a\n polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.

\n \n

The \n geofence polygon format supports a maximum of 1,000 vertices. The Geofence Geobuf format supports a maximum of 100,000 vertices.

\n
", "smithy.api#required": {} } }, @@ -7293,6 +7880,24 @@ "target": "com.amazonaws.location#RouteMatrixEntry" } }, + "com.amazonaws.location#Rsrp": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": -140, + "max": -44 + } + } + }, + "com.amazonaws.location#Rsrq": { + "type": "float", + "traits": { + "smithy.api#range": { + "min": -19.5, + "max": -3 + } + } + }, "com.amazonaws.location#SearchForPositionResult": { "type": "structure", "members": { @@ -7343,7 +7948,7 @@ "PlaceId": { "target": "com.amazonaws.location#PlaceId", "traits": { - "smithy.api#documentation": "

The unique identifier of the Place. You can use this with the GetPlace\n operation to find the place again later, or to get full information for the Place.

\n

The GetPlace request must use the same PlaceIndex \n resource as the SearchPlaceIndexForSuggestions that generated the Place \n ID.

\n \n

For SearchPlaceIndexForSuggestions operations, the\n PlaceId is returned by place indexes that use Esri, Grab, or HERE\n as data providers.

\n
\n

While you can use PlaceID in subsequent requests, \n PlaceID is not intended to be a permanent \n identifier and the ID can change between consecutive API calls. \n Please see the following PlaceID behaviour for each data provider:

\n " + "smithy.api#documentation": "

The unique identifier of the Place. You can use this with the GetPlace\n operation to find the place again later, or to get full information for the Place.

\n

The GetPlace request must use the same PlaceIndex \n resource as the SearchPlaceIndexForSuggestions that generated the Place \n ID.

\n \n

For SearchPlaceIndexForSuggestions operations, the\n PlaceId is returned by place indexes that use Esri, Grab, or HERE\n as data providers.

\n
" } }, "Categories": { @@ -7941,6 +8546,19 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.location#SpeedUnit": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "KilometersPerHour" + }, + { + "value": "MilesPerHour" + } + ] + } + }, "com.amazonaws.location#Status": { "type": "string", "traits": { @@ -8222,6 +8840,9 @@ }, { "target": "com.amazonaws.location#ListTrackerConsumers" + }, + { + "target": "com.amazonaws.location#VerifyDevicePosition" } ], "traits": { @@ -9014,6 +9635,12 @@ } } }, + "com.amazonaws.location#Uuid": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + }, "com.amazonaws.location#ValidationException": { "type": "structure", "members": { @@ -9117,11 +9744,156 @@ ] } }, + "com.amazonaws.location#VerifyDevicePosition": { + "type": "operation", + "input": { + "target": "com.amazonaws.location#VerifyDevicePositionRequest" + }, + "output": { + "target": "com.amazonaws.location#VerifyDevicePositionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.location#AccessDeniedException" + }, + { + "target": "com.amazonaws.location#InternalServerException" + }, + { + "target": "com.amazonaws.location#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.location#ThrottlingException" + }, + { + "target": "com.amazonaws.location#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Verifies the integrity of the device's position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device's state.

", + "smithy.api#endpoint": { + "hostPrefix": "tracking." + }, + "smithy.api#http": { + "uri": "/tracking/v0/trackers/{TrackerName}/positions/verify", + "method": "POST" + } + } + }, + "com.amazonaws.location#VerifyDevicePositionRequest": { + "type": "structure", + "members": { + "TrackerName": { + "target": "com.amazonaws.location#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the tracker resource to be associated with verification request.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DeviceState": { + "target": "com.amazonaws.location#DeviceState", + "traits": { + "smithy.api#documentation": "

The device's state, including position, IP address, cell signals and Wi-Fi access points.

", + "smithy.api#required": {} + } + }, + "DistanceUnit": { + "target": "com.amazonaws.location#DistanceUnit", + "traits": { + "smithy.api#documentation": "

The distance unit for the verification request.

\n

Default Value: Kilometers\n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.location#VerifyDevicePositionResponse": { + "type": "structure", + "members": { + "InferredState": { + "target": "com.amazonaws.location#InferredState", + "traits": { + "smithy.api#documentation": "

The inferred state of the device, given the provided position, IP address, cellular signals, and Wi-Fi- access points.

", + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.location#Id", + "traits": { + "smithy.api#documentation": "

The device identifier.

", + "smithy.api#required": {} + } + }, + "SampleTime": { + "target": "com.amazonaws.location#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp at which the device's position was determined. Uses ISO 8601 \n format: YYYY-MM-DDThh:mm:ss.sssZ.

", + "smithy.api#required": {} + } + }, + "ReceivedTime": { + "target": "com.amazonaws.location#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the tracker resource received the device position in ISO 8601 \n format: YYYY-MM-DDThh:mm:ss.sssZ.

", + "smithy.api#required": {} + } + }, + "DistanceUnit": { + "target": "com.amazonaws.location#DistanceUnit", + "traits": { + "smithy.api#documentation": "

The distance unit for the verification response.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.location#WaypointPositionList": { "type": "list", "member": { "target": "com.amazonaws.location#Position" } + }, + "com.amazonaws.location#WiFiAccessPoint": { + "type": "structure", + "members": { + "MacAddress": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Medium access control address (Mac).

", + "smithy.api#length": { + "min": 12, + "max": 17 + }, + "smithy.api#pattern": "^([0-9A-Fa-f]{2}[:-]?){5}([0-9A-Fa-f]{2})$", + "smithy.api#required": {} + } + }, + "Rss": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Received signal strength (dBm) of the WLAN measurement data.

", + "smithy.api#range": { + "min": -128, + "max": 0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Wi-Fi access point.

" + } + }, + "com.amazonaws.location#WiFiAccessPointList": { + "type": "list", + "member": { + "target": "com.amazonaws.location#WiFiAccessPoint" + } } } } \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/s3.json b/codegen/sdk-codegen/aws-models/s3.json index 7279b69e8f5..3b48bc38581 100644 --- a/codegen/sdk-codegen/aws-models/s3.json +++ b/codegen/sdk-codegen/aws-models/s3.json @@ -647,6 +647,11 @@ "documentation": "The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.", "type": "String" }, + "CopySource": { + "required": false, + "documentation": "The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.", + "type": "String" + }, "DisableAccessPoints": { "required": false, "documentation": "Internal parameter to disable Access Point Buckets", @@ -10663,6 +10668,33 @@ "Key": "key" } }, + { + "documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "CopySource": "/copy/source", + "Key": "key" + } + }, { "documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint", "expect": { @@ -18844,7 +18876,10 @@ "traits": { "smithy.api#documentation": "

Specifies the source object for the copy operation. The source object \n can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.

\n

You specify the value of the copy source in one of two\n formats, depending on whether you want to access the source object through an access point:

\n \n

If your source bucket versioning is enabled, the x-amz-copy-source header by default identifies the current\n version of an object to copy. If the current version is a delete marker, Amazon S3\n behaves as if the object was deleted. To copy a different version, use the\n versionId query parameter. Specifically, append ?versionId=\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.

\n

If you enable versioning on the destination bucket, Amazon S3 generates a unique version\n ID for the copied object. This version ID is different from the version ID\n of the source object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id response header in the response.

\n

If you do not enable versioning or suspend it on the destination bucket, the version\n ID that Amazon S3 generates in the\n x-amz-version-id response header is always null.

\n \n

\n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets.

\n
", "smithy.api#httpHeader": "x-amz-copy-source", - "smithy.api#required": {} + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "CopySource" + } } }, "CopySourceIfMatch": { @@ -18915,7 +18950,10 @@ "traits": { "smithy.api#documentation": "

The key of the destination object.

", "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } } }, "Metadata": { @@ -30612,19 +30650,31 @@ "smithy.api#documentation": "

Adds an object to a bucket.

\n \n \n \n

Amazon S3 is a distributed system. If it receives multiple write requests for the same object\n simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:

\n \n
\n
Permissions
\n
\n \n
\n
Data integrity with Content-MD5
\n
\n \n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com.

\n
\n
\n

For more information about related Amazon S3 APIs, see the following:

\n ", "smithy.api#examples": [ { - "title": "To upload object and specify user-defined metadata", - "documentation": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", + "title": "To upload an object and specify server-side encryption and object tags", + "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", "input": { "Body": "filetoupload", "Bucket": "examplebucket", "Key": "exampleobject", - "Metadata": { - "metadata1": "value1", - "metadata2": "value2" - } + "ServerSideEncryption": "AES256", + "Tagging": "key1=value1&key2=value2" }, "output": { - "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0", + "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "ServerSideEncryption": "AES256" + } + }, + { + "title": "To create an object.", + "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "objectkey" + }, + "output": { + "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ", "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } }, @@ -30659,28 +30709,19 @@ } }, { - "title": "To create an object.", - "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", + "title": "To upload object and specify user-defined metadata", + "documentation": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", "input": { "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "objectkey" - }, - "output": { - "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, - { - "title": "To upload an object", - "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", - "input": { - "Body": "HappyFace.jpg", - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" + "Key": "exampleobject", + "Metadata": { + "metadata1": "value1", + "metadata2": "value2" + } }, "output": { - "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", + "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0", "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } }, @@ -30699,19 +30740,16 @@ } }, { - "title": "To upload an object and specify server-side encryption and object tags", - "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", + "title": "To upload an object", + "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", "input": { - "Body": "filetoupload", + "Body": "HappyFace.jpg", "Bucket": "examplebucket", - "Key": "exampleobject", - "ServerSideEncryption": "AES256", - "Tagging": "key1=value1&key2=value2" + "Key": "HappyFace.jpg" }, "output": { - "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "ServerSideEncryption": "AES256" + "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } } ], diff --git a/codegen/sdk-codegen/aws-models/sns.json b/codegen/sdk-codegen/aws-models/sns.json index c77285f4bf6..b523df57d06 100644 --- a/codegen/sdk-codegen/aws-models/sns.json +++ b/codegen/sdk-codegen/aws-models/sns.json @@ -1571,7 +1571,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a platform application object for one of the supported push notification\n services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile\n apps may register. You must specify PlatformPrincipal and\n PlatformCredential attributes when using the\n CreatePlatformApplication action.

\n

\n PlatformPrincipal and PlatformCredential are received from\n the notification service.

\n \n

You can use the returned PlatformApplicationArn as an attribute for the\n CreatePlatformEndpoint action.

" + "smithy.api#documentation": "

Creates a platform application object for one of the supported push notification\n services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile\n apps may register. You must specify PlatformPrincipal and\n PlatformCredential attributes when using the\n CreatePlatformApplication action.

\n

\n PlatformPrincipal and PlatformCredential are received from\n the notification service.

\n \n

You can use the returned PlatformApplicationArn as an attribute for the\n CreatePlatformEndpoint action.

" } }, "com.amazonaws.sns#CreatePlatformApplicationInput": { @@ -1794,7 +1794,7 @@ "Attributes": { "target": "com.amazonaws.sns#TopicAttributesMap", "traits": { - "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the CreateTopic action uses:

\n \n

The following attribute applies only to server-side\n encryption:

\n \n

The following attributes apply only to FIFO topics:

\n " + "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists names, descriptions, and values of the special request\n parameters that the CreateTopic action uses:

\n \n

The following attribute applies only to server-side\n encryption:

\n \n

The following attributes apply only to FIFO topics:

\n " } }, "Tags": { @@ -2420,7 +2420,7 @@ "Attributes": { "target": "com.amazonaws.sns#SubscriptionAttributesMap", "traits": { - "smithy.api#documentation": "

A map of the subscription's attributes. Attributes in this map include the\n following:

\n \n

The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

\n " + "smithy.api#documentation": "

A map of the subscription's attributes. Attributes in this map include the\n following:

\n \n

The following attribute applies only to Amazon Data Firehose delivery stream subscriptions:

\n " } } }, @@ -4037,7 +4037,7 @@ "Subject": { "target": "com.amazonaws.sns#subject", "traits": { - "smithy.api#documentation": "

Optional parameter to be used as the \"Subject\" line when the message is delivered to\n email endpoints. This field will also be included, if present, in the standard JSON\n messages delivered to other endpoints.

\n

Constraints: Subjects must be ASCII text that begins with a letter, number, or\n punctuation mark; must not include line breaks or control characters; and must be less\n than 100 characters long.

" + "smithy.api#documentation": "

Optional parameter to be used as the \"Subject\" line when the message is delivered to\n email endpoints. This field will also be included, if present, in the standard JSON\n messages delivered to other endpoints.

\n

Constraints: Subjects must be UTF-8 text with no line breaks or control characters,\n and less than 100 characters long.

" } }, "MessageStructure": { @@ -4490,7 +4490,7 @@ "AttributeName": { "target": "com.amazonaws.sns#attributeName", "traits": { - "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that this action uses:

\n \n

The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

\n ", + "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that this action uses:

\n \n

The following attribute applies only to Amazon Data Firehose delivery stream subscriptions:

\n ", "smithy.api#required": {} } }, @@ -4648,7 +4648,7 @@ "Attributes": { "target": "com.amazonaws.sns#SubscriptionAttributesMap", "traits": { - "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the Subscribe action uses:

\n \n

The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

\n \n

The following attributes apply only to FIFO topics:

\n " + "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the Subscribe action uses:

\n \n

The following attribute applies only to Amazon Data Firehose delivery stream subscriptions:

\n \n

The following attributes apply only to FIFO topics:

\n " } }, "ReturnSubscriptionArn": { diff --git a/codegen/sdk-codegen/aws-models/sqs.json b/codegen/sdk-codegen/aws-models/sqs.json index 578c7847656..9a96b4f9d07 100644 --- a/codegen/sdk-codegen/aws-models/sqs.json +++ b/codegen/sdk-codegen/aws-models/sqs.json @@ -3339,7 +3339,7 @@ "smithy.api#deprecated": { "message": "AttributeNames has been replaced by MessageSystemAttributeNames" }, - "smithy.api#documentation": "\n

\n This parameter has been deprecated but will be supported for backward compatibility.\n To provide attribute names, you are encouraged to use MessageSystemAttributeNames. \n

\n
\n

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", + "smithy.api#documentation": "\n

This parameter has been deprecated but will be supported for backward\n compatibility. To provide attribute names, you are encouraged to use\n MessageSystemAttributeNames.

\n
\n

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "AttributeName" } @@ -3347,7 +3347,7 @@ "MessageSystemAttributeNames": { "target": "com.amazonaws.sqs#MessageSystemAttributeList", "traits": { - "smithy.api#documentation": "

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", + "smithy.api#documentation": "

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "AttributeName" } @@ -3471,7 +3471,7 @@ "code": "RequestThrottled", "httpResponseCode": 403 }, - "smithy.api#documentation": "

The request was denied due to request throttling.

\n ", + "smithy.api#documentation": "

The request was denied due to request throttling.

\n ", "smithy.api#error": "client", "smithy.api#httpError": 403 } @@ -3543,7 +3543,7 @@ } ], "traits": { - "smithy.api#documentation": "

Delivers a message to the specified queue.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
" + "smithy.api#documentation": "

Delivers a message to the specified queue.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed. For more information, see the W3C specification for characters.

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Amazon SQS does not throw an exception or completely reject the message if it contains invalid characters. Instead, it replaces those invalid characters with U+FFFD before storing the message in the queue, as long as the message body contains at least one valid character.

\n
" } }, "com.amazonaws.sqs#SendMessageBatch": { @@ -3608,7 +3608,7 @@ } ], "traits": { - "smithy.api#documentation": "

You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued\n in the order they are sent.

\n

The result of sending each message is reported individually in the response.\n Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

\n

The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
\n

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses\n the default value for the queue.

" + "smithy.api#documentation": "

You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued\n in the order they are sent.

\n

The result of sending each message is reported individually in the response.\n Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

\n

The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed. For more information, see the W3C specification for characters.

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Amazon SQS does not throw an exception or completely reject the message if it contains invalid characters. Instead, it replaces those invalid characters with U+FFFD before storing the message in the queue, as long as the message body contains at least one valid character.

\n
\n

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses\n the default value for the queue.

" } }, "com.amazonaws.sqs#SendMessageBatchRequest": { @@ -3791,7 +3791,7 @@ "MessageBody": { "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

The message to send. The minimum size is one character. The maximum size is 256\n KiB.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
", + "smithy.api#documentation": "

The message to send. The minimum size is one character. The maximum size is 256\n KiB.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed. For more information, see the W3C specification for characters.

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Amazon SQS does not throw an exception or completely reject the message if it contains invalid characters. Instead, it replaces those invalid characters with U+FFFD before storing the message in the queue, as long as the message body contains at least one valid character.

\n
", "smithy.api#required": {} } }, @@ -3909,7 +3909,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the value of one or more queue attributes, like a policy. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate throughout\n the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can\n take up to 15 minutes and will impact existing messages in the queue potentially causing\n them to be expired and deleted if the MessageRetentionPeriod is reduced\n below the age of existing messages.

\n \n \n " + "smithy.api#documentation": "

Sets the value of one or more queue attributes, like a policy. When you change a\n queue's attributes, the change can take up to 60 seconds for most of the attributes to\n propagate throughout the Amazon SQS system. Changes made to the\n MessageRetentionPeriod attribute can take up to 15 minutes and will\n impact existing messages in the queue potentially causing them to be expired and deleted\n if the MessageRetentionPeriod is reduced below the age of existing\n messages.

\n \n \n " } }, "com.amazonaws.sqs#SetQueueAttributesRequest": { diff --git a/codegen/sdk-codegen/aws-models/storage-gateway.json b/codegen/sdk-codegen/aws-models/storage-gateway.json index be8461e5675..2e87c99d343 100644 --- a/codegen/sdk-codegen/aws-models/storage-gateway.json +++ b/codegen/sdk-codegen/aws-models/storage-gateway.json @@ -818,6 +818,23 @@ } } }, + "com.amazonaws.storagegateway#AutomaticUpdatePolicy": { + "type": "enum", + "members": { + "ALL_VERSIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL_VERSIONS" + } + }, + "EMERGENCY_VERSIONS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMERGENCY_VERSIONS_ONLY" + } + } + } + }, "com.amazonaws.storagegateway#AvailabilityMonitorTestStatus": { "type": "enum", "members": { @@ -3789,7 +3806,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns your gateway's weekly maintenance start time including the day and time of\n the week. Note that values are in terms of the gateway's time zone.

", + "smithy.api#documentation": "

Returns your gateway's maintenance window schedule information, with values for\n monthly or weekly cadence, specific day and time to begin maintenance, and which types of\n updates to apply. Time values returned are for the gateway's time zone.

", "smithy.api#examples": [ { "title": "To describe gateway's maintenance start time", @@ -3850,7 +3867,7 @@ "DayOfMonth": { "target": "com.amazonaws.storagegateway#DayOfMonth", "traits": { - "smithy.api#documentation": "

The day of the month component of the maintenance start time represented as an ordinal\n number from 1 to 28, where 1 represents the first day of the month and 28 represents the\n last day of the month.

" + "smithy.api#documentation": "

The day of the month component of the maintenance start time represented as an ordinal\n number from 1 to 28, where 1 represents the first day of the month. It is not possible to\n set the maintenance schedule to start on days 29 through 31.

" } }, "Timezone": { @@ -3858,10 +3875,16 @@ "traits": { "smithy.api#documentation": "

A value that indicates the time zone that is set for the gateway. The start time and day\n of week specified should be in the time zone of the gateway.

" } + }, + "SoftwareUpdatePreferences": { + "target": "com.amazonaws.storagegateway#SoftwareUpdatePreferences", + "traits": { + "smithy.api#documentation": "

A set of variables indicating the software update preferences for the gateway.

\n

Includes AutomaticUpdatePolicy field with the following inputs:

\n

\n ALL_VERSIONS - Enables regular gateway maintenance updates.

\n

\n EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance\n updates.

" + } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", "smithy.api#output": {} } }, @@ -4028,7 +4051,7 @@ "SMBSecurityStrategy": { "target": "com.amazonaws.storagegateway#SMBSecurityStrategy", "traits": { - "smithy.api#documentation": "

The type of security strategy that was specified for file gateway.

\n " + "smithy.api#documentation": "

The type of security strategy that was specified for file gateway.

\n " } }, "FileSharesVisible": { @@ -8546,6 +8569,20 @@ "smithy.api#pattern": "^\\Asnap-([0-9A-Fa-f]{8}|[0-9A-Fa-f]{17})\\z$" } }, + "com.amazonaws.storagegateway#SoftwareUpdatePreferences": { + "type": "structure", + "members": { + "AutomaticUpdatePolicy": { + "target": "com.amazonaws.storagegateway#AutomaticUpdatePolicy", + "traits": { + "smithy.api#documentation": "

Indicates the automatic update policy for a gateway.

\n

\n ALL_VERSIONS - Enables regular gateway maintenance updates.

\n

\n EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance\n updates.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A set of variables indicating the software update preferences for the gateway.

" + } + }, "com.amazonaws.storagegateway#SoftwareUpdatesEndDate": { "type": "string", "traits": { @@ -10902,7 +10939,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a gateway's metadata, which includes the gateway's name and time zone.\n To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in\n your request.

\n \n

For gateways activated after September 2, 2015, the gateway's ARN contains the\n gateway ID rather than the gateway name. However, changing the name of the gateway has\n no effect on the gateway's ARN.

\n
", + "smithy.api#documentation": "

Updates a gateway's metadata, which includes the gateway's name, time zone,\n and metadata cache size. To specify which gateway to update, use the Amazon Resource Name\n (ARN) of the gateway in your request.

\n \n

For gateways activated after September 2, 2015, the gateway's ARN contains the\n gateway ID rather than the gateway name. However, changing the name of the gateway has\n no effect on the gateway's ARN.

\n
", "smithy.api#examples": [ { "title": "To update a gateway's metadata", @@ -10947,7 +10984,7 @@ "GatewayCapacity": { "target": "com.amazonaws.storagegateway#GatewayCapacity", "traits": { - "smithy.api#documentation": "

Specifies the size of the gateway's metadata cache.

" + "smithy.api#documentation": "

Specifies the size of the gateway's metadata cache. This setting impacts gateway\n performance and hardware recommendations. For more information, see Performance guidance for gateways with multiple file shares\n in the Amazon S3 File Gateway User Guide.

" } } }, @@ -11049,7 +11086,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a gateway's weekly maintenance start time information, including day and\n time of the week. The maintenance time is the time in your gateway's time zone.

", + "smithy.api#documentation": "

Updates a gateway's maintenance window schedule, with settings for monthly or\n weekly cadence, specific day and time to begin maintenance, and which types of updates to\n apply. Time configuration uses the gateway's time zone. You can pass values for a complete\n maintenance schedule, or update policy, or both. Previous values will persist for whichever\n setting you choose not to modify. If an incomplete or invalid maintenance schedule is\n passed, the entire request will be rejected with an error and no changes will occur.

\n

A complete maintenance schedule must include values for both\n MinuteOfHour and HourOfDay, and either\n DayOfMonth\n or\n DayOfWeek.

\n \n

We recommend keeping maintenance updates turned on, except in specific use cases\n where the brief disruptions caused by updating the gateway could critically impact your\n deployment.

\n
", "smithy.api#examples": [ { "title": "To update a gateway's maintenance start time", @@ -11079,32 +11116,36 @@ "HourOfDay": { "target": "com.amazonaws.storagegateway#HourOfDay", "traits": { - "smithy.api#documentation": "

The hour component of the maintenance start time represented as hh,\n where hh is the hour (00 to 23). The hour of the day is in the time\n zone of the gateway.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The hour component of the maintenance start time represented as hh,\n where hh is the hour (00 to 23). The hour of the day is in the time\n zone of the gateway.

" } }, "MinuteOfHour": { "target": "com.amazonaws.storagegateway#MinuteOfHour", "traits": { - "smithy.api#documentation": "

The minute component of the maintenance start time represented as\n mm, where mm is the minute (00 to 59). The\n minute of the hour is in the time zone of the gateway.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The minute component of the maintenance start time represented as\n mm, where mm is the minute (00 to 59). The\n minute of the hour is in the time zone of the gateway.

" } }, "DayOfWeek": { "target": "com.amazonaws.storagegateway#DayOfWeek", "traits": { - "smithy.api#documentation": "

The day of the week component of the maintenance start time week represented as an\n ordinal number from 0 to 6, where 0 represents Sunday and 6 Saturday.

" + "smithy.api#documentation": "

The day of the week component of the maintenance start time week represented as an\n ordinal number from 0 to 6, where 0 represents Sunday and 6 represents Saturday.

" } }, "DayOfMonth": { "target": "com.amazonaws.storagegateway#DayOfMonth", "traits": { - "smithy.api#documentation": "

The day of the month component of the maintenance start time represented as an ordinal\n number from 1 to 28, where 1 represents the first day of the month and 28 represents the\n last day of the month.

" + "smithy.api#documentation": "

The day of the month component of the maintenance start time represented as an ordinal\n number from 1 to 28, where 1 represents the first day of the month. It is not possible to\n set the maintenance schedule to start on days 29 through 31.

" + } + }, + "SoftwareUpdatePreferences": { + "target": "com.amazonaws.storagegateway#SoftwareUpdatePreferences", + "traits": { + "smithy.api#documentation": "

A set of variables indicating the software update preferences for the gateway.

\n

Includes AutomaticUpdatePolicy field with the following inputs:

\n

\n ALL_VERSIONS - Enables regular gateway maintenance updates.

\n

\n EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance\n updates.

" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", "smithy.api#input": {} } }, @@ -11535,7 +11576,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the SMB security strategy on a file gateway. This action is only supported in\n file gateways.

\n \n

This API is called Security level in the User Guide.

\n

A higher security level can affect performance of the gateway.

\n
" + "smithy.api#documentation": "

Updates the SMB security strategy level for an Amazon S3 file gateway. This\n action is only supported for Amazon S3 file gateways.

\n \n

For information about configuring this setting using the Amazon Web Services console,\n see Setting a security level for your gateway in the Amazon S3\n File Gateway User Guide.

\n

A higher security strategy level can affect performance of the gateway.

\n
" } }, "com.amazonaws.storagegateway#UpdateSMBSecurityStrategyInput": { @@ -11550,7 +11591,7 @@ "SMBSecurityStrategy": { "target": "com.amazonaws.storagegateway#SMBSecurityStrategy", "traits": { - "smithy.api#documentation": "

Specifies the type of security strategy.

\n

ClientSpecified: if you use this option, requests are established based on what is\n negotiated by the client. This option is recommended when you want to maximize\n compatibility across different clients in your environment. Supported only in S3 File\n Gateway.

\n

MandatorySigning: if you use this option, file gateway only allows connections from\n SMBv2 or SMBv3 clients that have signing enabled. This option works with SMB clients on\n Microsoft Windows Vista, Windows Server 2008 or newer.

\n

MandatoryEncryption: if you use this option, file gateway only allows connections from\n SMBv3 clients that have encryption enabled. This option is highly recommended for\n environments that handle sensitive data. This option works with SMB clients on Microsoft\n Windows 8, Windows Server 2012 or newer.

", + "smithy.api#documentation": "

Specifies the type of security strategy.

\n

\n ClientSpecified: If you choose this option, requests are established based\n on what is negotiated by the client. This option is recommended when you want to maximize\n compatibility across different clients in your environment. Supported only for S3 File\n Gateway.

\n

\n MandatorySigning: If you choose this option, File Gateway only allows\n connections from SMBv2 or SMBv3 clients that have signing enabled. This option works with\n SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer.

\n

\n MandatoryEncryption: If you choose this option, File Gateway only allows\n connections from SMBv3 clients that have encryption enabled. This option is recommended for\n environments that handle sensitive data. This option works with SMB clients on Microsoft\n Windows 8, Windows Server 2012 or newer.

\n

\n MandatoryEncryptionNoAes128: If you choose this option, File Gateway only\n allows connections from SMBv3 clients that use 256-bit AES encryption algorithms. 128-bit\n algorithms are not allowed. This option is recommended for environments that handle\n sensitive data. It works with SMB clients on Microsoft Windows 8, Windows Server 2012, or\n later.

", "smithy.api#required": {} } } diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json index 30c2ac8bca2..ddc93c85e14 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json @@ -2951,28 +2951,116 @@ }, "cloud9" : { "endpoints" : { - "af-south-1" : { }, - "ap-east-1" : { }, - "ap-northeast-1" : { }, - "ap-northeast-2" : { }, - "ap-northeast-3" : { }, - "ap-south-1" : { }, - "ap-southeast-1" : { }, - "ap-southeast-2" : { }, - "ca-central-1" : { }, - "eu-central-1" : { }, - "eu-north-1" : { }, - "eu-south-1" : { }, - "eu-west-1" : { }, - "eu-west-2" : { }, - "eu-west-3" : { }, - "il-central-1" : { }, - "me-south-1" : { }, - "sa-east-1" : { }, - "us-east-1" : { }, - "us-east-2" : { }, - "us-west-1" : { }, - "us-west-2" : { } + "af-south-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-east-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-2" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-northeast-3" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-south-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ap-southeast-2" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "ca-central-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-central-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-north-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-south-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-2" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "eu-west-3" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "il-central-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "me-south-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "sa-east-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "us-east-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "us-east-2" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "us-west-1" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + }, + "us-west-2" : { + "variants" : [ { + "tags" : [ "dualstack" ] + } ] + } } }, "cloudcontrolapi" : { @@ -5249,8 +5337,18 @@ "ap-southeast-2" : { }, "ap-southeast-3" : { }, "ap-southeast-4" : { }, - "ca-central-1" : { }, - "ca-west-1" : { }, + "ca-central-1" : { + "variants" : [ { + "hostname" : "directconnect-fips.ca-central-1.amazonaws.com", + "tags" : [ "fips" ] + } ] + }, + "ca-west-1" : { + "variants" : [ { + "hostname" : "directconnect-fips.ca-west-1.amazonaws.com", + "tags" : [ "fips" ] + } ] + }, "eu-central-1" : { }, "eu-central-2" : { }, "eu-north-1" : { }, @@ -5259,6 +5357,20 @@ "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, + "fips-ca-central-1" : { + "credentialScope" : { + "region" : "ca-central-1" + }, + "deprecated" : true, + "hostname" : "directconnect-fips.ca-central-1.amazonaws.com" + }, + "fips-ca-west-1" : { + "credentialScope" : { + "region" : "ca-west-1" + }, + "deprecated" : true, + "hostname" : "directconnect-fips.ca-west-1.amazonaws.com" + }, "fips-us-east-1" : { "credentialScope" : { "region" : "us-east-1" diff --git a/example/service/dynamodb/scanItems/go.mod b/example/service/dynamodb/scanItems/go.mod index 05ab12cf1a6..0c82d9947c2 100644 --- a/example/service/dynamodb/scanItems/go.mod +++ b/example/service/dynamodb/scanItems/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2 v1.27.1 github.com/aws/aws-sdk-go-v2/config v1.27.17 - github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.13.21 + github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.14.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.7 ) diff --git a/example/service/s3/listObjects/go.mod b/example/service/s3/listObjects/go.mod index c803e1841b6..f9037e26799 100644 --- a/example/service/s3/listObjects/go.mod +++ b/example/service/s3/listObjects/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2/config v1.27.17 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 ) require ( diff --git a/example/service/s3/usingPrivateLink/go.mod b/example/service/s3/usingPrivateLink/go.mod index a21c44df32c..68036a52104 100644 --- a/example/service/s3/usingPrivateLink/go.mod +++ b/example/service/s3/usingPrivateLink/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2 v1.27.1 github.com/aws/aws-sdk-go-v2/config v1.27.17 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 github.com/aws/aws-sdk-go-v2/service/s3control v1.44.12 ) diff --git a/feature/dynamodb/attributevalue/CHANGELOG.md b/feature/dynamodb/attributevalue/CHANGELOG.md index 3eefe5e5345..4f8d98c19ca 100644 --- a/feature/dynamodb/attributevalue/CHANGELOG.md +++ b/feature/dynamodb/attributevalue/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.14.0 (2024-06-05) + +* **Feature**: Add codec options to use encoding.Text/Binary(Un)Marshaler when present on targets. + # v1.13.21 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/feature/dynamodb/attributevalue/decode.go b/feature/dynamodb/attributevalue/decode.go index a0a8b53f76f..15a94f4b24d 100644 --- a/feature/dynamodb/attributevalue/decode.go +++ b/feature/dynamodb/attributevalue/decode.go @@ -231,6 +231,18 @@ type DecoderOptions struct { // Default string parsing format is time.RFC3339 // Default number parsing format is seconds since January 1, 1970 UTC DecodeTime DecodeTimeAttributes + + // When enabled, the decoder will use implementations of + // encoding.TextUnmarshaler and encoding.BinaryUnmarshaler when present on + // unmarshaling targets. + // + // If a target implements [Unmarshaler], encoding unmarshaler + // implementations are ignored. + // + // If the attributevalue is a string, its underlying value will be used to + // call UnmarshalText on the target. If the attributevalue is a binary, its + // value will be used to call UnmarshalBinary. + UseEncodingUnmarshalers bool } // A Decoder provides unmarshaling AttributeValues to Go value types. @@ -288,17 +300,30 @@ func (d *Decoder) decode(av types.AttributeValue, v reflect.Value, fieldTag tag) var u Unmarshaler _, isNull := av.(*types.AttributeValueMemberNULL) if av == nil || isNull { - u, v = indirect(v, indirectOptions{decodeNull: true}) + u, v = indirect[Unmarshaler](v, indirectOptions{decodeNull: true}) if u != nil { return u.UnmarshalDynamoDBAttributeValue(av) } return d.decodeNull(v) } - u, v = indirect(v, indirectOptions{}) + v0 := v + u, v = indirect[Unmarshaler](v, indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBAttributeValue(av) } + if d.options.UseEncodingUnmarshalers { + if s, ok := av.(*types.AttributeValueMemberS); ok { + if u, _ := indirect[encoding.TextUnmarshaler](v0, indirectOptions{}); u != nil { + return u.UnmarshalText([]byte(s.Value)) + } + } + if b, ok := av.(*types.AttributeValueMemberB); ok { + if u, _ := indirect[encoding.BinaryUnmarshaler](v0, indirectOptions{}); u != nil { + return u.UnmarshalBinary(b.Value) + } + } + } switch tv := av.(type) { case *types.AttributeValueMemberB: @@ -420,7 +445,7 @@ func (d *Decoder) decodeBinarySet(bs [][]byte, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBAttributeValue(&types.AttributeValueMemberBS{Value: bs}) } @@ -555,7 +580,7 @@ func (d *Decoder) decodeNumberSet(ns []string, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBAttributeValue(&types.AttributeValueMemberNS{Value: ns}) } @@ -634,7 +659,7 @@ func (d *Decoder) decodeMap(avMap map[string]types.AttributeValue, v reflect.Val for k, av := range avMap { key := reflect.New(keyType).Elem() // handle pointer keys - _, indirectKey := indirect(key, indirectOptions{skipUnmarshaler: true}) + _, indirectKey := indirect[Unmarshaler](key, indirectOptions{skipUnmarshaler: true}) if err := decodeMapKey(k, indirectKey, tag{}); err != nil { return &UnmarshalTypeError{ Value: fmt.Sprintf("map key %q", k), @@ -777,7 +802,7 @@ func (d *Decoder) decodeStringSet(ss []string, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBAttributeValue(&types.AttributeValueMemberSS{Value: ss}) } @@ -825,7 +850,7 @@ type indirectOptions struct { // // Based on the enoding/json type reflect value type indirection in Go Stdlib // https://golang.org/src/encoding/json/decode.go indirect func. -func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value) { +func indirect[U any](v reflect.Value, opts indirectOptions) (U, reflect.Value) { // Issue #24153 indicates that it is generally not a guaranteed property // that you may round-trip a reflect.Value by calling Value.Addr().Elem() // and expect the value to still be settable for values derived from @@ -859,7 +884,8 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value continue } if e.Kind() != reflect.Ptr && e.IsValid() { - return nil, e + var u U + return u, e } } if v.Kind() != reflect.Ptr { @@ -880,7 +906,7 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value v.Set(reflect.New(v.Type().Elem())) } if !opts.skipUnmarshaler && v.Type().NumMethod() > 0 && v.CanInterface() { - if u, ok := v.Interface().(Unmarshaler); ok { + if u, ok := v.Interface().(U); ok { return u, reflect.Value{} } } @@ -893,7 +919,8 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value } } - return nil, v + var u U + return u, v } // A Number represents a Attributevalue number literal. diff --git a/feature/dynamodb/attributevalue/decode_test.go b/feature/dynamodb/attributevalue/decode_test.go index d8ae9490a85..9481ed5f7e8 100644 --- a/feature/dynamodb/attributevalue/decode_test.go +++ b/feature/dynamodb/attributevalue/decode_test.go @@ -4,6 +4,7 @@ import ( "fmt" "reflect" "strconv" + "strings" "testing" "time" @@ -1173,3 +1174,97 @@ func TestUnmarshalMap_keyPtrTypes(t *testing.T) { } } + +type textUnmarshalerString string + +func (v *textUnmarshalerString) UnmarshalText(text []byte) error { + *v = textUnmarshalerString("[[" + string(text) + "]]") + return nil +} + +func TestUnmarshalTextString(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo"} + + var actual textUnmarshalerString + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + if string(actual) != "[[foo]]" { + t.Errorf("expected [[foo]], got %s", actual) + } +} + +func TestUnmarshalTextStringDisabled(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo"} + + var actual textUnmarshalerString + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = false + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + if string(actual) != "foo" { + t.Errorf("expected foo, got %s", actual) + } +} + +type textUnmarshalerStruct struct { + I, J string +} + +func (v *textUnmarshalerStruct) UnmarshalText(text []byte) error { + parts := strings.Split(string(text), ";") + v.I = parts[0] + v.J = parts[1] + return nil +} + +func TestUnmarshalTextStruct(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo;bar"} + + var actual textUnmarshalerStruct + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + expected := textUnmarshalerStruct{"foo", "bar"} + if actual != expected { + t.Errorf("expected %v, got %v", expected, actual) + } +} + +type binaryUnmarshaler struct { + I, J byte +} + +func (v *binaryUnmarshaler) UnmarshalBinary(b []byte) error { + v.I = b[0] + v.J = b[1] + return nil +} + +func TestUnmarshalBinary(t *testing.T) { + in := &types.AttributeValueMemberB{Value: []byte{1, 2}} + + var actual binaryUnmarshaler + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + expected := binaryUnmarshaler{1, 2} + if actual != expected { + t.Errorf("expected %v, got %v", expected, actual) + } +} diff --git a/feature/dynamodb/attributevalue/encode.go b/feature/dynamodb/attributevalue/encode.go index f62000a68f0..005a23c3b01 100644 --- a/feature/dynamodb/attributevalue/encode.go +++ b/feature/dynamodb/attributevalue/encode.go @@ -354,8 +354,7 @@ func MarshalListWithOptions(in interface{}, optFns ...func(*EncoderOptions)) ([] return asList.Value, nil } -// EncoderOptions is a collection of options shared between marshaling -// and unmarshaling +// EncoderOptions is a collection of options used by the marshaler. type EncoderOptions struct { // Support other custom struct tag keys, such as `yaml`, `json`, or `toml`. // Note that values provided with a custom TagKey must also be supported @@ -380,6 +379,19 @@ type EncoderOptions struct { // // Default encoding is time.RFC3339Nano in a DynamoDB String (S) data type. EncodeTime func(time.Time) (types.AttributeValue, error) + + // When enabled, the encoder will use implementations of + // encoding.TextMarshaler and encoding.BinaryMarshaler when present on + // marshaled values. + // + // Implementations are checked in the following order: + // - [Marshaler] + // - encoding.TextMarshaler + // - encoding.BinaryMarshaler + // + // The results of a MarshalText call will convert to string (S), results + // from a MarshalBinary call will convert to binary (B). + UseEncodingMarshalers bool } // An Encoder provides marshaling Go value types to AttributeValues. @@ -438,7 +450,7 @@ func (e *Encoder) encode(v reflect.Value, fieldTag tag) (types.AttributeValue, e v = valueElem(v) if v.Kind() != reflect.Invalid { - if av, err := tryMarshaler(v); err != nil { + if av, err := e.tryMarshaler(v); err != nil { return nil, err } else if av != nil { return av, nil @@ -822,7 +834,7 @@ func isNullableZeroValue(v reflect.Value) bool { return false } -func tryMarshaler(v reflect.Value) (types.AttributeValue, error) { +func (e *Encoder) tryMarshaler(v reflect.Value) (types.AttributeValue, error) { if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { v = v.Addr() } @@ -831,9 +843,35 @@ func tryMarshaler(v reflect.Value) (types.AttributeValue, error) { return nil, nil } - if m, ok := v.Interface().(Marshaler); ok { + i := v.Interface() + if m, ok := i.(Marshaler); ok { return m.MarshalDynamoDBAttributeValue() } + if e.options.UseEncodingMarshalers { + return e.tryEncodingMarshaler(i) + } + + return nil, nil +} + +func (e *Encoder) tryEncodingMarshaler(v any) (types.AttributeValue, error) { + if m, ok := v.(encoding.TextMarshaler); ok { + s, err := m.MarshalText() + if err != nil { + return nil, err + } + + return &types.AttributeValueMemberS{Value: string(s)}, nil + } + + if m, ok := v.(encoding.BinaryMarshaler); ok { + b, err := m.MarshalBinary() + if err != nil { + return nil, err + } + + return &types.AttributeValueMemberB{Value: b}, nil + } return nil, nil } diff --git a/feature/dynamodb/attributevalue/encode_test.go b/feature/dynamodb/attributevalue/encode_test.go index 342550a6c03..97a385c6679 100644 --- a/feature/dynamodb/attributevalue/encode_test.go +++ b/feature/dynamodb/attributevalue/encode_test.go @@ -94,6 +94,95 @@ func (m customBoolStringMarshaler) MarshalDynamoDBAttributeValue() (types.Attrib return &types.AttributeValueMemberS{Value: string(m)}, nil } +type customTextMarshaler struct { + I, J int +} + +func (v customTextMarshaler) MarshalText() ([]byte, error) { + text := fmt.Sprintf("{I: %d, J: %d}", v.I, v.J) + return []byte(text), nil +} + +type customBinaryMarshaler struct { + I, J byte +} + +func (v customBinaryMarshaler) MarshalBinary() ([]byte, error) { + return []byte{v.I, v.J}, nil +} + +type customAVAndTextMarshaler struct { + I, J int +} + +func (v customAVAndTextMarshaler) MarshalDynamoDBAttributeValue() (types.AttributeValue, error) { + return &types.AttributeValueMemberNS{Value: []string{ + fmt.Sprintf("%d", v.I), + fmt.Sprintf("%d", v.J), + }}, nil +} + +func (v customAVAndTextMarshaler) MarshalText() ([]byte, error) { + return []byte("should never happen"), nil +} + +func TestEncodingMarshalers(t *testing.T) { + cases := []struct { + input any + expected types.AttributeValue + useMarshalers bool + }{ + { + input: customTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ + "I": &types.AttributeValueMemberN{Value: "1"}, + "J": &types.AttributeValueMemberN{Value: "2"}, + }}, + useMarshalers: false, + }, + { + input: customTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberS{Value: "{I: 1, J: 2}"}, + useMarshalers: true, + }, + { + input: customBinaryMarshaler{1, 2}, + expected: &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ + "I": &types.AttributeValueMemberN{Value: "1"}, + "J": &types.AttributeValueMemberN{Value: "2"}, + }}, + useMarshalers: false, + }, + { + input: customBinaryMarshaler{1, 2}, + expected: &types.AttributeValueMemberB{Value: []byte{1, 2}}, + useMarshalers: true, + }, + { + input: customAVAndTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberNS{Value: []string{"1", "2"}}, + useMarshalers: false, + }, + { + input: customAVAndTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberNS{Value: []string{"1", "2"}}, + useMarshalers: true, + }, + } + + for _, testCase := range cases { + actual, err := MarshalWithOptions(testCase.input, func(o *EncoderOptions) { + o.UseEncodingMarshalers = testCase.useMarshalers + }) + if err != nil { + t.Errorf("got unexpected error %v for input %v", err, testCase.input) + } + if diff := cmpDiff(testCase.expected, actual); len(diff) != 0 { + t.Errorf("expected match but got: %s", diff) + } + } +} + func TestCustomStringMarshaler(t *testing.T) { cases := []struct { expected types.AttributeValue diff --git a/feature/dynamodb/attributevalue/go_module_metadata.go b/feature/dynamodb/attributevalue/go_module_metadata.go index af42c2ef863..5baf38738cf 100644 --- a/feature/dynamodb/attributevalue/go_module_metadata.go +++ b/feature/dynamodb/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.21" +const goModuleVersion = "1.14.0" diff --git a/feature/dynamodb/expression/CHANGELOG.md b/feature/dynamodb/expression/CHANGELOG.md index 20e2f0105b4..495769e442f 100644 --- a/feature/dynamodb/expression/CHANGELOG.md +++ b/feature/dynamodb/expression/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.7.22 (2024-06-05) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.7.21 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/feature/dynamodb/expression/go.mod b/feature/dynamodb/expression/go.mod index 3a37f5239e2..074e29bb2cb 100644 --- a/feature/dynamodb/expression/go.mod +++ b/feature/dynamodb/expression/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2 v1.27.1 - github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.13.21 + github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.14.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.7 ) diff --git a/feature/dynamodb/expression/go_module_metadata.go b/feature/dynamodb/expression/go_module_metadata.go index 813d5f90696..10d9e02da3c 100644 --- a/feature/dynamodb/expression/go_module_metadata.go +++ b/feature/dynamodb/expression/go_module_metadata.go @@ -3,4 +3,4 @@ package expression // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.7.21" +const goModuleVersion = "1.7.22" diff --git a/feature/dynamodbstreams/attributevalue/CHANGELOG.md b/feature/dynamodbstreams/attributevalue/CHANGELOG.md index b6e97c4f1b2..588cecf77a3 100644 --- a/feature/dynamodbstreams/attributevalue/CHANGELOG.md +++ b/feature/dynamodbstreams/attributevalue/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.13.23 (2024-06-06) + +* No change notes available for this release. + +# v1.13.22 (2024-06-05) + +* No change notes available for this release. + # v1.13.21 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/feature/dynamodbstreams/attributevalue/decode.go b/feature/dynamodbstreams/attributevalue/decode.go index b722b3eec38..35021869967 100644 --- a/feature/dynamodbstreams/attributevalue/decode.go +++ b/feature/dynamodbstreams/attributevalue/decode.go @@ -231,6 +231,18 @@ type DecoderOptions struct { // Default string parsing format is time.RFC3339 // Default number parsing format is seconds since January 1, 1970 UTC DecodeTime DecodeTimeAttributes + + // When enabled, the decoder will use implementations of + // encoding.TextUnmarshaler and encoding.BinaryUnmarshaler when present on + // unmarshaling targets. + // + // If a target implements [Unmarshaler], encoding unmarshaler + // implementations are ignored. + // + // If the attributevalue is a string, its underlying value will be used to + // call UnmarshalText on the target. If the attributevalue is a binary, its + // value will be used to call UnmarshalBinary. + UseEncodingUnmarshalers bool } // A Decoder provides unmarshaling AttributeValues to Go value types. @@ -288,17 +300,30 @@ func (d *Decoder) decode(av types.AttributeValue, v reflect.Value, fieldTag tag) var u Unmarshaler _, isNull := av.(*types.AttributeValueMemberNULL) if av == nil || isNull { - u, v = indirect(v, indirectOptions{decodeNull: true}) + u, v = indirect[Unmarshaler](v, indirectOptions{decodeNull: true}) if u != nil { return u.UnmarshalDynamoDBStreamsAttributeValue(av) } return d.decodeNull(v) } - u, v = indirect(v, indirectOptions{}) + v0 := v + u, v = indirect[Unmarshaler](v, indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBStreamsAttributeValue(av) } + if d.options.UseEncodingUnmarshalers { + if s, ok := av.(*types.AttributeValueMemberS); ok { + if u, _ := indirect[encoding.TextUnmarshaler](v0, indirectOptions{}); u != nil { + return u.UnmarshalText([]byte(s.Value)) + } + } + if b, ok := av.(*types.AttributeValueMemberB); ok { + if u, _ := indirect[encoding.BinaryUnmarshaler](v0, indirectOptions{}); u != nil { + return u.UnmarshalBinary(b.Value) + } + } + } switch tv := av.(type) { case *types.AttributeValueMemberB: @@ -420,7 +445,7 @@ func (d *Decoder) decodeBinarySet(bs [][]byte, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBStreamsAttributeValue(&types.AttributeValueMemberBS{Value: bs}) } @@ -555,7 +580,7 @@ func (d *Decoder) decodeNumberSet(ns []string, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBStreamsAttributeValue(&types.AttributeValueMemberNS{Value: ns}) } @@ -634,7 +659,7 @@ func (d *Decoder) decodeMap(avMap map[string]types.AttributeValue, v reflect.Val for k, av := range avMap { key := reflect.New(keyType).Elem() // handle pointer keys - _, indirectKey := indirect(key, indirectOptions{skipUnmarshaler: true}) + _, indirectKey := indirect[Unmarshaler](key, indirectOptions{skipUnmarshaler: true}) if err := decodeMapKey(k, indirectKey, tag{}); err != nil { return &UnmarshalTypeError{ Value: fmt.Sprintf("map key %q", k), @@ -777,7 +802,7 @@ func (d *Decoder) decodeStringSet(ss []string, v reflect.Value) error { if !isArray { v.SetLen(i + 1) } - u, elem := indirect(v.Index(i), indirectOptions{}) + u, elem := indirect[Unmarshaler](v.Index(i), indirectOptions{}) if u != nil { return u.UnmarshalDynamoDBStreamsAttributeValue(&types.AttributeValueMemberSS{Value: ss}) } @@ -825,7 +850,7 @@ type indirectOptions struct { // // Based on the enoding/json type reflect value type indirection in Go Stdlib // https://golang.org/src/encoding/json/decode.go indirect func. -func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value) { +func indirect[U any](v reflect.Value, opts indirectOptions) (U, reflect.Value) { // Issue #24153 indicates that it is generally not a guaranteed property // that you may round-trip a reflect.Value by calling Value.Addr().Elem() // and expect the value to still be settable for values derived from @@ -859,7 +884,8 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value continue } if e.Kind() != reflect.Ptr && e.IsValid() { - return nil, e + var u U + return u, e } } if v.Kind() != reflect.Ptr { @@ -880,7 +906,7 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value v.Set(reflect.New(v.Type().Elem())) } if !opts.skipUnmarshaler && v.Type().NumMethod() > 0 && v.CanInterface() { - if u, ok := v.Interface().(Unmarshaler); ok { + if u, ok := v.Interface().(U); ok { return u, reflect.Value{} } } @@ -893,7 +919,8 @@ func indirect(v reflect.Value, opts indirectOptions) (Unmarshaler, reflect.Value } } - return nil, v + var u U + return u, v } // A Number represents a Attributevalue number literal. diff --git a/feature/dynamodbstreams/attributevalue/decode_test.go b/feature/dynamodbstreams/attributevalue/decode_test.go index fb5ea599f48..1bccef17abb 100644 --- a/feature/dynamodbstreams/attributevalue/decode_test.go +++ b/feature/dynamodbstreams/attributevalue/decode_test.go @@ -4,6 +4,7 @@ import ( "fmt" "reflect" "strconv" + "strings" "testing" "time" @@ -1173,3 +1174,97 @@ func TestUnmarshalMap_keyPtrTypes(t *testing.T) { } } + +type textUnmarshalerString string + +func (v *textUnmarshalerString) UnmarshalText(text []byte) error { + *v = textUnmarshalerString("[[" + string(text) + "]]") + return nil +} + +func TestUnmarshalTextString(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo"} + + var actual textUnmarshalerString + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + if string(actual) != "[[foo]]" { + t.Errorf("expected [[foo]], got %s", actual) + } +} + +func TestUnmarshalTextStringDisabled(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo"} + + var actual textUnmarshalerString + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = false + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + if string(actual) != "foo" { + t.Errorf("expected foo, got %s", actual) + } +} + +type textUnmarshalerStruct struct { + I, J string +} + +func (v *textUnmarshalerStruct) UnmarshalText(text []byte) error { + parts := strings.Split(string(text), ";") + v.I = parts[0] + v.J = parts[1] + return nil +} + +func TestUnmarshalTextStruct(t *testing.T) { + in := &types.AttributeValueMemberS{Value: "foo;bar"} + + var actual textUnmarshalerStruct + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + expected := textUnmarshalerStruct{"foo", "bar"} + if actual != expected { + t.Errorf("expected %v, got %v", expected, actual) + } +} + +type binaryUnmarshaler struct { + I, J byte +} + +func (v *binaryUnmarshaler) UnmarshalBinary(b []byte) error { + v.I = b[0] + v.J = b[1] + return nil +} + +func TestUnmarshalBinary(t *testing.T) { + in := &types.AttributeValueMemberB{Value: []byte{1, 2}} + + var actual binaryUnmarshaler + err := UnmarshalWithOptions(in, &actual, func(o *DecoderOptions) { + o.UseEncodingUnmarshalers = true + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + expected := binaryUnmarshaler{1, 2} + if actual != expected { + t.Errorf("expected %v, got %v", expected, actual) + } +} diff --git a/feature/dynamodbstreams/attributevalue/encode.go b/feature/dynamodbstreams/attributevalue/encode.go index d696d43d2fb..4e9989a70a5 100644 --- a/feature/dynamodbstreams/attributevalue/encode.go +++ b/feature/dynamodbstreams/attributevalue/encode.go @@ -354,8 +354,7 @@ func MarshalListWithOptions(in interface{}, optFns ...func(*EncoderOptions)) ([] return asList.Value, nil } -// EncoderOptions is a collection of options shared between marshaling -// and unmarshaling +// EncoderOptions is a collection of options used by the marshaler. type EncoderOptions struct { // Support other custom struct tag keys, such as `yaml`, `json`, or `toml`. // Note that values provided with a custom TagKey must also be supported @@ -380,6 +379,19 @@ type EncoderOptions struct { // // Default encoding is time.RFC3339Nano in a DynamoDBStreams String (S) data type. EncodeTime func(time.Time) (types.AttributeValue, error) + + // When enabled, the encoder will use implementations of + // encoding.TextMarshaler and encoding.BinaryMarshaler when present on + // marshaled values. + // + // Implementations are checked in the following order: + // - [Marshaler] + // - encoding.TextMarshaler + // - encoding.BinaryMarshaler + // + // The results of a MarshalText call will convert to string (S), results + // from a MarshalBinary call will convert to binary (B). + UseEncodingMarshalers bool } // An Encoder provides marshaling Go value types to AttributeValues. @@ -438,7 +450,7 @@ func (e *Encoder) encode(v reflect.Value, fieldTag tag) (types.AttributeValue, e v = valueElem(v) if v.Kind() != reflect.Invalid { - if av, err := tryMarshaler(v); err != nil { + if av, err := e.tryMarshaler(v); err != nil { return nil, err } else if av != nil { return av, nil @@ -822,7 +834,7 @@ func isNullableZeroValue(v reflect.Value) bool { return false } -func tryMarshaler(v reflect.Value) (types.AttributeValue, error) { +func (e *Encoder) tryMarshaler(v reflect.Value) (types.AttributeValue, error) { if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { v = v.Addr() } @@ -831,9 +843,35 @@ func tryMarshaler(v reflect.Value) (types.AttributeValue, error) { return nil, nil } - if m, ok := v.Interface().(Marshaler); ok { + i := v.Interface() + if m, ok := i.(Marshaler); ok { return m.MarshalDynamoDBStreamsAttributeValue() } + if e.options.UseEncodingMarshalers { + return e.tryEncodingMarshaler(i) + } + + return nil, nil +} + +func (e *Encoder) tryEncodingMarshaler(v any) (types.AttributeValue, error) { + if m, ok := v.(encoding.TextMarshaler); ok { + s, err := m.MarshalText() + if err != nil { + return nil, err + } + + return &types.AttributeValueMemberS{Value: string(s)}, nil + } + + if m, ok := v.(encoding.BinaryMarshaler); ok { + b, err := m.MarshalBinary() + if err != nil { + return nil, err + } + + return &types.AttributeValueMemberB{Value: b}, nil + } return nil, nil } diff --git a/feature/dynamodbstreams/attributevalue/encode_test.go b/feature/dynamodbstreams/attributevalue/encode_test.go index 9c0584160a6..56bc3be5186 100644 --- a/feature/dynamodbstreams/attributevalue/encode_test.go +++ b/feature/dynamodbstreams/attributevalue/encode_test.go @@ -94,6 +94,95 @@ func (m customBoolStringMarshaler) MarshalDynamoDBStreamsAttributeValue() (types return &types.AttributeValueMemberS{Value: string(m)}, nil } +type customTextMarshaler struct { + I, J int +} + +func (v customTextMarshaler) MarshalText() ([]byte, error) { + text := fmt.Sprintf("{I: %d, J: %d}", v.I, v.J) + return []byte(text), nil +} + +type customBinaryMarshaler struct { + I, J byte +} + +func (v customBinaryMarshaler) MarshalBinary() ([]byte, error) { + return []byte{v.I, v.J}, nil +} + +type customAVAndTextMarshaler struct { + I, J int +} + +func (v customAVAndTextMarshaler) MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) { + return &types.AttributeValueMemberNS{Value: []string{ + fmt.Sprintf("%d", v.I), + fmt.Sprintf("%d", v.J), + }}, nil +} + +func (v customAVAndTextMarshaler) MarshalText() ([]byte, error) { + return []byte("should never happen"), nil +} + +func TestEncodingMarshalers(t *testing.T) { + cases := []struct { + input any + expected types.AttributeValue + useMarshalers bool + }{ + { + input: customTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ + "I": &types.AttributeValueMemberN{Value: "1"}, + "J": &types.AttributeValueMemberN{Value: "2"}, + }}, + useMarshalers: false, + }, + { + input: customTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberS{Value: "{I: 1, J: 2}"}, + useMarshalers: true, + }, + { + input: customBinaryMarshaler{1, 2}, + expected: &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ + "I": &types.AttributeValueMemberN{Value: "1"}, + "J": &types.AttributeValueMemberN{Value: "2"}, + }}, + useMarshalers: false, + }, + { + input: customBinaryMarshaler{1, 2}, + expected: &types.AttributeValueMemberB{Value: []byte{1, 2}}, + useMarshalers: true, + }, + { + input: customAVAndTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberNS{Value: []string{"1", "2"}}, + useMarshalers: false, + }, + { + input: customAVAndTextMarshaler{1, 2}, + expected: &types.AttributeValueMemberNS{Value: []string{"1", "2"}}, + useMarshalers: true, + }, + } + + for _, testCase := range cases { + actual, err := MarshalWithOptions(testCase.input, func(o *EncoderOptions) { + o.UseEncodingMarshalers = testCase.useMarshalers + }) + if err != nil { + t.Errorf("got unexpected error %v for input %v", err, testCase.input) + } + if diff := cmpDiff(testCase.expected, actual); len(diff) != 0 { + t.Errorf("expected match but got: %s", diff) + } + } +} + func TestCustomStringMarshaler(t *testing.T) { cases := []struct { expected types.AttributeValue diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index af42c2ef863..d352c29f7ba 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.21" +const goModuleVersion = "1.13.23" diff --git a/feature/s3/manager/CHANGELOG.md b/feature/s3/manager/CHANGELOG.md index c526ff00ca4..a0175faa48b 100644 --- a/feature/s3/manager/CHANGELOG.md +++ b/feature/s3/manager/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.16.23 (2024-06-05) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.22 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/feature/s3/manager/go.mod b/feature/s3/manager/go.mod index 64e95997054..ca13f26b4fb 100644 --- a/feature/s3/manager/go.mod +++ b/feature/s3/manager/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2 v1.27.1 github.com/aws/aws-sdk-go-v2/config v1.27.17 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 github.com/aws/smithy-go v1.20.2 ) diff --git a/feature/s3/manager/go_module_metadata.go b/feature/s3/manager/go_module_metadata.go index 70bc28d8286..c2160609cfb 100644 --- a/feature/s3/manager/go_module_metadata.go +++ b/feature/s3/manager/go_module_metadata.go @@ -3,4 +3,4 @@ package manager // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.22" +const goModuleVersion = "1.16.23" diff --git a/service/account/CHANGELOG.md b/service/account/CHANGELOG.md index dbb2be7d49a..6eeb9472b17 100644 --- a/service/account/CHANGELOG.md +++ b/service/account/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.0 (2024-06-06) + +* **Feature**: This release adds 3 new APIs (AcceptPrimaryEmailUpdate, GetPrimaryEmail, and StartPrimaryEmailUpdate) used to centrally manage the root user email address of member accounts within an AWS organization. + # v1.16.9 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/account/api_op_AcceptPrimaryEmailUpdate.go b/service/account/api_op_AcceptPrimaryEmailUpdate.go new file mode 100644 index 00000000000..5a16ec56c59 --- /dev/null +++ b/service/account/api_op_AcceptPrimaryEmailUpdate.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package account + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/account/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address +// (also known as the root user email address) for the specified account. +func (c *Client) AcceptPrimaryEmailUpdate(ctx context.Context, params *AcceptPrimaryEmailUpdateInput, optFns ...func(*Options)) (*AcceptPrimaryEmailUpdateOutput, error) { + if params == nil { + params = &AcceptPrimaryEmailUpdateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptPrimaryEmailUpdate", params, optFns, c.addOperationAcceptPrimaryEmailUpdateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptPrimaryEmailUpdateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptPrimaryEmailUpdateInput struct { + + // Specifies the 12-digit account ID number of the Amazon Web Services account + // that you want to access or modify with this operation. To use this parameter, + // the caller must be an identity in the [organization's management account]or a delegated administrator account. The + // specified account ID must be a member account in the same organization. The + // organization must have [all features enabled], and the organization must have [trusted access] enabled for the + // Account Management service, and optionally a [delegated admin]account assigned. + // + // This operation can only be called from the management account or the delegated + // administrator account of an organization for a member account. + // + // The management account can't specify its own AccountId . + // + // [organization's management account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account + // [all features enabled]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html + // [delegated admin]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html + // [trusted access]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html + // + // This member is required. + AccountId *string + + // The OTP code sent to the PrimaryEmail specified on the StartPrimaryEmailUpdate + // API call. + // + // This member is required. + Otp *string + + // The new primary email address for use with the specified account. This must + // match the PrimaryEmail from the StartPrimaryEmailUpdate API call. + // + // This member is required. + PrimaryEmail *string + + noSmithyDocumentSerde +} + +type AcceptPrimaryEmailUpdateOutput struct { + + // Retrieves the status of the accepted primary email update request. + Status types.PrimaryEmailUpdateStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptPrimaryEmailUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptPrimaryEmailUpdate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptPrimaryEmailUpdate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptPrimaryEmailUpdate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpAcceptPrimaryEmailUpdateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptPrimaryEmailUpdate(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAcceptPrimaryEmailUpdate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AcceptPrimaryEmailUpdate", + } +} diff --git a/service/account/api_op_DisableRegion.go b/service/account/api_op_DisableRegion.go index 3a948e938a8..6c22af4f54c 100644 --- a/service/account/api_op_DisableRegion.go +++ b/service/account/api_op_DisableRegion.go @@ -11,6 +11,9 @@ import ( ) // Disables (opts-out) a particular Region for an account. +// +// The act of disabling a Region will remove all IAM access to any resources that +// reside in that Region. func (c *Client) DisableRegion(ctx context.Context, params *DisableRegionInput, optFns ...func(*Options)) (*DisableRegionOutput, error) { if params == nil { params = &DisableRegionInput{} @@ -42,8 +45,8 @@ type DisableRegionInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_EnableRegion.go b/service/account/api_op_EnableRegion.go index 4952a4c3d19..b91b9d1209a 100644 --- a/service/account/api_op_EnableRegion.go +++ b/service/account/api_op_EnableRegion.go @@ -42,8 +42,8 @@ type EnableRegionInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_GetContactInformation.go b/service/account/api_op_GetContactInformation.go index 3e83d0b33bd..dc3117e7359 100644 --- a/service/account/api_op_GetContactInformation.go +++ b/service/account/api_op_GetContactInformation.go @@ -37,8 +37,8 @@ type GetContactInformationInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_GetPrimaryEmail.go b/service/account/api_op_GetPrimaryEmail.go new file mode 100644 index 00000000000..4f3695a0daa --- /dev/null +++ b/service/account/api_op_GetPrimaryEmail.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package account + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the primary email address for the specified account. +func (c *Client) GetPrimaryEmail(ctx context.Context, params *GetPrimaryEmailInput, optFns ...func(*Options)) (*GetPrimaryEmailOutput, error) { + if params == nil { + params = &GetPrimaryEmailInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPrimaryEmail", params, optFns, c.addOperationGetPrimaryEmailMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPrimaryEmailOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPrimaryEmailInput struct { + + // Specifies the 12-digit account ID number of the Amazon Web Services account + // that you want to access or modify with this operation. To use this parameter, + // the caller must be an identity in the [organization's management account]or a delegated administrator account. The + // specified account ID must be a member account in the same organization. The + // organization must have [all features enabled], and the organization must have [trusted access] enabled for the + // Account Management service, and optionally a [delegated admin]account assigned. + // + // This operation can only be called from the management account or the delegated + // administrator account of an organization for a member account. + // + // The management account can't specify its own AccountId . + // + // [organization's management account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account + // [all features enabled]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html + // [delegated admin]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html + // [trusted access]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html + // + // This member is required. + AccountId *string + + noSmithyDocumentSerde +} + +type GetPrimaryEmailOutput struct { + + // Retrieves the primary email address associated with the specified account. + PrimaryEmail *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPrimaryEmailMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPrimaryEmail{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPrimaryEmail{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPrimaryEmail"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetPrimaryEmailValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPrimaryEmail(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPrimaryEmail(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPrimaryEmail", + } +} diff --git a/service/account/api_op_GetRegionOptStatus.go b/service/account/api_op_GetRegionOptStatus.go index 9352b100bad..766e3070428 100644 --- a/service/account/api_op_GetRegionOptStatus.go +++ b/service/account/api_op_GetRegionOptStatus.go @@ -40,8 +40,8 @@ type GetRegionOptStatusInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_ListRegions.go b/service/account/api_op_ListRegions.go index 5ced08e19e6..9cd9b5988ce 100644 --- a/service/account/api_op_ListRegions.go +++ b/service/account/api_op_ListRegions.go @@ -35,8 +35,8 @@ type ListRegionsInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_PutContactInformation.go b/service/account/api_op_PutContactInformation.go index cce7405f56d..5386ca7f51d 100644 --- a/service/account/api_op_PutContactInformation.go +++ b/service/account/api_op_PutContactInformation.go @@ -43,8 +43,8 @@ type PutContactInformationInput struct { // that you want to access or modify with this operation. If you don't specify this // parameter, it defaults to the Amazon Web Services account of the identity used // to call the operation. To use this parameter, the caller must be an identity in - // the [organization's management account]or a delegated administrator account. The specified account ID must also be - // a member account in the same organization. The organization must have [all features enabled], and the + // the [organization's management account]or a delegated administrator account. The specified account ID must be a + // member account in the same organization. The organization must have [all features enabled], and the // organization must have [trusted access]enabled for the Account Management service, and // optionally a [delegated admin]account assigned. // diff --git a/service/account/api_op_StartPrimaryEmailUpdate.go b/service/account/api_op_StartPrimaryEmailUpdate.go new file mode 100644 index 00000000000..1a157edcc97 --- /dev/null +++ b/service/account/api_op_StartPrimaryEmailUpdate.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package account + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/account/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts the process to update the primary email address for the specified +// account. +func (c *Client) StartPrimaryEmailUpdate(ctx context.Context, params *StartPrimaryEmailUpdateInput, optFns ...func(*Options)) (*StartPrimaryEmailUpdateOutput, error) { + if params == nil { + params = &StartPrimaryEmailUpdateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartPrimaryEmailUpdate", params, optFns, c.addOperationStartPrimaryEmailUpdateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartPrimaryEmailUpdateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartPrimaryEmailUpdateInput struct { + + // Specifies the 12-digit account ID number of the Amazon Web Services account + // that you want to access or modify with this operation. To use this parameter, + // the caller must be an identity in the [organization's management account]or a delegated administrator account. The + // specified account ID must be a member account in the same organization. The + // organization must have [all features enabled], and the organization must have [trusted access] enabled for the + // Account Management service, and optionally a [delegated admin]account assigned. + // + // This operation can only be called from the management account or the delegated + // administrator account of an organization for a member account. + // + // The management account can't specify its own AccountId . + // + // [organization's management account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account + // [all features enabled]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html + // [delegated admin]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html + // [trusted access]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html + // + // This member is required. + AccountId *string + + // The new primary email address (also known as the root user email address) to + // use in the specified account. + // + // This member is required. + PrimaryEmail *string + + noSmithyDocumentSerde +} + +type StartPrimaryEmailUpdateOutput struct { + + // The status of the primary email update request. + Status types.PrimaryEmailUpdateStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartPrimaryEmailUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartPrimaryEmailUpdate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartPrimaryEmailUpdate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartPrimaryEmailUpdate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpStartPrimaryEmailUpdateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartPrimaryEmailUpdate(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartPrimaryEmailUpdate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartPrimaryEmailUpdate", + } +} diff --git a/service/account/deserializers.go b/service/account/deserializers.go index d219d743a53..bfb3c568571 100644 --- a/service/account/deserializers.go +++ b/service/account/deserializers.go @@ -29,6 +29,172 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpAcceptPrimaryEmailUpdate struct { +} + +func (*awsRestjson1_deserializeOpAcceptPrimaryEmailUpdate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAcceptPrimaryEmailUpdate) 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, awsRestjson1_deserializeOpErrorAcceptPrimaryEmailUpdate(response, &metadata) + } + output := &AcceptPrimaryEmailUpdateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAcceptPrimaryEmailUpdateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAcceptPrimaryEmailUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAcceptPrimaryEmailUpdateOutput(v **AcceptPrimaryEmailUpdateOutput, 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 *AcceptPrimaryEmailUpdateOutput + if *v == nil { + sv = &AcceptPrimaryEmailUpdateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PrimaryEmailUpdateStatus to be of type string, got %T instead", value) + } + sv.Status = types.PrimaryEmailUpdateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDeleteAlternateContact struct { } @@ -650,6 +816,169 @@ func awsRestjson1_deserializeOpDocumentGetContactInformationOutput(v **GetContac return nil } +type awsRestjson1_deserializeOpGetPrimaryEmail struct { +} + +func (*awsRestjson1_deserializeOpGetPrimaryEmail) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetPrimaryEmail) 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, awsRestjson1_deserializeOpErrorGetPrimaryEmail(response, &metadata) + } + output := &GetPrimaryEmailOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetPrimaryEmailOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetPrimaryEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetPrimaryEmailOutput(v **GetPrimaryEmailOutput, 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 *GetPrimaryEmailOutput + if *v == nil { + sv = &GetPrimaryEmailOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PrimaryEmail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PrimaryEmailAddress to be of type string, got %T instead", value) + } + sv.PrimaryEmail = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetRegionOptStatus struct { } @@ -1180,6 +1509,172 @@ func awsRestjson1_deserializeOpErrorPutContactInformation(response *smithyhttp.R } } +type awsRestjson1_deserializeOpStartPrimaryEmailUpdate struct { +} + +func (*awsRestjson1_deserializeOpStartPrimaryEmailUpdate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartPrimaryEmailUpdate) 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, awsRestjson1_deserializeOpErrorStartPrimaryEmailUpdate(response, &metadata) + } + output := &StartPrimaryEmailUpdateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartPrimaryEmailUpdateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartPrimaryEmailUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartPrimaryEmailUpdateOutput(v **StartPrimaryEmailUpdateOutput, 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 *StartPrimaryEmailUpdateOutput + if *v == nil { + sv = &StartPrimaryEmailUpdateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PrimaryEmailUpdateStatus to be of type string, got %T instead", value) + } + sv.Status = types.PrimaryEmailUpdateStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccessDeniedException{} var buff [1024]byte diff --git a/service/account/endpoints.go b/service/account/endpoints.go index 399ca71feb2..39e50703e45 100644 --- a/service/account/endpoints.go +++ b/service/account/endpoints.go @@ -442,7 +442,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://account-fips.") diff --git a/service/account/generated.json b/service/account/generated.json index 375a037019e..c9270d6f179 100644 --- a/service/account/generated.json +++ b/service/account/generated.json @@ -8,15 +8,18 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AcceptPrimaryEmailUpdate.go", "api_op_DeleteAlternateContact.go", "api_op_DisableRegion.go", "api_op_EnableRegion.go", "api_op_GetAlternateContact.go", "api_op_GetContactInformation.go", + "api_op_GetPrimaryEmail.go", "api_op_GetRegionOptStatus.go", "api_op_ListRegions.go", "api_op_PutAlternateContact.go", "api_op_PutContactInformation.go", + "api_op_StartPrimaryEmailUpdate.go", "auth.go", "deserializers.go", "doc.go", diff --git a/service/account/go_module_metadata.go b/service/account/go_module_metadata.go index 2cce0eef141..72c4c1a44ba 100644 --- a/service/account/go_module_metadata.go +++ b/service/account/go_module_metadata.go @@ -3,4 +3,4 @@ package account // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.9" +const goModuleVersion = "1.17.0" diff --git a/service/account/serializers.go b/service/account/serializers.go index 0910d0ff1af..8556088bbed 100644 --- a/service/account/serializers.go +++ b/service/account/serializers.go @@ -14,6 +14,91 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpAcceptPrimaryEmailUpdate struct { +} + +func (*awsRestjson1_serializeOpAcceptPrimaryEmailUpdate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAcceptPrimaryEmailUpdate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AcceptPrimaryEmailUpdateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/acceptPrimaryEmailUpdate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAcceptPrimaryEmailUpdateInput(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} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAcceptPrimaryEmailUpdateInput(v *AcceptPrimaryEmailUpdateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAcceptPrimaryEmailUpdateInput(v *AcceptPrimaryEmailUpdateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + if v.Otp != nil { + ok := object.Key("Otp") + ok.String(*v.Otp) + } + + if v.PrimaryEmail != nil { + ok := object.Key("PrimaryEmail") + ok.String(*v.PrimaryEmail) + } + + return nil +} + type awsRestjson1_serializeOpDeleteAlternateContact struct { } @@ -409,6 +494,81 @@ func awsRestjson1_serializeOpDocumentGetContactInformationInput(v *GetContactInf return nil } +type awsRestjson1_serializeOpGetPrimaryEmail struct { +} + +func (*awsRestjson1_serializeOpGetPrimaryEmail) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPrimaryEmail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetPrimaryEmailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getPrimaryEmail") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetPrimaryEmailInput(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} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetPrimaryEmailInput(v *GetPrimaryEmailInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetPrimaryEmailInput(v *GetPrimaryEmailInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + return nil +} + type awsRestjson1_serializeOpGetRegionOptStatus struct { } @@ -763,6 +923,86 @@ func awsRestjson1_serializeOpDocumentPutContactInformationInput(v *PutContactInf return nil } +type awsRestjson1_serializeOpStartPrimaryEmailUpdate struct { +} + +func (*awsRestjson1_serializeOpStartPrimaryEmailUpdate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartPrimaryEmailUpdate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartPrimaryEmailUpdateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/startPrimaryEmailUpdate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartPrimaryEmailUpdateInput(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} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartPrimaryEmailUpdateInput(v *StartPrimaryEmailUpdateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartPrimaryEmailUpdateInput(v *StartPrimaryEmailUpdateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + if v.PrimaryEmail != nil { + ok := object.Key("PrimaryEmail") + ok.String(*v.PrimaryEmail) + } + + return nil +} + func awsRestjson1_serializeDocumentContactInformation(v *types.ContactInformation, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/account/snapshot/api_op_AcceptPrimaryEmailUpdate.go.snap b/service/account/snapshot/api_op_AcceptPrimaryEmailUpdate.go.snap new file mode 100644 index 00000000000..37171ed2965 --- /dev/null +++ b/service/account/snapshot/api_op_AcceptPrimaryEmailUpdate.go.snap @@ -0,0 +1,34 @@ +AcceptPrimaryEmailUpdate + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/account/snapshot/api_op_GetPrimaryEmail.go.snap b/service/account/snapshot/api_op_GetPrimaryEmail.go.snap new file mode 100644 index 00000000000..d989e90ffd7 --- /dev/null +++ b/service/account/snapshot/api_op_GetPrimaryEmail.go.snap @@ -0,0 +1,34 @@ +GetPrimaryEmail + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/account/snapshot/api_op_StartPrimaryEmailUpdate.go.snap b/service/account/snapshot/api_op_StartPrimaryEmailUpdate.go.snap new file mode 100644 index 00000000000..1113c07c35c --- /dev/null +++ b/service/account/snapshot/api_op_StartPrimaryEmailUpdate.go.snap @@ -0,0 +1,34 @@ +StartPrimaryEmailUpdate + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/account/snapshot_test.go b/service/account/snapshot_test.go index f1706f4667a..87bf211142e 100644 --- a/service/account/snapshot_test.go +++ b/service/account/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_AcceptPrimaryEmailUpdate(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptPrimaryEmailUpdate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AcceptPrimaryEmailUpdate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteAlternateContact(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteAlternateContact(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_GetContactInformation(t *testing.T) { } } +func TestCheckSnapshot_GetPrimaryEmail(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPrimaryEmail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPrimaryEmail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetRegionOptStatus(t *testing.T) { svc := New(Options{}) _, err := svc.GetRegionOptStatus(context.Background(), nil, func(o *Options) { @@ -169,6 +193,30 @@ func TestCheckSnapshot_PutContactInformation(t *testing.T) { t.Fatal(err) } } + +func TestCheckSnapshot_StartPrimaryEmailUpdate(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartPrimaryEmailUpdate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartPrimaryEmailUpdate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_AcceptPrimaryEmailUpdate(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptPrimaryEmailUpdate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AcceptPrimaryEmailUpdate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteAlternateContact(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteAlternateContact(context.Background(), nil, func(o *Options) { @@ -229,6 +277,18 @@ func TestUpdateSnapshot_GetContactInformation(t *testing.T) { } } +func TestUpdateSnapshot_GetPrimaryEmail(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPrimaryEmail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPrimaryEmail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetRegionOptStatus(t *testing.T) { svc := New(Options{}) _, err := svc.GetRegionOptStatus(context.Background(), nil, func(o *Options) { @@ -276,3 +336,15 @@ func TestUpdateSnapshot_PutContactInformation(t *testing.T) { t.Fatal(err) } } + +func TestUpdateSnapshot_StartPrimaryEmailUpdate(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartPrimaryEmailUpdate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartPrimaryEmailUpdate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/account/types/enums.go b/service/account/types/enums.go index 85c65427fbb..a7e4a371bb9 100644 --- a/service/account/types/enums.go +++ b/service/account/types/enums.go @@ -23,6 +23,25 @@ func (AlternateContactType) Values() []AlternateContactType { } } +type PrimaryEmailUpdateStatus string + +// Enum values for PrimaryEmailUpdateStatus +const ( + PrimaryEmailUpdateStatusPending PrimaryEmailUpdateStatus = "PENDING" + PrimaryEmailUpdateStatusAccepted PrimaryEmailUpdateStatus = "ACCEPTED" +) + +// Values returns all known values for PrimaryEmailUpdateStatus. 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 (PrimaryEmailUpdateStatus) Values() []PrimaryEmailUpdateStatus { + return []PrimaryEmailUpdateStatus{ + "PENDING", + "ACCEPTED", + } +} + type RegionOptStatus string // Enum values for RegionOptStatus diff --git a/service/account/types/types.go b/service/account/types/types.go index adb6347e575..01b82961f10 100644 --- a/service/account/types/types.go +++ b/service/account/types/types.go @@ -75,8 +75,11 @@ type ContactInformation struct { // The district or county of the primary contact address, if any. DistrictOrCounty *string - // The state or region of the primary contact address. This field is required in - // selected countries. + // The state or region of the primary contact address. If the mailing address is + // within the United States (US), the value in this field can be either a two + // character state code (for example, NJ ) or the full state name (for example, + // New Jersey ). This field is required in the following countries: US , CA , GB , + // DE , JP , IN , and BR . StateOrRegion *string // The URL of the website associated with the primary contact information, if any. diff --git a/service/account/validators.go b/service/account/validators.go index 9b92205739b..07287e2a458 100644 --- a/service/account/validators.go +++ b/service/account/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAcceptPrimaryEmailUpdate struct { +} + +func (*validateOpAcceptPrimaryEmailUpdate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptPrimaryEmailUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptPrimaryEmailUpdateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptPrimaryEmailUpdateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteAlternateContact struct { } @@ -90,6 +110,26 @@ func (m *validateOpGetAlternateContact) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetPrimaryEmail struct { +} + +func (*validateOpGetPrimaryEmail) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPrimaryEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPrimaryEmailInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPrimaryEmailInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetRegionOptStatus struct { } @@ -150,6 +190,30 @@ func (m *validateOpPutContactInformation) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpStartPrimaryEmailUpdate struct { +} + +func (*validateOpStartPrimaryEmailUpdate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartPrimaryEmailUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartPrimaryEmailUpdateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartPrimaryEmailUpdateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptPrimaryEmailUpdateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptPrimaryEmailUpdate{}, middleware.After) +} + func addOpDeleteAlternateContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAlternateContact{}, middleware.After) } @@ -166,6 +230,10 @@ func addOpGetAlternateContactValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetAlternateContact{}, middleware.After) } +func addOpGetPrimaryEmailValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPrimaryEmail{}, middleware.After) +} + func addOpGetRegionOptStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRegionOptStatus{}, middleware.After) } @@ -178,6 +246,10 @@ func addOpPutContactInformationValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpPutContactInformation{}, middleware.After) } +func addOpStartPrimaryEmailUpdateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartPrimaryEmailUpdate{}, middleware.After) +} + func validateContactInformation(v *types.ContactInformation) error { if v == nil { return nil @@ -208,6 +280,27 @@ func validateContactInformation(v *types.ContactInformation) error { } } +func validateOpAcceptPrimaryEmailUpdateInput(v *AcceptPrimaryEmailUpdateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptPrimaryEmailUpdateInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.PrimaryEmail == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryEmail")) + } + if v.Otp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Otp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteAlternateContactInput(v *DeleteAlternateContactInput) error { if v == nil { return nil @@ -268,6 +361,21 @@ func validateOpGetAlternateContactInput(v *GetAlternateContactInput) error { } } +func validateOpGetPrimaryEmailInput(v *GetPrimaryEmailInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPrimaryEmailInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRegionOptStatusInput(v *GetRegionOptStatusInput) error { if v == nil { return nil @@ -328,3 +436,21 @@ func validateOpPutContactInformationInput(v *PutContactInformationInput) error { return nil } } + +func validateOpStartPrimaryEmailUpdateInput(v *StartPrimaryEmailUpdateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartPrimaryEmailUpdateInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.PrimaryEmail == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryEmail")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/cloud9/CHANGELOG.md b/service/cloud9/CHANGELOG.md index 6a6c76936ab..8c62b01a0f5 100644 --- a/service/cloud9/CHANGELOG.md +++ b/service/cloud9/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.24.10 (2024-06-05) + +* No change notes available for this release. + # v1.24.9 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/cloud9/go_module_metadata.go b/service/cloud9/go_module_metadata.go index c4528fa265d..fb37ee9d8b7 100644 --- a/service/cloud9/go_module_metadata.go +++ b/service/cloud9/go_module_metadata.go @@ -3,4 +3,4 @@ package cloud9 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.24.9" +const goModuleVersion = "1.24.10" diff --git a/service/cloud9/internal/endpoints/endpoints.go b/service/cloud9/internal/endpoints/endpoints.go index c8e05a43683..09e19c0d8bd 100644 --- a/service/cloud9/internal/endpoints/endpoints.go +++ b/service/cloud9/internal/endpoints/endpoints.go @@ -142,69 +142,157 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: {}, }, }, { diff --git a/service/directconnect/CHANGELOG.md b/service/directconnect/CHANGELOG.md index 31efd598921..6d43e1206ab 100644 --- a/service/directconnect/CHANGELOG.md +++ b/service/directconnect/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.24.10 (2024-06-05) + +* No change notes available for this release. + # v1.24.9 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/directconnect/go_module_metadata.go b/service/directconnect/go_module_metadata.go index ac26e37db19..7beb52484f0 100644 --- a/service/directconnect/go_module_metadata.go +++ b/service/directconnect/go_module_metadata.go @@ -3,4 +3,4 @@ package directconnect // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.24.9" +const goModuleVersion = "1.24.10" diff --git a/service/directconnect/internal/endpoints/endpoints.go b/service/directconnect/internal/endpoints/endpoints.go index 4a35d57e853..45ed398be05 100644 --- a/service/directconnect/internal/endpoints/endpoints.go +++ b/service/directconnect/internal/endpoints/endpoints.go @@ -175,9 +175,21 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "directconnect-fips.ca-central-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "ca-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "directconnect-fips.ca-west-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -202,6 +214,24 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "fips-ca-central-1", + }: endpoints.Endpoint{ + Hostname: "directconnect-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ca-west-1", + }: endpoints.Endpoint{ + Hostname: "directconnect-fips.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ diff --git a/service/firehose/CHANGELOG.md b/service/firehose/CHANGELOG.md index f3fe19903b4..419b61d14a2 100644 --- a/service/firehose/CHANGELOG.md +++ b/service/firehose/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.29.0 (2024-06-06) + +* **Feature**: Adds integration with Secrets Manager for Redshift, Splunk, HttpEndpoint, and Snowflake destinations + # v1.28.11 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/firehose/api_op_StartDeliveryStreamEncryption.go b/service/firehose/api_op_StartDeliveryStreamEncryption.go index a09c0df3da9..552021cec24 100644 --- a/service/firehose/api_op_StartDeliveryStreamEncryption.go +++ b/service/firehose/api_op_StartDeliveryStreamEncryption.go @@ -33,7 +33,7 @@ import ( // grant that enables it to use the new CMK to encrypt and decrypt data and to // manage the grant. // -// For the KMS grant creation to be successful, Firehose APIs +// For the KMS grant creation to be successful, the Firehose API operations // StartDeliveryStreamEncryption and CreateDeliveryStream should not be called // with session credentials that are more than 6 hours old. // diff --git a/service/firehose/api_op_UpdateDestination.go b/service/firehose/api_op_UpdateDestination.go index 0ed15c32bb6..7b0ba5e6ad3 100644 --- a/service/firehose/api_op_UpdateDestination.go +++ b/service/firehose/api_op_UpdateDestination.go @@ -102,7 +102,7 @@ type UpdateDestinationInput struct { // Deprecated: This member has been deprecated. S3DestinationUpdate *types.S3DestinationUpdate - // Update to the Snowflake destination condiguration settings + // Update to the Snowflake destination configuration settings. SnowflakeDestinationUpdate *types.SnowflakeDestinationUpdate // Describes an update for a destination in Splunk. diff --git a/service/firehose/deserializers.go b/service/firehose/deserializers.go index 62cd6c9ff52..524e3779841 100644 --- a/service/firehose/deserializers.go +++ b/service/firehose/deserializers.go @@ -3704,6 +3704,11 @@ func awsAwsjson11_deserializeDocumentHttpEndpointDestinationDescription(v **type return err } + case "SecretsManagerConfiguration": + if err := awsAwsjson11_deserializeDocumentSecretsManagerConfiguration(&sv.SecretsManagerConfiguration, value); err != nil { + return err + } + default: _, _ = key, value @@ -5066,6 +5071,11 @@ func awsAwsjson11_deserializeDocumentRedshiftDestinationDescription(v **types.Re return err } + case "SecretsManagerConfiguration": + if err := awsAwsjson11_deserializeDocumentSecretsManagerConfiguration(&sv.SecretsManagerConfiguration, value); err != nil { + return err + } + case "Username": if value != nil { jtv, ok := value.(string) @@ -5428,6 +5438,64 @@ func awsAwsjson11_deserializeDocumentSchemaConfiguration(v **types.SchemaConfigu return nil } +func awsAwsjson11_deserializeDocumentSecretsManagerConfiguration(v **types.SecretsManagerConfiguration, 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.SecretsManagerConfiguration + if *v == nil { + sv = &types.SecretsManagerConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "RoleARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) + } + sv.RoleARN = ptr.String(jtv) + } + + case "SecretARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretARN to be of type string, got %T instead", value) + } + sv.SecretARN = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSecurityGroupIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5659,6 +5727,11 @@ func awsAwsjson11_deserializeDocumentSnowflakeDestinationDescription(v **types.S sv.Schema = ptr.String(jtv) } + case "SecretsManagerConfiguration": + if err := awsAwsjson11_deserializeDocumentSecretsManagerConfiguration(&sv.SecretsManagerConfiguration, value); err != nil { + return err + } + case "SnowflakeRoleConfiguration": if err := awsAwsjson11_deserializeDocumentSnowflakeRoleConfiguration(&sv.SnowflakeRoleConfiguration, value); err != nil { return err @@ -6023,6 +6096,11 @@ func awsAwsjson11_deserializeDocumentSplunkDestinationDescription(v **types.Splu return err } + case "SecretsManagerConfiguration": + if err := awsAwsjson11_deserializeDocumentSecretsManagerConfiguration(&sv.SecretsManagerConfiguration, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/firehose/doc.go b/service/firehose/doc.go index 2378ef134db..d4e00e73e9b 100644 --- a/service/firehose/doc.go +++ b/service/firehose/doc.go @@ -10,5 +10,5 @@ // Amazon Data Firehose is a fully managed service that delivers real-time // streaming data to destinations such as Amazon Simple Storage Service (Amazon // S3), Amazon OpenSearch Service, Amazon Redshift, Splunk, and various other -// supportd destinations. +// supported destinations. package firehose diff --git a/service/firehose/go_module_metadata.go b/service/firehose/go_module_metadata.go index fdb79f9d435..66375d3aca2 100644 --- a/service/firehose/go_module_metadata.go +++ b/service/firehose/go_module_metadata.go @@ -3,4 +3,4 @@ package firehose // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.11" +const goModuleVersion = "1.29.0" diff --git a/service/firehose/serializers.go b/service/firehose/serializers.go index 19480ef1d64..3e670083f9b 100644 --- a/service/firehose/serializers.go +++ b/service/firehose/serializers.go @@ -1776,6 +1776,13 @@ func awsAwsjson11_serializeDocumentHttpEndpointDestinationConfiguration(v *types } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -1842,6 +1849,13 @@ func awsAwsjson11_serializeDocumentHttpEndpointDestinationUpdate(v *types.HttpEn } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -2310,6 +2324,13 @@ func awsAwsjson11_serializeDocumentRedshiftDestinationConfiguration(v *types.Red } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + if v.Username != nil { ok := object.Key("Username") ok.String(*v.Username) @@ -2384,6 +2405,13 @@ func awsAwsjson11_serializeDocumentRedshiftDestinationUpdate(v *types.RedshiftDe } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + if v.Username != nil { ok := object.Key("Username") ok.String(*v.Username) @@ -2559,6 +2587,28 @@ func awsAwsjson11_serializeDocumentSchemaConfiguration(v *types.SchemaConfigurat return nil } +func awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v *types.SecretsManagerConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.RoleARN != nil { + ok := object.Key("RoleARN") + ok.String(*v.RoleARN) + } + + if v.SecretARN != nil { + ok := object.Key("SecretARN") + ok.String(*v.SecretARN) + } + + return nil +} + func awsAwsjson11_serializeDocumentSecurityGroupIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2673,6 +2723,13 @@ func awsAwsjson11_serializeDocumentSnowflakeDestinationConfiguration(v *types.Sn ok.String(*v.Schema) } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + if v.SnowflakeRoleConfiguration != nil { ok := object.Key("SnowflakeRoleConfiguration") if err := awsAwsjson11_serializeDocumentSnowflakeRoleConfiguration(v.SnowflakeRoleConfiguration, ok); err != nil { @@ -2782,6 +2839,13 @@ func awsAwsjson11_serializeDocumentSnowflakeDestinationUpdate(v *types.Snowflake ok.String(*v.Schema) } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + if v.SnowflakeRoleConfiguration != nil { ok := object.Key("SnowflakeRoleConfiguration") if err := awsAwsjson11_serializeDocumentSnowflakeRoleConfiguration(v.SnowflakeRoleConfiguration, ok); err != nil { @@ -2924,6 +2988,13 @@ func awsAwsjson11_serializeDocumentSplunkDestinationConfiguration(v *types.Splun } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -2991,6 +3062,13 @@ func awsAwsjson11_serializeDocumentSplunkDestinationUpdate(v *types.SplunkDestin } } + if v.SecretsManagerConfiguration != nil { + ok := object.Key("SecretsManagerConfiguration") + if err := awsAwsjson11_serializeDocumentSecretsManagerConfiguration(v.SecretsManagerConfiguration, ok); err != nil { + return err + } + } + return nil } diff --git a/service/firehose/types/types.go b/service/firehose/types/types.go index e8f64dff693..90f0f806018 100644 --- a/service/firehose/types/types.go +++ b/service/firehose/types/types.go @@ -1372,8 +1372,8 @@ type HttpEndpointDestinationConfiguration struct { // Describes a data processing configuration. ProcessingConfiguration *ProcessingConfiguration - // The configuration of the requeste sent to the HTTP endpoint specified as the - // destination. + // The configuration of the request sent to the HTTP endpoint that is specified as + // the destination. RequestConfiguration *HttpEndpointRequestConfiguration // Describes the retry behavior in case Firehose is unable to deliver data to the @@ -1391,6 +1391,10 @@ type HttpEndpointDestinationConfiguration struct { // destination ( FailedDataOnly ). S3BackupMode HttpEndpointS3BackupMode + // The configuration that defines how you access secrets for HTTP Endpoint + // destination. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } @@ -1435,6 +1439,10 @@ type HttpEndpointDestinationDescription struct { // Describes a destination in Amazon S3. S3DestinationDescription *S3DestinationDescription + // The configuration that defines how you access secrets for HTTP Endpoint + // destination. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } @@ -1479,6 +1487,10 @@ type HttpEndpointDestinationUpdate struct { // Describes an update for a destination in Amazon S3. S3Update *S3DestinationUpdate + // The configuration that defines how you access secrets for HTTP Endpoint + // destination. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } @@ -1734,7 +1746,7 @@ type OutputFormatConfiguration struct { // A serializer to use for converting data to the Parquet format before storing it // in Amazon S3. For more information, see [Apache Parquet]. // -// [Apache Parquet]: https://parquet.apache.org/documentation/latest/ +// [Apache Parquet]: https://parquet.apache.org/docs/ type ParquetSerDe struct { // The Hadoop Distributed File System (HDFS) block size. This is useful if you @@ -1862,11 +1874,6 @@ type RedshiftDestinationConfiguration struct { // This member is required. CopyCommand *CopyCommand - // The user password. - // - // This member is required. - Password *string - // The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more // information, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]. // @@ -1886,14 +1893,12 @@ type RedshiftDestinationConfiguration struct { // This member is required. S3Configuration *S3DestinationConfiguration - // The name of the user. - // - // This member is required. - Username *string - // The CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions + // The user password. + Password *string + // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration @@ -1909,6 +1914,12 @@ type RedshiftDestinationConfiguration struct { // update the delivery stream to disable it. S3BackupMode RedshiftS3BackupMode + // The configuration that defines how you access secrets for Amazon Redshift. + SecretsManagerConfiguration *SecretsManagerConfiguration + + // The name of the user. + Username *string + noSmithyDocumentSerde } @@ -1938,11 +1949,6 @@ type RedshiftDestinationDescription struct { // This member is required. S3DestinationDescription *S3DestinationDescription - // The name of the user. - // - // This member is required. - Username *string - // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions @@ -1959,6 +1965,12 @@ type RedshiftDestinationDescription struct { // The Amazon S3 backup mode. S3BackupMode RedshiftS3BackupMode + // The configuration that defines how you access secrets for Amazon Redshift. + SecretsManagerConfiguration *SecretsManagerConfiguration + + // The name of the user. + Username *string + noSmithyDocumentSerde } @@ -2004,6 +2016,9 @@ type RedshiftDestinationUpdate struct { // that reads from the S3 bucket doesn't support these compression formats. S3Update *S3DestinationUpdate + // The configuration that defines how you access secrets for Amazon Redshift. + SecretsManagerConfiguration *SecretsManagerConfiguration + // The name of the user. Username *string @@ -2235,6 +2250,33 @@ type SchemaConfiguration struct { noSmithyDocumentSerde } +// The structure that defines how Firehose accesses the secret. +type SecretsManagerConfiguration struct { + + // Specifies whether you want to use the the secrets manager feature. When set as + // True the secrets manager configuration overwrites the existing secrets in the + // destination configuration. When it's set to False Firehose falls back to the + // credentials in the destination configuration. + // + // This member is required. + Enabled *bool + + // Specifies the role that Firehose assumes when calling the Secrets Manager API + // operation. When you provide the role, it overrides any destination specific role + // defined in the destination configuration. If you do not provide the then we use + // the destination specific role. This parameter is required for Splunk. + RoleARN *string + + // The ARN of the secret that stores your credentials. It must be in the same + // region as the Firehose stream and the role. The secret ARN can reside in a + // different account than the delivery stream and role as Firehose supports + // cross-account secret access. This parameter is required when Enabled is set to + // True . + SecretARN *string + + noSmithyDocumentSerde +} + // The serializer that you want Firehose to use to convert data to the target // format before writing it to Amazon S3. Firehose supports two types of // serializers: the [ORC SerDe]and the [Parquet SerDe]. @@ -2274,13 +2316,6 @@ type SnowflakeDestinationConfiguration struct { // This member is required. Database *string - // The private key used to encrypt your Snowflake client. For information, see [Using Key Pair Authentication & Key Rotation]. - // - // [Using Key Pair Authentication & Key Rotation]: https://docs.snowflake.com/en/user-guide/data-load-snowpipe-streaming-configuration#using-key-pair-authentication-key-rotation - // - // This member is required. - PrivateKey *string - // The Amazon Resource Name (ARN) of the Snowflake role // // This member is required. @@ -2303,11 +2338,6 @@ type SnowflakeDestinationConfiguration struct { // This member is required. Table *string - // User login name for the Snowflake account. - // - // This member is required. - User *string - // Describes the Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions @@ -2328,6 +2358,11 @@ type SnowflakeDestinationConfiguration struct { // The name of the record metadata column MetaDataColumnName *string + // The private key used to encrypt your Snowflake client. For information, see [Using Key Pair Authentication & Key Rotation]. + // + // [Using Key Pair Authentication & Key Rotation]: https://docs.snowflake.com/en/user-guide/data-load-snowpipe-streaming-configuration#using-key-pair-authentication-key-rotation + PrivateKey *string + // Describes a data processing configuration. ProcessingConfiguration *ProcessingConfiguration @@ -2338,6 +2373,9 @@ type SnowflakeDestinationConfiguration struct { // Choose an S3 backup mode S3BackupMode SnowflakeS3BackupMode + // The configuration that defines how you access secrets for Snowflake. + SecretsManagerConfiguration *SecretsManagerConfiguration + // Optionally configure a Snowflake role. Otherwise the default user role will be // used. SnowflakeRoleConfiguration *SnowflakeRoleConfiguration @@ -2348,6 +2386,9 @@ type SnowflakeDestinationConfiguration struct { // [Amazon PrivateLink & Snowflake]: https://docs.snowflake.com/en/user-guide/admin-security-privatelink SnowflakeVpcConfiguration *SnowflakeVpcConfiguration + // User login name for the Snowflake account. + User *string + noSmithyDocumentSerde } @@ -2397,6 +2438,9 @@ type SnowflakeDestinationDescription struct { // database objects, such as tables and views Schema *string + // The configuration that defines how you access secrets for Snowflake. + SecretsManagerConfiguration *SecretsManagerConfiguration + // Optionally configure a Snowflake role. Otherwise the default user role will be // used. SnowflakeRoleConfiguration *SnowflakeRoleConfiguration @@ -2492,6 +2536,9 @@ type SnowflakeDestinationUpdate struct { // database objects, such as tables and views Schema *string + // Describes the Secrets Manager configuration in Snowflake. + SecretsManagerConfiguration *SecretsManagerConfiguration + // Optionally configure a Snowflake role. Otherwise the default user role will be // used. SnowflakeRoleConfiguration *SnowflakeRoleConfiguration @@ -2604,12 +2651,6 @@ type SplunkDestinationConfiguration struct { // This member is required. HECEndpointType HECEndpointType - // This is a GUID that you obtain from your Splunk cluster when you create a new - // HEC endpoint. - // - // This member is required. - HECToken *string - // The configuration for the backup Amazon S3 location. // // This member is required. @@ -2627,6 +2668,10 @@ type SplunkDestinationConfiguration struct { // to send the data again or considers it an error, based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int32 + // This is a GUID that you obtain from your Splunk cluster when you create a new + // HEC endpoint. + HECToken *string + // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration @@ -2644,6 +2689,9 @@ type SplunkDestinationConfiguration struct { // update it from AllEvents to FailedEventsOnly . S3BackupMode SplunkS3BackupMode + // The configuration that defines how you access secrets for Splunk. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } @@ -2688,6 +2736,9 @@ type SplunkDestinationDescription struct { // The Amazon S3 destination.> S3DestinationDescription *S3DestinationDescription + // The configuration that defines how you access secrets for Splunk. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } @@ -2736,6 +2787,9 @@ type SplunkDestinationUpdate struct { // Your update to the configuration of the backup Amazon S3 location. S3Update *S3DestinationUpdate + // The configuration that defines how you access secrets for Splunk. + SecretsManagerConfiguration *SecretsManagerConfiguration + noSmithyDocumentSerde } diff --git a/service/firehose/validators.go b/service/firehose/validators.go index 1b742beb155..1af8af7ef90 100644 --- a/service/firehose/validators.go +++ b/service/firehose/validators.go @@ -684,6 +684,11 @@ func validateHttpEndpointDestinationConfiguration(v *types.HttpEndpointDestinati invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -716,6 +721,11 @@ func validateHttpEndpointDestinationUpdate(v *types.HttpEndpointDestinationUpdat invalidParams.AddNested("S3Update", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -937,12 +947,6 @@ func validateRedshiftDestinationConfiguration(v *types.RedshiftDestinationConfig invalidParams.AddNested("CopyCommand", err.(smithy.InvalidParamsError)) } } - if v.Username == nil { - invalidParams.Add(smithy.NewErrParamRequired("Username")) - } - if v.Password == nil { - invalidParams.Add(smithy.NewErrParamRequired("Password")) - } if v.S3Configuration == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Configuration")) } else if v.S3Configuration != nil { @@ -960,6 +964,11 @@ func validateRedshiftDestinationConfiguration(v *types.RedshiftDestinationConfig invalidParams.AddNested("S3BackupConfiguration", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -992,6 +1001,11 @@ func validateRedshiftDestinationUpdate(v *types.RedshiftDestinationUpdate) error invalidParams.AddNested("S3BackupUpdate", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1039,6 +1053,21 @@ func validateS3DestinationUpdate(v *types.S3DestinationUpdate) error { } } +func validateSecretsManagerConfiguration(v *types.SecretsManagerConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SecretsManagerConfiguration"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSnowflakeDestinationConfiguration(v *types.SnowflakeDestinationConfiguration) error { if v == nil { return nil @@ -1047,12 +1076,6 @@ func validateSnowflakeDestinationConfiguration(v *types.SnowflakeDestinationConf if v.AccountUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountUrl")) } - if v.PrivateKey == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrivateKey")) - } - if v.User == nil { - invalidParams.Add(smithy.NewErrParamRequired("User")) - } if v.Database == nil { invalidParams.Add(smithy.NewErrParamRequired("Database")) } @@ -1082,6 +1105,11 @@ func validateSnowflakeDestinationConfiguration(v *types.SnowflakeDestinationConf invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1104,6 +1132,11 @@ func validateSnowflakeDestinationUpdate(v *types.SnowflakeDestinationUpdate) err invalidParams.AddNested("S3Update", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1137,9 +1170,6 @@ func validateSplunkDestinationConfiguration(v *types.SplunkDestinationConfigurat if len(v.HECEndpointType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("HECEndpointType")) } - if v.HECToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("HECToken")) - } if v.S3Configuration == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Configuration")) } else if v.S3Configuration != nil { @@ -1152,6 +1182,11 @@ func validateSplunkDestinationConfiguration(v *types.SplunkDestinationConfigurat invalidParams.AddNested("ProcessingConfiguration", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1174,6 +1209,11 @@ func validateSplunkDestinationUpdate(v *types.SplunkDestinationUpdate) error { invalidParams.AddNested("ProcessingConfiguration", err.(smithy.InvalidParamsError)) } } + if v.SecretsManagerConfiguration != nil { + if err := validateSecretsManagerConfiguration(v.SecretsManagerConfiguration); err != nil { + invalidParams.AddNested("SecretsManagerConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/fsx/CHANGELOG.md b/service/fsx/CHANGELOG.md index 42685e837cf..1f5d9160109 100644 --- a/service/fsx/CHANGELOG.md +++ b/service/fsx/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.44.0 (2024-06-06) + +* **Feature**: This release adds support to increase metadata performance on FSx for Lustre file systems beyond the default level provisioned when a file system is created. This can be done by specifying MetadataConfiguration during the creation of Persistent_2 file systems or by updating it on demand. + # v1.43.10 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/fsx/api_op_CreateFileSystem.go b/service/fsx/api_op_CreateFileSystem.go index 55f3038cbdc..01971be583b 100644 --- a/service/fsx/api_op_CreateFileSystem.go +++ b/service/fsx/api_op_CreateFileSystem.go @@ -81,7 +81,7 @@ type CreateFileSystemInput struct { // configure depends on the value that you set for StorageType and the Lustre // DeploymentType , as follows: // - // - For SCRATCH_2 , PERSISTENT_2 and PERSISTENT_1 deployment types using SSD + // - For SCRATCH_2 , PERSISTENT_2 , and PERSISTENT_1 deployment types using SSD // storage type, the valid values are 1200 GiB, 2400 GiB, and increments of 2400 // GiB. // @@ -134,19 +134,24 @@ type CreateFileSystemInput struct { // Command Line Interface (CLI) or an Amazon Web Services SDK. ClientRequestToken *string - // (Optional) For FSx for Lustre file systems, sets the Lustre version for the - // file system that you're creating. Valid values are 2.10 , 2.12 , and 2.15 : + // For FSx for Lustre file systems, sets the Lustre version for the file system + // that you're creating. Valid values are 2.10 , 2.12 , and 2.15 : // // - 2.10 is supported by the Scratch and Persistent_1 Lustre deployment types. // - // - 2.12 and 2.15 are supported by all Lustre deployment types. 2.12 or 2.15 is - // required when setting FSx for Lustre DeploymentType to PERSISTENT_2 . + // - 2.12 is supported by all Lustre deployment types, except for PERSISTENT_2 + // with a metadata configuration mode. // - // Default value = 2.10 , except when DeploymentType is set to PERSISTENT_2 , then - // the default is 2.12 . + // - 2.15 is supported by all Lustre deployment types and is recommended for all + // new file systems. // - // If you set FileSystemTypeVersion to 2.10 for a PERSISTENT_2 Lustre deployment - // type, the CreateFileSystem operation fails. + // Default value is 2.10 , except for the following deployments: + // + // - Default value is 2.12 when DeploymentType is set to PERSISTENT_2 without a + // metadata configuration mode. + // + // - Default value is 2.15 when DeploymentType is set to PERSISTENT_2 with a + // metadata configuration mode. FileSystemTypeVersion *string // Specifies the ID of the Key Management Service (KMS) key to use for encrypting diff --git a/service/fsx/api_op_CreateStorageVirtualMachine.go b/service/fsx/api_op_CreateStorageVirtualMachine.go index 286d6fb19a0..585409287f5 100644 --- a/service/fsx/api_op_CreateStorageVirtualMachine.go +++ b/service/fsx/api_op_CreateStorageVirtualMachine.go @@ -61,8 +61,10 @@ type CreateStorageVirtualMachineInput struct { // majority of users are SMB clients, and an application accessing the data uses a // Microsoft Windows user as the service account. // - // - MIXED This is an advanced setting. For more information, see Volume security stylein the Amazon + // - MIXED This is an advanced setting. For more information, see [Volume security style]in the Amazon // FSx for NetApp ONTAP User Guide. + // + // [Volume security style]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-security-style.html RootVolumeSecurityStyle types.StorageVirtualMachineRootVolumeSecurityStyle // The password to use when managing the SVM using the NetApp ONTAP CLI or REST diff --git a/service/fsx/api_op_DeleteFileSystem.go b/service/fsx/api_op_DeleteFileSystem.go index cc9be85adb9..26af3529bee 100644 --- a/service/fsx/api_op_DeleteFileSystem.go +++ b/service/fsx/api_op_DeleteFileSystem.go @@ -16,14 +16,14 @@ import ( // // To delete an Amazon FSx for NetApp ONTAP file system, first delete all the // volumes and storage virtual machines (SVMs) on the file system. Then provide a -// FileSystemId value to the DeleFileSystem operation. +// FileSystemId value to the DeleteFileSystem operation. // // By default, when you delete an Amazon FSx for Windows File Server file system, // a final backup is created upon deletion. This final backup isn't subject to the // file system's retention policy, and must be manually deleted. // // To delete an Amazon FSx for Lustre file system, first [unmount] it from every connected -// Amazon EC2 instance, then provide a FileSystemId value to the DeleFileSystem +// Amazon EC2 instance, then provide a FileSystemId value to the DeleteFileSystem // operation. By default, Amazon FSx will not take a final backup when the // DeleteFileSystem operation is invoked. On file systems not linked to an Amazon // S3 bucket, set SkipFinalBackup to false to take a final backup of the file diff --git a/service/fsx/api_op_UpdateFileSystem.go b/service/fsx/api_op_UpdateFileSystem.go index 84237210469..b6411031a78 100644 --- a/service/fsx/api_op_UpdateFileSystem.go +++ b/service/fsx/api_op_UpdateFileSystem.go @@ -49,6 +49,8 @@ import ( // // - LustreRootSquashConfiguration // +// - MetadataConfiguration +// // - PerUnitStorageThroughput // // - StorageCapacity diff --git a/service/fsx/deserializers.go b/service/fsx/deserializers.go index e426917ebd0..0ddd8394aae 100644 --- a/service/fsx/deserializers.go +++ b/service/fsx/deserializers.go @@ -9925,6 +9925,59 @@ func awsAwsjson11_deserializeDocumentFileSystemFailureDetails(v **types.FileSyst return nil } +func awsAwsjson11_deserializeDocumentFileSystemLustreMetadataConfiguration(v **types.FileSystemLustreMetadataConfiguration, 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.FileSystemLustreMetadataConfiguration + if *v == nil { + sv = &types.FileSystemLustreMetadataConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Iops": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MetadataIops to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) + } + + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetadataConfigurationMode to be of type string, got %T instead", value) + } + sv.Mode = types.MetadataConfigurationMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentFileSystemMaintenanceOperations(v *[]types.FileSystemMaintenanceOperation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10641,6 +10694,11 @@ func awsAwsjson11_deserializeDocumentLustreFileSystemConfiguration(v **types.Lus return err } + case "MetadataConfiguration": + if err := awsAwsjson11_deserializeDocumentFileSystemLustreMetadataConfiguration(&sv.MetadataConfiguration, value); err != nil { + return err + } + case "MountName": if value != nil { jtv, ok := value.(string) diff --git a/service/fsx/go_module_metadata.go b/service/fsx/go_module_metadata.go index 5f177b73a83..15c8e84ba58 100644 --- a/service/fsx/go_module_metadata.go +++ b/service/fsx/go_module_metadata.go @@ -3,4 +3,4 @@ package fsx // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.43.10" +const goModuleVersion = "1.44.0" diff --git a/service/fsx/serializers.go b/service/fsx/serializers.go index 7785768ba7b..83b887bda05 100644 --- a/service/fsx/serializers.go +++ b/service/fsx/serializers.go @@ -2716,6 +2716,13 @@ func awsAwsjson11_serializeDocumentCreateFileSystemLustreConfiguration(v *types. } } + if v.MetadataConfiguration != nil { + ok := object.Key("MetadataConfiguration") + if err := awsAwsjson11_serializeDocumentCreateFileSystemLustreMetadataConfiguration(v.MetadataConfiguration, ok); err != nil { + return err + } + } + if v.PerUnitStorageThroughput != nil { ok := object.Key("PerUnitStorageThroughput") ok.Integer(*v.PerUnitStorageThroughput) @@ -2736,6 +2743,23 @@ func awsAwsjson11_serializeDocumentCreateFileSystemLustreConfiguration(v *types. return nil } +func awsAwsjson11_serializeDocumentCreateFileSystemLustreMetadataConfiguration(v *types.CreateFileSystemLustreMetadataConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Iops != nil { + ok := object.Key("Iops") + ok.Integer(*v.Iops) + } + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + return nil +} + func awsAwsjson11_serializeDocumentCreateFileSystemOntapConfiguration(v *types.CreateFileSystemOntapConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4182,6 +4206,13 @@ func awsAwsjson11_serializeDocumentUpdateFileSystemLustreConfiguration(v *types. } } + if v.MetadataConfiguration != nil { + ok := object.Key("MetadataConfiguration") + if err := awsAwsjson11_serializeDocumentUpdateFileSystemLustreMetadataConfiguration(v.MetadataConfiguration, ok); err != nil { + return err + } + } + if v.PerUnitStorageThroughput != nil { ok := object.Key("PerUnitStorageThroughput") ok.Integer(*v.PerUnitStorageThroughput) @@ -4202,6 +4233,23 @@ func awsAwsjson11_serializeDocumentUpdateFileSystemLustreConfiguration(v *types. return nil } +func awsAwsjson11_serializeDocumentUpdateFileSystemLustreMetadataConfiguration(v *types.UpdateFileSystemLustreMetadataConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Iops != nil { + ok := object.Key("Iops") + ok.Integer(*v.Iops) + } + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + return nil +} + func awsAwsjson11_serializeDocumentUpdateFileSystemOntapConfiguration(v *types.UpdateFileSystemOntapConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/fsx/types/enums.go b/service/fsx/types/enums.go index e22173ed66a..a284146c3e1 100644 --- a/service/fsx/types/enums.go +++ b/service/fsx/types/enums.go @@ -654,6 +654,25 @@ func (LustreDeploymentType) Values() []LustreDeploymentType { } } +type MetadataConfigurationMode string + +// Enum values for MetadataConfigurationMode +const ( + MetadataConfigurationModeAutomatic MetadataConfigurationMode = "AUTOMATIC" + MetadataConfigurationModeUserProvisioned MetadataConfigurationMode = "USER_PROVISIONED" +) + +// Values returns all known values for MetadataConfigurationMode. 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 (MetadataConfigurationMode) Values() []MetadataConfigurationMode { + return []MetadataConfigurationMode{ + "AUTOMATIC", + "USER_PROVISIONED", + } +} + type NfsVersion string // Enum values for NfsVersion diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index 782c274994d..fb9d1447360 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -620,16 +620,18 @@ type CreateFileSystemLustreConfiguration struct { // // Choose PERSISTENT_2 for longer-term storage and for latency-sensitive workloads // that require the highest levels of IOPS/throughput. PERSISTENT_2 supports SSD - // storage, and offers higher PerUnitStorageThroughput (up to 1000 MB/s/TiB). - // PERSISTENT_2 is available in a limited number of Amazon Web Services Regions. - // For more information, and an up-to-date list of Amazon Web Services Regions in - // which PERSISTENT_2 is available, see [File system deployment options for FSx for Lustre] in the Amazon FSx for Lustre User Guide. + // storage, and offers higher PerUnitStorageThroughput (up to 1000 MB/s/TiB). You + // can optionally specify a metadata configuration mode for PERSISTENT_2 which + // supports increasing metadata performance. PERSISTENT_2 is available in a + // limited number of Amazon Web Services Regions. For more information, and an + // up-to-date list of Amazon Web Services Regions in which PERSISTENT_2 is + // available, see [File system deployment options for FSx for Lustre]in the Amazon FSx for Lustre User Guide. // // If you choose PERSISTENT_2 , and you set FileSystemTypeVersion to 2.10 , the // CreateFileSystem operation fails. // // Encryption of data in transit is automatically turned on when you access - // SCRATCH_2 , PERSISTENT_1 and PERSISTENT_2 file systems from Amazon EC2 + // SCRATCH_2 , PERSISTENT_1 , and PERSISTENT_2 file systems from Amazon EC2 // instances that support automatic encryption in the Amazon Web Services Regions // where they are available. For more information about encryption in transit for // FSx for Lustre file systems, see [Encrypting data in transit]in the Amazon FSx for Lustre User Guide. @@ -696,6 +698,10 @@ type CreateFileSystemLustreConfiguration struct { // data repositories associated with your file system to Amazon CloudWatch Logs. LogConfiguration *LustreLogCreateConfiguration + // The Lustre metadata performance configuration for the creation of an FSx for + // Lustre file system using a PERSISTENT_2 deployment type. + MetadataConfiguration *CreateFileSystemLustreMetadataConfiguration + // Required with PERSISTENT_1 and PERSISTENT_2 deployment types, provisions the // amount of read and write throughput for each 1 tebibyte (TiB) of file system // storage capacity, in MB/s/TiB. File system throughput capacity is calculated by @@ -726,6 +732,44 @@ type CreateFileSystemLustreConfiguration struct { noSmithyDocumentSerde } +// The Lustre metadata performance configuration for the creation of an Amazon FSx +// for Lustre file system using a PERSISTENT_2 deployment type. The configuration +// uses a Metadata IOPS value to set the maximum rate of metadata disk IOPS +// supported by the file system. +// +// After creation, the file system supports increasing metadata performance. For +// more information on Metadata IOPS, see [Lustre metadata performance configuration]in the Amazon FSx for Lustre User Guide. +// +// [Lustre metadata performance configuration]: https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-metadata-performance.html#metadata-configuration +type CreateFileSystemLustreMetadataConfiguration struct { + + // The metadata configuration mode for provisioning Metadata IOPS for an FSx for + // Lustre file system using a PERSISTENT_2 deployment type. + // + // - In AUTOMATIC mode, FSx for Lustre automatically provisions and scales the + // number of Metadata IOPS for your file system based on your file system storage + // capacity. + // + // - In USER_PROVISIONED mode, you specify the number of Metadata IOPS to + // provision for your file system. + // + // This member is required. + Mode MetadataConfigurationMode + + // (USER_PROVISIONED mode only) Specifies the number of Metadata IOPS to provision + // for the file system. This parameter sets the maximum rate of metadata disk IOPS + // supported by the file system. Valid values are 1500 , 3000 , 6000 , 12000 , and + // multiples of 12000 up to a maximum of 192000 . + // + // Iops doesn’t have a default value. If you're using USER_PROVISIONED mode, you + // can choose to specify a valid value. If you're using AUTOMATIC mode, you cannot + // specify a value because FSx for Lustre automatically sets the value based on + // your file system storage capacity. + Iops *int32 + + noSmithyDocumentSerde +} + // The ONTAP configuration properties of the FSx for ONTAP file system that you // are creating. type CreateFileSystemOntapConfiguration struct { @@ -789,7 +833,7 @@ type CreateFileSystemOntapConfiguration struct { // - The value of HAPairs is greater than 1 and the value of DeploymentType is // SINGLE_AZ_1 or MULTI_AZ_1 . // - // [High-availability (HA) pairs]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/HA-pairs.html + // [High-availability (HA) pairs]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/administering-file-systems.html#HA-pairs HAPairs *int32 // Required when DeploymentType is set to MULTI_AZ_1 . This specifies the subnet in @@ -1140,14 +1184,13 @@ type CreateOntapVolumeConfiguration struct { // // For more information, see [Volume types] in the Amazon FSx for NetApp ONTAP User Guide. // - // [Volume types]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-types + // [Volume types]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-types OntapVolumeType InputOntapVolumeType // Specifies the security style for the volume. If a volume's security style is // not specified, it is automatically set to the root volume's security style. The // security style determines the type of permissions that FSx for ONTAP uses to - // control data access. For more information, see [Volume security style]in the Amazon FSx for NetApp - // ONTAP User Guide. Specify one of the following values: + // control data access. Specify one of the following values: // // - UNIX if the file system is managed by a UNIX administrator, the majority of // users are NFS clients, and an application accessing the data uses a UNIX user as @@ -1163,7 +1206,7 @@ type CreateOntapVolumeConfiguration struct { // For more information, see [Volume security style] in the FSx for ONTAP User Guide. // // [What the security styles and their effects are]: https://docs.netapp.com/us-en/ontap/nfs-admin/security-styles-their-effects-concept.html - // [Volume security style]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-security-style.html + // [Volume security style]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-security-style SecurityStyle SecurityStyle // Specifies the configured size of the volume, in bytes. @@ -1231,7 +1274,7 @@ type CreateOntapVolumeConfiguration struct { // volumes that you can use for different purposes, FlexVol and FlexGroup volumes. // For more information, see [Volume styles]in the Amazon FSx for NetApp ONTAP User Guide. // - // [Volume styles]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-styles.html + // [Volume styles]: https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html#volume-styles VolumeStyle VolumeStyle noSmithyDocumentSerde @@ -2281,7 +2324,7 @@ type FileCacheDataRepositoryAssociation struct { // // - If you are not using the DataRepositorySubdirectories parameter, the path is // to an NFS Export directory (or one of its subdirectories) in the format - // nsf://nfs-domain-name/exportpath . You can therefore link a single NFS Export + // nfs://nfs-domain-name/exportpath . You can therefore link a single NFS Export // to a single data repository association. // // - If you are using the DataRepositorySubdirectories parameter, the path is the @@ -2586,6 +2629,31 @@ type FileSystemFailureDetails struct { noSmithyDocumentSerde } +// The Lustre metadata performance configuration of an Amazon FSx for Lustre file +// system using a PERSISTENT_2 deployment type. The configuration enables the file +// system to support increasing metadata performance. +type FileSystemLustreMetadataConfiguration struct { + + // The metadata configuration mode for provisioning Metadata IOPS for the file + // system. + // + // - In AUTOMATIC mode, FSx for Lustre automatically provisions and scales the + // number of Metadata IOPS on your file system based on your file system storage + // capacity. + // + // - In USER_PROVISIONED mode, you can choose to specify the number of Metadata + // IOPS to provision for your file system. + // + // This member is required. + Mode MetadataConfigurationMode + + // The number of Metadata IOPS provisioned for the file system. Valid values are + // 1500 , 3000 , 6000 , 12000 , and multiples of 12000 up to a maximum of 192000 . + Iops *int32 + + noSmithyDocumentSerde +} + // A filter used to restrict the results of describe calls. You can use multiple // filters to return results that meet all applied filter requirements. type Filter struct { @@ -2682,6 +2750,10 @@ type LustreFileSystemConfiguration struct { // for your file system to Amazon CloudWatch Logs. LogConfiguration *LustreLogConfiguration + // The Lustre metadata performance configuration for an Amazon FSx for Lustre file + // system using a PERSISTENT_2 deployment type. + MetadataConfiguration *FileSystemLustreMetadataConfiguration + // You use the MountName value when mounting the file system. // // For the SCRATCH_1 deployment type, this value is always " fsx ". For SCRATCH_2 , @@ -3618,32 +3690,35 @@ type SelfManagedActiveDirectoryConfiguration struct { } // Specifies changes you are making to the self-managed Microsoft Active Directory -// (AD) configuration to which an FSx for Windows File Server file system or an FSx -// for ONTAP SVM is joined. +// configuration to which an FSx for Windows File Server file system or an FSx for +// ONTAP SVM is joined. type SelfManagedActiveDirectoryConfigurationUpdates struct { // A list of up to three DNS server or domain controller IP addresses in your - // self-managed AD domain. + // self-managed Active Directory domain. DnsIps []string - // Specifies an updated fully qualified domain name of your self-managed AD - // configuration. + // Specifies an updated fully qualified domain name of your self-managed Active + // Directory configuration. DomainName *string - // Specifies the updated name of the self-managed AD domain group whose members - // are granted administrative privileges for the Amazon FSx resource. + // For FSx for ONTAP file systems only - Specifies the updated name of the + // self-managed Active Directory domain group whose members are granted + // administrative privileges for the Amazon FSx resource. FileSystemAdministratorsGroup *string // Specifies an updated fully qualified distinguished name of the organization - // unit within your self-managed AD. + // unit within your self-managed Active Directory. OrganizationalUnitDistinguishedName *string - // Specifies the updated password for the service account on your self-managed AD - // domain. Amazon FSx uses this account to join to your self-managed AD domain. + // Specifies the updated password for the service account on your self-managed + // Active Directory domain. Amazon FSx uses this account to join to your + // self-managed Active Directory domain. Password *string - // Specifies the updated user name for the service account on your self-managed AD - // domain. Amazon FSx uses this account to join to your self-managed AD domain. + // Specifies the updated user name for the service account on your self-managed + // Active Directory domain. Amazon FSx uses this account to join to your + // self-managed Active Directory domain. // // This account must have the permissions required to join computers to the domain // in the organizational unit provided in OrganizationalUnitDistinguishedName . @@ -4086,6 +4161,11 @@ type UpdateFileSystemLustreConfiguration struct { // data repositories associated with your file system to Amazon CloudWatch Logs. LogConfiguration *LustreLogCreateConfiguration + // The Lustre metadata performance configuration for an Amazon FSx for Lustre file + // system using a PERSISTENT_2 deployment type. When this configuration is + // enabled, the file system supports increasing metadata performance. + MetadataConfiguration *UpdateFileSystemLustreMetadataConfiguration + // The throughput of an Amazon FSx for Lustre Persistent SSD-based file system, // measured in megabytes per second per tebibyte (MB/s/TiB). You can increase or // decrease your file system's throughput. Valid values depend on the deployment @@ -4115,6 +4195,42 @@ type UpdateFileSystemLustreConfiguration struct { noSmithyDocumentSerde } +// The Lustre metadata performance configuration update for an Amazon FSx for +// Lustre file system using a PERSISTENT_2 deployment type. You can request an +// increase in your file system's Metadata IOPS and/or switch your file system's +// metadata configuration mode. For more information, see [Managing metadata performance]in the Amazon FSx for +// Lustre User Guide. +// +// [Managing metadata performance]: https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-metadata-performance.html +type UpdateFileSystemLustreMetadataConfiguration struct { + + // (USER_PROVISIONED mode only) Specifies the number of Metadata IOPS to provision + // for your file system. Valid values are 1500 , 3000 , 6000 , 12000 , and + // multiples of 12000 up to a maximum of 192000 . + // + // The value you provide must be greater than or equal to the current number of + // Metadata IOPS provisioned for the file system. + Iops *int32 + + // The metadata configuration mode for provisioning Metadata IOPS for an FSx for + // Lustre file system using a PERSISTENT_2 deployment type. + // + // - To increase the Metadata IOPS or to switch from AUTOMATIC mode, specify + // USER_PROVISIONED as the value for this parameter. Then use the Iops parameter + // to provide a Metadata IOPS value that is greater than or equal to the current + // number of Metadata IOPS provisioned for the file system. + // + // - To switch from USER_PROVISIONED mode, specify AUTOMATIC as the value for + // this parameter, but do not input a value for Iops. + // + // If you request to switch from USER_PROVISIONED to AUTOMATIC mode and the + // current Metadata IOPS value is greater than the automated default, FSx for + // Lustre rejects the request because downscaling Metadata IOPS is not supported. + Mode MetadataConfigurationMode + + noSmithyDocumentSerde +} + // The configuration updates for an Amazon FSx for NetApp ONTAP file system. type UpdateFileSystemOntapConfiguration struct { @@ -4506,8 +4622,8 @@ type UpdateSvmActiveDirectoryConfiguration struct { NetBiosName *string // Specifies changes you are making to the self-managed Microsoft Active Directory - // (AD) configuration to which an FSx for Windows File Server file system or an FSx - // for ONTAP SVM is joined. + // configuration to which an FSx for Windows File Server file system or an FSx for + // ONTAP SVM is joined. SelfManagedActiveDirectoryConfiguration *SelfManagedActiveDirectoryConfigurationUpdates noSmithyDocumentSerde diff --git a/service/fsx/validators.go b/service/fsx/validators.go index f7ce498b2b5..c1a6a5467fe 100644 --- a/service/fsx/validators.go +++ b/service/fsx/validators.go @@ -932,6 +932,26 @@ func validateCreateFileSystemLustreConfiguration(v *types.CreateFileSystemLustre invalidParams.AddNested("LogConfiguration", err.(smithy.InvalidParamsError)) } } + if v.MetadataConfiguration != nil { + if err := validateCreateFileSystemLustreMetadataConfiguration(v.MetadataConfiguration); err != nil { + invalidParams.AddNested("MetadataConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateFileSystemLustreMetadataConfiguration(v *types.CreateFileSystemLustreMetadataConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFileSystemLustreMetadataConfiguration"} + if len(v.Mode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Mode")) + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/globalaccelerator/CHANGELOG.md b/service/globalaccelerator/CHANGELOG.md index 9962aa55abf..6ea1f795895 100644 --- a/service/globalaccelerator/CHANGELOG.md +++ b/service/globalaccelerator/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.24.0 (2024-06-05) + +* **Feature**: This release contains a new optional ip-addresses input field for the update accelerator and update custom routing accelerator apis. This input enables consumers to replace IPv4 addresses on existing accelerators with addresses provided in the input. + # v1.23.6 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/globalaccelerator/api_op_UpdateAccelerator.go b/service/globalaccelerator/api_op_UpdateAccelerator.go index 84924678f29..3b07faab1fe 100644 --- a/service/globalaccelerator/api_op_UpdateAccelerator.go +++ b/service/globalaccelerator/api_op_UpdateAccelerator.go @@ -66,6 +66,9 @@ type UpdateAcceleratorInput struct { // the value can be IPV4 or DUAL_STACK. IpAddressType types.IpAddressType + // The IP addresses for an accelerator. + IpAddresses []string + // The name of the accelerator. The name can have a maximum of 64 characters, must // contain only alphanumeric characters, periods (.), or hyphens (-), and must not // begin or end with a hyphen or period. diff --git a/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go b/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go index d6a439a2315..37aa5ba4d13 100644 --- a/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go +++ b/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go @@ -45,6 +45,9 @@ type UpdateCustomRoutingAcceleratorInput struct { // accelerator, the value must be IPV4. IpAddressType types.IpAddressType + // The IP addresses for an accelerator. + IpAddresses []string + // The name of the accelerator. The name can have a maximum of 64 characters, must // contain only alphanumeric characters, periods (.), or hyphens (-), and must not // begin or end with a hyphen or period. diff --git a/service/globalaccelerator/go_module_metadata.go b/service/globalaccelerator/go_module_metadata.go index 7758a74b838..64b009a35ae 100644 --- a/service/globalaccelerator/go_module_metadata.go +++ b/service/globalaccelerator/go_module_metadata.go @@ -3,4 +3,4 @@ package globalaccelerator // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.6" +const goModuleVersion = "1.24.0" diff --git a/service/globalaccelerator/serializers.go b/service/globalaccelerator/serializers.go index c1d8796cf86..9fda3e68b83 100644 --- a/service/globalaccelerator/serializers.go +++ b/service/globalaccelerator/serializers.go @@ -4455,6 +4455,13 @@ func awsAwsjson11_serializeOpDocumentUpdateAcceleratorInput(v *UpdateAccelerator ok.Boolean(*v.Enabled) } + if v.IpAddresses != nil { + ok := object.Key("IpAddresses") + if err := awsAwsjson11_serializeDocumentIpAddresses(v.IpAddresses, ok); err != nil { + return err + } + } + if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) @@ -4554,6 +4561,13 @@ func awsAwsjson11_serializeOpDocumentUpdateCustomRoutingAcceleratorInput(v *Upda ok.Boolean(*v.Enabled) } + if v.IpAddresses != nil { + ok := object.Key("IpAddresses") + if err := awsAwsjson11_serializeDocumentIpAddresses(v.IpAddresses, ok); err != nil { + return err + } + } + if len(v.IpAddressType) > 0 { ok := object.Key("IpAddressType") ok.String(string(v.IpAddressType)) diff --git a/service/glue/CHANGELOG.md b/service/glue/CHANGELOG.md index 43aed17b824..815d078ec9a 100644 --- a/service/glue/CHANGELOG.md +++ b/service/glue/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.84.0 (2024-06-06) + +* **Feature**: This release adds support for creating and updating Glue Data Catalog Views. + +# v1.83.0 (2024-06-05) + +* **Feature**: AWS Glue now supports native SaaS connectivity: Salesforce connector available now + # v1.82.1 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/glue/api_op_CreateConnection.go b/service/glue/api_op_CreateConnection.go index 24b4e1e2aca..9cfd711d0dd 100644 --- a/service/glue/api_op_CreateConnection.go +++ b/service/glue/api_op_CreateConnection.go @@ -48,6 +48,12 @@ type CreateConnectionInput struct { } type CreateConnectionOutput struct { + + // The status of the connection creation request. The request can take some time + // for certain authentication types, for example when creating an OAuth connection + // with token exchange over VPC. + CreateConnectionStatus types.ConnectionStatus + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/glue/api_op_CreateJob.go b/service/glue/api_op_CreateJob.go index bcc9a6fead7..b9d6998ce7a 100644 --- a/service/glue/api_op_CreateJob.go +++ b/service/glue/api_op_CreateJob.go @@ -199,7 +199,12 @@ type CreateJobInput struct { // The job timeout in minutes. This is the maximum time that a job run can consume // resources before it is terminated and enters TIMEOUT status. The default is - // 2,880 minutes (48 hours). + // 2,880 minutes (48 hours) for batch jobs. + // + // Streaming jobs must have timeout values less than 7 days or 10080 minutes. When + // the value is left blank, the job will be restarted after 7 days based if you + // have not setup a maintenance window. If you have setup maintenance window, it + // will be restarted during the maintenance window after 7 days. Timeout *int32 // The type of predefined worker that is allocated when a job runs. Accepts a diff --git a/service/glue/api_op_StartJobRun.go b/service/glue/api_op_StartJobRun.go index 2223b4373d2..892f26fca93 100644 --- a/service/glue/api_op_StartJobRun.go +++ b/service/glue/api_op_StartJobRun.go @@ -124,8 +124,10 @@ type StartJobRunInput struct { // consume resources before it is terminated and enters TIMEOUT status. This value // overrides the timeout value set in the parent job. // - // Streaming jobs do not have a timeout. The default for non-streaming jobs is - // 2,880 minutes (48 hours). + // Streaming jobs must have timeout values less than 7 days or 10080 minutes. When + // the value is left blank, the job will be restarted after 7 days based if you + // have not setup a maintenance window. If you have setup maintenance window, it + // will be restarted during the maintenance window after 7 days. Timeout *int32 // The type of predefined worker that is allocated when a job runs. Accepts a diff --git a/service/glue/api_op_UpdateTable.go b/service/glue/api_op_UpdateTable.go index d1ff5aa3975..5010abc9e6a 100644 --- a/service/glue/api_op_UpdateTable.go +++ b/service/glue/api_op_UpdateTable.go @@ -44,6 +44,10 @@ type UpdateTableInput struct { // Amazon Web Services account ID is used by default. CatalogId *string + // A flag that can be set to true to ignore matching storage descriptor and + // subobject matching requirements. + Force bool + // By default, UpdateTable always creates an archived version of the table before // updating it. However, if skipArchive is set to true, UpdateTable does not // create the archived version. @@ -55,6 +59,9 @@ type UpdateTableInput struct { // The version ID at which to update the table contents. VersionId *string + // The operation to be performed when updating the view. + ViewUpdateAction types.ViewUpdateAction + noSmithyDocumentSerde } diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index 12058a7f528..bf30b0694c9 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -27214,6 +27214,60 @@ func awsAwsjson11_deserializeDocumentAthenaConnectorSource(v **types.AthenaConne return nil } +func awsAwsjson11_deserializeDocumentAuthenticationConfiguration(v **types.AuthenticationConfiguration, 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.AuthenticationConfiguration + if *v == nil { + sv = &types.AuthenticationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthenticationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthenticationType to be of type string, got %T instead", value) + } + sv.AuthenticationType = types.AuthenticationType(jtv) + } + + case "OAuth2Properties": + if err := awsAwsjson11_deserializeDocumentOAuth2Properties(&sv.OAuth2Properties, value); err != nil { + return err + } + + case "SecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value) + } + sv.SecretArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentBackfillError(v **types.BackfillError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -31456,6 +31510,11 @@ func awsAwsjson11_deserializeDocumentConnection(v **types.Connection, value inte for key, value := range shape { switch key { + case "AuthenticationConfiguration": + if err := awsAwsjson11_deserializeDocumentAuthenticationConfiguration(&sv.AuthenticationConfiguration, value); err != nil { + return err + } + case "ConnectionProperties": if err := awsAwsjson11_deserializeDocumentConnectionProperties(&sv.ConnectionProperties, value); err != nil { return err @@ -31495,6 +31554,22 @@ func awsAwsjson11_deserializeDocumentConnection(v **types.Connection, value inte sv.Description = ptr.String(jtv) } + case "LastConnectionValidationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastConnectionValidationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "LastUpdatedBy": if value != nil { jtv, ok := value.(string) @@ -31539,6 +31614,24 @@ func awsAwsjson11_deserializeDocumentConnection(v **types.Connection, value inte return err } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ConnectionStatus(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongValueString to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + default: _, _ = key, value @@ -44292,6 +44385,114 @@ func awsAwsjson11_deserializeDocumentNullValueFields(v *[]types.NullValueField, return nil } +func awsAwsjson11_deserializeDocumentOAuth2ClientApplication(v **types.OAuth2ClientApplication, 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.OAuth2ClientApplication + if *v == nil { + sv = &types.OAuth2ClientApplication{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AWSManagedClientApplicationReference": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSManagedClientApplicationReference to be of type string, got %T instead", value) + } + sv.AWSManagedClientApplicationReference = ptr.String(jtv) + } + + case "UserManagedClientApplicationClientId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserManagedClientApplicationClientId to be of type string, got %T instead", value) + } + sv.UserManagedClientApplicationClientId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOAuth2Properties(v **types.OAuth2Properties, 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.OAuth2Properties + if *v == nil { + sv = &types.OAuth2Properties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OAuth2ClientApplication": + if err := awsAwsjson11_deserializeDocumentOAuth2ClientApplication(&sv.OAuth2ClientApplication, value); err != nil { + return err + } + + case "OAuth2GrantType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2GrantType to be of type string, got %T instead", value) + } + sv.OAuth2GrantType = types.OAuth2GrantType(jtv) + } + + case "TokenUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenUrl to be of type string, got %T instead", value) + } + sv.TokenUrl = ptr.String(jtv) + } + + case "TokenUrlParametersMap": + if err := awsAwsjson11_deserializeDocumentTokenUrlParametersMap(&sv.TokenUrlParametersMap, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOneInput(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -52417,6 +52618,42 @@ func awsAwsjson11_deserializeDocumentTaskRunProperties(v **types.TaskRunProperti return nil } +func awsAwsjson11_deserializeDocumentTokenUrlParametersMap(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 TokenUrlParameterValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentTransformConfigParameter(v **types.TransformConfigParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -53542,6 +53779,15 @@ func awsAwsjson11_deserializeDocumentViewRepresentation(v **types.ViewRepresenta sv.IsStale = ptr.Bool(jtv) } + case "ValidationConnection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ValidationConnection = ptr.String(jtv) + } + case "ViewExpandedText": if value != nil { jtv, ok := value.(string) @@ -55265,6 +55511,15 @@ func awsAwsjson11_deserializeOpDocumentCreateConnectionOutput(v **CreateConnecti for key, value := range shape { switch key { + case "CreateConnectionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionStatus to be of type string, got %T instead", value) + } + sv.CreateConnectionStatus = types.ConnectionStatus(jtv) + } + default: _, _ = key, value diff --git a/service/glue/go_module_metadata.go b/service/glue/go_module_metadata.go index 3297211cbbf..a98e5514e48 100644 --- a/service/glue/go_module_metadata.go +++ b/service/glue/go_module_metadata.go @@ -3,4 +3,4 @@ package glue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.82.1" +const goModuleVersion = "1.84.0" diff --git a/service/glue/serializers.go b/service/glue/serializers.go index 792cd6357ed..6b58dfb16f4 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -12218,6 +12218,47 @@ func awsAwsjson11_serializeDocumentAuditContext(v *types.AuditContext, value smi return nil } +func awsAwsjson11_serializeDocumentAuthenticationConfigurationInput(v *types.AuthenticationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthenticationType) > 0 { + ok := object.Key("AuthenticationType") + ok.String(string(v.AuthenticationType)) + } + + if v.OAuth2Properties != nil { + ok := object.Key("OAuth2Properties") + if err := awsAwsjson11_serializeDocumentOAuth2PropertiesInput(v.OAuth2Properties, ok); err != nil { + return err + } + } + + if v.SecretArn != nil { + ok := object.Key("SecretArn") + ok.String(*v.SecretArn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAuthorizationCodeProperties(v *types.AuthorizationCodeProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthorizationCode != nil { + ok := object.Key("AuthorizationCode") + ok.String(*v.AuthorizationCode) + } + + if v.RedirectUri != nil { + ok := object.Key("RedirectUri") + ok.String(*v.RedirectUri) + } + + return nil +} + func awsAwsjson11_serializeDocumentBasicCatalogTarget(v *types.BasicCatalogTarget, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13585,6 +13626,13 @@ func awsAwsjson11_serializeDocumentConnectionInput(v *types.ConnectionInput, val object := value.Object() defer object.Close() + if v.AuthenticationConfiguration != nil { + ok := object.Key("AuthenticationConfiguration") + if err := awsAwsjson11_serializeDocumentAuthenticationConfigurationInput(v.AuthenticationConfiguration, ok); err != nil { + return err + } + } + if v.ConnectionProperties != nil { ok := object.Key("ConnectionProperties") if err := awsAwsjson11_serializeDocumentConnectionProperties(v.ConnectionProperties, ok); err != nil { @@ -13621,6 +13669,11 @@ func awsAwsjson11_serializeDocumentConnectionInput(v *types.ConnectionInput, val } } + if v.ValidateCredentials { + ok := object.Key("ValidateCredentials") + ok.Boolean(v.ValidateCredentials) + } + return nil } @@ -17053,6 +17106,61 @@ func awsAwsjson11_serializeDocumentNullValueFields(v []types.NullValueField, val return nil } +func awsAwsjson11_serializeDocumentOAuth2ClientApplication(v *types.OAuth2ClientApplication, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AWSManagedClientApplicationReference != nil { + ok := object.Key("AWSManagedClientApplicationReference") + ok.String(*v.AWSManagedClientApplicationReference) + } + + if v.UserManagedClientApplicationClientId != nil { + ok := object.Key("UserManagedClientApplicationClientId") + ok.String(*v.UserManagedClientApplicationClientId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOAuth2PropertiesInput(v *types.OAuth2PropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthorizationCodeProperties != nil { + ok := object.Key("AuthorizationCodeProperties") + if err := awsAwsjson11_serializeDocumentAuthorizationCodeProperties(v.AuthorizationCodeProperties, ok); err != nil { + return err + } + } + + if v.OAuth2ClientApplication != nil { + ok := object.Key("OAuth2ClientApplication") + if err := awsAwsjson11_serializeDocumentOAuth2ClientApplication(v.OAuth2ClientApplication, ok); err != nil { + return err + } + } + + if len(v.OAuth2GrantType) > 0 { + ok := object.Key("OAuth2GrantType") + ok.String(string(v.OAuth2GrantType)) + } + + if v.TokenUrl != nil { + ok := object.Key("TokenUrl") + ok.String(*v.TokenUrl) + } + + if v.TokenUrlParametersMap != nil { + ok := object.Key("TokenUrlParametersMap") + if err := awsAwsjson11_serializeDocumentTokenUrlParametersMap(v.TokenUrlParametersMap, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentOneInput(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -19801,6 +19909,13 @@ func awsAwsjson11_serializeDocumentTableInput(v *types.TableInput, value smithyj } } + if v.ViewDefinition != nil { + ok := object.Key("ViewDefinition") + if err := awsAwsjson11_serializeDocumentViewDefinitionInput(v.ViewDefinition, ok); err != nil { + return err + } + } + if v.ViewExpandedText != nil { ok := object.Key("ViewExpandedText") ok.String(*v.ViewExpandedText) @@ -19897,6 +20012,17 @@ func awsAwsjson11_serializeDocumentTaskRunSortCriteria(v *types.TaskRunSortCrite return nil } +func awsAwsjson11_serializeDocumentTokenUrlParametersMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsAwsjson11_serializeDocumentTransformConfigParameter(v *types.TransformConfigParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20374,6 +20500,93 @@ func awsAwsjson11_serializeDocumentValueStringList(v []string, value smithyjson. return nil } +func awsAwsjson11_serializeDocumentViewDefinitionInput(v *types.ViewDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Definer != nil { + ok := object.Key("Definer") + ok.String(*v.Definer) + } + + if v.IsProtected != nil { + ok := object.Key("IsProtected") + ok.Boolean(*v.IsProtected) + } + + if v.Representations != nil { + ok := object.Key("Representations") + if err := awsAwsjson11_serializeDocumentViewRepresentationInputList(v.Representations, ok); err != nil { + return err + } + } + + if v.SubObjects != nil { + ok := object.Key("SubObjects") + if err := awsAwsjson11_serializeDocumentViewSubObjectsList(v.SubObjects, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentViewRepresentationInput(v *types.ViewRepresentationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Dialect) > 0 { + ok := object.Key("Dialect") + ok.String(string(v.Dialect)) + } + + if v.DialectVersion != nil { + ok := object.Key("DialectVersion") + ok.String(*v.DialectVersion) + } + + if v.ValidationConnection != nil { + ok := object.Key("ValidationConnection") + ok.String(*v.ValidationConnection) + } + + if v.ViewExpandedText != nil { + ok := object.Key("ViewExpandedText") + ok.String(*v.ViewExpandedText) + } + + if v.ViewOriginalText != nil { + ok := object.Key("ViewOriginalText") + ok.String(*v.ViewOriginalText) + } + + return nil +} + +func awsAwsjson11_serializeDocumentViewRepresentationInputList(v []types.ViewRepresentationInput, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentViewRepresentationInput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentViewSubObjectsList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentWorkflowNames(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -25975,6 +26188,11 @@ func awsAwsjson11_serializeOpDocumentUpdateTableInput(v *UpdateTableInput, value ok.String(*v.DatabaseName) } + if v.Force { + ok := object.Key("Force") + ok.Boolean(v.Force) + } + if v.SkipArchive != nil { ok := object.Key("SkipArchive") ok.Boolean(*v.SkipArchive) @@ -25997,6 +26215,11 @@ func awsAwsjson11_serializeOpDocumentUpdateTableInput(v *UpdateTableInput, value ok.String(*v.VersionId) } + if len(v.ViewUpdateAction) > 0 { + ok := object.Key("ViewUpdateAction") + ok.String(string(v.ViewUpdateAction)) + } + return nil } diff --git a/service/glue/types/enums.go b/service/glue/types/enums.go index 8888eda0e0e..fbe5b7ae80c 100644 --- a/service/glue/types/enums.go +++ b/service/glue/types/enums.go @@ -66,6 +66,27 @@ func (AggFunction) Values() []AggFunction { } } +type AuthenticationType string + +// Enum values for AuthenticationType +const ( + AuthenticationTypeBasic AuthenticationType = "BASIC" + AuthenticationTypeOauth2 AuthenticationType = "OAUTH2" + AuthenticationTypeCustom AuthenticationType = "CUSTOM" +) + +// Values returns all known values for AuthenticationType. 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 (AuthenticationType) Values() []AuthenticationType { + return []AuthenticationType{ + "BASIC", + "OAUTH2", + "CUSTOM", + } +} + type BackfillErrorCode string // Enum values for BackfillErrorCode @@ -352,6 +373,7 @@ const ( ConnectionPropertyKeyKafkaSaslGssapiKrb5Conf ConnectionPropertyKey = "KAFKA_SASL_GSSAPI_KRB5_CONF" ConnectionPropertyKeyKafkaSaslGssapiService ConnectionPropertyKey = "KAFKA_SASL_GSSAPI_SERVICE" ConnectionPropertyKeyKafkaSaslGssapiPrincipal ConnectionPropertyKey = "KAFKA_SASL_GSSAPI_PRINCIPAL" + ConnectionPropertyKeyRoleArn ConnectionPropertyKey = "ROLE_ARN" ) // Values returns all known values for ConnectionPropertyKey. Note that this can @@ -402,6 +424,28 @@ func (ConnectionPropertyKey) Values() []ConnectionPropertyKey { "KAFKA_SASL_GSSAPI_KRB5_CONF", "KAFKA_SASL_GSSAPI_SERVICE", "KAFKA_SASL_GSSAPI_PRINCIPAL", + "ROLE_ARN", + } +} + +type ConnectionStatus string + +// Enum values for ConnectionStatus +const ( + ConnectionStatusReady ConnectionStatus = "READY" + ConnectionStatusInProgress ConnectionStatus = "IN_PROGRESS" + ConnectionStatusFailed ConnectionStatus = "FAILED" +) + +// Values returns all known values for ConnectionStatus. 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 (ConnectionStatus) Values() []ConnectionStatus { + return []ConnectionStatus{ + "READY", + "IN_PROGRESS", + "FAILED", } } @@ -416,6 +460,7 @@ const ( ConnectionTypeNetwork ConnectionType = "NETWORK" ConnectionTypeMarketplace ConnectionType = "MARKETPLACE" ConnectionTypeCustom ConnectionType = "CUSTOM" + ConnectionTypeSalesforce ConnectionType = "SALESFORCE" ) // Values returns all known values for ConnectionType. Note that this can be @@ -431,6 +476,7 @@ func (ConnectionType) Values() []ConnectionType { "NETWORK", "MARKETPLACE", "CUSTOM", + "SALESFORCE", } } @@ -749,10 +795,15 @@ type FederationSourceErrorCode string // Enum values for FederationSourceErrorCode const ( + FederationSourceErrorCodeAccessDeniedException FederationSourceErrorCode = "AccessDeniedException" + FederationSourceErrorCodeEntityNotFoundException FederationSourceErrorCode = "EntityNotFoundException" + FederationSourceErrorCodeInvalidCredentialsException FederationSourceErrorCode = "InvalidCredentialsException" + FederationSourceErrorCodeInvalidInputException FederationSourceErrorCode = "InvalidInputException" FederationSourceErrorCodeInvalidResponseException FederationSourceErrorCode = "InvalidResponseException" FederationSourceErrorCodeOperationTimeoutException FederationSourceErrorCode = "OperationTimeoutException" FederationSourceErrorCodeOperationNotSupportedException FederationSourceErrorCode = "OperationNotSupportedException" FederationSourceErrorCodeInternalServiceException FederationSourceErrorCode = "InternalServiceException" + FederationSourceErrorCodePartialFailureException FederationSourceErrorCode = "PartialFailureException" FederationSourceErrorCodeThrottlingException FederationSourceErrorCode = "ThrottlingException" ) @@ -762,10 +813,15 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (FederationSourceErrorCode) Values() []FederationSourceErrorCode { return []FederationSourceErrorCode{ + "AccessDeniedException", + "EntityNotFoundException", + "InvalidCredentialsException", + "InvalidInputException", "InvalidResponseException", "OperationTimeoutException", "OperationNotSupportedException", "InternalServiceException", + "PartialFailureException", "ThrottlingException", } } @@ -1320,6 +1376,27 @@ func (NodeType) Values() []NodeType { } } +type OAuth2GrantType string + +// Enum values for OAuth2GrantType +const ( + OAuth2GrantTypeAuthorizationCode OAuth2GrantType = "AUTHORIZATION_CODE" + OAuth2GrantTypeClientCredentials OAuth2GrantType = "CLIENT_CREDENTIALS" + OAuth2GrantTypeJwtBearer OAuth2GrantType = "JWT_BEARER" +) + +// Values returns all known values for OAuth2GrantType. 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 (OAuth2GrantType) Values() []OAuth2GrantType { + return []OAuth2GrantType{ + "AUTHORIZATION_CODE", + "CLIENT_CREDENTIALS", + "JWT_BEARER", + } +} + type ParamType string // Enum values for ParamType @@ -2226,6 +2303,29 @@ func (ViewDialect) Values() []ViewDialect { } } +type ViewUpdateAction string + +// Enum values for ViewUpdateAction +const ( + ViewUpdateActionAdd ViewUpdateAction = "ADD" + ViewUpdateActionReplace ViewUpdateAction = "REPLACE" + ViewUpdateActionAddOrReplace ViewUpdateAction = "ADD_OR_REPLACE" + ViewUpdateActionDrop ViewUpdateAction = "DROP" +) + +// Values returns all known values for ViewUpdateAction. 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 (ViewUpdateAction) Values() []ViewUpdateAction { + return []ViewUpdateAction{ + "ADD", + "REPLACE", + "ADD_OR_REPLACE", + "DROP", + } +} + type WorkerType string // Enum values for WorkerType diff --git a/service/glue/types/types.go b/service/glue/types/types.go index 65271d720c2..47f089bf1a0 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -308,6 +308,56 @@ type AuditContext struct { noSmithyDocumentSerde } +// A structure containing the authentication configuration. +type AuthenticationConfiguration struct { + + // A structure containing the authentication configuration. + AuthenticationType AuthenticationType + + // The properties for OAuth2 authentication. + OAuth2Properties *OAuth2Properties + + // The secret manager ARN to store credentials. + SecretArn *string + + noSmithyDocumentSerde +} + +// A structure containing the authentication configuration in the CreateConnection +// request. +type AuthenticationConfigurationInput struct { + + // A structure containing the authentication configuration in the CreateConnection + // request. + AuthenticationType AuthenticationType + + // The properties for OAuth2 authentication in the CreateConnection request. + OAuth2Properties *OAuth2PropertiesInput + + // The secret manager ARN to store credentials in the CreateConnection request. + SecretArn *string + + noSmithyDocumentSerde +} + +// The set of properties required for the the OAuth2 AUTHORIZATION_CODE grant type +// workflow. +type AuthorizationCodeProperties struct { + + // An authorization code to be used in the third leg of the AUTHORIZATION_CODE + // grant workflow. This is a single-use code which becomes invalid once exchanged + // for an access token, thus it is acceptable to have this value as a request + // parameter. + AuthorizationCode *string + + // The redirect URI where the user gets redirected to by authorization server when + // issuing an authorization code. The URI is subsequently used when the + // authorization code is exchanged for an access token. + RedirectUri *string + + noSmithyDocumentSerde +} + // A list of errors that can occur when registering partition indexes for an // existing table. // @@ -1446,6 +1496,9 @@ type ConfusionMatrix struct { // Defines a connection to a data source. type Connection struct { + // The authentication properties of the connection. + AuthenticationConfiguration *AuthenticationConfiguration + // These key-value pairs define parameters for the connection: // // - HOST - The host URI: either the fully qualified domain name (FQDN) or the @@ -1593,16 +1646,19 @@ type Connection struct { // The type of the connection. Currently, SFTP is not supported. ConnectionType ConnectionType - // The time that this connection definition was created. + // The timestamp of the time that this connection definition was created. CreationTime *time.Time // The description of the connection. Description *string + // A timestamp of the time this connection was last validated. + LastConnectionValidationTime *time.Time + // The user, group, or role that last updated this connection definition. LastUpdatedBy *string - // The last time that this connection definition was updated. + // The timestamp of the last time the connection definition was updated. LastUpdatedTime *time.Time // A list of criteria that can be used in selecting this connection. @@ -1611,10 +1667,16 @@ type Connection struct { // The name of the connection definition. Name *string - // A map of physical connection requirements, such as virtual private cloud (VPC) - // and SecurityGroup , that are needed to make this connection successfully. + // The physical connection requirements, such as virtual private cloud (VPC) and + // SecurityGroup , that are needed to make this connection successfully. PhysicalConnectionRequirements *PhysicalConnectionRequirements + // The status of the connection. Can be one of: READY , IN_PROGRESS , or FAILED . + Status ConnectionStatus + + // The reason for the connection status. + StatusReason *string + noSmithyDocumentSerde } @@ -1675,6 +1737,10 @@ type ConnectionInput struct { // // - Required: All of ( USERNAME , PASSWORD ) or SECRET_ID . // + // - SALESFORCE - Designates a connection to Salesforce using OAuth authencation. + // + // - Requires the AuthenticationConfiguration member to be configured. + // // - NETWORK - Designates a network connection to a data source within an Amazon // Virtual Private Cloud environment (Amazon VPC). // @@ -1710,22 +1776,29 @@ type ConnectionInput struct { // This member is required. ConnectionType ConnectionType - // The name of the connection. Connection will not function as expected without a - // name. + // The name of the connection. // // This member is required. Name *string + // The authentication properties of the connection. Used for a Salesforce + // connection. + AuthenticationConfiguration *AuthenticationConfigurationInput + // The description of the connection. Description *string // A list of criteria that can be used in selecting this connection. MatchCriteria []string - // A map of physical connection requirements, such as virtual private cloud (VPC) - // and SecurityGroup , that are needed to successfully make this connection. + // The physical connection requirements, such as virtual private cloud (VPC) and + // SecurityGroup , that are needed to successfully make this connection. PhysicalConnectionRequirements *PhysicalConnectionRequirements + // A flag to validate the credentials during create connection. Used for a + // Salesforce connection. Default is true. + ValidateCredentials bool + noSmithyDocumentSerde } @@ -4361,7 +4434,12 @@ type Job struct { // The job timeout in minutes. This is the maximum time that a job run can consume // resources before it is terminated and enters TIMEOUT status. The default is - // 2,880 minutes (48 hours). + // 2,880 minutes (48 hours) for batch jobs. + // + // Streaming jobs must have timeout values less than 7 days or 10080 minutes. When + // the value is left blank, the job will be restarted after 7 days based if you + // have not setup a maintenance window. If you have setup maintenance window, it + // will be restarted during the maintenance window after 7 days. Timeout *int32 // The type of predefined worker that is allocated when a job runs. Accepts a @@ -4666,13 +4744,6 @@ type JobRun struct { // consume resources before it is terminated and enters TIMEOUT status. This value // overrides the timeout value set in the parent job. // - // The maximum value for timeout for batch jobs is 7 days or 10080 minutes. The - // default is 2880 minutes (48 hours) for batch jobs. - // - // Any existing Glue jobs that have a greater timeout value are defaulted to 7 - // days. For instance you have specified a timeout of 20 days for a batch job, it - // will be stopped on the 7th day. - // // Streaming jobs must have timeout values less than 7 days or 10080 minutes. When // the value is left blank, the job will be restarted after 7 days based if you // have not setup a maintenance window. If you have setup maintenance window, it @@ -4887,7 +4958,12 @@ type JobUpdate struct { // The job timeout in minutes. This is the maximum time that a job run can consume // resources before it is terminated and enters TIMEOUT status. The default is - // 2,880 minutes (48 hours). + // 2,880 minutes (48 hours) for batch jobs. + // + // Streaming jobs must have timeout values less than 7 days or 10080 minutes. When + // the value is left blank, the job will be restarted after 7 days based if you + // have not setup a maintenance window. If you have setup maintenance window, it + // will be restarted during the maintenance window after 7 days. Timeout *int32 // The type of predefined worker that is allocated when a job runs. Accepts a @@ -5827,6 +5903,62 @@ type NullValueField struct { noSmithyDocumentSerde } +// The OAuth2 client app used for the connection. +type OAuth2ClientApplication struct { + + // The reference to the SaaS-side client app that is Amazon Web Services managed. + AWSManagedClientApplicationReference *string + + // The client application clientID if the ClientAppType is USER_MANAGED . + UserManagedClientApplicationClientId *string + + noSmithyDocumentSerde +} + +// A structure containing properties for OAuth2 authentication. +type OAuth2Properties struct { + + // The client application type. For example, AWS_MANAGED or USER_MANAGED. + OAuth2ClientApplication *OAuth2ClientApplication + + // The OAuth2 grant type. For example, AUTHORIZATION_CODE , JWT_BEARER , or + // CLIENT_CREDENTIALS . + OAuth2GrantType OAuth2GrantType + + // The URL of the provider's authentication server, to exchange an authorization + // code for an access token. + TokenUrl *string + + // A map of parameters that are added to the token GET request. + TokenUrlParametersMap map[string]string + + noSmithyDocumentSerde +} + +// A structure containing properties for OAuth2 in the CreateConnection request. +type OAuth2PropertiesInput struct { + + // The set of properties required for the the OAuth2 AUTHORIZATION_CODE grant type. + AuthorizationCodeProperties *AuthorizationCodeProperties + + // The client application type in the CreateConnection request. For example, + // AWS_MANAGED or USER_MANAGED . + OAuth2ClientApplication *OAuth2ClientApplication + + // The OAuth2 grant type in the CreateConnection request. For example, + // AUTHORIZATION_CODE , JWT_BEARER , or CLIENT_CREDENTIALS . + OAuth2GrantType OAuth2GrantType + + // The URL of the provider's authentication server, to exchange an authorization + // code for an access token. + TokenUrl *string + + // A map of parameters that are added to the token GET request. + TokenUrlParametersMap map[string]string + + noSmithyDocumentSerde +} + // A structure representing an open format table. type OpenTableFormatInput struct { @@ -6066,12 +6198,10 @@ type PartitionValueList struct { noSmithyDocumentSerde } -// Specifies the physical requirements for a connection. +// The OAuth client app in GetConnection response. type PhysicalConnectionRequirements struct { - // The connection's Availability Zone. This field is redundant because the - // specified subnet implies the Availability Zone to be used. Currently the field - // must be populated, but it will be deprecated in the future. + // The connection's Availability Zone. AvailabilityZone *string // The security group ID list used by the connection. @@ -8233,6 +8363,10 @@ type TableInput struct { // A TableIdentifier structure that describes a target table for resource linking. TargetTable *TableIdentifier + // A structure that contains all the information that defines the view, including + // the dialect or dialects for the view, and the query. + ViewDefinition *ViewDefinitionInput + // Included for Apache Hive compatibility. Not used in the normal course of Glue // operations. ViewExpandedText *string @@ -8862,6 +8996,28 @@ type ViewDefinition struct { noSmithyDocumentSerde } +// A structure containing details for creating or updating an Glue view. +type ViewDefinitionInput struct { + + // The definer of a view in SQL. + Definer *string + + // You can set this flag as true to instruct the engine not to push user-provided + // operations into the logical plan of the view during query planning. However, + // setting this flag does not guarantee that the engine will comply. Refer to the + // engine's documentation to understand the guarantees provided, if any. + IsProtected *bool + + // A list of structures that contains the dialect of the view, and the query that + // defines the view. + Representations []ViewRepresentationInput + + // A list of base table ARNs that make up the view. + SubObjects []string + + noSmithyDocumentSerde +} + // A structure that contains the dialect of the view, and the query that defines // the view. type ViewRepresentation struct { @@ -8876,11 +9032,16 @@ type ViewRepresentation struct { // can be queried in their respective query engines. IsStale *bool + // The name of the connection to be used to validate the specific representation + // of the view. + ValidationConnection *string + // The expanded SQL for the view. This SQL is used by engines while processing a // query on a view. Engines may perform operations during view creation to // transform ViewOriginalText to ViewExpandedText . For example: // - // - Fully qualify identifiers: SELECT * from table1 → SELECT * from db1.table1 + // - Fully qualified identifiers: SELECT * from table1 -> SELECT * from + // db1.table1 ViewExpandedText *string // The SELECT query provided by the customer during CREATE VIEW DDL . This SQL is @@ -8892,6 +9053,31 @@ type ViewRepresentation struct { noSmithyDocumentSerde } +// A structure containing details of a representation to update or create a Lake +// Formation view. +type ViewRepresentationInput struct { + + // A parameter that specifies the engine type of a specific representation. + Dialect ViewDialect + + // A parameter that specifies the version of the engine of a specific + // representation. + DialectVersion *string + + // The name of the connection to be used to validate the specific representation + // of the view. + ValidationConnection *string + + // A string that represents the SQL query that describes the view with expanded + // resource ARNs + ViewExpandedText *string + + // A string that represents the original SQL query that describes the view. + ViewOriginalText *string + + noSmithyDocumentSerde +} + // A workflow is a collection of multiple dependent Glue jobs and crawlers that // are run to complete a complex ETL task. A workflow manages the execution and // monitoring of all its jobs and crawlers. diff --git a/service/internal/benchmark/go.mod b/service/internal/benchmark/go.mod index 938f572a20e..be17c1325a1 100644 --- a/service/internal/benchmark/go.mod +++ b/service/internal/benchmark/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.27.1 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.7 github.com/aws/aws-sdk-go-v2/service/lexruntimeservice v1.20.9 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 github.com/aws/aws-sdk-go-v2/service/schemas v1.24.9 github.com/aws/smithy-go v1.20.2 ) diff --git a/service/internal/integrationtest/go.mod b/service/internal/integrationtest/go.mod index 8305c0d6121..51d63170444 100644 --- a/service/internal/integrationtest/go.mod +++ b/service/internal/integrationtest/go.mod @@ -3,7 +3,7 @@ module github.com/aws/aws-sdk-go-v2/service/internal/integrationtest require ( github.com/aws/aws-sdk-go-v2 v1.27.1 github.com/aws/aws-sdk-go-v2/config v1.27.17 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.22 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.23 github.com/aws/aws-sdk-go-v2/service/acm v1.26.1 github.com/aws/aws-sdk-go-v2/service/apigateway v1.23.11 github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.27.9 @@ -28,7 +28,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.23.9 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.38.9 github.com/aws/aws-sdk-go-v2/service/devicefarm v1.22.9 - github.com/aws/aws-sdk-go-v2/service/directconnect v1.24.9 + github.com/aws/aws-sdk-go-v2/service/directconnect v1.24.10 github.com/aws/aws-sdk-go-v2/service/directoryservice v1.24.9 github.com/aws/aws-sdk-go-v2/service/docdb v1.34.6 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.7 @@ -44,10 +44,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.22.9 github.com/aws/aws-sdk-go-v2/service/emr v1.39.10 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.31.4 - github.com/aws/aws-sdk-go-v2/service/firehose v1.28.11 + github.com/aws/aws-sdk-go-v2/service/firehose v1.29.0 github.com/aws/aws-sdk-go-v2/service/gamelift v1.31.5 github.com/aws/aws-sdk-go-v2/service/glacier v1.22.9 - github.com/aws/aws-sdk-go-v2/service/glue v1.82.1 + github.com/aws/aws-sdk-go-v2/service/glue v1.84.0 github.com/aws/aws-sdk-go-v2/service/health v1.24.9 github.com/aws/aws-sdk-go-v2/service/iam v1.32.5 github.com/aws/aws-sdk-go-v2/service/inspector v1.21.9 @@ -67,7 +67,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53 v1.40.9 github.com/aws/aws-sdk-go-v2/service/route53domains v1.23.9 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.28.6 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.4 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.0 github.com/aws/aws-sdk-go-v2/service/s3control v1.44.12 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.2 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.28.9 @@ -75,8 +75,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/sfn v1.27.5 github.com/aws/aws-sdk-go-v2/service/shield v1.25.9 github.com/aws/aws-sdk-go-v2/service/snowball v1.26.11 - github.com/aws/aws-sdk-go-v2/service/sns v1.29.9 - github.com/aws/aws-sdk-go-v2/service/sqs v1.32.4 + github.com/aws/aws-sdk-go-v2/service/sns v1.29.10 + github.com/aws/aws-sdk-go-v2/service/sqs v1.32.5 github.com/aws/aws-sdk-go-v2/service/ssm v1.50.5 github.com/aws/aws-sdk-go-v2/service/sts v1.28.11 github.com/aws/aws-sdk-go-v2/service/support v1.22.5 diff --git a/service/iotwireless/CHANGELOG.md b/service/iotwireless/CHANGELOG.md index c76a16a0c71..c5bec8e782a 100644 --- a/service/iotwireless/CHANGELOG.md +++ b/service/iotwireless/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.39.0 (2024-06-06) + +* **Feature**: Adds support for wireless device to be in Conflict FUOTA Device Status due to a FUOTA Task, so it couldn't be attached to a new one. + # v1.38.5 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/iotwireless/go_module_metadata.go b/service/iotwireless/go_module_metadata.go index 1a61ef07636..e025431d34a 100644 --- a/service/iotwireless/go_module_metadata.go +++ b/service/iotwireless/go_module_metadata.go @@ -3,4 +3,4 @@ package iotwireless // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.38.5" +const goModuleVersion = "1.39.0" diff --git a/service/iotwireless/types/enums.go b/service/iotwireless/types/enums.go index daa2f74d3d1..ba337becac6 100644 --- a/service/iotwireless/types/enums.go +++ b/service/iotwireless/types/enums.go @@ -289,17 +289,18 @@ type FuotaDeviceStatus string // Enum values for FuotaDeviceStatus const ( - FuotaDeviceStatusInitial FuotaDeviceStatus = "Initial" - FuotaDeviceStatusPackageNotSupported FuotaDeviceStatus = "Package_Not_Supported" - FuotaDeviceStatusFragAlgoUnsupported FuotaDeviceStatus = "FragAlgo_unsupported" - FuotaDeviceStatusNotEnoughMemory FuotaDeviceStatus = "Not_enough_memory" - FuotaDeviceStatusFragIndexUnsupported FuotaDeviceStatus = "FragIndex_unsupported" - FuotaDeviceStatusWrongDescriptor FuotaDeviceStatus = "Wrong_descriptor" - FuotaDeviceStatusSessionCntReplay FuotaDeviceStatus = "SessionCnt_replay" - FuotaDeviceStatusMissingFrag FuotaDeviceStatus = "MissingFrag" - FuotaDeviceStatusMemoryError FuotaDeviceStatus = "MemoryError" - FuotaDeviceStatusMICError FuotaDeviceStatus = "MICError" - FuotaDeviceStatusSuccessful FuotaDeviceStatus = "Successful" + FuotaDeviceStatusInitial FuotaDeviceStatus = "Initial" + FuotaDeviceStatusPackageNotSupported FuotaDeviceStatus = "Package_Not_Supported" + FuotaDeviceStatusFragAlgoUnsupported FuotaDeviceStatus = "FragAlgo_unsupported" + FuotaDeviceStatusNotEnoughMemory FuotaDeviceStatus = "Not_enough_memory" + FuotaDeviceStatusFragIndexUnsupported FuotaDeviceStatus = "FragIndex_unsupported" + FuotaDeviceStatusWrongDescriptor FuotaDeviceStatus = "Wrong_descriptor" + FuotaDeviceStatusSessionCntReplay FuotaDeviceStatus = "SessionCnt_replay" + FuotaDeviceStatusMissingFrag FuotaDeviceStatus = "MissingFrag" + FuotaDeviceStatusMemoryError FuotaDeviceStatus = "MemoryError" + FuotaDeviceStatusMICError FuotaDeviceStatus = "MICError" + FuotaDeviceStatusSuccessful FuotaDeviceStatus = "Successful" + FuotaDeviceStatusDeviceExistInConflictFuotaTask FuotaDeviceStatus = "Device_exist_in_conflict_fuota_task" ) // Values returns all known values for FuotaDeviceStatus. Note that this can be @@ -319,6 +320,7 @@ func (FuotaDeviceStatus) Values() []FuotaDeviceStatus { "MemoryError", "MICError", "Successful", + "Device_exist_in_conflict_fuota_task", } } diff --git a/service/location/CHANGELOG.md b/service/location/CHANGELOG.md index 43e05abf3b2..aae38989fda 100644 --- a/service/location/CHANGELOG.md +++ b/service/location/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.38.0 (2024-06-06) + +* **Feature**: Added two new APIs, VerifyDevicePosition and ForecastGeofenceEvents. Added support for putting larger geofences up to 100,000 vertices with Geobuf fields. + # v1.37.9 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/location/api_op_ForecastGeofenceEvents.go b/service/location/api_op_ForecastGeofenceEvents.go new file mode 100644 index 00000000000..3544286018d --- /dev/null +++ b/service/location/api_op_ForecastGeofenceEvents.go @@ -0,0 +1,319 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package location + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/location/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Evaluates device positions against geofence geometries from a given geofence +// collection. The event forecasts three states for which a device can be in +// relative to a geofence: +// +// ENTER : If a device is outside of a geofence, but would breach the fence if the +// device is moving at its current speed within time horizon window. +// +// EXIT : If a device is inside of a geofence, but would breach the fence if the +// device is moving at its current speed within time horizon window. +// +// IDLE : If a device is inside of a geofence, and the device is not moving. +func (c *Client) ForecastGeofenceEvents(ctx context.Context, params *ForecastGeofenceEventsInput, optFns ...func(*Options)) (*ForecastGeofenceEventsOutput, error) { + if params == nil { + params = &ForecastGeofenceEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ForecastGeofenceEvents", params, optFns, c.addOperationForecastGeofenceEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ForecastGeofenceEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ForecastGeofenceEventsInput struct { + + // The name of the geofence collection. + // + // This member is required. + CollectionName *string + + // The device's state, including current position and speed. + // + // This member is required. + DeviceState *types.ForecastGeofenceEventsDeviceState + + // The distance unit used for the NearestDistance property returned in a + // forecasted event. The measurement system must match for DistanceUnit and + // SpeedUnit ; if Kilometers is specified for DistanceUnit , then SpeedUnit must + // be KilometersPerHour . + // + // Default Value: Kilometers + DistanceUnit types.DistanceUnit + + // An optional limit for the number of resources returned in a single call. + // + // Default value: 20 + MaxResults *int32 + + // The pagination token specifying which page of results to return in the + // response. If no token is provided, the default page is the first page. + // + // Default value: null + NextToken *string + + // The speed unit for the device captured by the device state. The measurement + // system must match for DistanceUnit and SpeedUnit ; if Kilometers is specified + // for DistanceUnit , then SpeedUnit must be KilometersPerHour . + // + // Default Value: KilometersPerHour . + SpeedUnit types.SpeedUnit + + // Specifies the time horizon in minutes for the forecasted events. + TimeHorizonMinutes *float64 + + noSmithyDocumentSerde +} + +type ForecastGeofenceEventsOutput struct { + + // The distance unit for the forecasted events. + // + // This member is required. + DistanceUnit types.DistanceUnit + + // The list of forecasted events. + // + // This member is required. + ForecastedEvents []types.ForecastedEvent + + // The speed unit for the forecasted events. + // + // This member is required. + SpeedUnit types.SpeedUnit + + // The pagination token specifying which page of results to return in the + // response. If no token is provided, the default page is the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationForecastGeofenceEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpForecastGeofenceEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpForecastGeofenceEvents{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ForecastGeofenceEvents"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opForecastGeofenceEventsMiddleware(stack); err != nil { + return err + } + if err = addOpForecastGeofenceEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opForecastGeofenceEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opForecastGeofenceEventsMiddleware struct { +} + +func (*endpointPrefix_opForecastGeofenceEventsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opForecastGeofenceEventsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "geofencing." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opForecastGeofenceEventsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opForecastGeofenceEventsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ForecastGeofenceEventsAPIClient is a client that implements the +// ForecastGeofenceEvents operation. +type ForecastGeofenceEventsAPIClient interface { + ForecastGeofenceEvents(context.Context, *ForecastGeofenceEventsInput, ...func(*Options)) (*ForecastGeofenceEventsOutput, error) +} + +var _ ForecastGeofenceEventsAPIClient = (*Client)(nil) + +// ForecastGeofenceEventsPaginatorOptions is the paginator options for +// ForecastGeofenceEvents +type ForecastGeofenceEventsPaginatorOptions struct { + // An optional limit for the number of resources returned in a single call. + // + // Default value: 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 +} + +// ForecastGeofenceEventsPaginator is a paginator for ForecastGeofenceEvents +type ForecastGeofenceEventsPaginator struct { + options ForecastGeofenceEventsPaginatorOptions + client ForecastGeofenceEventsAPIClient + params *ForecastGeofenceEventsInput + nextToken *string + firstPage bool +} + +// NewForecastGeofenceEventsPaginator returns a new ForecastGeofenceEventsPaginator +func NewForecastGeofenceEventsPaginator(client ForecastGeofenceEventsAPIClient, params *ForecastGeofenceEventsInput, optFns ...func(*ForecastGeofenceEventsPaginatorOptions)) *ForecastGeofenceEventsPaginator { + if params == nil { + params = &ForecastGeofenceEventsInput{} + } + + options := ForecastGeofenceEventsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ForecastGeofenceEventsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ForecastGeofenceEventsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ForecastGeofenceEvents page. +func (p *ForecastGeofenceEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ForecastGeofenceEventsOutput, 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.ForecastGeofenceEvents(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_opForecastGeofenceEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ForecastGeofenceEvents", + } +} diff --git a/service/location/api_op_GetDevicePosition.go b/service/location/api_op_GetDevicePosition.go index cabf5ed525f..cc6f6c014ff 100644 --- a/service/location/api_op_GetDevicePosition.go +++ b/service/location/api_op_GetDevicePosition.go @@ -52,7 +52,7 @@ type GetDevicePositionOutput struct { // This member is required. Position []float64 - // The timestamp for when the tracker resource received the device position in [ISO 8601] + // The timestamp for when the tracker resource received the device position. Uses [ISO 8601] // format: YYYY-MM-DDThh:mm:ss.sssZ . // // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html diff --git a/service/location/api_op_GetGeofence.go b/service/location/api_op_GetGeofence.go index 6ec9c4a2db2..88e4636da56 100644 --- a/service/location/api_op_GetGeofence.go +++ b/service/location/api_op_GetGeofence.go @@ -13,6 +13,9 @@ import ( ) // Retrieves the geofence details from a geofence collection. +// +// The returned geometry will always match the geometry format used when the +// geofence was created. func (c *Client) GetGeofence(ctx context.Context, params *GetGeofenceInput, optFns ...func(*Options)) (*GetGeofenceOutput, error) { if params == nil { params = &GetGeofenceInput{} diff --git a/service/location/api_op_GetMapGlyphs.go b/service/location/api_op_GetMapGlyphs.go index 05cc8a57b34..b2fe9094dfe 100644 --- a/service/location/api_op_GetMapGlyphs.go +++ b/service/location/api_op_GetMapGlyphs.go @@ -44,8 +44,7 @@ type GetMapGlyphsInput struct { // // - VectorEsriStreets – Arial Regular | Arial Italic | Arial Bold // - // - VectorEsriNavigation – Arial Regular | Arial Italic | Arial Bold | Arial - // Unicode MS Bold | Arial Unicode MS Regular + // - VectorEsriNavigation – Arial Regular | Arial Italic | Arial Bold // // Valid font stacks for [HERE Technologies] styles: // diff --git a/service/location/api_op_GetPlace.go b/service/location/api_op_GetPlace.go index 398f2478980..ede0791c972 100644 --- a/service/location/api_op_GetPlace.go +++ b/service/location/api_op_GetPlace.go @@ -46,34 +46,6 @@ type GetPlaceInput struct { // The identifier of the place to find. // - // While you can use PlaceID in subsequent requests, PlaceID is not intended to be - // a permanent identifier and the ID can change between consecutive API calls. - // Please see the following PlaceID behaviour for each data provider: - // - // - Esri: Place IDs will change every quarter at a minimum. The typical time - // period for these changes would be March, June, September, and December. Place - // IDs might also change between the typical quarterly change but that will be much - // less frequent. - // - // - HERE: We recommend that you cache data for no longer than a week to keep - // your data data fresh. You can assume that less than 1% ID shifts will release - // over release which is approximately 1 - 2 times per week. - // - // - Grab: Place IDs can expire or become invalid in the following situations. - // - // - Data operations: The POI may be removed from Grab POI database by Grab Map - // Ops based on the ground-truth, such as being closed in the real world, being - // detected as a duplicate POI, or having incorrect information. Grab will - // synchronize data to the Waypoint environment on weekly basis. - // - // - Interpolated POI: Interpolated POI is a temporary POI generated in real - // time when serving a request, and it will be marked as derived in the - // place.result_type field in the response. The information of interpolated POIs - // will be retained for at least 30 days, which means that within 30 days, you are - // able to obtain POI details by Place ID from Place Details API. After 30 days, - // the interpolated POIs(both Place ID and details) may expire and inaccessible - // from the Places Details API. - // // This member is required. PlaceId *string diff --git a/service/location/api_op_PutGeofence.go b/service/location/api_op_PutGeofence.go index 373675d928e..e17f0ba2e28 100644 --- a/service/location/api_op_PutGeofence.go +++ b/service/location/api_op_PutGeofence.go @@ -41,11 +41,14 @@ type PutGeofenceInput struct { // This member is required. GeofenceId *string - // Contains the details to specify the position of the geofence. Can be either a - // polygon or a circle. Including both will return a validation error. + // Contains the details to specify the position of the geofence. Can be a polygon, + // a circle or a polygon encoded in Geobuf format. Including multiple selections + // will return a validation error. // - // Each [geofence polygon] can have a maximum of 1,000 vertices. + // The [geofence polygon] format supports a maximum of 1,000 vertices. The [Geofence Geobuf] format supports a + // maximum of 100,000 vertices. // + // [Geofence Geobuf]: https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html // [geofence polygon]: https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html // // This member is required. diff --git a/service/location/api_op_VerifyDevicePosition.go b/service/location/api_op_VerifyDevicePosition.go new file mode 100644 index 00000000000..73ff2fd3ef2 --- /dev/null +++ b/service/location/api_op_VerifyDevicePosition.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package location + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/location/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Verifies the integrity of the device's position by determining if it was +// reported behind a proxy, and by comparing it to an inferred position estimated +// based on the device's state. +func (c *Client) VerifyDevicePosition(ctx context.Context, params *VerifyDevicePositionInput, optFns ...func(*Options)) (*VerifyDevicePositionOutput, error) { + if params == nil { + params = &VerifyDevicePositionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "VerifyDevicePosition", params, optFns, c.addOperationVerifyDevicePositionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*VerifyDevicePositionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type VerifyDevicePositionInput struct { + + // The device's state, including position, IP address, cell signals and Wi-Fi + // access points. + // + // This member is required. + DeviceState *types.DeviceState + + // The name of the tracker resource to be associated with verification request. + // + // This member is required. + TrackerName *string + + // The distance unit for the verification request. + // + // Default Value: Kilometers + DistanceUnit types.DistanceUnit + + noSmithyDocumentSerde +} + +type VerifyDevicePositionOutput struct { + + // The device identifier. + // + // This member is required. + DeviceId *string + + // The distance unit for the verification response. + // + // This member is required. + DistanceUnit types.DistanceUnit + + // The inferred state of the device, given the provided position, IP address, + // cellular signals, and Wi-Fi- access points. + // + // This member is required. + InferredState *types.InferredState + + // The timestamp for when the tracker resource received the device position in [ISO 8601] + // format: YYYY-MM-DDThh:mm:ss.sssZ . + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + // + // This member is required. + ReceivedTime *time.Time + + // The timestamp at which the device's position was determined. Uses [ISO 8601] format: + // YYYY-MM-DDThh:mm:ss.sssZ . + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + // + // This member is required. + SampleTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationVerifyDevicePositionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpVerifyDevicePosition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpVerifyDevicePosition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "VerifyDevicePosition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opVerifyDevicePositionMiddleware(stack); err != nil { + return err + } + if err = addOpVerifyDevicePositionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyDevicePosition(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opVerifyDevicePositionMiddleware struct { +} + +func (*endpointPrefix_opVerifyDevicePositionMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opVerifyDevicePositionMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "tracking." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opVerifyDevicePositionMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opVerifyDevicePositionMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opVerifyDevicePosition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "VerifyDevicePosition", + } +} diff --git a/service/location/deserializers.go b/service/location/deserializers.go index 0f9a2e7ab45..acd67812889 100644 --- a/service/location/deserializers.go +++ b/service/location/deserializers.go @@ -5,6 +5,7 @@ package location import ( "bytes" "context" + "encoding/base64" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" @@ -4691,6 +4692,192 @@ func awsRestjson1_deserializeOpErrorDisassociateTrackerConsumer(response *smithy } } +type awsRestjson1_deserializeOpForecastGeofenceEvents struct { +} + +func (*awsRestjson1_deserializeOpForecastGeofenceEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpForecastGeofenceEvents) 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, awsRestjson1_deserializeOpErrorForecastGeofenceEvents(response, &metadata) + } + output := &ForecastGeofenceEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentForecastGeofenceEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorForecastGeofenceEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentForecastGeofenceEventsOutput(v **ForecastGeofenceEventsOutput, 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 *ForecastGeofenceEventsOutput + if *v == nil { + sv = &ForecastGeofenceEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DistanceUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DistanceUnit to be of type string, got %T instead", value) + } + sv.DistanceUnit = types.DistanceUnit(jtv) + } + + case "ForecastedEvents": + if err := awsRestjson1_deserializeDocumentForecastedEventsList(&sv.ForecastedEvents, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "SpeedUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SpeedUnit to be of type string, got %T instead", value) + } + sv.SpeedUnit = types.SpeedUnit(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetDevicePosition struct { } @@ -6490,7 +6677,7 @@ func awsRestjson1_deserializeOpDocumentListGeofencesOutput(v **ListGeofencesOutp if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) + return fmt.Errorf("expected LargeToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -9640,48 +9827,37 @@ func awsRestjson1_deserializeOpDocumentUpdateTrackerOutput(v **UpdateTrackerOutp return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsRestjson1_deserializeOpVerifyDevicePosition struct { +} - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsRestjson1_deserializeOpVerifyDevicePosition) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpVerifyDevicePosition) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorVerifyDevicePosition(response, &metadata) + } + output := &VerifyDevicePositionOutput{} + out.Result = output -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9692,36 +9868,45 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentVerifyDevicePositionOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +func awsRestjson1_deserializeOpErrorVerifyDevicePosition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -9731,10 +9916,215 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentVerifyDevicePositionOutput(v **VerifyDevicePositionOutput, 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 *VerifyDevicePositionOutput + if *v == nil { + sv = &VerifyDevicePositionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.DeviceId = ptr.String(jtv) + } + + case "DistanceUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DistanceUnit to be of type string, got %T instead", value) + } + sv.DistanceUnit = types.DistanceUnit(jtv) + } + + case "InferredState": + if err := awsRestjson1_deserializeDocumentInferredState(&sv.InferredState, value); err != nil { + return err + } + + case "ReceivedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ReceivedTime = ptr.Time(t) + } + + case "SampleTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.SampleTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_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 awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), @@ -11092,7 +11482,7 @@ func awsRestjson1_deserializeDocumentCountryCodeList(v *[]string, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) } col = jtv } @@ -11330,6 +11720,159 @@ func awsRestjson1_deserializeDocumentFilterPlaceCategoryList(v *[]string, value return nil } +func awsRestjson1_deserializeDocumentForecastedEvent(v **types.ForecastedEvent, 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.ForecastedEvent + if *v == nil { + sv = &types.ForecastedEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EventId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.EventId = ptr.String(jtv) + } + + case "EventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ForecastedGeofenceEventType to be of type string, got %T instead", value) + } + sv.EventType = types.ForecastedGeofenceEventType(jtv) + } + + case "ForecastedBreachTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ForecastedBreachTime = ptr.Time(t) + } + + case "GeofenceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.GeofenceId = ptr.String(jtv) + } + + case "GeofenceProperties": + if err := awsRestjson1_deserializeDocumentPropertyMap(&sv.GeofenceProperties, value); err != nil { + return err + } + + case "IsDeviceInGeofence": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsDeviceInGeofence = ptr.Bool(jtv) + } + + case "NearestDistance": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.NearestDistance = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.NearestDistance = f64 + + default: + return fmt.Errorf("expected NearestDistance to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentForecastedEventsList(v *[]types.ForecastedEvent, 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.ForecastedEvent + if *v == nil { + cv = []types.ForecastedEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ForecastedEvent + destAddr := &col + if err := awsRestjson1_deserializeDocumentForecastedEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentGeoArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11355,7 +11898,7 @@ func awsRestjson1_deserializeDocumentGeoArnList(v *[]string, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GeoArn to be of type string, got %T instead", value) + return fmt.Errorf("expected GeoArnV2 to be of type string, got %T instead", value) } col = jtv } @@ -11393,6 +11936,19 @@ func awsRestjson1_deserializeDocumentGeofenceGeometry(v **types.GeofenceGeometry return err } + case "Geobuf": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Base64EncodedGeobuf to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode Base64EncodedGeobuf, %w", err) + } + sv.Geobuf = dv + } + case "Polygon": if err := awsRestjson1_deserializeDocumentLinearRings(&sv.Polygon, value); err != nil { return err @@ -11407,6 +11963,90 @@ func awsRestjson1_deserializeDocumentGeofenceGeometry(v **types.GeofenceGeometry return nil } +func awsRestjson1_deserializeDocumentInferredState(v **types.InferredState, 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.InferredState + if *v == nil { + sv = &types.InferredState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Accuracy": + if err := awsRestjson1_deserializeDocumentPositionalAccuracy(&sv.Accuracy, value); err != nil { + return err + } + + case "DeviationDistance": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeviationDistance = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DeviationDistance = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "ProxyDetected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ProxyDetected = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/location/generated.json b/service/location/generated.json index 9968ec90723..fb7252c9c91 100644 --- a/service/location/generated.json +++ b/service/location/generated.json @@ -36,6 +36,7 @@ "api_op_DescribeRouteCalculator.go", "api_op_DescribeTracker.go", "api_op_DisassociateTrackerConsumer.go", + "api_op_ForecastGeofenceEvents.go", "api_op_GetDevicePosition.go", "api_op_GetDevicePositionHistory.go", "api_op_GetGeofence.go", @@ -66,6 +67,7 @@ "api_op_UpdatePlaceIndex.go", "api_op_UpdateRouteCalculator.go", "api_op_UpdateTracker.go", + "api_op_VerifyDevicePosition.go", "auth.go", "deserializers.go", "doc.go", diff --git a/service/location/go_module_metadata.go b/service/location/go_module_metadata.go index ed7ff979ad6..2cc704099b0 100644 --- a/service/location/go_module_metadata.go +++ b/service/location/go_module_metadata.go @@ -3,4 +3,4 @@ package location // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.37.9" +const goModuleVersion = "1.38.0" diff --git a/service/location/serializers.go b/service/location/serializers.go index 253245c01f7..b494030e763 100644 --- a/service/location/serializers.go +++ b/service/location/serializers.go @@ -2417,6 +2417,134 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateTrackerConsumerInput(v *Dis return nil } +type awsRestjson1_serializeOpForecastGeofenceEvents struct { +} + +func (*awsRestjson1_serializeOpForecastGeofenceEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpForecastGeofenceEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ForecastGeofenceEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/geofencing/v0/collections/{CollectionName}/forecast-geofence-events") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsForecastGeofenceEventsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentForecastGeofenceEventsInput(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} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsForecastGeofenceEventsInput(v *ForecastGeofenceEventsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CollectionName == nil || len(*v.CollectionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionName must not be empty")} + } + if v.CollectionName != nil { + if err := encoder.SetURI("CollectionName").String(*v.CollectionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentForecastGeofenceEventsInput(v *ForecastGeofenceEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeviceState != nil { + ok := object.Key("DeviceState") + if err := awsRestjson1_serializeDocumentForecastGeofenceEventsDeviceState(v.DeviceState, ok); err != nil { + return err + } + } + + if len(v.DistanceUnit) > 0 { + ok := object.Key("DistanceUnit") + ok.String(string(v.DistanceUnit)) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.SpeedUnit) > 0 { + ok := object.Key("SpeedUnit") + ok.String(string(v.SpeedUnit)) + } + + if v.TimeHorizonMinutes != nil { + ok := object.Key("TimeHorizonMinutes") + switch { + case math.IsNaN(*v.TimeHorizonMinutes): + ok.String("NaN") + + case math.IsInf(*v.TimeHorizonMinutes, 1): + ok.String("Infinity") + + case math.IsInf(*v.TimeHorizonMinutes, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.TimeHorizonMinutes) + + } + } + + return nil +} + type awsRestjson1_serializeOpGetDevicePosition struct { } @@ -5172,6 +5300,101 @@ func awsRestjson1_serializeOpDocumentUpdateTrackerInput(v *UpdateTrackerInput, v return nil } +type awsRestjson1_serializeOpVerifyDevicePosition struct { +} + +func (*awsRestjson1_serializeOpVerifyDevicePosition) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpVerifyDevicePosition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*VerifyDevicePositionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tracking/v0/trackers/{TrackerName}/positions/verify") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsVerifyDevicePositionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentVerifyDevicePositionInput(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} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsVerifyDevicePositionInput(v *VerifyDevicePositionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TrackerName == nil || len(*v.TrackerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TrackerName must not be empty")} + } + if v.TrackerName != nil { + if err := encoder.SetURI("TrackerName").String(*v.TrackerName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentVerifyDevicePositionInput(v *VerifyDevicePositionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeviceState != nil { + ok := object.Key("DeviceState") + if err := awsRestjson1_serializeDocumentDeviceState(v.DeviceState, ok); err != nil { + return err + } + } + + if len(v.DistanceUnit) > 0 { + ok := object.Key("DistanceUnit") + ok.String(string(v.DistanceUnit)) + } + + return nil +} + func awsRestjson1_serializeDocumentApiKeyActionList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5334,6 +5557,20 @@ func awsRestjson1_serializeDocumentCalculateRouteTruckModeOptions(v *types.Calcu return nil } +func awsRestjson1_serializeDocumentCellSignals(v *types.CellSignals, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LteCellDetails != nil { + ok := object.Key("LteCellDetails") + if err := awsRestjson1_serializeDocumentLteCellDetailsList(v.LteCellDetails, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentCircle(v *types.Circle, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5462,6 +5699,56 @@ func awsRestjson1_serializeDocumentDevicePositionUpdateList(v []types.DevicePosi return nil } +func awsRestjson1_serializeDocumentDeviceState(v *types.DeviceState, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Accuracy != nil { + ok := object.Key("Accuracy") + if err := awsRestjson1_serializeDocumentPositionalAccuracy(v.Accuracy, ok); err != nil { + return err + } + } + + if v.CellSignals != nil { + ok := object.Key("CellSignals") + if err := awsRestjson1_serializeDocumentCellSignals(v.CellSignals, ok); err != nil { + return err + } + } + + if v.DeviceId != nil { + ok := object.Key("DeviceId") + ok.String(*v.DeviceId) + } + + if v.Ipv4Address != nil { + ok := object.Key("Ipv4Address") + ok.String(*v.Ipv4Address) + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if v.SampleTime != nil { + ok := object.Key("SampleTime") + ok.String(smithytime.FormatDateTime(*v.SampleTime)) + } + + if v.WiFiAccessPoints != nil { + ok := object.Key("WiFiAccessPoints") + if err := awsRestjson1_serializeDocumentWiFiAccessPointList(v.WiFiAccessPoints, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentFilterPlaceCategoryList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5473,6 +5760,38 @@ func awsRestjson1_serializeDocumentFilterPlaceCategoryList(v []string, value smi return nil } +func awsRestjson1_serializeDocumentForecastGeofenceEventsDeviceState(v *types.ForecastGeofenceEventsDeviceState, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if v.Speed != nil { + ok := object.Key("Speed") + switch { + case math.IsNaN(*v.Speed): + ok.String("NaN") + + case math.IsInf(*v.Speed, 1): + ok.String("Infinity") + + case math.IsInf(*v.Speed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Speed) + + } + } + + return nil +} + func awsRestjson1_serializeDocumentGeoArnList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5495,6 +5814,11 @@ func awsRestjson1_serializeDocumentGeofenceGeometry(v *types.GeofenceGeometry, v } } + if v.Geobuf != nil { + ok := object.Key("Geobuf") + ok.Base64EncodeBytes(v.Geobuf) + } + if v.Polygon != nil { ok := object.Key("Polygon") if err := awsRestjson1_serializeDocumentLinearRings(v.Polygon, ok); err != nil { @@ -5548,6 +5872,168 @@ func awsRestjson1_serializeDocumentLinearRings(v [][][]float64, value smithyjson return nil } +func awsRestjson1_serializeDocumentLteCellDetails(v *types.LteCellDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("CellId") + ok.Integer(v.CellId) + } + + if v.LocalId != nil { + ok := object.Key("LocalId") + if err := awsRestjson1_serializeDocumentLteLocalId(v.LocalId, ok); err != nil { + return err + } + } + + if v.Mcc != nil { + ok := object.Key("Mcc") + ok.Integer(*v.Mcc) + } + + if v.Mnc != nil { + ok := object.Key("Mnc") + ok.Integer(*v.Mnc) + } + + if v.NetworkMeasurements != nil { + ok := object.Key("NetworkMeasurements") + if err := awsRestjson1_serializeDocumentLteNetworkMeasurementsList(v.NetworkMeasurements, ok); err != nil { + return err + } + } + + if v.NrCapable != nil { + ok := object.Key("NrCapable") + ok.Boolean(*v.NrCapable) + } + + if v.Rsrp != nil { + ok := object.Key("Rsrp") + ok.Integer(*v.Rsrp) + } + + if v.Rsrq != nil { + ok := object.Key("Rsrq") + switch { + case math.IsNaN(float64(*v.Rsrq)): + ok.String("NaN") + + case math.IsInf(float64(*v.Rsrq), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.Rsrq), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.Rsrq) + + } + } + + if v.Tac != nil { + ok := object.Key("Tac") + ok.Integer(*v.Tac) + } + + if v.TimingAdvance != nil { + ok := object.Key("TimingAdvance") + ok.Integer(*v.TimingAdvance) + } + + return nil +} + +func awsRestjson1_serializeDocumentLteCellDetailsList(v []types.LteCellDetails, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLteCellDetails(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLteLocalId(v *types.LteLocalId, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Earfcn") + ok.Integer(v.Earfcn) + } + + { + ok := object.Key("Pci") + ok.Integer(v.Pci) + } + + return nil +} + +func awsRestjson1_serializeDocumentLteNetworkMeasurements(v *types.LteNetworkMeasurements, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("CellId") + ok.Integer(v.CellId) + } + + { + ok := object.Key("Earfcn") + ok.Integer(v.Earfcn) + } + + { + ok := object.Key("Pci") + ok.Integer(v.Pci) + } + + if v.Rsrp != nil { + ok := object.Key("Rsrp") + ok.Integer(*v.Rsrp) + } + + if v.Rsrq != nil { + ok := object.Key("Rsrq") + switch { + case math.IsNaN(float64(*v.Rsrq)): + ok.String("NaN") + + case math.IsInf(float64(*v.Rsrq), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.Rsrq), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.Rsrq) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentLteNetworkMeasurementsList(v []types.LteNetworkMeasurements, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLteNetworkMeasurements(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentMapConfiguration(v *types.MapConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5814,3 +6300,33 @@ func awsRestjson1_serializeDocumentWaypointPositionList(v [][]float64, value smi } return nil } + +func awsRestjson1_serializeDocumentWiFiAccessPoint(v *types.WiFiAccessPoint, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MacAddress != nil { + ok := object.Key("MacAddress") + ok.String(*v.MacAddress) + } + + if v.Rss != nil { + ok := object.Key("Rss") + ok.Integer(*v.Rss) + } + + return nil +} + +func awsRestjson1_serializeDocumentWiFiAccessPointList(v []types.WiFiAccessPoint, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentWiFiAccessPoint(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/location/snapshot/api_op_ForecastGeofenceEvents.go.snap b/service/location/snapshot/api_op_ForecastGeofenceEvents.go.snap new file mode 100644 index 00000000000..36221313b5e --- /dev/null +++ b/service/location/snapshot/api_op_ForecastGeofenceEvents.go.snap @@ -0,0 +1,35 @@ +ForecastGeofenceEvents + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/location/snapshot/api_op_VerifyDevicePosition.go.snap b/service/location/snapshot/api_op_VerifyDevicePosition.go.snap new file mode 100644 index 00000000000..09181b99def --- /dev/null +++ b/service/location/snapshot/api_op_VerifyDevicePosition.go.snap @@ -0,0 +1,35 @@ +VerifyDevicePosition + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + EndpointHostPrefix + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/location/snapshot_test.go b/service/location/snapshot_test.go index a36e05b78ae..fcee4b795c3 100644 --- a/service/location/snapshot_test.go +++ b/service/location/snapshot_test.go @@ -398,6 +398,18 @@ func TestCheckSnapshot_DisassociateTrackerConsumer(t *testing.T) { } } +func TestCheckSnapshot_ForecastGeofenceEvents(t *testing.T) { + svc := New(Options{}) + _, err := svc.ForecastGeofenceEvents(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ForecastGeofenceEvents") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetDevicePosition(t *testing.T) { svc := New(Options{}) _, err := svc.GetDevicePosition(context.Background(), nil, func(o *Options) { @@ -757,6 +769,18 @@ func TestCheckSnapshot_UpdateTracker(t *testing.T) { t.Fatal(err) } } + +func TestCheckSnapshot_VerifyDevicePosition(t *testing.T) { + svc := New(Options{}) + _, err := svc.VerifyDevicePosition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "VerifyDevicePosition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} func TestUpdateSnapshot_AssociateTrackerConsumer(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateTrackerConsumer(context.Background(), nil, func(o *Options) { @@ -1093,6 +1117,18 @@ func TestUpdateSnapshot_DisassociateTrackerConsumer(t *testing.T) { } } +func TestUpdateSnapshot_ForecastGeofenceEvents(t *testing.T) { + svc := New(Options{}) + _, err := svc.ForecastGeofenceEvents(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ForecastGeofenceEvents") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetDevicePosition(t *testing.T) { svc := New(Options{}) _, err := svc.GetDevicePosition(context.Background(), nil, func(o *Options) { @@ -1452,3 +1488,15 @@ func TestUpdateSnapshot_UpdateTracker(t *testing.T) { t.Fatal(err) } } + +func TestUpdateSnapshot_VerifyDevicePosition(t *testing.T) { + svc := New(Options{}) + _, err := svc.VerifyDevicePosition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "VerifyDevicePosition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/location/types/enums.go b/service/location/types/enums.go index a405e881a8b..ba64a661613 100644 --- a/service/location/types/enums.go +++ b/service/location/types/enums.go @@ -45,6 +45,20 @@ func (DistanceUnit) Values() []DistanceUnit { } } +type ForecastedGeofenceEventType string + +// Values returns all known values for ForecastedGeofenceEventType. 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 (ForecastedGeofenceEventType) Values() []ForecastedGeofenceEventType { + return []ForecastedGeofenceEventType{ + "ENTER", + "EXIT", + "IDLE", + } +} + type IntendedUse string // Values returns all known values for IntendedUse. Note that this can be expanded @@ -116,6 +130,19 @@ func (RouteMatrixErrorCode) Values() []RouteMatrixErrorCode { } } +type SpeedUnit string + +// Values returns all known values for SpeedUnit. 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 (SpeedUnit) Values() []SpeedUnit { + return []SpeedUnit{ + "KilometersPerHour", + "MilesPerHour", + } +} + type Status string // Values returns all known values for Status. Note that this can be expanded in diff --git a/service/location/types/types.go b/service/location/types/types.go index dea8e3ef9ad..0b50ef77d33 100644 --- a/service/location/types/types.go +++ b/service/location/types/types.go @@ -215,11 +215,14 @@ type BatchPutGeofenceRequestEntry struct { // This member is required. GeofenceId *string - // Contains the details of the position of the geofence. Can be either a polygon - // or a circle. Including both will return a validation error. + // Contains the details to specify the position of the geofence. Can be a polygon, + // a circle or a polygon encoded in Geobuf format. Including multiple selections + // will return a validation error. // - // Each [geofence polygon] can have a maximum of 1,000 vertices. + // The [geofence polygon] format supports a maximum of 1,000 vertices. The [Geofence geobuf] format supports a + // maximum of 100,000 vertices. // + // [Geofence geobuf]: https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html // [geofence polygon]: https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html // // This member is required. @@ -443,6 +446,18 @@ type CalculateRouteTruckModeOptions struct { noSmithyDocumentSerde } +// The cellular network communication infrastructure that the device uses. +type CellSignals struct { + + // Information about the Long-Term Evolution (LTE) network the device is connected + // to. + // + // This member is required. + LteCellDetails []LteCellDetails + + noSmithyDocumentSerde +} + // A circle on the earth, as defined by a center point and a radius. type Circle struct { @@ -565,10 +580,111 @@ type DevicePositionUpdate struct { noSmithyDocumentSerde } +// The device's position, IP address, and Wi-Fi access points. +type DeviceState struct { + + // The device identifier. + // + // This member is required. + DeviceId *string + + // The last known device position. + // + // This member is required. + Position []float64 + + // The timestamp at which the device's position was determined. Uses [ISO 8601] format: + // YYYY-MM-DDThh:mm:ss.sssZ . + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + // + // This member is required. + SampleTime *time.Time + + // Defines the level of certainty of the position. + Accuracy *PositionalAccuracy + + // The cellular network infrastructure that the device is connected to. + CellSignals *CellSignals + + // The device's Ipv4 address. + Ipv4Address *string + + // The Wi-Fi access points the device is using. + WiFiAccessPoints []WiFiAccessPoint + + noSmithyDocumentSerde +} + +// A forecasted event represents a geofence event in relation to the requested +// device state, that may occur given the provided device state and time horizon. +type ForecastedEvent struct { + + // The forecasted event identifier. + // + // This member is required. + EventId *string + + // The event type, forecasting three states for which a device can be in relative + // to a geofence: + // + // ENTER : If a device is outside of a geofence, but would breach the fence if the + // device is moving at its current speed within time horizon window. + // + // EXIT : If a device is inside of a geofence, but would breach the fence if the + // device is moving at its current speed within time horizon window. + // + // IDLE : If a device is inside of a geofence, and the device is not moving. + // + // This member is required. + EventType ForecastedGeofenceEventType + + // The geofence identifier pertaining to the forecasted event. + // + // This member is required. + GeofenceId *string + + // Indicates if the device is located within the geofence. + // + // This member is required. + IsDeviceInGeofence *bool + + // The closest distance from the device's position to the geofence. + // + // This member is required. + NearestDistance float64 + + // The forecasted time the device will breach the geofence in [ISO 8601] format: + // YYYY-MM-DDThh:mm:ss.sssZ + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + ForecastedBreachTime *time.Time + + // The geofence properties. + GeofenceProperties map[string]string + + noSmithyDocumentSerde +} + +// The device's position, IP address, and WiFi access points. +type ForecastGeofenceEventsDeviceState struct { + + // The device's position. + // + // This member is required. + Position []float64 + + // The device's speed. + Speed *float64 + + noSmithyDocumentSerde +} + // Contains the geofence geometry details. // -// A geofence geometry is made up of either a polygon or a circle. Can be either a -// polygon or a circle. Including both will return a validation error. +// A geofence geometry is made up of either a polygon or a circle. Can be a +// polygon, a circle or a polygon encoded in Geobuf format. Including multiple +// selections will return a validation error. // // Amazon Location doesn't currently support polygons with holes, multipolygons, // polygons that are wound clockwise, or that cross the antimeridian. @@ -577,6 +693,12 @@ type GeofenceGeometry struct { // A circle on the earth, as defined by a center point and a radius. Circle *Circle + // Geobuf is a compact binary encoding for geographic data that provides lossless + // compression of GeoJSON polygons. The Geobuf must be Base64-encoded. + // + // A polygon in Geobuf format can have up to 100,000 vertices. + Geobuf []byte + // A polygon is a list of linear rings which are each made up of a list of // vertices. // @@ -599,6 +721,29 @@ type GeofenceGeometry struct { noSmithyDocumentSerde } +// The inferred state of the device, given the provided position, IP address, +// cellular signals, and Wi-Fi- access points. +type InferredState struct { + + // Indicates if a proxy was used. + // + // This member is required. + ProxyDetected *bool + + // The level of certainty of the inferred position. + Accuracy *PositionalAccuracy + + // The distance between the inferred position and the device's self-reported + // position. + DeviationDistance *float64 + + // The device position inferred by the provided position, IP address, cellular + // signals, and Wi-Fi- access points. + Position []float64 + + noSmithyDocumentSerde +} + // Contains the calculated route's details for each path between a pair of // positions. The number of legs returned corresponds to one fewer than the total // number of positions in the request. @@ -716,6 +861,9 @@ type ListDevicePositionsResponseEntry struct { } // Contains the geofence collection details. +// +// The returned geometry will always match the geometry format used when the +// geofence was created. type ListGeofenceCollectionsResponseEntry struct { // The name of the geofence collection. @@ -758,6 +906,9 @@ type ListGeofenceCollectionsResponseEntry struct { } // Contains a list of geofences stored in a given geofence collection. +// +// The returned geometry will always match the geometry format used when the +// geofence was created. type ListGeofenceResponseEntry struct { // The timestamp for when the geofence was stored in a geofence collection in [ISO 8601] @@ -1049,6 +1200,95 @@ type ListTrackersResponseEntry struct { noSmithyDocumentSerde } +// Details about the Long-Term Evolution (LTE) network. +type LteCellDetails struct { + + // The E-UTRAN Cell Identifier (ECI). + // + // This member is required. + CellId int32 + + // The Mobile Country Code (MCC). + // + // This member is required. + Mcc *int32 + + // The Mobile Network Code (MNC) + // + // This member is required. + Mnc *int32 + + // The LTE local identification information (local ID). + LocalId *LteLocalId + + // The network measurements. + NetworkMeasurements []LteNetworkMeasurements + + // Indicates whether the LTE object is capable of supporting NR (new radio). + NrCapable *bool + + // Signal power of the reference signal received, measured in decibel-milliwatts + // (dBm). + Rsrp *int32 + + // Signal quality of the reference Signal received, measured in decibels (dB). + Rsrq *float32 + + // LTE Tracking Area Code (TAC). + Tac *int32 + + // Timing Advance (TA). + TimingAdvance *int32 + + noSmithyDocumentSerde +} + +// LTE local identification information (local ID). +type LteLocalId struct { + + // E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency + // channel number (EARFCN). + // + // This member is required. + Earfcn int32 + + // Physical Cell ID (PCI). + // + // This member is required. + Pci int32 + + noSmithyDocumentSerde +} + +// LTE network measurements. +type LteNetworkMeasurements struct { + + // E-UTRAN Cell Identifier (ECI). + // + // This member is required. + CellId int32 + + // E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency + // channel number (EARFCN). + // + // This member is required. + Earfcn int32 + + // Physical Cell ID (PCI). + // + // This member is required. + Pci int32 + + // Signal power of the reference signal received, measured in dBm + // (decibel-milliwatts). + Rsrp *int32 + + // Signal quality of the reference Signal received, measured in decibels (dB). + Rsrq *float32 + + noSmithyDocumentSerde +} + // Specifies the map tile style selected from an available provider. type MapConfiguration struct { @@ -1056,12 +1296,9 @@ type MapConfiguration struct { // // Valid [Esri map styles]: // - // - VectorEsriNavigation – The Esri Navigation map style, which provides a - // detailed basemap for the world symbolized with a custom navigation map style - // that's designed for use during the day in mobile devices. It also includes a - // richer set of places, such as shops, services, restaurants, attractions, and - // other points of interest. Enable the POI layer by setting it in CustomLayers - // to leverage the additional places data. + // - VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector + // basemap with a dark gray, neutral background with minimal colors, labels, and + // features that's designed to draw attention to your thematic content. // // - RasterEsriImagery – The Esri Imagery map style. A raster basemap that // provides one meter or better satellite and aerial imagery in many parts of the @@ -1080,16 +1317,28 @@ type MapConfiguration struct { // The vector tile layer is similar in content and style to the World Street Map // raster map. // - // - VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector - // basemap with a dark gray, neutral background with minimal colors, labels, and - // features that's designed to draw attention to your thematic content. + // - VectorEsriNavigation – The Esri Navigation map style, which provides a + // detailed basemap for the world symbolized with a custom navigation map style + // that's designed for use during the day in mobile devices. // // Valid [HERE Technologies map styles]: // + // - VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast + // detailed base map of the world that blends 3D and 2D rendering. + // + // The VectorHereContrast style has been renamed from VectorHereBerlin . + // VectorHereBerlin has been deprecated, but will continue to work in + // applications that use it. + // // - VectorHereExplore – A default HERE map style containing a neutral, global // map and its features including roads, buildings, landmarks, and water features. // It also now includes a fully designed map of Japan. // + // - VectorHereExploreTruck – A global map containing truck restrictions and + // attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments + // and icons on top of HERE Explore to support use cases within transport and + // logistics. + // // - RasterHereExploreSatellite – A global map containing high resolution // satellite imagery. // @@ -1102,18 +1351,6 @@ type MapConfiguration struct { // see. This means that more tiles are retrieved than when using either vector or // raster tiles alone. Your charges will include all tiles retrieved. // - // - VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast - // detailed base map of the world that blends 3D and 2D rendering. - // - // The VectorHereContrast style has been renamed from VectorHereBerlin . - // VectorHereBerlin has been deprecated, but will continue to work in - // applications that use it. - // - // - VectorHereExploreTruck – A global map containing truck restrictions and - // attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments - // and icons on top of HERE Explore to support use cases within transport and - // logistics. - // // Valid [GrabMaps map styles]: // // - VectorGrabStandardLight – The Grab Standard Light map style provides a @@ -1162,10 +1399,8 @@ type MapConfiguration struct { // layer, or, for styles that support custom layers, you can enable layer(s), such // as POI layer for the VectorEsriNavigation style. Default is unset . // - // Currenlty only VectorEsriNavigation supports CustomLayers. For more - // information, see [Custom Layers]. - // - // [Custom Layers]: https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#map-custom-layers + // Not all map resources or styles support custom layers. See Custom Layers for + // more information. CustomLayers []string // Specifies the political view for the style. Leave unset to not use a political @@ -1190,10 +1425,8 @@ type MapConfigurationUpdate struct { // layer, or, for styles that support custom layers, you can enable layer(s), such // as POI layer for the VectorEsriNavigation style. Default is unset . // - // Currenlty only VectorEsriNavigation supports CustomLayers. For more - // information, see [Custom Layers]. - // - // [Custom Layers]: https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html#map-custom-layers + // Not all map resources or styles support custom layers. See Custom Layers for + // more information. CustomLayers []string // Specifies the political view for the style. Set to an empty string to not use a @@ -1270,15 +1503,11 @@ type Place struct { // . Street *string - // An area that's part of a larger municipality. For example, Blissville is a + // An area that's part of a larger municipality. For example, Blissville is a // submunicipality in the Queen County in New York. // - // This property is only returned for a place index that uses Esri as a data - // provider. The property is represented as a district . - // - // For more information about data providers, see [Amazon Location Service data providers]. - // - // [Amazon Location Service data providers]: https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html + // This property supported by Esri and OpenData. The Esri property is district , + // and the OpenData property is borough . SubMunicipality *string // A county, or an area that's part of a larger region. For example, Metro @@ -1296,14 +1525,13 @@ type Place struct { // For addresses with multiple units, the unit identifier. Can include numbers and // letters, for example 3B or Unit 123 . // - // This property is returned only for a place index that uses Esri or Grab as a - // data provider. It is not returned for SearchPlaceIndexForPosition . + // Returned only for a place index that uses Esri or Grab as a data provider. Is + // not returned for SearchPlaceIndexForPosition . UnitNumber *string // For addresses with a UnitNumber , the type of unit. For example, Apartment . // - // This property is returned only for a place index that uses Esri as a data - // provider. + // Returned only for a place index that uses Esri as a data provider. UnitType *string noSmithyDocumentSerde @@ -1441,34 +1669,6 @@ type SearchForSuggestionsResult struct { // // For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place // indexes that use Esri, Grab, or HERE as data providers. - // - // While you can use PlaceID in subsequent requests, PlaceID is not intended to be - // a permanent identifier and the ID can change between consecutive API calls. - // Please see the following PlaceID behaviour for each data provider: - // - // - Esri: Place IDs will change every quarter at a minimum. The typical time - // period for these changes would be March, June, September, and December. Place - // IDs might also change between the typical quarterly change but that will be much - // less frequent. - // - // - HERE: We recommend that you cache data for no longer than a week to keep - // your data data fresh. You can assume that less than 1% ID shifts will release - // over release which is approximately 1 - 2 times per week. - // - // - Grab: Place IDs can expire or become invalid in the following situations. - // - // - Data operations: The POI may be removed from Grab POI database by Grab Map - // Ops based on the ground-truth, such as being closed in the real world, being - // detected as a duplicate POI, or having incorrect information. Grab will - // synchronize data to the Waypoint environment on weekly basis. - // - // - Interpolated POI: Interpolated POI is a temporary POI generated in real - // time when serving a request, and it will be marked as derived in the - // place.result_type field in the response. The information of interpolated POIs - // will be retained for at least 30 days, which means that within 30 days, you are - // able to obtain POI details by Place ID from Place Details API. After 30 days, - // the interpolated POIs(both Place ID and details) may expire and inaccessible - // from the Places Details API. PlaceId *string // Categories from the data provider that describe the Place that are not mapped @@ -1807,4 +2007,20 @@ type ValidationExceptionField struct { noSmithyDocumentSerde } +// Wi-Fi access point. +type WiFiAccessPoint struct { + + // Medium access control address (Mac). + // + // This member is required. + MacAddress *string + + // Received signal strength (dBm) of the WLAN measurement data. + // + // This member is required. + Rss *int32 + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/location/validators.go b/service/location/validators.go index 3d7a722d5c6..a454f168171 100644 --- a/service/location/validators.go +++ b/service/location/validators.go @@ -570,6 +570,26 @@ func (m *validateOpDisassociateTrackerConsumer) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpForecastGeofenceEvents struct { +} + +func (*validateOpForecastGeofenceEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpForecastGeofenceEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ForecastGeofenceEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpForecastGeofenceEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetDevicePositionHistory struct { } @@ -1050,6 +1070,26 @@ func (m *validateOpUpdateTracker) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpVerifyDevicePosition struct { +} + +func (*validateOpVerifyDevicePosition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpVerifyDevicePosition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*VerifyDevicePositionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpVerifyDevicePositionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpAssociateTrackerConsumerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateTrackerConsumer{}, middleware.After) } @@ -1162,6 +1202,10 @@ func addOpDisassociateTrackerConsumerValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDisassociateTrackerConsumer{}, middleware.After) } +func addOpForecastGeofenceEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpForecastGeofenceEvents{}, middleware.After) +} + func addOpGetDevicePositionHistoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDevicePositionHistory{}, middleware.After) } @@ -1258,6 +1302,10 @@ func addOpUpdateTrackerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTracker{}, middleware.After) } +func addOpVerifyDevicePositionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpVerifyDevicePosition{}, middleware.After) +} + func validateApiKeyRestrictions(v *types.ApiKeyRestrictions) error { if v == nil { return nil @@ -1315,6 +1363,25 @@ func validateBatchPutGeofenceRequestEntryList(v []types.BatchPutGeofenceRequestE } } +func validateCellSignals(v *types.CellSignals) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CellSignals"} + if v.LteCellDetails == nil { + invalidParams.Add(smithy.NewErrParamRequired("LteCellDetails")) + } else if v.LteCellDetails != nil { + if err := validateLteCellDetailsList(v.LteCellDetails); err != nil { + invalidParams.AddNested("LteCellDetails", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCircle(v *types.Circle) error { if v == nil { return nil @@ -1376,6 +1443,57 @@ func validateDevicePositionUpdateList(v []types.DevicePositionUpdate) error { } } +func validateDeviceState(v *types.DeviceState) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeviceState"} + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if v.SampleTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("SampleTime")) + } + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if v.Accuracy != nil { + if err := validatePositionalAccuracy(v.Accuracy); err != nil { + invalidParams.AddNested("Accuracy", err.(smithy.InvalidParamsError)) + } + } + if v.WiFiAccessPoints != nil { + if err := validateWiFiAccessPointList(v.WiFiAccessPoints); err != nil { + invalidParams.AddNested("WiFiAccessPoints", err.(smithy.InvalidParamsError)) + } + } + if v.CellSignals != nil { + if err := validateCellSignals(v.CellSignals); err != nil { + invalidParams.AddNested("CellSignals", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateForecastGeofenceEventsDeviceState(v *types.ForecastGeofenceEventsDeviceState) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ForecastGeofenceEventsDeviceState"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGeofenceGeometry(v *types.GeofenceGeometry) error { if v == nil { return nil @@ -1393,6 +1511,92 @@ func validateGeofenceGeometry(v *types.GeofenceGeometry) error { } } +func validateLteCellDetails(v *types.LteCellDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LteCellDetails"} + if v.Mcc == nil { + invalidParams.Add(smithy.NewErrParamRequired("Mcc")) + } + if v.Mnc == nil { + invalidParams.Add(smithy.NewErrParamRequired("Mnc")) + } + if v.LocalId != nil { + if err := validateLteLocalId(v.LocalId); err != nil { + invalidParams.AddNested("LocalId", err.(smithy.InvalidParamsError)) + } + } + if v.NetworkMeasurements != nil { + if err := validateLteNetworkMeasurementsList(v.NetworkMeasurements); err != nil { + invalidParams.AddNested("NetworkMeasurements", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLteCellDetailsList(v []types.LteCellDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LteCellDetailsList"} + for i := range v { + if err := validateLteCellDetails(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLteLocalId(v *types.LteLocalId) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LteLocalId"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLteNetworkMeasurements(v *types.LteNetworkMeasurements) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LteNetworkMeasurements"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLteNetworkMeasurementsList(v []types.LteNetworkMeasurements) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LteNetworkMeasurementsList"} + for i := range v { + if err := validateLteNetworkMeasurements(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMapConfiguration(v *types.MapConfiguration) error { if v == nil { return nil @@ -1423,6 +1627,41 @@ func validatePositionalAccuracy(v *types.PositionalAccuracy) error { } } +func validateWiFiAccessPoint(v *types.WiFiAccessPoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WiFiAccessPoint"} + if v.MacAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("MacAddress")) + } + if v.Rss == nil { + invalidParams.Add(smithy.NewErrParamRequired("Rss")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWiFiAccessPointList(v []types.WiFiAccessPoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WiFiAccessPointList"} + for i := range v { + if err := validateWiFiAccessPoint(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateTrackerConsumerInput(v *AssociateTrackerConsumerInput) error { if v == nil { return nil @@ -1911,6 +2150,28 @@ func validateOpDisassociateTrackerConsumerInput(v *DisassociateTrackerConsumerIn } } +func validateOpForecastGeofenceEventsInput(v *ForecastGeofenceEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ForecastGeofenceEventsInput"} + if v.CollectionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionName")) + } + if v.DeviceState == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceState")) + } else if v.DeviceState != nil { + if err := validateForecastGeofenceEventsDeviceState(v.DeviceState); err != nil { + invalidParams.AddNested("DeviceState", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetDevicePositionHistoryInput(v *GetDevicePositionHistoryInput) error { if v == nil { return nil @@ -2330,3 +2591,25 @@ func validateOpUpdateTrackerInput(v *UpdateTrackerInput) error { return nil } } + +func validateOpVerifyDevicePositionInput(v *VerifyDevicePositionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VerifyDevicePositionInput"} + if v.TrackerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrackerName")) + } + if v.DeviceState == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceState")) + } else if v.DeviceState != nil { + if err := validateDeviceState(v.DeviceState); err != nil { + invalidParams.AddNested("DeviceState", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/s3/CHANGELOG.md b/service/s3/CHANGELOG.md index caa8b4d78e2..6482a0a1da7 100644 --- a/service/s3/CHANGELOG.md +++ b/service/s3/CHANGELOG.md @@ -1,3 +1,8 @@ +# v1.55.0 (2024-06-05) + +* **Feature**: Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality. +* **Bug Fix**: Add S3-specific smithy protocol tests. + # v1.54.4 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/s3/api_op_CopyObject.go b/service/s3/api_op_CopyObject.go index 3ae7d9b310d..432f3325efe 100644 --- a/service/s3/api_op_CopyObject.go +++ b/service/s3/api_op_CopyObject.go @@ -736,6 +736,8 @@ type CopyObjectInput struct { func (in *CopyObjectInput) bindEndpointParams(p *EndpointParameters) { p.Bucket = in.Bucket + p.CopySource = in.CopySource + p.Key = in.Key p.DisableS3ExpressSessionAuth = ptr.Bool(true) } diff --git a/service/s3/endpoints.go b/service/s3/endpoints.go index e6ae2e8729a..39f416bcf87 100644 --- a/service/s3/endpoints.go +++ b/service/s3/endpoints.go @@ -326,6 +326,13 @@ type EndpointParameters struct { // is required. Prefix *string + // The Copy Source used for Copy Object request. This is an optional parameter that + // will be set automatically for operations that are scoped to Copy + // Source. + // + // Parameter is required. + CopySource *string + // Internal parameter to disable Access Point Buckets // // Parameter is required. diff --git a/service/s3/endpoints_test.go b/service/s3/endpoints_test.go index a2011e0466a..feb96c3350c 100644 --- a/service/s3/endpoints_test.go +++ b/service/s3/endpoints_test.go @@ -2545,8 +2545,69 @@ func TestEndpointCase56(t *testing.T) { } } -// virtual addressing, aws-global region with fips uses the regional fips endpoint +// virtual addressing, aws-global region with Copy Source, and Key uses the global +// endpoint. Copy Source and Key parameters should not be used in endpoint +// evaluation. func TestEndpointCase57(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("aws-global"), + Bucket: ptr.String("bucket-name"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Accelerate: ptr.Bool(false), + CopySource: ptr.String("/copy/source"), + Key: ptr.String("key"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://bucket-name.s3.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "s3") + smithyhttp.SetSigV4ASigningName(&sp, "s3") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + + smithyhttp.SetDisableDoubleEncoding(&sp, true) + return sp + }(), + }, + }) + return out + }(), + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// virtual addressing, aws-global region with fips uses the regional fips endpoint +func TestEndpointCase58(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -2604,7 +2665,7 @@ func TestEndpointCase57(t *testing.T) { // virtual addressing, aws-global region with dualstack uses the regional dualstack // endpoint -func TestEndpointCase58(t *testing.T) { +func TestEndpointCase59(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -2662,7 +2723,7 @@ func TestEndpointCase58(t *testing.T) { // virtual addressing, aws-global region with fips/dualstack uses the regional // fips/dualstack endpoint -func TestEndpointCase59(t *testing.T) { +func TestEndpointCase60(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -2720,7 +2781,7 @@ func TestEndpointCase59(t *testing.T) { // virtual addressing, aws-global region with accelerate uses the global accelerate // endpoint -func TestEndpointCase60(t *testing.T) { +func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -2777,7 +2838,7 @@ func TestEndpointCase60(t *testing.T) { } // virtual addressing, aws-global region with custom endpoint -func TestEndpointCase61(t *testing.T) { +func TestEndpointCase62(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Endpoint: ptr.String("https://example.com"), @@ -2836,7 +2897,7 @@ func TestEndpointCase61(t *testing.T) { // virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global // endpoint -func TestEndpointCase62(t *testing.T) { +func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseGlobalEndpoint: ptr.Bool(true), @@ -2895,7 +2956,7 @@ func TestEndpointCase62(t *testing.T) { // virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional // endpoint -func TestEndpointCase63(t *testing.T) { +func TestEndpointCase64(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseGlobalEndpoint: ptr.Bool(true), @@ -2954,7 +3015,7 @@ func TestEndpointCase63(t *testing.T) { // virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the // regional fips endpoint -func TestEndpointCase64(t *testing.T) { +func TestEndpointCase65(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseGlobalEndpoint: ptr.Bool(true), @@ -3013,7 +3074,7 @@ func TestEndpointCase64(t *testing.T) { // virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses // the regional dualstack endpoint -func TestEndpointCase65(t *testing.T) { +func TestEndpointCase66(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseGlobalEndpoint: ptr.Bool(true), @@ -3072,7 +3133,7 @@ func TestEndpointCase65(t *testing.T) { // virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses // the global accelerate endpoint -func TestEndpointCase66(t *testing.T) { +func TestEndpointCase67(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseGlobalEndpoint: ptr.Bool(true), @@ -3130,7 +3191,7 @@ func TestEndpointCase66(t *testing.T) { } // virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint -func TestEndpointCase67(t *testing.T) { +func TestEndpointCase68(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), @@ -3189,7 +3250,7 @@ func TestEndpointCase67(t *testing.T) { } // ForcePathStyle, aws-global region uses the global endpoint -func TestEndpointCase68(t *testing.T) { +func TestEndpointCase69(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -3247,7 +3308,7 @@ func TestEndpointCase68(t *testing.T) { } // ForcePathStyle, aws-global region with fips is invalid -func TestEndpointCase69(t *testing.T) { +func TestEndpointCase70(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -3306,7 +3367,7 @@ func TestEndpointCase69(t *testing.T) { // ForcePathStyle, aws-global region with dualstack uses regional dualstack // endpoint -func TestEndpointCase70(t *testing.T) { +func TestEndpointCase71(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket-name"), @@ -3364,7 +3425,7 @@ func TestEndpointCase70(t *testing.T) { } // ForcePathStyle, aws-global region custom endpoint uses the custom endpoint -func TestEndpointCase71(t *testing.T) { +func TestEndpointCase72(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Endpoint: ptr.String("https://example.com"), @@ -3423,7 +3484,7 @@ func TestEndpointCase71(t *testing.T) { } // ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint -func TestEndpointCase72(t *testing.T) { +func TestEndpointCase73(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket-name"), @@ -3482,7 +3543,7 @@ func TestEndpointCase72(t *testing.T) { } // ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint -func TestEndpointCase73(t *testing.T) { +func TestEndpointCase74(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("bucket-name"), @@ -3542,7 +3603,7 @@ func TestEndpointCase73(t *testing.T) { // ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional // dualstack endpoint -func TestEndpointCase74(t *testing.T) { +func TestEndpointCase75(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket-name"), @@ -3602,7 +3663,7 @@ func TestEndpointCase74(t *testing.T) { // ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the // custom endpoint -func TestEndpointCase75(t *testing.T) { +func TestEndpointCase76(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket-name"), @@ -3662,7 +3723,7 @@ func TestEndpointCase75(t *testing.T) { } // ARN with aws-global region and UseArnRegion uses the regional endpoint -func TestEndpointCase76(t *testing.T) { +func TestEndpointCase77(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseArnRegion: ptr.Bool(true), @@ -3733,7 +3794,7 @@ func TestEndpointCase76(t *testing.T) { } // cross partition MRAP ARN is an error -func TestEndpointCase77(t *testing.T) { +func TestEndpointCase78(t *testing.T) { var params = EndpointParameters{ Bucket: ptr.String("arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap"), Region: ptr.String("us-west-1"), @@ -3752,7 +3813,7 @@ func TestEndpointCase77(t *testing.T) { } // Endpoint override, accesspoint with HTTP, port -func TestEndpointCase78(t *testing.T) { +func TestEndpointCase79(t *testing.T) { var params = EndpointParameters{ Endpoint: ptr.String("http://beta.example.com:1234"), Region: ptr.String("us-west-2"), @@ -3807,7 +3868,7 @@ func TestEndpointCase78(t *testing.T) { } // Endpoint override, accesspoint with http, path, query, and port -func TestEndpointCase79(t *testing.T) { +func TestEndpointCase80(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -3865,7 +3926,7 @@ func TestEndpointCase79(t *testing.T) { } // non-bucket endpoint override with FIPS = error -func TestEndpointCase80(t *testing.T) { +func TestEndpointCase81(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Endpoint: ptr.String("http://beta.example.com:1234/path"), @@ -3886,7 +3947,7 @@ func TestEndpointCase80(t *testing.T) { } // FIPS + dualstack + custom endpoint -func TestEndpointCase81(t *testing.T) { +func TestEndpointCase82(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Endpoint: ptr.String("http://beta.example.com:1234/path"), @@ -3907,7 +3968,7 @@ func TestEndpointCase81(t *testing.T) { } // dualstack + custom endpoint -func TestEndpointCase82(t *testing.T) { +func TestEndpointCase83(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Endpoint: ptr.String("http://beta.example.com:1234/path"), @@ -3928,7 +3989,7 @@ func TestEndpointCase82(t *testing.T) { } // custom endpoint without FIPS/dualstack -func TestEndpointCase83(t *testing.T) { +func TestEndpointCase84(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Endpoint: ptr.String("http://beta.example.com:1234/path"), @@ -3984,7 +4045,7 @@ func TestEndpointCase83(t *testing.T) { } // s3 object lambda with access points disabled -func TestEndpointCase84(t *testing.T) { +func TestEndpointCase85(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:myendpoint"), @@ -4004,7 +4065,7 @@ func TestEndpointCase84(t *testing.T) { } // non bucket + FIPS -func TestEndpointCase85(t *testing.T) { +func TestEndpointCase86(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), @@ -4059,7 +4120,7 @@ func TestEndpointCase85(t *testing.T) { } // standard non bucket endpoint -func TestEndpointCase86(t *testing.T) { +func TestEndpointCase87(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -4114,7 +4175,7 @@ func TestEndpointCase86(t *testing.T) { } // non bucket endpoint with FIPS + Dualstack -func TestEndpointCase87(t *testing.T) { +func TestEndpointCase88(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), @@ -4169,7 +4230,7 @@ func TestEndpointCase87(t *testing.T) { } // non bucket endpoint with dualstack -func TestEndpointCase88(t *testing.T) { +func TestEndpointCase89(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -4224,7 +4285,7 @@ func TestEndpointCase88(t *testing.T) { } // use global endpoint + IP address endpoint override -func TestEndpointCase89(t *testing.T) { +func TestEndpointCase90(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket"), @@ -4282,7 +4343,7 @@ func TestEndpointCase89(t *testing.T) { } // non-dns endpoint + global endpoint -func TestEndpointCase90(t *testing.T) { +func TestEndpointCase91(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4339,7 +4400,7 @@ func TestEndpointCase90(t *testing.T) { } // endpoint override + use global endpoint -func TestEndpointCase91(t *testing.T) { +func TestEndpointCase92(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4397,7 +4458,7 @@ func TestEndpointCase91(t *testing.T) { } // FIPS + dualstack + non-bucket endpoint -func TestEndpointCase92(t *testing.T) { +func TestEndpointCase93(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4453,7 +4514,7 @@ func TestEndpointCase92(t *testing.T) { } // FIPS + dualstack + non-DNS endpoint -func TestEndpointCase93(t *testing.T) { +func TestEndpointCase94(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4510,7 +4571,7 @@ func TestEndpointCase93(t *testing.T) { } // endpoint override + FIPS + dualstack (BUG) -func TestEndpointCase94(t *testing.T) { +func TestEndpointCase95(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4533,7 +4594,7 @@ func TestEndpointCase94(t *testing.T) { } // endpoint override + non-dns bucket + FIPS (BUG) -func TestEndpointCase95(t *testing.T) { +func TestEndpointCase96(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4555,7 +4616,7 @@ func TestEndpointCase95(t *testing.T) { } // FIPS + bucket endpoint + force path style -func TestEndpointCase96(t *testing.T) { +func TestEndpointCase97(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4613,7 +4674,7 @@ func TestEndpointCase96(t *testing.T) { } // bucket + FIPS + force path style -func TestEndpointCase97(t *testing.T) { +func TestEndpointCase98(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket"), @@ -4671,7 +4732,7 @@ func TestEndpointCase97(t *testing.T) { } // FIPS + dualstack + use global endpoint -func TestEndpointCase98(t *testing.T) { +func TestEndpointCase99(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket"), @@ -4728,7 +4789,7 @@ func TestEndpointCase98(t *testing.T) { } // URI encoded bucket + use global endpoint -func TestEndpointCase99(t *testing.T) { +func TestEndpointCase100(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4751,7 +4812,7 @@ func TestEndpointCase99(t *testing.T) { } // FIPS + path based endpoint -func TestEndpointCase100(t *testing.T) { +func TestEndpointCase101(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4809,7 +4870,7 @@ func TestEndpointCase100(t *testing.T) { } // accelerate + dualstack + global endpoint -func TestEndpointCase101(t *testing.T) { +func TestEndpointCase102(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket"), @@ -4867,7 +4928,7 @@ func TestEndpointCase101(t *testing.T) { } // dualstack + global endpoint + non URI safe bucket -func TestEndpointCase102(t *testing.T) { +func TestEndpointCase103(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4925,7 +4986,7 @@ func TestEndpointCase102(t *testing.T) { } // FIPS + uri encoded bucket -func TestEndpointCase103(t *testing.T) { +func TestEndpointCase104(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -4984,7 +5045,7 @@ func TestEndpointCase103(t *testing.T) { } // endpoint override + non-uri safe endpoint + force path style -func TestEndpointCase104(t *testing.T) { +func TestEndpointCase105(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -5009,7 +5070,7 @@ func TestEndpointCase104(t *testing.T) { } // FIPS + Dualstack + global endpoint + non-dns bucket -func TestEndpointCase105(t *testing.T) { +func TestEndpointCase106(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("bucket!"), @@ -5067,7 +5128,7 @@ func TestEndpointCase105(t *testing.T) { } // endpoint override + FIPS + dualstack -func TestEndpointCase106(t *testing.T) { +func TestEndpointCase107(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(true), @@ -5089,7 +5150,7 @@ func TestEndpointCase106(t *testing.T) { } // non-bucket endpoint override + dualstack + global endpoint -func TestEndpointCase107(t *testing.T) { +func TestEndpointCase108(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -5111,7 +5172,7 @@ func TestEndpointCase107(t *testing.T) { } // Endpoint override + UseGlobalEndpoint + us-east-1 -func TestEndpointCase108(t *testing.T) { +func TestEndpointCase109(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -5133,7 +5194,7 @@ func TestEndpointCase108(t *testing.T) { } // non-FIPS partition with FIPS set + custom endpoint -func TestEndpointCase109(t *testing.T) { +func TestEndpointCase110(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -5154,7 +5215,7 @@ func TestEndpointCase109(t *testing.T) { } // aws-global signs as us-east-1 -func TestEndpointCase110(t *testing.T) { +func TestEndpointCase111(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5211,7 +5272,7 @@ func TestEndpointCase110(t *testing.T) { } // aws-global signs as us-east-1 -func TestEndpointCase111(t *testing.T) { +func TestEndpointCase112(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket"), @@ -5269,7 +5330,7 @@ func TestEndpointCase111(t *testing.T) { } // aws-global + dualstack + path-only bucket -func TestEndpointCase112(t *testing.T) { +func TestEndpointCase113(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5326,7 +5387,7 @@ func TestEndpointCase112(t *testing.T) { } // aws-global + path-only bucket -func TestEndpointCase113(t *testing.T) { +func TestEndpointCase114(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5380,7 +5441,7 @@ func TestEndpointCase113(t *testing.T) { } // aws-global + fips + custom endpoint -func TestEndpointCase114(t *testing.T) { +func TestEndpointCase115(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5403,7 +5464,7 @@ func TestEndpointCase114(t *testing.T) { } // aws-global, endpoint override & path only-bucket -func TestEndpointCase115(t *testing.T) { +func TestEndpointCase116(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5461,7 +5522,7 @@ func TestEndpointCase115(t *testing.T) { } // aws-global + dualstack + custom endpoint -func TestEndpointCase116(t *testing.T) { +func TestEndpointCase117(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseDualStack: ptr.Bool(true), @@ -5483,7 +5544,7 @@ func TestEndpointCase116(t *testing.T) { } // accelerate, dualstack + aws-global -func TestEndpointCase117(t *testing.T) { +func TestEndpointCase118(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket"), @@ -5541,7 +5602,7 @@ func TestEndpointCase117(t *testing.T) { // FIPS + aws-global + path only bucket. This is not supported by S3 but we allow // garbage in garbage out -func TestEndpointCase118(t *testing.T) { +func TestEndpointCase119(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5599,7 +5660,7 @@ func TestEndpointCase118(t *testing.T) { } // aws-global + FIPS + endpoint override. -func TestEndpointCase119(t *testing.T) { +func TestEndpointCase120(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(true), @@ -5619,7 +5680,7 @@ func TestEndpointCase119(t *testing.T) { } // force path style, FIPS, aws-global & endpoint override -func TestEndpointCase120(t *testing.T) { +func TestEndpointCase121(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5641,7 +5702,7 @@ func TestEndpointCase120(t *testing.T) { } // ip address causes path style to be forced -func TestEndpointCase121(t *testing.T) { +func TestEndpointCase122(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket"), @@ -5696,7 +5757,7 @@ func TestEndpointCase121(t *testing.T) { } // endpoint override with aws-global region -func TestEndpointCase122(t *testing.T) { +func TestEndpointCase123(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(true), @@ -5717,7 +5778,7 @@ func TestEndpointCase122(t *testing.T) { } // FIPS + path-only (TODO: consider making this an error) -func TestEndpointCase123(t *testing.T) { +func TestEndpointCase124(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), Bucket: ptr.String("bucket!"), @@ -5772,7 +5833,7 @@ func TestEndpointCase123(t *testing.T) { } // empty arn type -func TestEndpointCase124(t *testing.T) { +func TestEndpointCase125(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:not-s3:us-west-2:123456789012::myendpoint"), @@ -5791,7 +5852,7 @@ func TestEndpointCase124(t *testing.T) { } // path style can't be used with accelerate -func TestEndpointCase125(t *testing.T) { +func TestEndpointCase126(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket!"), @@ -5811,7 +5872,7 @@ func TestEndpointCase125(t *testing.T) { } // invalid region -func TestEndpointCase126(t *testing.T) { +func TestEndpointCase127(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2!"), Bucket: ptr.String("bucket.subdomain"), @@ -5831,7 +5892,7 @@ func TestEndpointCase126(t *testing.T) { } // invalid region -func TestEndpointCase127(t *testing.T) { +func TestEndpointCase128(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2!"), Bucket: ptr.String("bucket"), @@ -5851,7 +5912,7 @@ func TestEndpointCase127(t *testing.T) { } // empty arn type -func TestEndpointCase128(t *testing.T) { +func TestEndpointCase129(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3::123456789012:accesspoint:my_endpoint"), @@ -5870,7 +5931,7 @@ func TestEndpointCase128(t *testing.T) { } // empty arn type -func TestEndpointCase129(t *testing.T) { +func TestEndpointCase130(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint"), @@ -5890,7 +5951,7 @@ func TestEndpointCase129(t *testing.T) { } // invalid arn region -func TestEndpointCase130(t *testing.T) { +func TestEndpointCase131(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-object-lambda:us-east_2:123456789012:accesspoint:my-endpoint"), @@ -5910,7 +5971,7 @@ func TestEndpointCase130(t *testing.T) { } // invalid ARN outpost -func TestEndpointCase131(t *testing.T) { +func TestEndpointCase132(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost/op_01234567890123456/accesspoint/reports"), @@ -5930,7 +5991,7 @@ func TestEndpointCase131(t *testing.T) { } // invalid ARN -func TestEndpointCase132(t *testing.T) { +func TestEndpointCase133(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/reports"), @@ -5949,7 +6010,7 @@ func TestEndpointCase132(t *testing.T) { } // invalid ARN -func TestEndpointCase133(t *testing.T) { +func TestEndpointCase134(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456"), @@ -5968,7 +6029,7 @@ func TestEndpointCase133(t *testing.T) { } // invalid outpost type -func TestEndpointCase134(t *testing.T) { +func TestEndpointCase135(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports"), @@ -5987,7 +6048,7 @@ func TestEndpointCase134(t *testing.T) { } // invalid outpost type -func TestEndpointCase135(t *testing.T) { +func TestEndpointCase136(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east_1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports"), @@ -6006,7 +6067,7 @@ func TestEndpointCase135(t *testing.T) { } // invalid outpost type -func TestEndpointCase136(t *testing.T) { +func TestEndpointCase137(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:12345_789012:outpost/op-01234567890123456/not-accesspoint/reports"), @@ -6025,7 +6086,7 @@ func TestEndpointCase136(t *testing.T) { } // invalid outpost type -func TestEndpointCase137(t *testing.T) { +func TestEndpointCase138(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:12345789012:outpost"), @@ -6044,7 +6105,7 @@ func TestEndpointCase137(t *testing.T) { } // use global endpoint virtual addressing -func TestEndpointCase138(t *testing.T) { +func TestEndpointCase139(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket"), @@ -6100,7 +6161,7 @@ func TestEndpointCase138(t *testing.T) { } // global endpoint + ip address -func TestEndpointCase139(t *testing.T) { +func TestEndpointCase140(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket"), @@ -6156,7 +6217,7 @@ func TestEndpointCase139(t *testing.T) { } // invalid outpost type -func TestEndpointCase140(t *testing.T) { +func TestEndpointCase141(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket!"), @@ -6211,7 +6272,7 @@ func TestEndpointCase140(t *testing.T) { } // invalid outpost type -func TestEndpointCase141(t *testing.T) { +func TestEndpointCase142(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket"), @@ -6267,7 +6328,7 @@ func TestEndpointCase141(t *testing.T) { } // use global endpoint + custom endpoint -func TestEndpointCase142(t *testing.T) { +func TestEndpointCase143(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket!"), @@ -6323,7 +6384,7 @@ func TestEndpointCase142(t *testing.T) { } // use global endpoint, not us-east-1, force path style -func TestEndpointCase143(t *testing.T) { +func TestEndpointCase144(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), Bucket: ptr.String("bucket!"), @@ -6380,7 +6441,7 @@ func TestEndpointCase143(t *testing.T) { } // vanilla virtual addressing@us-west-2 -func TestEndpointCase144(t *testing.T) { +func TestEndpointCase145(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6438,7 +6499,7 @@ func TestEndpointCase144(t *testing.T) { } // virtual addressing + dualstack@us-west-2 -func TestEndpointCase145(t *testing.T) { +func TestEndpointCase146(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6496,7 +6557,7 @@ func TestEndpointCase145(t *testing.T) { } // accelerate + dualstack@us-west-2 -func TestEndpointCase146(t *testing.T) { +func TestEndpointCase147(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -6554,7 +6615,7 @@ func TestEndpointCase146(t *testing.T) { } // accelerate (dualstack=false)@us-west-2 -func TestEndpointCase147(t *testing.T) { +func TestEndpointCase148(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -6612,7 +6673,7 @@ func TestEndpointCase147(t *testing.T) { } // virtual addressing + fips@us-west-2 -func TestEndpointCase148(t *testing.T) { +func TestEndpointCase149(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6670,7 +6731,7 @@ func TestEndpointCase148(t *testing.T) { } // virtual addressing + dualstack + fips@us-west-2 -func TestEndpointCase149(t *testing.T) { +func TestEndpointCase150(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6728,7 +6789,7 @@ func TestEndpointCase149(t *testing.T) { } // accelerate + fips = error@us-west-2 -func TestEndpointCase150(t *testing.T) { +func TestEndpointCase151(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -6751,7 +6812,7 @@ func TestEndpointCase150(t *testing.T) { } // vanilla virtual addressing@cn-north-1 -func TestEndpointCase151(t *testing.T) { +func TestEndpointCase152(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6809,7 +6870,7 @@ func TestEndpointCase151(t *testing.T) { } // virtual addressing + dualstack@cn-north-1 -func TestEndpointCase152(t *testing.T) { +func TestEndpointCase153(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6867,7 +6928,7 @@ func TestEndpointCase152(t *testing.T) { } // accelerate (dualstack=false)@cn-north-1 -func TestEndpointCase153(t *testing.T) { +func TestEndpointCase154(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -6890,7 +6951,7 @@ func TestEndpointCase153(t *testing.T) { } // virtual addressing + fips@cn-north-1 -func TestEndpointCase154(t *testing.T) { +func TestEndpointCase155(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6913,7 +6974,7 @@ func TestEndpointCase154(t *testing.T) { } // vanilla virtual addressing@af-south-1 -func TestEndpointCase155(t *testing.T) { +func TestEndpointCase156(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -6971,7 +7032,7 @@ func TestEndpointCase155(t *testing.T) { } // virtual addressing + dualstack@af-south-1 -func TestEndpointCase156(t *testing.T) { +func TestEndpointCase157(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7029,7 +7090,7 @@ func TestEndpointCase156(t *testing.T) { } // accelerate + dualstack@af-south-1 -func TestEndpointCase157(t *testing.T) { +func TestEndpointCase158(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -7087,7 +7148,7 @@ func TestEndpointCase157(t *testing.T) { } // accelerate (dualstack=false)@af-south-1 -func TestEndpointCase158(t *testing.T) { +func TestEndpointCase159(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -7145,7 +7206,7 @@ func TestEndpointCase158(t *testing.T) { } // virtual addressing + fips@af-south-1 -func TestEndpointCase159(t *testing.T) { +func TestEndpointCase160(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7203,7 +7264,7 @@ func TestEndpointCase159(t *testing.T) { } // virtual addressing + dualstack + fips@af-south-1 -func TestEndpointCase160(t *testing.T) { +func TestEndpointCase161(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7261,7 +7322,7 @@ func TestEndpointCase160(t *testing.T) { } // accelerate + fips = error@af-south-1 -func TestEndpointCase161(t *testing.T) { +func TestEndpointCase162(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -7284,7 +7345,7 @@ func TestEndpointCase161(t *testing.T) { } // vanilla path style@us-west-2 -func TestEndpointCase162(t *testing.T) { +func TestEndpointCase163(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7342,7 +7403,7 @@ func TestEndpointCase162(t *testing.T) { } // fips@us-gov-west-2, bucket is not S3-dns-compatible (subdomains) -func TestEndpointCase163(t *testing.T) { +func TestEndpointCase164(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket.with.dots"), @@ -7399,7 +7460,7 @@ func TestEndpointCase163(t *testing.T) { } // path style + accelerate = error@us-west-2 -func TestEndpointCase164(t *testing.T) { +func TestEndpointCase165(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -7422,7 +7483,7 @@ func TestEndpointCase164(t *testing.T) { } // path style + dualstack@us-west-2 -func TestEndpointCase165(t *testing.T) { +func TestEndpointCase166(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7480,7 +7541,7 @@ func TestEndpointCase165(t *testing.T) { } // path style + arn is error@us-west-2 -func TestEndpointCase166(t *testing.T) { +func TestEndpointCase167(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket"), @@ -7503,7 +7564,7 @@ func TestEndpointCase166(t *testing.T) { } // path style + invalid DNS name@us-west-2 -func TestEndpointCase167(t *testing.T) { +func TestEndpointCase168(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -7561,7 +7622,7 @@ func TestEndpointCase167(t *testing.T) { } // no path style + invalid DNS name@us-west-2 -func TestEndpointCase168(t *testing.T) { +func TestEndpointCase169(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -7618,7 +7679,7 @@ func TestEndpointCase168(t *testing.T) { } // vanilla path style@cn-north-1 -func TestEndpointCase169(t *testing.T) { +func TestEndpointCase170(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7676,7 +7737,7 @@ func TestEndpointCase169(t *testing.T) { } // path style + fips@cn-north-1 -func TestEndpointCase170(t *testing.T) { +func TestEndpointCase171(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7699,7 +7760,7 @@ func TestEndpointCase170(t *testing.T) { } // path style + accelerate = error@cn-north-1 -func TestEndpointCase171(t *testing.T) { +func TestEndpointCase172(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -7722,7 +7783,7 @@ func TestEndpointCase171(t *testing.T) { } // path style + dualstack@cn-north-1 -func TestEndpointCase172(t *testing.T) { +func TestEndpointCase173(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7780,7 +7841,7 @@ func TestEndpointCase172(t *testing.T) { } // path style + arn is error@cn-north-1 -func TestEndpointCase173(t *testing.T) { +func TestEndpointCase174(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket"), @@ -7803,7 +7864,7 @@ func TestEndpointCase173(t *testing.T) { } // path style + invalid DNS name@cn-north-1 -func TestEndpointCase174(t *testing.T) { +func TestEndpointCase175(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -7861,7 +7922,7 @@ func TestEndpointCase174(t *testing.T) { } // no path style + invalid DNS name@cn-north-1 -func TestEndpointCase175(t *testing.T) { +func TestEndpointCase176(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -7918,7 +7979,7 @@ func TestEndpointCase175(t *testing.T) { } // vanilla path style@af-south-1 -func TestEndpointCase176(t *testing.T) { +func TestEndpointCase177(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -7976,7 +8037,7 @@ func TestEndpointCase176(t *testing.T) { } // path style + fips@af-south-1 -func TestEndpointCase177(t *testing.T) { +func TestEndpointCase178(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8034,7 +8095,7 @@ func TestEndpointCase177(t *testing.T) { } // path style + accelerate = error@af-south-1 -func TestEndpointCase178(t *testing.T) { +func TestEndpointCase179(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -8057,7 +8118,7 @@ func TestEndpointCase178(t *testing.T) { } // path style + dualstack@af-south-1 -func TestEndpointCase179(t *testing.T) { +func TestEndpointCase180(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8115,7 +8176,7 @@ func TestEndpointCase179(t *testing.T) { } // path style + arn is error@af-south-1 -func TestEndpointCase180(t *testing.T) { +func TestEndpointCase181(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket"), @@ -8138,7 +8199,7 @@ func TestEndpointCase180(t *testing.T) { } // path style + invalid DNS name@af-south-1 -func TestEndpointCase181(t *testing.T) { +func TestEndpointCase182(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -8196,7 +8257,7 @@ func TestEndpointCase181(t *testing.T) { } // no path style + invalid DNS name@af-south-1 -func TestEndpointCase182(t *testing.T) { +func TestEndpointCase183(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("99a_b"), @@ -8253,7 +8314,7 @@ func TestEndpointCase182(t *testing.T) { } // virtual addressing + private link@us-west-2 -func TestEndpointCase183(t *testing.T) { +func TestEndpointCase184(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8312,7 +8373,7 @@ func TestEndpointCase183(t *testing.T) { } // path style + private link@us-west-2 -func TestEndpointCase184(t *testing.T) { +func TestEndpointCase185(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8371,7 +8432,7 @@ func TestEndpointCase184(t *testing.T) { } // SDK::Host + FIPS@us-west-2 -func TestEndpointCase185(t *testing.T) { +func TestEndpointCase186(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8395,7 +8456,7 @@ func TestEndpointCase185(t *testing.T) { } // SDK::Host + DualStack@us-west-2 -func TestEndpointCase186(t *testing.T) { +func TestEndpointCase187(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8419,7 +8480,7 @@ func TestEndpointCase186(t *testing.T) { } // SDK::HOST + accelerate@us-west-2 -func TestEndpointCase187(t *testing.T) { +func TestEndpointCase188(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -8443,7 +8504,7 @@ func TestEndpointCase187(t *testing.T) { } // SDK::Host + access point ARN@us-west-2 -func TestEndpointCase188(t *testing.T) { +func TestEndpointCase189(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -8502,7 +8563,7 @@ func TestEndpointCase188(t *testing.T) { } // virtual addressing + private link@cn-north-1 -func TestEndpointCase189(t *testing.T) { +func TestEndpointCase190(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8561,7 +8622,7 @@ func TestEndpointCase189(t *testing.T) { } // path style + private link@cn-north-1 -func TestEndpointCase190(t *testing.T) { +func TestEndpointCase191(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8620,7 +8681,7 @@ func TestEndpointCase190(t *testing.T) { } // FIPS@cn-north-1 -func TestEndpointCase191(t *testing.T) { +func TestEndpointCase192(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8643,7 +8704,7 @@ func TestEndpointCase191(t *testing.T) { } // SDK::Host + DualStack@cn-north-1 -func TestEndpointCase192(t *testing.T) { +func TestEndpointCase193(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8667,7 +8728,7 @@ func TestEndpointCase192(t *testing.T) { } // SDK::HOST + accelerate@cn-north-1 -func TestEndpointCase193(t *testing.T) { +func TestEndpointCase194(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -8691,7 +8752,7 @@ func TestEndpointCase193(t *testing.T) { } // SDK::Host + access point ARN@cn-north-1 -func TestEndpointCase194(t *testing.T) { +func TestEndpointCase195(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint"), @@ -8750,7 +8811,7 @@ func TestEndpointCase194(t *testing.T) { } // virtual addressing + private link@af-south-1 -func TestEndpointCase195(t *testing.T) { +func TestEndpointCase196(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8809,7 +8870,7 @@ func TestEndpointCase195(t *testing.T) { } // path style + private link@af-south-1 -func TestEndpointCase196(t *testing.T) { +func TestEndpointCase197(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8868,7 +8929,7 @@ func TestEndpointCase196(t *testing.T) { } // SDK::Host + FIPS@af-south-1 -func TestEndpointCase197(t *testing.T) { +func TestEndpointCase198(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8892,7 +8953,7 @@ func TestEndpointCase197(t *testing.T) { } // SDK::Host + DualStack@af-south-1 -func TestEndpointCase198(t *testing.T) { +func TestEndpointCase199(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("bucket-name"), @@ -8916,7 +8977,7 @@ func TestEndpointCase198(t *testing.T) { } // SDK::HOST + accelerate@af-south-1 -func TestEndpointCase199(t *testing.T) { +func TestEndpointCase200(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("bucket-name"), @@ -8940,7 +9001,7 @@ func TestEndpointCase199(t *testing.T) { } // SDK::Host + access point ARN@af-south-1 -func TestEndpointCase200(t *testing.T) { +func TestEndpointCase201(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint"), @@ -8999,7 +9060,7 @@ func TestEndpointCase200(t *testing.T) { } // vanilla access point arn@us-west-2 -func TestEndpointCase201(t *testing.T) { +func TestEndpointCase202(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -9057,7 +9118,7 @@ func TestEndpointCase201(t *testing.T) { } // access point arn + FIPS@us-west-2 -func TestEndpointCase202(t *testing.T) { +func TestEndpointCase203(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -9115,7 +9176,7 @@ func TestEndpointCase202(t *testing.T) { } // access point arn + accelerate = error@us-west-2 -func TestEndpointCase203(t *testing.T) { +func TestEndpointCase204(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -9138,7 +9199,7 @@ func TestEndpointCase203(t *testing.T) { } // access point arn + FIPS + DualStack@us-west-2 -func TestEndpointCase204(t *testing.T) { +func TestEndpointCase205(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint"), @@ -9196,7 +9257,7 @@ func TestEndpointCase204(t *testing.T) { } // vanilla access point arn@cn-north-1 -func TestEndpointCase205(t *testing.T) { +func TestEndpointCase206(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint"), @@ -9254,7 +9315,7 @@ func TestEndpointCase205(t *testing.T) { } // access point arn + FIPS@cn-north-1 -func TestEndpointCase206(t *testing.T) { +func TestEndpointCase207(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint"), @@ -9277,7 +9338,7 @@ func TestEndpointCase206(t *testing.T) { } // access point arn + accelerate = error@cn-north-1 -func TestEndpointCase207(t *testing.T) { +func TestEndpointCase208(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint"), @@ -9300,7 +9361,7 @@ func TestEndpointCase207(t *testing.T) { } // access point arn + FIPS + DualStack@cn-north-1 -func TestEndpointCase208(t *testing.T) { +func TestEndpointCase209(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint"), @@ -9323,7 +9384,7 @@ func TestEndpointCase208(t *testing.T) { } // vanilla access point arn@af-south-1 -func TestEndpointCase209(t *testing.T) { +func TestEndpointCase210(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint"), @@ -9381,7 +9442,7 @@ func TestEndpointCase209(t *testing.T) { } // access point arn + FIPS@af-south-1 -func TestEndpointCase210(t *testing.T) { +func TestEndpointCase211(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint"), @@ -9439,7 +9500,7 @@ func TestEndpointCase210(t *testing.T) { } // access point arn + accelerate = error@af-south-1 -func TestEndpointCase211(t *testing.T) { +func TestEndpointCase212(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), Bucket: ptr.String("arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint"), @@ -9462,7 +9523,7 @@ func TestEndpointCase211(t *testing.T) { } // access point arn + FIPS + DualStack@af-south-1 -func TestEndpointCase212(t *testing.T) { +func TestEndpointCase213(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint"), @@ -9520,7 +9581,7 @@ func TestEndpointCase212(t *testing.T) { } // S3 outposts vanilla test -func TestEndpointCase213(t *testing.T) { +func TestEndpointCase214(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -9590,7 +9651,7 @@ func TestEndpointCase213(t *testing.T) { } // S3 outposts custom endpoint -func TestEndpointCase214(t *testing.T) { +func TestEndpointCase215(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -9661,7 +9722,7 @@ func TestEndpointCase214(t *testing.T) { } // outposts arn with region mismatch and UseArnRegion=false -func TestEndpointCase215(t *testing.T) { +func TestEndpointCase216(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint"), @@ -9685,7 +9746,7 @@ func TestEndpointCase215(t *testing.T) { } // outposts arn with region mismatch, custom region and UseArnRegion=false -func TestEndpointCase216(t *testing.T) { +func TestEndpointCase217(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint"), @@ -9710,7 +9771,7 @@ func TestEndpointCase216(t *testing.T) { } // outposts arn with region mismatch and UseArnRegion=true -func TestEndpointCase217(t *testing.T) { +func TestEndpointCase218(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint"), @@ -9782,7 +9843,7 @@ func TestEndpointCase217(t *testing.T) { } // outposts arn with region mismatch and UseArnRegion unset -func TestEndpointCase218(t *testing.T) { +func TestEndpointCase219(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint"), @@ -9853,7 +9914,7 @@ func TestEndpointCase218(t *testing.T) { } // outposts arn with partition mismatch and UseArnRegion=true -func TestEndpointCase219(t *testing.T) { +func TestEndpointCase220(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint"), @@ -9877,7 +9938,7 @@ func TestEndpointCase219(t *testing.T) { } // ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint -func TestEndpointCase220(t *testing.T) { +func TestEndpointCase221(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseGlobalEndpoint: ptr.Bool(true), @@ -9948,7 +10009,7 @@ func TestEndpointCase220(t *testing.T) { } // S3 outposts does not support dualstack -func TestEndpointCase221(t *testing.T) { +func TestEndpointCase222(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -9970,7 +10031,7 @@ func TestEndpointCase221(t *testing.T) { } // S3 outposts does not support fips -func TestEndpointCase222(t *testing.T) { +func TestEndpointCase223(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -9992,7 +10053,7 @@ func TestEndpointCase222(t *testing.T) { } // S3 outposts does not support accelerate -func TestEndpointCase223(t *testing.T) { +func TestEndpointCase224(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -10014,7 +10075,7 @@ func TestEndpointCase223(t *testing.T) { } // validates against subresource -func TestEndpointCase224(t *testing.T) { +func TestEndpointCase225(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10036,7 +10097,7 @@ func TestEndpointCase224(t *testing.T) { } // object lambda @us-east-1 -func TestEndpointCase225(t *testing.T) { +func TestEndpointCase226(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -10094,7 +10155,7 @@ func TestEndpointCase225(t *testing.T) { } // object lambda @us-west-2 -func TestEndpointCase226(t *testing.T) { +func TestEndpointCase227(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10152,7 +10213,7 @@ func TestEndpointCase226(t *testing.T) { } // object lambda, colon resource deliminator @us-west-2 -func TestEndpointCase227(t *testing.T) { +func TestEndpointCase228(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10210,7 +10271,7 @@ func TestEndpointCase227(t *testing.T) { } // object lambda @us-east-1, client region us-west-2, useArnRegion=true -func TestEndpointCase228(t *testing.T) { +func TestEndpointCase229(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10268,7 +10329,7 @@ func TestEndpointCase228(t *testing.T) { } // object lambda @us-east-1, client region s3-external-1, useArnRegion=true -func TestEndpointCase229(t *testing.T) { +func TestEndpointCase230(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("s3-external-1"), UseFIPS: ptr.Bool(false), @@ -10326,7 +10387,7 @@ func TestEndpointCase229(t *testing.T) { } // object lambda @us-east-1, client region s3-external-1, useArnRegion=false -func TestEndpointCase230(t *testing.T) { +func TestEndpointCase231(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("s3-external-1"), UseFIPS: ptr.Bool(false), @@ -10349,7 +10410,7 @@ func TestEndpointCase230(t *testing.T) { } // object lambda @us-east-1, client region aws-global, useArnRegion=true -func TestEndpointCase231(t *testing.T) { +func TestEndpointCase232(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(false), @@ -10407,7 +10468,7 @@ func TestEndpointCase231(t *testing.T) { } // object lambda @us-east-1, client region aws-global, useArnRegion=false -func TestEndpointCase232(t *testing.T) { +func TestEndpointCase233(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(false), @@ -10431,7 +10492,7 @@ func TestEndpointCase232(t *testing.T) { // object lambda @cn-north-1, client region us-west-2 (cross partition), // useArnRegion=true -func TestEndpointCase233(t *testing.T) { +func TestEndpointCase234(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(false), @@ -10454,7 +10515,7 @@ func TestEndpointCase233(t *testing.T) { } // object lambda with dualstack -func TestEndpointCase234(t *testing.T) { +func TestEndpointCase235(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10477,7 +10538,7 @@ func TestEndpointCase234(t *testing.T) { } // object lambda @us-gov-east-1 -func TestEndpointCase235(t *testing.T) { +func TestEndpointCase236(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -10535,7 +10596,7 @@ func TestEndpointCase235(t *testing.T) { } // object lambda @us-gov-east-1, with fips -func TestEndpointCase236(t *testing.T) { +func TestEndpointCase237(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), @@ -10593,7 +10654,7 @@ func TestEndpointCase236(t *testing.T) { } // object lambda @cn-north-1, with fips -func TestEndpointCase237(t *testing.T) { +func TestEndpointCase238(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -10616,7 +10677,7 @@ func TestEndpointCase237(t *testing.T) { } // object lambda with accelerate -func TestEndpointCase238(t *testing.T) { +func TestEndpointCase239(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10639,7 +10700,7 @@ func TestEndpointCase238(t *testing.T) { } // object lambda with invalid arn - bad service and someresource -func TestEndpointCase239(t *testing.T) { +func TestEndpointCase240(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10662,7 +10723,7 @@ func TestEndpointCase239(t *testing.T) { } // object lambda with invalid arn - invalid resource -func TestEndpointCase240(t *testing.T) { +func TestEndpointCase241(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10685,7 +10746,7 @@ func TestEndpointCase240(t *testing.T) { } // object lambda with invalid arn - missing region -func TestEndpointCase241(t *testing.T) { +func TestEndpointCase242(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10708,7 +10769,7 @@ func TestEndpointCase241(t *testing.T) { } // object lambda with invalid arn - missing account-id -func TestEndpointCase242(t *testing.T) { +func TestEndpointCase243(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10731,7 +10792,7 @@ func TestEndpointCase242(t *testing.T) { } // object lambda with invalid arn - account id contains invalid characters -func TestEndpointCase243(t *testing.T) { +func TestEndpointCase244(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10754,7 +10815,7 @@ func TestEndpointCase243(t *testing.T) { } // object lambda with invalid arn - missing access point name -func TestEndpointCase244(t *testing.T) { +func TestEndpointCase245(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10777,7 +10838,7 @@ func TestEndpointCase244(t *testing.T) { } // object lambda with invalid arn - access point name contains invalid character: * -func TestEndpointCase245(t *testing.T) { +func TestEndpointCase246(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10800,7 +10861,7 @@ func TestEndpointCase245(t *testing.T) { } // object lambda with invalid arn - access point name contains invalid character: . -func TestEndpointCase246(t *testing.T) { +func TestEndpointCase247(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10823,7 +10884,7 @@ func TestEndpointCase246(t *testing.T) { } // object lambda with invalid arn - access point name contains sub resources -func TestEndpointCase247(t *testing.T) { +func TestEndpointCase248(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10846,7 +10907,7 @@ func TestEndpointCase247(t *testing.T) { } // object lambda with custom endpoint -func TestEndpointCase248(t *testing.T) { +func TestEndpointCase249(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -10905,7 +10966,7 @@ func TestEndpointCase248(t *testing.T) { } // object lambda arn with region mismatch and UseArnRegion=false -func TestEndpointCase249(t *testing.T) { +func TestEndpointCase250(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Bucket: ptr.String("arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner"), @@ -10929,7 +10990,7 @@ func TestEndpointCase249(t *testing.T) { } // WriteGetObjectResponse @ us-west-2 -func TestEndpointCase250(t *testing.T) { +func TestEndpointCase251(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -10986,7 +11047,7 @@ func TestEndpointCase250(t *testing.T) { } // WriteGetObjectResponse with custom endpoint -func TestEndpointCase251(t *testing.T) { +func TestEndpointCase252(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11044,7 +11105,7 @@ func TestEndpointCase251(t *testing.T) { } // WriteGetObjectResponse @ us-east-1 -func TestEndpointCase252(t *testing.T) { +func TestEndpointCase253(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11101,7 +11162,7 @@ func TestEndpointCase252(t *testing.T) { } // WriteGetObjectResponse with fips -func TestEndpointCase253(t *testing.T) { +func TestEndpointCase254(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11158,7 +11219,7 @@ func TestEndpointCase253(t *testing.T) { } // WriteGetObjectResponse with dualstack -func TestEndpointCase254(t *testing.T) { +func TestEndpointCase255(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11180,7 +11241,7 @@ func TestEndpointCase254(t *testing.T) { } // WriteGetObjectResponse with accelerate -func TestEndpointCase255(t *testing.T) { +func TestEndpointCase256(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(true), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11202,7 +11263,7 @@ func TestEndpointCase255(t *testing.T) { } // WriteGetObjectResponse with fips in CN -func TestEndpointCase256(t *testing.T) { +func TestEndpointCase257(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), Region: ptr.String("cn-north-1"), @@ -11224,7 +11285,7 @@ func TestEndpointCase256(t *testing.T) { } // WriteGetObjectResponse with invalid partition -func TestEndpointCase257(t *testing.T) { +func TestEndpointCase258(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11246,7 +11307,7 @@ func TestEndpointCase257(t *testing.T) { } // WriteGetObjectResponse with an unknown partition -func TestEndpointCase258(t *testing.T) { +func TestEndpointCase259(t *testing.T) { var params = EndpointParameters{ Accelerate: ptr.Bool(false), UseObjectLambdaEndpoint: ptr.Bool(true), @@ -11303,7 +11364,7 @@ func TestEndpointCase258(t *testing.T) { } // S3 Outposts bucketAlias Real Outpost Prod us-west-1 -func TestEndpointCase259(t *testing.T) { +func TestEndpointCase260(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), Bucket: ptr.String("test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11373,7 +11434,7 @@ func TestEndpointCase259(t *testing.T) { } // S3 Outposts bucketAlias Real Outpost Prod ap-east-1 -func TestEndpointCase260(t *testing.T) { +func TestEndpointCase261(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), Bucket: ptr.String("test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11443,7 +11504,7 @@ func TestEndpointCase260(t *testing.T) { } // S3 Outposts bucketAlias Ec2 Outpost Prod us-east-1 -func TestEndpointCase261(t *testing.T) { +func TestEndpointCase262(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11513,7 +11574,7 @@ func TestEndpointCase261(t *testing.T) { } // S3 Outposts bucketAlias Ec2 Outpost Prod me-south-1 -func TestEndpointCase262(t *testing.T) { +func TestEndpointCase263(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), Bucket: ptr.String("test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11583,7 +11644,7 @@ func TestEndpointCase262(t *testing.T) { } // S3 Outposts bucketAlias Real Outpost Beta -func TestEndpointCase263(t *testing.T) { +func TestEndpointCase264(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3"), @@ -11654,7 +11715,7 @@ func TestEndpointCase263(t *testing.T) { } // S3 Outposts bucketAlias Ec2 Outpost Beta -func TestEndpointCase264(t *testing.T) { +func TestEndpointCase265(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3"), @@ -11725,7 +11786,7 @@ func TestEndpointCase264(t *testing.T) { } // S3 Outposts bucketAlias - No endpoint set for beta -func TestEndpointCase265(t *testing.T) { +func TestEndpointCase266(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3"), @@ -11747,7 +11808,7 @@ func TestEndpointCase265(t *testing.T) { } // S3 Outposts bucketAlias Invalid hardware type -func TestEndpointCase266(t *testing.T) { +func TestEndpointCase267(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-h0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11769,7 +11830,7 @@ func TestEndpointCase266(t *testing.T) { } // S3 Outposts bucketAlias Special character in Outpost Arn -func TestEndpointCase267(t *testing.T) { +func TestEndpointCase268(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-o00000754%1d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3"), @@ -11791,7 +11852,7 @@ func TestEndpointCase267(t *testing.T) { } // S3 Outposts bucketAlias - No endpoint set for beta -func TestEndpointCase268(t *testing.T) { +func TestEndpointCase269(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("test-accessp-e0b1d075431d83bebde8xz5w8ijx1qzlbp3i3ebeta0--op-s3"), @@ -11813,7 +11874,7 @@ func TestEndpointCase268(t *testing.T) { } // S3 Snow with bucket -func TestEndpointCase269(t *testing.T) { +func TestEndpointCase270(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("snow"), Bucket: ptr.String("bucketName"), @@ -11871,7 +11932,7 @@ func TestEndpointCase269(t *testing.T) { } // S3 Snow without bucket -func TestEndpointCase270(t *testing.T) { +func TestEndpointCase271(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("snow"), Endpoint: ptr.String("https://10.0.1.12:433"), @@ -11928,7 +11989,7 @@ func TestEndpointCase270(t *testing.T) { } // S3 Snow no port -func TestEndpointCase271(t *testing.T) { +func TestEndpointCase272(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("snow"), Bucket: ptr.String("bucketName"), @@ -11986,7 +12047,7 @@ func TestEndpointCase271(t *testing.T) { } // S3 Snow dns endpoint -func TestEndpointCase272(t *testing.T) { +func TestEndpointCase273(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("snow"), Bucket: ptr.String("bucketName"), @@ -12044,7 +12105,7 @@ func TestEndpointCase272(t *testing.T) { } // Data Plane with short AZ -func TestEndpointCase273(t *testing.T) { +func TestEndpointCase274(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -12103,7 +12164,7 @@ func TestEndpointCase273(t *testing.T) { } // Data Plane with short AZ fips -func TestEndpointCase274(t *testing.T) { +func TestEndpointCase275(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -12162,7 +12223,7 @@ func TestEndpointCase274(t *testing.T) { } // Data Plane with long AZ -func TestEndpointCase275(t *testing.T) { +func TestEndpointCase276(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), Bucket: ptr.String("mybucket--apne1-az1--x-s3"), @@ -12221,7 +12282,7 @@ func TestEndpointCase275(t *testing.T) { } // Data Plane with long AZ fips -func TestEndpointCase276(t *testing.T) { +func TestEndpointCase277(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), Bucket: ptr.String("mybucket--apne1-az1--x-s3"), @@ -12280,7 +12341,7 @@ func TestEndpointCase276(t *testing.T) { } // Control plane with short AZ bucket -func TestEndpointCase277(t *testing.T) { +func TestEndpointCase278(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -12340,7 +12401,7 @@ func TestEndpointCase277(t *testing.T) { } // Control plane with short AZ bucket and fips -func TestEndpointCase278(t *testing.T) { +func TestEndpointCase279(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -12400,7 +12461,7 @@ func TestEndpointCase278(t *testing.T) { } // Control plane without bucket -func TestEndpointCase279(t *testing.T) { +func TestEndpointCase280(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -12459,7 +12520,7 @@ func TestEndpointCase279(t *testing.T) { } // Control plane without bucket and fips -func TestEndpointCase280(t *testing.T) { +func TestEndpointCase281(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -12518,7 +12579,7 @@ func TestEndpointCase280(t *testing.T) { } // Data Plane sigv4 auth with short AZ -func TestEndpointCase281(t *testing.T) { +func TestEndpointCase282(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -12577,7 +12638,7 @@ func TestEndpointCase281(t *testing.T) { } // Data Plane sigv4 auth with short AZ fips -func TestEndpointCase282(t *testing.T) { +func TestEndpointCase283(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -12636,7 +12697,7 @@ func TestEndpointCase282(t *testing.T) { } // Data Plane sigv4 auth with long AZ -func TestEndpointCase283(t *testing.T) { +func TestEndpointCase284(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), Bucket: ptr.String("mybucket--apne1-az1--x-s3"), @@ -12696,7 +12757,7 @@ func TestEndpointCase283(t *testing.T) { } // Data Plane sigv4 auth with long AZ fips -func TestEndpointCase284(t *testing.T) { +func TestEndpointCase285(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), Bucket: ptr.String("mybucket--apne1-az1--x-s3"), @@ -12756,7 +12817,7 @@ func TestEndpointCase284(t *testing.T) { } // Control Plane host override -func TestEndpointCase285(t *testing.T) { +func TestEndpointCase286(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -12817,7 +12878,7 @@ func TestEndpointCase285(t *testing.T) { } // Control Plane host override no bucket -func TestEndpointCase286(t *testing.T) { +func TestEndpointCase287(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), @@ -12877,7 +12938,7 @@ func TestEndpointCase286(t *testing.T) { } // Data plane host override non virtual session auth -func TestEndpointCase287(t *testing.T) { +func TestEndpointCase288(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -12936,7 +12997,7 @@ func TestEndpointCase287(t *testing.T) { } // Control Plane host override ip -func TestEndpointCase288(t *testing.T) { +func TestEndpointCase289(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -12997,7 +13058,7 @@ func TestEndpointCase288(t *testing.T) { } // Data plane host override -func TestEndpointCase289(t *testing.T) { +func TestEndpointCase290(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("mybucket--usw2-az1--x-s3"), @@ -13056,7 +13117,7 @@ func TestEndpointCase289(t *testing.T) { } // bad format error -func TestEndpointCase290(t *testing.T) { +func TestEndpointCase291(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--usaz1--x-s3"), @@ -13079,7 +13140,7 @@ func TestEndpointCase290(t *testing.T) { } // bad format error no session auth -func TestEndpointCase291(t *testing.T) { +func TestEndpointCase292(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--usaz1--x-s3"), @@ -13103,7 +13164,7 @@ func TestEndpointCase291(t *testing.T) { } // dual-stack error -func TestEndpointCase292(t *testing.T) { +func TestEndpointCase293(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -13126,7 +13187,7 @@ func TestEndpointCase292(t *testing.T) { } // accelerate error -func TestEndpointCase293(t *testing.T) { +func TestEndpointCase294(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("mybucket--use1-az1--x-s3"), @@ -13149,7 +13210,7 @@ func TestEndpointCase293(t *testing.T) { } // Data plane bucket format error -func TestEndpointCase294(t *testing.T) { +func TestEndpointCase295(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), Bucket: ptr.String("my.bucket--use1-az1--x-s3"), @@ -13172,7 +13233,7 @@ func TestEndpointCase294(t *testing.T) { } // host override data plane bucket error session auth -func TestEndpointCase295(t *testing.T) { +func TestEndpointCase296(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("my.bucket--usw2-az1--x-s3"), @@ -13195,7 +13256,7 @@ func TestEndpointCase295(t *testing.T) { } // host override data plane bucket error -func TestEndpointCase296(t *testing.T) { +func TestEndpointCase297(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), Bucket: ptr.String("my.bucket--usw2-az1--x-s3"), diff --git a/service/s3/go_module_metadata.go b/service/s3/go_module_metadata.go index e7a959d40eb..a3c32d72452 100644 --- a/service/s3/go_module_metadata.go +++ b/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.54.4" +const goModuleVersion = "1.55.0" diff --git a/service/s3/manual_protocol_test.go b/service/s3/manual_protocol_test.go new file mode 100644 index 00000000000..4aca2d932ba --- /dev/null +++ b/service/s3/manual_protocol_test.go @@ -0,0 +1,405 @@ +package s3 + +import ( + "context" + "errors" + "io" + "net/http" + "strings" + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/s3/types" +) + +// This file replicates the tests in https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/restXml/services/s3.smithy, +// which we cannot generate through normal protocoltest codegen due to +// requirement on handwritten source in S3. + +type capturedRequest struct { + r *http.Request +} + +func (cr *capturedRequest) Do(r *http.Request) (*http.Response, error) { + cr.r = r + return &http.Response{ // returns are moot, for request tests only + StatusCode: 400, + Body: http.NoBody, + }, nil +} + +func TestS3Protocol_ListObjectsV2_Request(t *testing.T) { + for name, tt := range map[string]struct { + Options func(*Options) + OperationOptions func(*Options) + Input *ListObjectsV2Input + + ExpectMethod string + ExpectHost string + ExpectPath string + ExpectQuery []string + }{ + "S3DefaultAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + "S3VirtualHostAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + "S3PathAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = true + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "s3.us-west-2.amazonaws.com", + ExpectPath: "/mybucket", + ExpectQuery: []string{"list-type=2"}, + }, + "S3VirtualHostDualstackAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + o.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateEnabled + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.dualstack.us-west-2.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + "S3VirtualHostAccelerateAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + o.UseAccelerate = true + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3-accelerate.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + "S3VirtualHostDualstackAccelerateAddressing": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + o.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateEnabled + o.UseAccelerate = true + }, + OperationOptions: func(o *Options) {}, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3-accelerate.dualstack.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + "S3OperationAddressingPreferred": { + Options: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = true + }, + OperationOptions: func(o *Options) { + o.UsePathStyle = false + }, + Input: &ListObjectsV2Input{ + Bucket: aws.String("mybucket"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/", + ExpectQuery: []string{"list-type=2"}, + }, + } { + t.Run(name, func(t *testing.T) { + var r capturedRequest + svc := New(Options{HTTPClient: &r}, tt.Options) + + svc.ListObjectsV2(context.Background(), tt.Input, tt.OperationOptions) + if r.r == nil { + t.Fatal("captured request is nil") + } + + req := r.r + if tt.ExpectMethod != req.Method { + t.Errorf("expect method: %v != %v", tt.ExpectMethod, req.Method) + } + if tt.ExpectHost != req.URL.Host { + t.Errorf("expect host: %v != %v", tt.ExpectHost, req.URL.Host) + } + if tt.ExpectPath != req.URL.RawPath { + t.Errorf("expect path: %v != %v", tt.ExpectPath, req.URL.RawPath) + } + for _, q := range tt.ExpectQuery { + if !strings.Contains(req.URL.RawQuery, q) { + t.Errorf("query %v is missing %v", req.URL.RawQuery, q) + } + } + }) + } +} + +func TestS3Protocol_DeleteObjectTagging_Request(t *testing.T) { + for name, tt := range map[string]struct { + ClientOptions func(*Options) + OperationOptions func(*Options) + Input *DeleteObjectTaggingInput + + ExpectMethod string + ExpectHost string + ExpectPath string + ExpectQuery []string + }{ + "S3EscapeObjectKeyInUriLabel": { + ClientOptions: func(o *Options) { + o.Region = "us-west-2" + }, + OperationOptions: func(o *Options) {}, + Input: &DeleteObjectTaggingInput{ + Bucket: aws.String("mybucket"), + Key: aws.String("my key.txt"), + }, + + ExpectMethod: "DELETE", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/my%20key.txt", + ExpectQuery: []string{"tagging"}, + }, + "S3EscapePathObjectKeyInUriLabel": { + ClientOptions: func(o *Options) { + o.Region = "us-west-2" + }, + OperationOptions: func(o *Options) {}, + Input: &DeleteObjectTaggingInput{ + Bucket: aws.String("mybucket"), + Key: aws.String("foo/bar/my key.txt"), + }, + + ExpectMethod: "DELETE", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/foo/bar/my%20key.txt", + ExpectQuery: []string{"tagging"}, + }, + } { + t.Run(name, func(t *testing.T) { + var r capturedRequest + svc := New(Options{HTTPClient: &r}, tt.ClientOptions) + + svc.DeleteObjectTagging(context.Background(), tt.Input, tt.OperationOptions) + if r.r == nil { + t.Fatal("captured request is nil") + } + + req := r.r + if tt.ExpectMethod != req.Method { + t.Errorf("expect method: %v != %v", tt.ExpectMethod, req.Method) + } + if tt.ExpectHost != req.URL.Host { + t.Errorf("expect host: %v != %v", tt.ExpectHost, req.URL.Host) + } + if tt.ExpectPath != req.URL.RawPath { + t.Errorf("expect path: %v != %v", tt.ExpectPath, req.URL.RawPath) + } + for _, q := range tt.ExpectQuery { + if !strings.Contains(req.URL.RawQuery, q) { + t.Errorf("query %v is missing %v", req.URL.RawQuery, q) + } + } + }) + } + +} + +func TestS3Protocol_GetObject_Request(t *testing.T) { + for name, tt := range map[string]struct { + ClientOptions func(*Options) + OperationOptions func(*Options) + Input *GetObjectInput + + ExpectMethod string + ExpectHost string + ExpectPath string + ExpectQuery []string + }{ + "S3PreservesLeadingDotSegmentInUriLabel": { + ClientOptions: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + }, + OperationOptions: func(o *Options) {}, + Input: &GetObjectInput{ + Bucket: aws.String("mybucket"), + Key: aws.String("../key.txt"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/../key.txt", + }, + "S3PreservesEmbeddedDotSegmentInUriLabel": { + ClientOptions: func(o *Options) { + o.Region = "us-west-2" + o.UsePathStyle = false + }, + OperationOptions: func(o *Options) {}, + Input: &GetObjectInput{ + Bucket: aws.String("mybucket"), + Key: aws.String("foo/../key.txt"), + }, + + ExpectMethod: "GET", + ExpectHost: "mybucket.s3.us-west-2.amazonaws.com", + ExpectPath: "/foo/../key.txt", + }, + } { + t.Run(name, func(t *testing.T) { + var r capturedRequest + svc := New(Options{HTTPClient: &r}, tt.ClientOptions) + + svc.GetObject(context.Background(), tt.Input, tt.OperationOptions) + if r.r == nil { + t.Fatal("captured request is nil") + } + + req := r.r + if tt.ExpectMethod != req.Method { + t.Errorf("expect method: %v != %v", tt.ExpectMethod, req.Method) + } + if tt.ExpectHost != req.URL.Host { + t.Errorf("expect host: %v != %v", tt.ExpectHost, req.URL.Host) + } + if tt.ExpectPath != req.URL.RawPath { + t.Errorf("expect path: %v != %v", tt.ExpectPath, req.URL.RawPath) + } + for _, q := range tt.ExpectQuery { + if !strings.Contains(req.URL.RawQuery, q) { + t.Errorf("query %v is missing %v", req.URL.RawQuery, q) + } + } + }) + } + +} + +type mockHTTPResponse struct { + resp *http.Response +} + +func (m *mockHTTPResponse) Do(r *http.Request) (*http.Response, error) { + return m.resp, nil +} + +func TestS3Protocol_GetBucketLocation_Response(t *testing.T) { + for name, tt := range map[string]struct { + Response *http.Response + Expect *GetBucketLocationOutput + }{ + "GetBucketLocationUnwrappedOutput": { + Response: &http.Response{ + StatusCode: 200, + Body: io.NopCloser(strings.NewReader("\nus-west-2")), + }, + Expect: &GetBucketLocationOutput{ + LocationConstraint: types.BucketLocationConstraintUsWest2, + }, + }, + } { + t.Run(name, func(t *testing.T) { + svc := New(Options{ + Region: "us-west-2", + HTTPClient: &mockHTTPResponse{tt.Response}, + }) + + out, err := svc.GetBucketLocation(context.Background(), &GetBucketLocationInput{ + Bucket: aws.String("bucket"), + }) + if err != nil { + t.Fatalf("get bucket location: %v", err) + } + + if tt.Expect.LocationConstraint != out.LocationConstraint { + t.Errorf("LocationConstraint %v != %v", tt.Expect.LocationConstraint, out.LocationConstraint) + } + }) + } +} + +func TestS3Protocol_Error_NoSuchBucket(t *testing.T) { + for name, tt := range map[string]struct { + Response *http.Response + }{ + "GetBucketLocationUnwrappedOutput": { + Response: &http.Response{ + StatusCode: 400, + Body: io.NopCloser(strings.NewReader("\n\n\tSender\n\tNoSuchBucket\n")), + }, + }, + } { + t.Run(name, func(t *testing.T) { + svc := New(Options{ + Region: "us-west-2", + HTTPClient: &mockHTTPResponse{tt.Response}, + }) + + _, err := svc.GetObject(context.Background(), &GetObjectInput{ + Bucket: aws.String("bucket"), + Key: aws.String("key"), + }) + if err == nil { + t.Fatal("call operation: expected error, got none") + } + + // of note: we don't actually return a *types.NoSuchBucket in this + // case, but we DO capture the right error code + var terr interface { + ErrorCode() string + } + if !errors.As(err, &terr) { + t.Errorf("error does not implement ErrorCode(), was %v", err) + } + if actual := terr.ErrorCode(); actual != "NoSuchBucket" { + t.Errorf("error code, expected NoSuchBucket, was %v", actual) + } + }) + } + +} diff --git a/service/sns/CHANGELOG.md b/service/sns/CHANGELOG.md index 48f0a4aa11e..209ea4c483a 100644 --- a/service/sns/CHANGELOG.md +++ b/service/sns/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.29.10 (2024-06-06) + +* **Documentation**: Doc-only update for SNS. These changes include customer-reported issues and TXC3 updates. + # v1.29.9 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/sns/api_op_CreatePlatformApplication.go b/service/sns/api_op_CreatePlatformApplication.go index 23a810fd682..c1af848756b 100644 --- a/service/sns/api_op_CreatePlatformApplication.go +++ b/service/sns/api_op_CreatePlatformApplication.go @@ -18,18 +18,18 @@ import ( // PlatformPrincipal and PlatformCredential are received from the notification // service. // -// - For ADM , PlatformPrincipal is client id and PlatformCredential is client +// - For ADM, PlatformPrincipal is client id and PlatformCredential is client // secret . // -// - For Baidu , PlatformPrincipal is API key and PlatformCredential is secret -// key . -// // - For APNS and APNS_SANDBOX using certificate credentials, PlatformPrincipal // is SSL certificate and PlatformCredential is private key . // // - For APNS and APNS_SANDBOX using token credentials, PlatformPrincipal is // signing key ID and PlatformCredential is signing key . // +// - For Baidu, PlatformPrincipal is API key and PlatformCredential is secret key +// . +// // - For GCM (Firebase Cloud Messaging) using key credentials, there is no // PlatformPrincipal . The PlatformCredential is API key . // @@ -40,10 +40,10 @@ import ( // recommends using the following command: SERVICE_JSON=`jq @json <<< cat // service.json` . // -// - For MPNS , PlatformPrincipal is TLS certificate and PlatformCredential is +// - For MPNS, PlatformPrincipal is TLS certificate and PlatformCredential is // private key . // -// - For WNS , PlatformPrincipal is Package Security Identifier and +// - For WNS, PlatformPrincipal is Package Security Identifier and // PlatformCredential is secret key . // // You can use the returned PlatformApplicationArn as an attribute for the diff --git a/service/sns/api_op_CreateTopic.go b/service/sns/api_op_CreateTopic.go index 6c12b5e6568..a6c6bf7db4d 100644 --- a/service/sns/api_op_CreateTopic.go +++ b/service/sns/api_op_CreateTopic.go @@ -49,7 +49,7 @@ type CreateTopicInput struct { // A map of attributes with their corresponding values. // - // The following lists the names, descriptions, and values of the special request + // The following lists names, descriptions, and values of the special request // parameters that the CreateTopic action uses: // // - DeliveryPolicy – The policy that defines how Amazon SNS retries failed diff --git a/service/sns/api_op_GetSubscriptionAttributes.go b/service/sns/api_op_GetSubscriptionAttributes.go index dc485a5e630..5d01c4874ff 100644 --- a/service/sns/api_op_GetSubscriptionAttributes.go +++ b/service/sns/api_op_GetSubscriptionAttributes.go @@ -85,21 +85,21 @@ type GetSubscriptionAttributesOutput struct { // // - TopicArn – The topic ARN that the subscription is associated with. // - // The following attribute applies only to Amazon Kinesis Data Firehose delivery - // stream subscriptions: + // The following attribute applies only to Amazon Data Firehose delivery stream + // subscriptions: // // - SubscriptionRoleArn – The ARN of the IAM role that has the following: // - // - Permission to write to the Kinesis Data Firehose delivery stream + // - Permission to write to the Firehose delivery stream // // - Amazon SNS listed as a trusted entity // - // Specifying a valid ARN for this attribute is required for Kinesis Data Firehose - // delivery stream subscriptions. For more information, see [Fanout to Kinesis Data Firehose delivery streams]in the Amazon SNS - // Developer Guide. + // Specifying a valid ARN for this attribute is required for Firehose delivery + // stream subscriptions. For more information, see [Fanout to Firehose delivery streams]in the Amazon SNS Developer + // Guide. // - // [Fanout to Kinesis Data Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html // [Amazon SNS Message Filtering]: https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html + // [Fanout to Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Attributes map[string]string // Metadata pertaining to the operation's result. diff --git a/service/sns/api_op_Publish.go b/service/sns/api_op_Publish.go index 3337a7301a7..9b0f1668fcf 100644 --- a/service/sns/api_op_Publish.go +++ b/service/sns/api_op_Publish.go @@ -156,9 +156,8 @@ type PublishInput struct { // delivered to email endpoints. This field will also be included, if present, in // the standard JSON messages delivered to other endpoints. // - // Constraints: Subjects must be ASCII text that begins with a letter, number, or - // punctuation mark; must not include line breaks or control characters; and must - // be less than 100 characters long. + // Constraints: Subjects must be UTF-8 text with no line breaks or control + // characters, and less than 100 characters long. Subject *string // If you don't specify a value for the TargetArn parameter, you must specify a diff --git a/service/sns/api_op_SetSubscriptionAttributes.go b/service/sns/api_op_SetSubscriptionAttributes.go index c88a0e4e8c3..2fbe0436f98 100644 --- a/service/sns/api_op_SetSubscriptionAttributes.go +++ b/service/sns/api_op_SetSubscriptionAttributes.go @@ -61,20 +61,20 @@ type SetSubscriptionAttributesInput struct { // becomes unavailable) are held in the dead-letter queue for further analysis or // reprocessing. // - // The following attribute applies only to Amazon Kinesis Data Firehose delivery - // stream subscriptions: + // The following attribute applies only to Amazon Data Firehose delivery stream + // subscriptions: // // - SubscriptionRoleArn – The ARN of the IAM role that has the following: // - // - Permission to write to the Kinesis Data Firehose delivery stream + // - Permission to write to the Firehose delivery stream // // - Amazon SNS listed as a trusted entity // - // Specifying a valid ARN for this attribute is required for Kinesis Data Firehose - // delivery stream subscriptions. For more information, see [Fanout to Kinesis Data Firehose delivery streams]in the Amazon SNS - // Developer Guide. + // Specifying a valid ARN for this attribute is required for Firehose delivery + // stream subscriptions. For more information, see [Fanout to Firehose delivery streams]in the Amazon SNS Developer + // Guide. // - // [Fanout to Kinesis Data Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html + // [Fanout to Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html // // This member is required. AttributeName *string diff --git a/service/sns/api_op_Subscribe.go b/service/sns/api_op_Subscribe.go index 2e7855200cc..bf14515eef0 100644 --- a/service/sns/api_op_Subscribe.go +++ b/service/sns/api_op_Subscribe.go @@ -98,18 +98,18 @@ type SubscribeInput struct { // becomes unavailable) are held in the dead-letter queue for further analysis or // reprocessing. // - // The following attribute applies only to Amazon Kinesis Data Firehose delivery - // stream subscriptions: + // The following attribute applies only to Amazon Data Firehose delivery stream + // subscriptions: // // - SubscriptionRoleArn – The ARN of the IAM role that has the following: // - // - Permission to write to the Kinesis Data Firehose delivery stream + // - Permission to write to the Firehose delivery stream // // - Amazon SNS listed as a trusted entity // - // Specifying a valid ARN for this attribute is required for Kinesis Data Firehose - // delivery stream subscriptions. For more information, see [Fanout to Kinesis Data Firehose delivery streams]in the Amazon SNS - // Developer Guide. + // Specifying a valid ARN for this attribute is required for Firehose delivery + // stream subscriptions. For more information, see [Fanout to Firehose delivery streams]in the Amazon SNS Developer + // Guide. // // The following attributes apply only to [FIFO topics]: // @@ -130,7 +130,7 @@ type SubscribeInput struct { // // - Pending – The default state while the replay initiates. // - // [Fanout to Kinesis Data Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html + // [Fanout to Firehose delivery streams]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html // [FIFO topics]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html Attributes map[string]string diff --git a/service/sns/go_module_metadata.go b/service/sns/go_module_metadata.go index c4b43adae37..3390dae3a16 100644 --- a/service/sns/go_module_metadata.go +++ b/service/sns/go_module_metadata.go @@ -3,4 +3,4 @@ package sns // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.9" +const goModuleVersion = "1.29.10" diff --git a/service/sqs/CHANGELOG.md b/service/sqs/CHANGELOG.md index 88c8b63d73a..9da37e42718 100644 --- a/service/sqs/CHANGELOG.md +++ b/service/sqs/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.32.5 (2024-06-06) + +* **Documentation**: Doc only updates for SQS. These updates include customer-reported issues and TCX3 modifications. + # v1.32.4 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/sqs/api_op_SendMessage.go b/service/sqs/api_op_SendMessage.go index 7d80f4fa9b3..43a988203c6 100644 --- a/service/sqs/api_op_SendMessage.go +++ b/service/sqs/api_op_SendMessage.go @@ -14,12 +14,14 @@ import ( // Delivers a message to the specified queue. // // A message can include only XML, JSON, and unformatted text. The following -// Unicode characters are allowed: +// Unicode characters are allowed. For more information, see the [W3C specification for characters]. // // #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF // -// Any characters not included in this list will be rejected. For more -// information, see the [W3C specification for characters]. +// Amazon SQS does not throw an exception or completely reject the message if it +// contains invalid characters. Instead, it replaces those invalid characters with +// U+FFFD before storing the message in the queue, as long as the message body +// contains at least one valid character. // // [W3C specification for characters]: http://www.w3.org/TR/REC-xml/#charsets func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optFns ...func(*Options)) (*SendMessageOutput, error) { @@ -43,12 +45,14 @@ type SendMessageInput struct { // KiB. // // A message can include only XML, JSON, and unformatted text. The following - // Unicode characters are allowed: + // Unicode characters are allowed. For more information, see the [W3C specification for characters]. // // #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF // - // Any characters not included in this list will be rejected. For more - // information, see the [W3C specification for characters]. + // Amazon SQS does not throw an exception or completely reject the message if it + // contains invalid characters. Instead, it replaces those invalid characters with + // U+FFFD before storing the message in the queue, as long as the message body + // contains at least one valid character. // // [W3C specification for characters]: http://www.w3.org/TR/REC-xml/#charsets // diff --git a/service/sqs/api_op_SendMessageBatch.go b/service/sqs/api_op_SendMessageBatch.go index 85e87ae3788..489e17cd991 100644 --- a/service/sqs/api_op_SendMessageBatch.go +++ b/service/sqs/api_op_SendMessageBatch.go @@ -26,12 +26,14 @@ import ( // KiB (262,144 bytes). // // A message can include only XML, JSON, and unformatted text. The following -// Unicode characters are allowed: +// Unicode characters are allowed. For more information, see the [W3C specification for characters]. // // #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF // -// Any characters not included in this list will be rejected. For more -// information, see the [W3C specification for characters]. +// Amazon SQS does not throw an exception or completely reject the message if it +// contains invalid characters. Instead, it replaces those invalid characters with +// U+FFFD before storing the message in the queue, as long as the message body +// contains at least one valid character. // // If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses // the default value for the queue. diff --git a/service/sqs/go_module_metadata.go b/service/sqs/go_module_metadata.go index 788b0759c6d..74029385d5d 100644 --- a/service/sqs/go_module_metadata.go +++ b/service/sqs/go_module_metadata.go @@ -3,4 +3,4 @@ package sqs // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.32.4" +const goModuleVersion = "1.32.5" diff --git a/service/storagegateway/CHANGELOG.md b/service/storagegateway/CHANGELOG.md index eeb25616df4..23acca1d342 100644 --- a/service/storagegateway/CHANGELOG.md +++ b/service/storagegateway/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.29.0 (2024-06-06) + +* **Feature**: Adds SoftwareUpdatePreferences to DescribeMaintenanceStartTime and UpdateMaintenanceStartTime, a structure which contains AutomaticUpdatePolicy. + # v1.28.2 (2024-06-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/storagegateway/api_op_DescribeMaintenanceStartTime.go b/service/storagegateway/api_op_DescribeMaintenanceStartTime.go index bfeb318fa2f..37b2d8bb0b8 100644 --- a/service/storagegateway/api_op_DescribeMaintenanceStartTime.go +++ b/service/storagegateway/api_op_DescribeMaintenanceStartTime.go @@ -6,12 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/storagegateway/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns your gateway's weekly maintenance start time including the day and time -// of the week. Note that values are in terms of the gateway's time zone. +// Returns your gateway's maintenance window schedule information, with values for +// monthly or weekly cadence, specific day and time to begin maintenance, and which +// types of updates to apply. Time values returned are for the gateway's time zone. func (c *Client) DescribeMaintenanceStartTime(ctx context.Context, params *DescribeMaintenanceStartTimeInput, optFns ...func(*Options)) (*DescribeMaintenanceStartTimeOutput, error) { if params == nil { params = &DescribeMaintenanceStartTimeInput{} @@ -41,6 +43,8 @@ type DescribeMaintenanceStartTimeInput struct { // A JSON object containing the following fields: // +// # DescribeMaintenanceStartTimeOutput$SoftwareUpdatePreferences +// // # DescribeMaintenanceStartTimeOutput$DayOfMonth // // # DescribeMaintenanceStartTimeOutput$DayOfWeek @@ -53,8 +57,8 @@ type DescribeMaintenanceStartTimeInput struct { type DescribeMaintenanceStartTimeOutput struct { // The day of the month component of the maintenance start time represented as an - // ordinal number from 1 to 28, where 1 represents the first day of the month and - // 28 represents the last day of the month. + // ordinal number from 1 to 28, where 1 represents the first day of the month. It + // is not possible to set the maintenance schedule to start on days 29 through 31. DayOfMonth *int32 // An ordinal number between 0 and 6 that represents the day of the week, where 0 @@ -75,6 +79,15 @@ type DescribeMaintenanceStartTimeOutput struct { // gateway. MinuteOfHour *int32 + // A set of variables indicating the software update preferences for the gateway. + // + // Includes AutomaticUpdatePolicy field with the following inputs: + // + // ALL_VERSIONS - Enables regular gateway maintenance updates. + // + // EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance updates. + SoftwareUpdatePreferences *types.SoftwareUpdatePreferences + // A value that indicates the time zone that is set for the gateway. The start // time and day of week specified should be in the time zone of the gateway. Timezone *string diff --git a/service/storagegateway/api_op_DescribeSMBSettings.go b/service/storagegateway/api_op_DescribeSMBSettings.go index 5bb33002b67..f5b6756e5c9 100644 --- a/service/storagegateway/api_op_DescribeSMBSettings.go +++ b/service/storagegateway/api_op_DescribeSMBSettings.go @@ -91,22 +91,22 @@ type DescribeSMBSettingsOutput struct { // maximize compatibility across different clients in your environment. Supported // only for S3 File Gateway. // - // - MandatorySigning : If you use this option, File Gateway only allows + // - MandatorySigning : If you choose this option, File Gateway only allows // connections from SMBv2 or SMBv3 clients that have signing turned on. This option // works with SMB clients on Microsoft Windows Vista, Windows Server 2008, or // later. // - // - MandatoryEncryption : If you use this option, File Gateway only allows + // - MandatoryEncryption : If you choose this option, File Gateway only allows // connections from SMBv3 clients that have encryption turned on. Both 256-bit and // 128-bit algorithms are allowed. This option is recommended for environments that // handle sensitive data. It works with SMB clients on Microsoft Windows 8, Windows // Server 2012, or later. // - // - EnforceEncryption : If you use this option, File Gateway only allows - // connections from SMBv3 clients that use 256-bit AES encryption algorithms. - // 128-bit algorithms are not allowed. This option is recommended for environments - // that handle sensitive data. It works with SMB clients on Microsoft Windows 8, - // Windows Server 2012, or later. + // - MandatoryEncryptionNoAes128 : If you choose this option, File Gateway only + // allows connections from SMBv3 clients that use 256-bit AES encryption + // algorithms. 128-bit algorithms are not allowed. This option is recommended for + // environments that handle sensitive data. It works with SMB clients on Microsoft + // Windows 8, Windows Server 2012, or later. SMBSecurityStrategy types.SMBSecurityStrategy // Metadata pertaining to the operation's result. diff --git a/service/storagegateway/api_op_UpdateGatewayInformation.go b/service/storagegateway/api_op_UpdateGatewayInformation.go index e46dfddaa7e..cbb74ecb6bd 100644 --- a/service/storagegateway/api_op_UpdateGatewayInformation.go +++ b/service/storagegateway/api_op_UpdateGatewayInformation.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates a gateway's metadata, which includes the gateway's name and time zone. -// To specify which gateway to update, use the Amazon Resource Name (ARN) of the -// gateway in your request. +// Updates a gateway's metadata, which includes the gateway's name, time zone, and +// metadata cache size. To specify which gateway to update, use the Amazon Resource +// Name (ARN) of the gateway in your request. // // For gateways activated after September 2, 2015, the gateway's ARN contains the // gateway ID rather than the gateway name. However, changing the name of the @@ -49,7 +49,11 @@ type UpdateGatewayInformationInput struct { // [What is Amazon CloudWatch Logs?]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html CloudWatchLogGroupARN *string - // Specifies the size of the gateway's metadata cache. + // Specifies the size of the gateway's metadata cache. This setting impacts + // gateway performance and hardware recommendations. For more information, see [Performance guidance for gateways with multiple file shares]in + // the Amazon S3 File Gateway User Guide. + // + // [Performance guidance for gateways with multiple file shares]: https://docs.aws.amazon.com/filegateway/latest/files3/performance-multiple-file-shares.html GatewayCapacity types.GatewayCapacity // The name you configured for your gateway. diff --git a/service/storagegateway/api_op_UpdateMaintenanceStartTime.go b/service/storagegateway/api_op_UpdateMaintenanceStartTime.go index 7360c199369..0d536fe5c1a 100644 --- a/service/storagegateway/api_op_UpdateMaintenanceStartTime.go +++ b/service/storagegateway/api_op_UpdateMaintenanceStartTime.go @@ -6,13 +6,25 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/storagegateway/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates a gateway's weekly maintenance start time information, including day -// and time of the week. The maintenance time is the time in your gateway's time -// zone. +// Updates a gateway's maintenance window schedule, with settings for monthly or +// weekly cadence, specific day and time to begin maintenance, and which types of +// updates to apply. Time configuration uses the gateway's time zone. You can pass +// values for a complete maintenance schedule, or update policy, or both. Previous +// values will persist for whichever setting you choose not to modify. If an +// incomplete or invalid maintenance schedule is passed, the entire request will be +// rejected with an error and no changes will occur. +// +// A complete maintenance schedule must include values for both MinuteOfHour and +// HourOfDay , and either DayOfMonth or DayOfWeek . +// +// We recommend keeping maintenance updates turned on, except in specific use +// cases where the brief disruptions caused by updating the gateway could +// critically impact your deployment. func (c *Client) UpdateMaintenanceStartTime(ctx context.Context, params *UpdateMaintenanceStartTimeInput, optFns ...func(*Options)) (*UpdateMaintenanceStartTimeOutput, error) { if params == nil { params = &UpdateMaintenanceStartTimeInput{} @@ -30,6 +42,8 @@ func (c *Client) UpdateMaintenanceStartTime(ctx context.Context, params *UpdateM // A JSON object containing the following fields: // +// # UpdateMaintenanceStartTimeInput$SoftwareUpdatePreferences +// // # UpdateMaintenanceStartTimeInput$DayOfMonth // // # UpdateMaintenanceStartTimeInput$DayOfWeek @@ -45,27 +59,33 @@ type UpdateMaintenanceStartTimeInput struct { // This member is required. GatewayARN *string + // The day of the month component of the maintenance start time represented as an + // ordinal number from 1 to 28, where 1 represents the first day of the month. It + // is not possible to set the maintenance schedule to start on days 29 through 31. + DayOfMonth *int32 + + // The day of the week component of the maintenance start time week represented as + // an ordinal number from 0 to 6, where 0 represents Sunday and 6 represents + // Saturday. + DayOfWeek *int32 + // The hour component of the maintenance start time represented as hh, where hh is // the hour (00 to 23). The hour of the day is in the time zone of the gateway. - // - // This member is required. HourOfDay *int32 // The minute component of the maintenance start time represented as mm, where mm // is the minute (00 to 59). The minute of the hour is in the time zone of the // gateway. - // - // This member is required. MinuteOfHour *int32 - // The day of the month component of the maintenance start time represented as an - // ordinal number from 1 to 28, where 1 represents the first day of the month and - // 28 represents the last day of the month. - DayOfMonth *int32 - - // The day of the week component of the maintenance start time week represented as - // an ordinal number from 0 to 6, where 0 represents Sunday and 6 Saturday. - DayOfWeek *int32 + // A set of variables indicating the software update preferences for the gateway. + // + // Includes AutomaticUpdatePolicy field with the following inputs: + // + // ALL_VERSIONS - Enables regular gateway maintenance updates. + // + // EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance updates. + SoftwareUpdatePreferences *types.SoftwareUpdatePreferences noSmithyDocumentSerde } diff --git a/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go b/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go index 1bc021b329b..161e60b379f 100644 --- a/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go +++ b/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go @@ -11,12 +11,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the SMB security strategy on a file gateway. This action is only -// supported in file gateways. +// Updates the SMB security strategy level for an Amazon S3 file gateway. This +// action is only supported for Amazon S3 file gateways. // -// This API is called Security level in the User Guide. +// For information about configuring this setting using the Amazon Web Services +// console, see [Setting a security level for your gateway]in the Amazon S3 File Gateway User Guide. // -// A higher security level can affect performance of the gateway. +// A higher security strategy level can affect performance of the gateway. +// +// [Setting a security level for your gateway]: https://docs.aws.amazon.com/filegateway/latest/files3/security-strategy.html func (c *Client) UpdateSMBSecurityStrategy(ctx context.Context, params *UpdateSMBSecurityStrategyInput, optFns ...func(*Options)) (*UpdateSMBSecurityStrategyOutput, error) { if params == nil { params = &UpdateSMBSecurityStrategyInput{} @@ -42,19 +45,25 @@ type UpdateSMBSecurityStrategyInput struct { // Specifies the type of security strategy. // - // ClientSpecified: if you use this option, requests are established based on what - // is negotiated by the client. This option is recommended when you want to + // ClientSpecified : If you choose this option, requests are established based on + // what is negotiated by the client. This option is recommended when you want to // maximize compatibility across different clients in your environment. Supported - // only in S3 File Gateway. + // only for S3 File Gateway. // - // MandatorySigning: if you use this option, file gateway only allows connections - // from SMBv2 or SMBv3 clients that have signing enabled. This option works with - // SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer. + // MandatorySigning : If you choose this option, File Gateway only allows + // connections from SMBv2 or SMBv3 clients that have signing enabled. This option + // works with SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer. // - // MandatoryEncryption: if you use this option, file gateway only allows + // MandatoryEncryption : If you choose this option, File Gateway only allows // connections from SMBv3 clients that have encryption enabled. This option is - // highly recommended for environments that handle sensitive data. This option - // works with SMB clients on Microsoft Windows 8, Windows Server 2012 or newer. + // recommended for environments that handle sensitive data. This option works with + // SMB clients on Microsoft Windows 8, Windows Server 2012 or newer. + // + // MandatoryEncryptionNoAes128 : If you choose this option, File Gateway only + // allows connections from SMBv3 clients that use 256-bit AES encryption + // algorithms. 128-bit algorithms are not allowed. This option is recommended for + // environments that handle sensitive data. It works with SMB clients on Microsoft + // Windows 8, Windows Server 2012, or later. // // This member is required. SMBSecurityStrategy types.SMBSecurityStrategy diff --git a/service/storagegateway/deserializers.go b/service/storagegateway/deserializers.go index 22ec32b6499..3de7a43a040 100644 --- a/service/storagegateway/deserializers.go +++ b/service/storagegateway/deserializers.go @@ -12859,6 +12859,46 @@ func awsAwsjson11_deserializeDocumentSMBLocalGroups(v **types.SMBLocalGroups, va return nil } +func awsAwsjson11_deserializeDocumentSoftwareUpdatePreferences(v **types.SoftwareUpdatePreferences, 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.SoftwareUpdatePreferences + if *v == nil { + sv = &types.SoftwareUpdatePreferences{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomaticUpdatePolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomaticUpdatePolicy to be of type string, got %T instead", value) + } + sv.AutomaticUpdatePolicy = types.AutomaticUpdatePolicy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentStorageGatewayError(v **types.StorageGatewayError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16493,6 +16533,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceStartTimeOutput(v **De sv.MinuteOfHour = ptr.Int32(int32(i64)) } + case "SoftwareUpdatePreferences": + if err := awsAwsjson11_deserializeDocumentSoftwareUpdatePreferences(&sv.SoftwareUpdatePreferences, value); err != nil { + return err + } + case "Timezone": if value != nil { jtv, ok := value.(string) diff --git a/service/storagegateway/go_module_metadata.go b/service/storagegateway/go_module_metadata.go index 499ebd272d4..3c298b607fd 100644 --- a/service/storagegateway/go_module_metadata.go +++ b/service/storagegateway/go_module_metadata.go @@ -3,4 +3,4 @@ package storagegateway // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.2" +const goModuleVersion = "1.29.0" diff --git a/service/storagegateway/serializers.go b/service/storagegateway/serializers.go index 28785544137..3bd66acb53a 100644 --- a/service/storagegateway/serializers.go +++ b/service/storagegateway/serializers.go @@ -5232,6 +5232,18 @@ func awsAwsjson11_serializeDocumentSMBLocalGroups(v *types.SMBLocalGroups, value return nil } +func awsAwsjson11_serializeDocumentSoftwareUpdatePreferences(v *types.SoftwareUpdatePreferences, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AutomaticUpdatePolicy) > 0 { + ok := object.Key("AutomaticUpdatePolicy") + ok.String(string(v.AutomaticUpdatePolicy)) + } + + return nil +} + func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7270,6 +7282,13 @@ func awsAwsjson11_serializeOpDocumentUpdateMaintenanceStartTimeInput(v *UpdateMa ok.Integer(*v.MinuteOfHour) } + if v.SoftwareUpdatePreferences != nil { + ok := object.Key("SoftwareUpdatePreferences") + if err := awsAwsjson11_serializeDocumentSoftwareUpdatePreferences(v.SoftwareUpdatePreferences, ok); err != nil { + return err + } + } + return nil } diff --git a/service/storagegateway/types/enums.go b/service/storagegateway/types/enums.go index 1526ecf5d2e..33e61b4d456 100644 --- a/service/storagegateway/types/enums.go +++ b/service/storagegateway/types/enums.go @@ -31,6 +31,25 @@ func (ActiveDirectoryStatus) Values() []ActiveDirectoryStatus { } } +type AutomaticUpdatePolicy string + +// Enum values for AutomaticUpdatePolicy +const ( + AutomaticUpdatePolicyAllVersions AutomaticUpdatePolicy = "ALL_VERSIONS" + AutomaticUpdatePolicyEmergencyVersionsOnly AutomaticUpdatePolicy = "EMERGENCY_VERSIONS_ONLY" +) + +// Values returns all known values for AutomaticUpdatePolicy. 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 (AutomaticUpdatePolicy) Values() []AutomaticUpdatePolicy { + return []AutomaticUpdatePolicy{ + "ALL_VERSIONS", + "EMERGENCY_VERSIONS_ONLY", + } +} + type AvailabilityMonitorTestStatus string // Enum values for AvailabilityMonitorTestStatus diff --git a/service/storagegateway/types/types.go b/service/storagegateway/types/types.go index b45684c8ac4..18b6d1d321d 100644 --- a/service/storagegateway/types/types.go +++ b/service/storagegateway/types/types.go @@ -932,6 +932,19 @@ type SMBLocalGroups struct { noSmithyDocumentSerde } +// A set of variables indicating the software update preferences for the gateway. +type SoftwareUpdatePreferences struct { + + // Indicates the automatic update policy for a gateway. + // + // ALL_VERSIONS - Enables regular gateway maintenance updates. + // + // EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance updates. + AutomaticUpdatePolicy AutomaticUpdatePolicy + + noSmithyDocumentSerde +} + // Provides additional information about an error that was returned by the // service. See the errorCode and errorDetails members for more information about // the error. diff --git a/service/storagegateway/validators.go b/service/storagegateway/validators.go index d868b7700b0..5a5ff8a956a 100644 --- a/service/storagegateway/validators.go +++ b/service/storagegateway/validators.go @@ -3439,12 +3439,6 @@ func validateOpUpdateMaintenanceStartTimeInput(v *UpdateMaintenanceStartTimeInpu if v.GatewayARN == nil { invalidParams.Add(smithy.NewErrParamRequired("GatewayARN")) } - if v.HourOfDay == nil { - invalidParams.Add(smithy.NewErrParamRequired("HourOfDay")) - } - if v.MinuteOfHour == nil { - invalidParams.Add(smithy.NewErrParamRequired("MinuteOfHour")) - } if invalidParams.Len() > 0 { return invalidParams } else {