diff --git a/.changes/1.36.0.json b/.changes/1.36.0.json new file mode 100644 index 0000000000..8d00e4babb --- /dev/null +++ b/.changes/1.36.0.json @@ -0,0 +1,67 @@ +[ + { + "category": "``apigateway``", + "description": "Documentation updates for Amazon API Gateway", + "type": "api-change" + }, + { + "category": "``bedrock-agent-runtime``", + "description": "Now supports streaming for inline agents.", + "type": "api-change" + }, + { + "category": "``cognito-identity``", + "description": "corrects the dual-stack endpoint configuration", + "type": "api-change" + }, + { + "category": "``partnercentral-selling``", + "description": "Add Tagging support for ResourceSnapshotJob resources", + "type": "api-change" + }, + { + "category": "``s3``", + "description": "This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests.", + "type": "api-change" + }, + { + "category": "``security-ir``", + "description": "Increase minimum length of Threat Actor IP 'userAgent' to 1.", + "type": "api-change" + }, + { + "category": "``sesv2``", + "description": "This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects elevated complaint rates for customer sending identities.", + "type": "api-change" + }, + { + "category": "``workspaces``", + "description": "Added GeneralPurpose.4xlarge & GeneralPurpose.8xlarge ComputeTypes.", + "type": "api-change" + }, + { + "category": "``workspaces-thin-client``", + "description": "Mark type in MaintenanceWindow as required.", + "type": "api-change" + }, + { + "category": "AWSCRT", + "description": "Update awscrt version to 0.23.4", + "type": "enhancement" + }, + { + "category": "``s3``", + "description": "The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using the ``when_supported`` and ``when_required`` options - in code using the ``response_checksum_validation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``response_checksum_validation``, or as an env variable using ``AWS_RESPONSE_CHECKSUM_VALIDATION``.", + "type": "feature" + }, + { + "category": "``s3``", + "description": "Added support for the CRC64NVME checksum algorithm in the S3 client through the optional AWS CRT (``awscrt``) dependency.", + "type": "feature" + }, + { + "category": "``s3``", + "description": "S3 client behavior is updated to always calculate a CRC32 checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). Checksum behavior can be configured using ``when_supported`` and ``when_required`` options - in code using the ``request_checksum_calculation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``request_checksum_calculation``, or as an env variable using ``AWS_REQUEST_CHECKSUM_CALCULATION``. Note: Botocore will no longer automatically compute and populate the Content-MD5 header.", + "type": "feature" + } +] \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4ada902a78..426ed5ed9d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,24 @@ CHANGELOG ========= +1.36.0 +====== + +* api-change:``apigateway``: Documentation updates for Amazon API Gateway +* api-change:``bedrock-agent-runtime``: Now supports streaming for inline agents. +* api-change:``cognito-identity``: corrects the dual-stack endpoint configuration +* api-change:``partnercentral-selling``: Add Tagging support for ResourceSnapshotJob resources +* api-change:``s3``: This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests. +* api-change:``security-ir``: Increase minimum length of Threat Actor IP 'userAgent' to 1. +* api-change:``sesv2``: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects elevated complaint rates for customer sending identities. +* api-change:``workspaces``: Added GeneralPurpose.4xlarge & GeneralPurpose.8xlarge ComputeTypes. +* api-change:``workspaces-thin-client``: Mark type in MaintenanceWindow as required. +* enhancement:AWSCRT: Update awscrt version to 0.23.4 +* feature:``s3``: The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using the ``when_supported`` and ``when_required`` options - in code using the ``response_checksum_validation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``response_checksum_validation``, or as an env variable using ``AWS_RESPONSE_CHECKSUM_VALIDATION``. +* feature:``s3``: Added support for the CRC64NVME checksum algorithm in the S3 client through the optional AWS CRT (``awscrt``) dependency. +* feature:``s3``: S3 client behavior is updated to always calculate a CRC32 checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). Checksum behavior can be configured using ``when_supported`` and ``when_required`` options - in code using the ``request_checksum_calculation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``request_checksum_calculation``, or as an env variable using ``AWS_REQUEST_CHECKSUM_CALCULATION``. Note: Botocore will no longer automatically compute and populate the Content-MD5 header. + + 1.35.99 ======= diff --git a/botocore/__init__.py b/botocore/__init__.py index c542baa045..70025ede4e 100644 --- a/botocore/__init__.py +++ b/botocore/__init__.py @@ -16,7 +16,7 @@ import os import re -__version__ = '1.35.99' +__version__ = '1.36.0' class NullHandler(logging.Handler): diff --git a/botocore/args.py b/botocore/args.py index 7ffea80011..df08dd3cc9 100644 --- a/botocore/args.py +++ b/botocore/args.py @@ -61,6 +61,15 @@ # values result in a warning-level log message. USERAGENT_APPID_MAXLEN = 50 +VALID_REQUEST_CHECKSUM_CALCULATION_CONFIG = ( + "when_supported", + "when_required", +) +VALID_RESPONSE_CHECKSUM_VALIDATION_CONFIG = ( + "when_supported", + "when_required", +) + class ClientArgsCreator: def __init__( @@ -271,12 +280,19 @@ def compute_client_args( sigv4a_signing_region_set=( client_config.sigv4a_signing_region_set ), + request_checksum_calculation=( + client_config.request_checksum_calculation + ), + response_checksum_validation=( + client_config.response_checksum_validation + ), ) self._compute_retry_config(config_kwargs) self._compute_connect_timeout(config_kwargs) self._compute_user_agent_appid_config(config_kwargs) self._compute_request_compression_config(config_kwargs) self._compute_sigv4a_signing_region_set_config(config_kwargs) + self._compute_checksum_config(config_kwargs) s3_config = self.compute_s3_config(client_config) is_s3_service = self._is_s3_service(service_name) @@ -781,3 +797,36 @@ def _compute_sigv4a_signing_region_set_config(self, config_kwargs): 'sigv4a_signing_region_set' ) config_kwargs['sigv4a_signing_region_set'] = sigv4a_signing_region_set + + def _compute_checksum_config(self, config_kwargs): + self._handle_checksum_config( + config_kwargs, + config_key="request_checksum_calculation", + valid_options=VALID_REQUEST_CHECKSUM_CALCULATION_CONFIG, + ) + self._handle_checksum_config( + config_kwargs, + config_key="response_checksum_validation", + valid_options=VALID_RESPONSE_CHECKSUM_VALIDATION_CONFIG, + ) + + def _handle_checksum_config( + self, + config_kwargs, + config_key, + valid_options, + ): + value = config_kwargs.get(config_key) + if value is None: + value = self._config_store.get_config_variable(config_key) + + if isinstance(value, str): + value = value.lower() + + if value not in valid_options: + raise botocore.exceptions.InvalidChecksumConfigError( + config_key=config_key, + config_value=value, + valid_options=valid_options, + ) + config_kwargs[config_key] = value diff --git a/botocore/config.py b/botocore/config.py index eee55bb06d..0d20b69b8f 100644 --- a/botocore/config.py +++ b/botocore/config.py @@ -235,6 +235,37 @@ class Config: specified service will be ignored. Defaults to None. + + :type request_checksum_calculation: str + :param request_checksum_calculation: Determines when a checksum will be + calculated for request payloads. Valid values are: + + * ``when_supported`` -- When set, a checksum will be calculated for + all request payloads of operations modeled with the ``httpChecksum`` + trait where ``requestChecksumRequired`` is ``true`` or a + ``requestAlgorithmMember`` is modeled. + + * ``when_required`` -- When set, a checksum will only be calculated + for request payloads of operations modeled with the ``httpChecksum`` + trait where ``requestChecksumRequired`` is ``true`` or where a + ``requestAlgorithmMember`` is modeled and supplied. + + Defaults to None. + + :type response_checksum_validation: str + :param response_checksum_validation: Determines when checksum validation + will be performed on response payloads. Valid values are: + + * ``when_supported`` -- When set, checksum validation is performed on + all response payloads of operations modeled with the ``httpChecksum`` + trait where ``responseAlgorithms`` is modeled, except when no modeled + checksum algorithms are supported. + + * ``when_required`` -- When set, checksum validation is not performed + on response payloads of operations unless the checksum algorithm is + supported and the ``requestValidationModeMember`` member is set to ``ENABLED``. + + Defaults to None. """ OPTION_DEFAULTS = OrderedDict( @@ -264,6 +295,8 @@ class Config: ('disable_request_compression', None), ('client_context_params', None), ('sigv4a_signing_region_set', None), + ('request_checksum_calculation', None), + ('response_checksum_validation', None), ] ) diff --git a/botocore/configprovider.py b/botocore/configprovider.py index be5ce09004..5ebe85235d 100644 --- a/botocore/configprovider.py +++ b/botocore/configprovider.py @@ -168,6 +168,18 @@ None, None, ), + 'request_checksum_calculation': ( + 'request_checksum_calculation', + 'AWS_REQUEST_CHECKSUM_CALCULATION', + "when_supported", + None, + ), + 'response_checksum_validation': ( + 'response_checksum_validation', + 'AWS_RESPONSE_CHECKSUM_VALIDATION', + "when_supported", + None, + ), } # Evaluate AWS_STS_REGIONAL_ENDPOINTS settings @@ -468,7 +480,7 @@ def __copy__(self): def get_config_variable(self, logical_name): """ - Retrieve the value associeated with the specified logical_name + Retrieve the value associated with the specified logical_name from the corresponding provider. If no value is found None will be returned. diff --git a/botocore/data/apigateway/2015-07-09/service-2.json b/botocore/data/apigateway/2015-07-09/service-2.json index 2d551032fd..2602d85be7 100644 --- a/botocore/data/apigateway/2015-07-09/service-2.json +++ b/botocore/data/apigateway/2015-07-09/service-2.json @@ -2626,7 +2626,7 @@ }, "domainNameId":{ "shape":"String", - "documentation":"

The identifier for the domain name resource. Supported only for private custom domain names.

", + "documentation":"

The identifier for the domain name resource. Required for private custom domain names.

", "location":"querystring", "locationName":"domainNameId" }, @@ -4474,7 +4474,7 @@ }, "domainNameId":{ "shape":"String", - "documentation":"

The identifier for the domain name resource. Supported only for private custom domain names.

", + "documentation":"

The identifier for the domain name resource. Required for private custom domain names.

", "location":"querystring", "locationName":"domainNameId" } diff --git a/botocore/data/bedrock-agent-runtime/2023-07-26/service-2.json b/botocore/data/bedrock-agent-runtime/2023-07-26/service-2.json index 36c06b21b6..5f1192615e 100644 --- a/botocore/data/bedrock-agent-runtime/2023-07-26/service-2.json +++ b/botocore/data/bedrock-agent-runtime/2023-07-26/service-2.json @@ -102,7 +102,7 @@ {"shape":"AccessDeniedException"}, {"shape":"ServiceQuotaExceededException"} ], - "documentation":"

The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeAgent.

Sends a prompt for the agent to process and respond to. Note the following fields for the request:

The response is returned in the bytes field of the chunk object.

" + "documentation":"

Sends a prompt for the agent to process and respond to. Note the following fields for the request:

The response contains both chunk and trace attributes.

The final response is returned in the bytes field of the chunk object. The InvokeAgent returns one chunk for the entire interaction.

" }, "InvokeFlow":{ "name":"InvokeFlow", @@ -146,7 +146,7 @@ {"shape":"AccessDeniedException"}, {"shape":"ServiceQuotaExceededException"} ], - "documentation":"

Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.

The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeInlineAgent.

" + "documentation":"

Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.

" }, "OptimizePrompt":{ "name":"OptimizePrompt", @@ -2903,6 +2903,10 @@ "documentation":"

The unique identifier of the session. Use the same value across requests to continue the same conversation.

", "location":"uri", "locationName":"sessionId" + }, + "streamingConfigurations":{ + "shape":"StreamingConfigurations", + "documentation":"

Specifies the configurations for streaming.

To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream action.

" } } }, diff --git a/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json b/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json index 348fc5c4bb..96572525e5 100644 --- a/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json +++ b/botocore/data/cognito-identity/2014-06-30/endpoint-rule-set-1.json @@ -166,6 +166,82 @@ } ], "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://cognito-identity-fips.us-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-2" + ] + } + ], + "endpoint": { + "url": "https://cognito-identity-fips.us-east-2.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-west-1" + ] + } + ], + "endpoint": { + "url": "https://cognito-identity-fips.us-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-west-2" + ] + } + ], + "endpoint": { + "url": "https://cognito-identity-fips.us-west-2.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { @@ -270,6 +346,31 @@ } ], "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://cognito-identity.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { diff --git a/botocore/data/endpoints.json b/botocore/data/endpoints.json index 37297d3cca..d0a69877c0 100644 --- a/botocore/data/endpoints.json +++ b/botocore/data/endpoints.json @@ -2924,6 +2924,7 @@ "ap-southeast-3" : { }, "ap-southeast-4" : { }, "ap-southeast-5" : { }, + "ap-southeast-7" : { }, "ca-central-1" : { }, "ca-west-1" : { }, "eu-central-1" : { }, @@ -18850,6 +18851,8 @@ "ap-southeast-2" : { }, "ap-southeast-3" : { }, "ap-southeast-4" : { }, + "ap-southeast-5" : { }, + "ap-southeast-7" : { }, "ca-central-1" : { }, "ca-west-1" : { }, "eu-central-1" : { }, @@ -18891,6 +18894,7 @@ "il-central-1" : { }, "me-central-1" : { }, "me-south-1" : { }, + "mx-central-1" : { }, "sa-east-1" : { }, "us-east-1" : { "variants" : [ { diff --git a/botocore/data/partnercentral-selling/2022-07-26/service-2.json b/botocore/data/partnercentral-selling/2022-07-26/service-2.json index 5f6f7dfe23..02f9b793bd 100644 --- a/botocore/data/partnercentral-selling/2022-07-26/service-2.json +++ b/botocore/data/partnercentral-selling/2022-07-26/service-2.json @@ -24,12 +24,13 @@ "input":{"shape":"AcceptEngagementInvitationRequest"}, "errors":[ {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, {"shape":"AccessDeniedException"}, {"shape":"InternalServerException"}, {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Use the AcceptEngagementInvitation action to accept an engagement invitation shared by AWS. Accepting the invitation indicates your willingness to participate in the engagement, granting you access to all engagement-related data.

" + "documentation":"

Use the AcceptEngagementInvitation action to accept an engagement invitation shared by AWS. Accepting the invitation indicates your willingness to participate in the engagement, granting you access to all engagement-related data.

" }, "AssignOpportunity":{ "name":"AssignOpportunity", @@ -79,7 +80,7 @@ {"shape":"ServiceQuotaExceededException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

The CreateEngagement action allows you to create an Engagement, which serves as a collaborative space between different parties such as AWS Partners and AWS Sellers. This action automatically adds the caller's AWS account as an active member of the newly created Engagement.

", + "documentation":"

The CreateEngagement action allows you to create an Engagement, which serves as a collaborative space between different parties such as AWS Partners and AWS Sellers. This action automatically adds the caller's AWS account as an active member of the newly created Engagement.

", "idempotent":true }, "CreateEngagementInvitation":{ @@ -117,7 +118,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Creates an Opportunity record in Partner Central. Use this operation to create a potential business opportunity for submission to Amazon Web Services. Creating an opportunity sets Lifecycle.ReviewStatus to Pending Submission.

To submit an opportunity, follow these steps:

  1. To create the opportunity, use CreateOpportunity.

  2. To associate a solution with the opportunity, use AssociateOpportunity.

  3. To submit the opportunity, use StartEngagementFromOpportunityTask.

After submission, you can't edit the opportunity until the review is complete. But opportunities in the Pending Submission state must have complete details. You can update the opportunity while it's in the Pending Submission state.

There's a set of mandatory fields to create opportunities, but consider providing optional fields to enrich the opportunity record.

", + "documentation":"

Creates an Opportunity record in Partner Central. Use this operation to create a potential business opportunity for submission to Amazon Web Services. Creating an opportunity sets Lifecycle.ReviewStatus to Pending Submission.

To submit an opportunity, follow these steps:

  1. To create the opportunity, use CreateOpportunity.

  2. To associate a solution with the opportunity, use AssociateOpportunity.

  3. To start the engagement with AWS, use StartEngagementFromOpportunity.

After submission, you can't edit the opportunity until the review is complete. But opportunities in the Pending Submission state must have complete details. You can update the opportunity while it's in the Pending Submission state.

There's a set of mandatory fields to create opportunities, but consider providing optional fields to enrich the opportunity record.

", "idempotent":true }, "CreateResourceSnapshot":{ @@ -155,7 +156,7 @@ {"shape":"ServiceQuotaExceededException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Use this action to create a job to generate a snapshot of the specified resource within an engagement. It initiates an asynchronous process to create a resource snapshot. The job creates a new snapshot only if the resource state has changed, adhering to the same access control and immutability rules as direct snapshot creation.

", + "documentation":"

Use this action to create a job to generate a snapshot of the specified resource within an engagement. It initiates an asynchronous process to create a resource snapshot. The job creates a new snapshot only if the resource state has changed, adhering to the same access control and immutability rules as direct snapshot creation.

", "idempotent":true }, "DeleteResourceSnapshotJob":{ @@ -167,6 +168,7 @@ "input":{"shape":"DeleteResourceSnapshotJobRequest"}, "errors":[ {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, {"shape":"AccessDeniedException"}, {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} @@ -221,7 +223,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Use this action to retrieve the engagement record for a given EngagementIdentifier.

" + "documentation":"

Use this action to retrieve the engagement record for a given EngagementIdentifier.

" }, "GetEngagementInvitation":{ "name":"GetEngagementInvitation", @@ -287,7 +289,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Use this action to retrieves information about a specific resource snapshot job.

" + "documentation":"

Use this action to retrieves information about a specific resource snapshot job.

" }, "GetSellingSystemSettings":{ "name":"GetSellingSystemSettings", @@ -368,7 +370,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Retrieves the details of member partners in an engagement. This operation can only be invoked by members of the engagement. The ListEngagementMembers operation allows you to fetch information about the members of a specific engagement. This action is restricted to members of the engagement being queried.

" + "documentation":"

Retrieves the details of member partners in an Engagement. This operation can only be invoked by members of the Engagement. The ListEngagementMembers operation allows you to fetch information about the members of a specific Engagement. This action is restricted to members of the Engagement being queried.

" }, "ListEngagementResourceAssociations":{ "name":"ListEngagementResourceAssociations", @@ -384,7 +386,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Lists the associations between resources and engagements where the caller is a member and has at least one snapshot in the engagement.

" + "documentation":"

Lists the associations between resources and engagements where the caller is a member and has at least one snapshot in the engagement.

" }, "ListEngagements":{ "name":"ListEngagements", @@ -400,7 +402,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

This action allows users to retrieve a list of engagement records from Partner Central. This action can be used to manage and track various engagements across different stages of the partner selling process.

" + "documentation":"

This action allows users to retrieve a list of Engagement records from Partner Central. This action can be used to manage and track various engagements across different stages of the partner selling process.

" }, "ListOpportunities":{ "name":"ListOpportunities", @@ -430,7 +432,8 @@ "errors":[ {"shape":"ThrottlingException"}, {"shape":"AccessDeniedException"}, - {"shape":"ValidationException"} + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} ], "documentation":"

Lists resource snapshot jobs owned by the customer. This operation supports various filtering scenarios, including listing all jobs owned by the caller, jobs for a specific engagement, jobs with a specific status, or any combination of these filters.

" }, @@ -448,7 +451,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Retrieves a list of resource view snapshots based on specified criteria.

" + "documentation":"

Retrieves a list of resource view snapshots based on specified criteria. This operation supports various use cases, including:

" }, "ListSolutions":{ "name":"ListSolutions", @@ -466,6 +469,23 @@ ], "documentation":"

Retrieves a list of Partner Solutions that the partner registered on Partner Central. This API is used to generate a list of solutions that an end user selects from for association with an opportunity.

" }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ThrottlingException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Returns a list of tags for a resource.

" + }, "PutSellingSystemSettings":{ "name":"PutSellingSystemSettings", "http":{ @@ -492,6 +512,7 @@ "input":{"shape":"RejectEngagementInvitationRequest"}, "errors":[ {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, {"shape":"AccessDeniedException"}, {"shape":"InternalServerException"}, {"shape":"ValidationException"}, @@ -550,7 +571,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Starts a resource snapshot job that has been previously created.

", + "documentation":"

Starts a resource snapshot job that has been previously created.

", "idempotent":true }, "StopResourceSnapshotJob":{ @@ -566,7 +587,7 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Stops a resource snapshot job. The job must be started prior to being stopped.

", + "documentation":"

Stops a resource snapshot job. The job must be started prior to being stopped.

", "idempotent":true }, "SubmitOpportunity":{ @@ -583,7 +604,45 @@ {"shape":"ValidationException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Use this action to submit an opportunity that was previously created by partner for AWS review. After you perform this action, the opportunity becomes non-editable until it is reviewed by AWS and has LifeCycle.ReviewStatus as either Approved or Action Required.

" + "documentation":"

Use this action to submit an Opportunity that was previously created by partner for AWS review. After you perform this action, the Opportunity becomes non-editable until it is reviewed by AWS and has LifeCycle.ReviewStatus as either Approved or Action Required.

" + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Assigns one or more tags (key-value pairs) to the specified resource.

", + "idempotent":true + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ], + "documentation":"

Removes a tag or tags from a resource.

", + "idempotent":true }, "UpdateOpportunity":{ "name":"UpdateOpportunity", @@ -614,7 +673,7 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

The CatalogType parameter specifies the catalog associated with the engagement invitation. Accepted values are AWS and Sandbox, which determine the environment in which the engagement invitation is managed.

" + "documentation":"

The CatalogType parameter specifies the catalog associated with the engagement invitation. Accepted values are AWS and Sandbox, which determine the environment in which the engagement invitation is managed.

" }, "Identifier":{ "shape":"EngagementInvitationArnOrIdentifier", @@ -1624,24 +1683,24 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

The CreateEngagementRequest$Catalog parameter specifies the catalog related to the engagement. Accepted values are AWS and Sandbox, which determine the environment in which the engagement is managed.

" + "documentation":"

The CreateEngagementRequest$Catalog parameter specifies the catalog related to the engagement. Accepted values are AWS and Sandbox, which determine the environment in which the engagement is managed.

" }, "ClientToken":{ "shape":"CreateEngagementRequestClientTokenString", - "documentation":"

The CreateEngagementRequest$ClientToken parameter specifies a unique, case-sensitive identifier to ensure that the request is handled exactly once. The value must not exceed sixty-four alphanumeric characters.

", + "documentation":"

The CreateEngagementRequest$ClientToken parameter specifies a unique, case-sensitive identifier to ensure that the request is handled exactly once. The value must not exceed sixty-four alphanumeric characters.

", "idempotencyToken":true }, "Contexts":{ "shape":"EngagementContexts", - "documentation":"

The Contexts field is a required array of objects, with a maximum of 5 contexts allowed, specifying detailed information about customer projects associated with the Engagement. Each context object contains a Type field indicating the context type, which must be CustomerProject in this version, and a Payload field containing the CustomerProject details. The CustomerProject object is composed of two main components: Customer and Project. The Customer object includes information such as CompanyName, WebsiteUrl, Industry, and CountryCode, providing essential details about the customer. The Project object contains Title, BusinessProblem, and TargetCompletionDate, offering insights into the specific project associated with the customer. This structure allows comprehensive context to be included within the Engagement, facilitating effective collaboration between parties by providing relevant customer and project information.

" + "documentation":"

The Contexts field is a required array of objects, with a maximum of 5 contexts allowed, specifying detailed information about customer projects associated with the Engagement. Each context object contains a Type field indicating the context type, which must be CustomerProject in this version, and a Payload field containing the CustomerProject details. The CustomerProject object is composed of two main components: Customer and Project. The Customer object includes information such as CompanyName, WebsiteUrl, Industry, and CountryCode, providing essential details about the customer. The Project object contains Title, BusinessProblem, and TargetCompletionDate, offering insights into the specific project associated with the customer. This structure allows comprehensive context to be included within the Engagement, facilitating effective collaboration between parties by providing relevant customer and project information.

" }, "Description":{ "shape":"EngagementDescription", - "documentation":"

Provides a description of the Engagement.

" + "documentation":"

Provides a description of the Engagement.

" }, "Title":{ "shape":"EngagementTitle", - "documentation":"

Specifies the title of the Engagement.

" + "documentation":"

Specifies the title of the Engagement.

" } } }, @@ -1654,11 +1713,11 @@ "members":{ "Arn":{ "shape":"EngagementArn", - "documentation":"

The Amazon Resource Name (ARN) that identifies the engagement.

" + "documentation":"

The Amazon Resource Name (ARN) that identifies the engagement.

" }, "Id":{ "shape":"EngagementIdentifier", - "documentation":"

Unique identifier assigned to the newly created engagement.

" + "documentation":"

Unique identifier assigned to the newly created engagement.

" } } }, @@ -1712,7 +1771,7 @@ }, "PrimaryNeedsFromAws":{ "shape":"PrimaryNeedsFromAws", - "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" + "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" }, "Project":{ "shape":"Project", @@ -1764,28 +1823,32 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog in which to create the snapshot job. Valid values are AWS and Sandbox.

" + "documentation":"

Specifies the catalog in which to create the snapshot job. Valid values are AWS and Sandbox.

" }, "ClientToken":{ "shape":"CreateResourceSnapshotJobRequestClientTokenString", - "documentation":"

Specifies a unique, client-generated UUID to ensure that the request is handled exactly once. This token helps prevent duplicate snapshot job creations.

", + "documentation":"

A client-generated UUID used for idempotency check. The token helps prevent duplicate job creations.

", "idempotencyToken":true }, "EngagementIdentifier":{ "shape":"EngagementIdentifier", - "documentation":"

Specifies the identifier of the engagement associated with the resource to be snapshotted.

" + "documentation":"

Specifies the identifier of the engagement associated with the resource to be snapshotted.

" }, "ResourceIdentifier":{ "shape":"ResourceIdentifier", - "documentation":"

Specifies the identifier of the specific resource to be snapshotted. The format depends on the ResourceType.

" + "documentation":"

Specifies the identifier of the specific resource to be snapshotted. The format depends on the ResourceType.

" }, "ResourceSnapshotTemplateIdentifier":{ "shape":"ResourceTemplateName", - "documentation":"

Specifies the name of the template that defines the schema for the snapshot.

" + "documentation":"

Specifies the name of the template that defines the schema for the snapshot.

" }, "ResourceType":{ "shape":"ResourceType", - "documentation":"

The type of resource for which the snapshot job is being created. Must be one of the supported resource types Opportunity.

" + "documentation":"

The type of resource for which the snapshot job is being created. Must be one of the supported resource types i.e. Opportunity

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

A list of objects specifying each tag name and value.

" } } }, @@ -1798,11 +1861,11 @@ "members":{ "Arn":{ "shape":"ResourceSnapshotJobArn", - "documentation":"

The Amazon Resource Name (ARN) of the created snapshot job.

" + "documentation":"

The Amazon Resource Name (ARN) of the created snapshot job.

" }, "Id":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The unique identifier for the created snapshot job.

" + "documentation":"

The unique identifier for the created snapshot job.

" } } }, @@ -2059,10 +2122,10 @@ "Customer":{"shape":"EngagementCustomer"}, "Project":{ "shape":"EngagementCustomerProjectDetails", - "documentation":"

Information about the customer project associated with the Engagement.

" + "documentation":"

Information about the customer project associated with the Engagement.

" } }, - "documentation":"

The CustomerProjects structure in Engagements offers a flexible framework for managing customer-project relationships. It supports multiple customers per Engagement and multiple projects per customer, while also allowing for customers without projects and projects without specific customers.

All Engagement members have full visibility of customers and their associated projects, enabling the capture of relevant context even when project details are not fully defined. This structure also facilitates targeted invitations, allowing partners to focus on specific customers and their business problems when sending Engagement invitations.

" + "documentation":"

The CustomerProjects structure in Engagements offers a flexible framework for managing customer-project relationships. It supports multiple customers per Engagement and multiple projects per customer, while also allowing for customers without projects and projects without specific customers.

All Engagement members have full visibility of customers and their associated projects, enabling the capture of relevant context even when project details are not fully defined. This structure also facilitates targeted invitations, allowing partners to focus on specific customers and their business problems when sending Engagement invitations.

" }, "CustomerSummary":{ "type":"structure", @@ -2172,24 +2235,24 @@ "members":{ "Payload":{ "shape":"EngagementContextPayload", - "documentation":"

Contains the specific details of the Engagement context. The structure of this payload varies depending on the Type field.

" + "documentation":"

Contains the specific details of the Engagement context. The structure of this payload varies depending on the Type field.

" }, "Type":{ "shape":"EngagementContextType", - "documentation":"

Specifies the type of Engagement context. Valid values are \"CustomerProject\" or \"Document\", indicating whether the context relates to a customer project or a document respectively.

" + "documentation":"

Specifies the type of Engagement context. Valid values are \"CustomerProject\" or \"Document\", indicating whether the context relates to a customer project or a document respectively.

" } }, - "documentation":"

Provides detailed context information for an Engagement. This structure allows for specifying the type of context and its associated payload.

" + "documentation":"

Provides detailed context information for an Engagement. This structure allows for specifying the type of context and its associated payload.

" }, "EngagementContextPayload":{ "type":"structure", "members":{ "CustomerProject":{ "shape":"CustomerProjectsContext", - "documentation":"

Contains detailed information about a customer project when the context type is \"CustomerProject\". This field is present only when the Type in EngagementContextDetails is set to \"CustomerProject\".

" + "documentation":"

Contains detailed information about a customer project when the context type is \"CustomerProject\". This field is present only when the Type in EngagementContextDetails is set to \"CustomerProject\".

" } }, - "documentation":"

Represents the payload of an Engagement context. The structure of this payload varies based on the context type specified in the EngagementContextDetails.

", + "documentation":"

Represents the payload of an Engagement context. The structure of this payload varies based on the context type specified in the EngagementContextDetails.

", "union":true }, "EngagementContextType":{ @@ -2246,18 +2309,18 @@ "members":{ "BusinessProblem":{ "shape":"EngagementCustomerBusinessProblem", - "documentation":"

A description of the business problem the project aims to solve.

" + "documentation":"

A description of the business problem the project aims to solve.

" }, "TargetCompletionDate":{ "shape":"EngagementCustomerProjectDetailsTargetCompletionDateString", - "documentation":"

The target completion date for the customer's project.

" + "documentation":"

The target completion date for the customer's project.

" }, "Title":{ "shape":"EngagementCustomerProjectTitle", - "documentation":"

The title of the project.

" + "documentation":"

The title of the project.

" } }, - "documentation":"

Provides comprehensive details about a customer project associated with an Engagement. This may include information such as project goals, timelines, and specific customer requirements.

" + "documentation":"

Provides comprehensive details about a customer project associated with an Engagement. This may include information such as project goals, timelines, and specific customer requirements.

" }, "EngagementCustomerProjectDetailsTargetCompletionDateString":{ "type":"string", @@ -2387,15 +2450,15 @@ "members":{ "AccountId":{ "shape":"AwsAccount", - "documentation":"

This is the unique identifier for the AWS account associated with the member organization. It's used for AWS-related operations and identity verification.

" + "documentation":"

This is the unique identifier for the AWS account associated with the member organization. It's used for AWS-related operations and identity verification.

" }, "CompanyName":{ "shape":"MemberCompanyName", - "documentation":"

The official name of the member's company or organization.

" + "documentation":"

The official name of the member's company or organization.

" }, "WebsiteUrl":{ "shape":"String", - "documentation":"

The URL of the member company's website. This offers a way to find more information about the member organization and serves as an additional identifier.

" + "documentation":"

The URL of the member company's website. This offers a way to find more information about the member organization and serves as an additional identifier.

" } }, "documentation":"

Engagement members are the participants in an Engagement, which is likely a collaborative project or business opportunity within the AWS partner network. Members can be different partner organizations or AWS accounts that are working together on a specific engagement.

Each member is represented by their AWS Account ID, Company Name, and associated details. Members have a status within the Engagement (PENDING, ACCEPTED, REJECTED, or WITHDRAWN), indicating their current state of participation. Only existing members of an Engagement can view the list of other members. This implies a level of privacy and access control within the Engagement structure.

" @@ -2409,14 +2472,14 @@ "members":{ "CompanyName":{ "shape":"MemberCompanyName", - "documentation":"

The official name of the member's company or organization.

" + "documentation":"

The official name of the member's company or organization.

" }, "WebsiteUrl":{ "shape":"String", - "documentation":"

The URL of the member company's website. This offers a way to find more information about the member organization and serves as an additional identifier.

" + "documentation":"

The URL of the member company's website. This offers a way to find more information about the member organization and serves as an additional identifier.

" } }, - "documentation":"

The EngagementMemberSummary provides a snapshot of essential information about participants in an AWS Partner Central Engagement. This compact data structure encapsulates key details of each member, facilitating efficient collaboration and management within the Engagement.

" + "documentation":"

The EngagementMemberSummary provides a snapshot of essential information about participants in an AWS Partner Central Engagement. This compact data structure encapsulates key details of each member, facilitating efficient collaboration and management within the Engagement.

" }, "EngagementMembers":{ "type":"list", @@ -2440,7 +2503,7 @@ }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

The AWS account ID of the entity that created the association.

" + "documentation":"

The AWS account ID of the entity that owns the resource. Identifies the account responsible for or having primary control over the resource.

" }, "EngagementId":{ "shape":"EngagementIdentifier", @@ -2478,14 +2541,14 @@ "members":{ "SortBy":{ "shape":"EngagementSortName", - "documentation":"

The field by which to sort the results.

" + "documentation":"

The field by which to sort the results.

" }, "SortOrder":{ "shape":"SortOrder", - "documentation":"

The order in which to sort the results.

" + "documentation":"

The order in which to sort the results.

" } }, - "documentation":"

Specifies the sorting parameters for listing Engagements.

" + "documentation":"

Specifies the sorting parameters for listing Engagements.

" }, "EngagementSortName":{ "type":"string", @@ -2496,30 +2559,30 @@ "members":{ "Arn":{ "shape":"EngagementArn", - "documentation":"

The Amazon Resource Name (ARN) of the created engagement.

" + "documentation":"

The Amazon Resource Name (ARN) of the created Engagement.

" }, "CreatedAt":{ "shape":"DateTime", - "documentation":"

The date and time when the engagement was created.

" + "documentation":"

The date and time when the Engagement was created.

" }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

The AWS account ID of the engagement creator.

" + "documentation":"

The AWS Account ID of the Engagement creator.

" }, "Id":{ "shape":"EngagementIdentifier", - "documentation":"

The unique identifier for the engagement.

" + "documentation":"

The unique identifier for the Engagement.

" }, "MemberCount":{ "shape":"Integer", - "documentation":"

The number of members in the engagement.

" + "documentation":"

The number of members in the Engagement.

" }, "Title":{ "shape":"EngagementTitle", - "documentation":"

The title of the engagement.

" + "documentation":"

The title of the Engagement.

" } }, - "documentation":"

An object that contains an Engagement's subset of fields.

" + "documentation":"

An object that contains an Engagement's subset of fields.

" }, "EngagementSummaryList":{ "type":"list", @@ -2549,7 +2612,7 @@ }, "EstimationUrl":{ "shape":"WebsiteUrl", - "documentation":"

A URL providing additional information or context about the spend estimation.

" + "documentation":"

A URL providing additional information or context about the spend estimation.

" }, "Frequency":{ "shape":"PaymentFrequency", @@ -2852,11 +2915,11 @@ }, "EngagementDescription":{ "shape":"EngagementDescription", - "documentation":"

The description of the engagement associated with this invitation.

" + "documentation":"

The description of the engagement associated with this invitation.

" }, "EngagementId":{ "shape":"EngagementIdentifier", - "documentation":"

The identifier of the engagement associated with this invitation.This ID links the invitation to its corresponding engagement.

" + "documentation":"

The identifier of the engagement associated with this invitation.This ID links the invitation to its corresponding engagement.

" }, "EngagementTitle":{ "shape":"EngagementTitle", @@ -2864,7 +2927,7 @@ }, "ExistingMembers":{ "shape":"EngagementMemberSummaries", - "documentation":"

A list of active members currently part of the Engagement. This array contains a maximum of 10 members, each represented by an object with the following properties.

" + "documentation":"

A list of active members currently part of the Engagement. This array contains a maximum of 10 members, each represented by an object with the following properties.

" }, "ExpirationDate":{ "shape":"DateTime", @@ -2880,7 +2943,7 @@ }, "InvitationMessage":{ "shape":"InvitationMessage", - "documentation":"

The message sent to the invited partner when the invitation was created.

" + "documentation":"

The message sent to the invited partner when the invitation was created.

" }, "Payload":{ "shape":"Payload", @@ -2926,11 +2989,11 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog related to the engagement request. Valid values are AWS and Sandbox.

" + "documentation":"

Specifies the catalog related to the engagement request. Valid values are AWS and Sandbox.

" }, "Identifier":{ "shape":"EngagementArnOrIdentifier", - "documentation":"

Specifies the identifier of the Engagement record to retrieve.

" + "documentation":"

Specifies the identifier of the Engagement record to retrieve.

" } } }, @@ -2939,35 +3002,35 @@ "members":{ "Arn":{ "shape":"EngagementArn", - "documentation":"

The Amazon Resource Name (ARN) of the engagement retrieved.

" + "documentation":"

The Amazon Resource Name (ARN) of the engagement retrieved.

" }, "Contexts":{ "shape":"EngagementContexts", - "documentation":"

A list of context objects associated with the engagement. Each context provides additional information related to the Engagement, such as customer projects or documents.

" + "documentation":"

A list of context objects associated with the engagement. Each context provides additional information related to the Engagement, such as customer projects or documents.

" }, "CreatedAt":{ "shape":"DateTime", - "documentation":"

The date and time when the Engagement was created, presented in ISO 8601 format (UTC). For example: \"2023-05-01T20:37:46Z\". This timestamp helps track the lifecycle of the Engagement.

" + "documentation":"

The date and time when the Engagement was created, presented in ISO 8601 format (UTC). For example: \"2023-05-01T20:37:46Z\". This timestamp helps track the lifecycle of the Engagement.

" }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

The AWS account ID of the user who originally created the engagement. This field helps in tracking the origin of the engagement.

" + "documentation":"

The AWS account ID of the user who originally created the engagement. This field helps in tracking the origin of the engagement.

" }, "Description":{ "shape":"EngagementDescription", - "documentation":"

A more detailed description of the engagement. This provides additional context or information about the engagement's purpose or scope.

" + "documentation":"

A more detailed description of the engagement. This provides additional context or information about the engagement's purpose or scope.

" }, "Id":{ "shape":"EngagementIdentifier", - "documentation":"

The unique resource identifier of the engagement retrieved.

" + "documentation":"

The unique resource identifier of the engagement retrieved.

" }, "MemberCount":{ "shape":"Integer", - "documentation":"

Specifies the current count of members participating in the Engagement. This count includes all active members regardless of their roles or permissions within the Engagement.

" + "documentation":"

Specifies the current count of members participating in the Engagement. This count includes all active members regardless of their roles or permissions within the Engagement.

" }, "Title":{ "shape":"EngagementTitle", - "documentation":"

The title of the engagement. It provides a brief, descriptive name for the engagement that is meaningful and easily recognizable.

" + "documentation":"

The title of the engagement. It provides a brief, descriptive name for the engagement that is meaningful and easily recognizable.

" } } }, @@ -3048,7 +3111,7 @@ }, "PrimaryNeedsFromAws":{ "shape":"PrimaryNeedsFromAws", - "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" + "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" }, "Project":{ "shape":"Project", @@ -3078,11 +3141,11 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog related to the request. Valid values are:

" + "documentation":"

Specifies the catalog related to the request. Valid values are:

" }, "ResourceSnapshotJobIdentifier":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The unique identifier of the resource snapshot job to be retrieved. This identifier is crucial for pinpointing the specific job you want to query.

" + "documentation":"

The unique identifier of the resource snapshot job to be retrieved. This identifier is crucial for pinpointing the specific job you want to query.

" } } }, @@ -3092,51 +3155,51 @@ "members":{ "Arn":{ "shape":"ResourceSnapshotJobArn", - "documentation":"

he Amazon Resource Name (ARN) of the snapshot job. This globally unique identifier can be used for resource-specific operations across AWS services.

" + "documentation":"

The Amazon Resource Name (ARN) of the snapshot job. This globally unique identifier can be used for resource-specific operations across AWS services.

" }, "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

The catalog in which the snapshot job was created. This will match the catalog specified in the request.

" + "documentation":"

The catalog in which the snapshot job was created. This will match the Catalog specified in the request.

" }, "CreatedAt":{ "shape":"DateTime", - "documentation":"

The date and time when the snapshot job was created, in ISO 8601 format (UTC). Example: \"2023-05-01T20:37:46Z\"

" + "documentation":"

The date and time when the snapshot job was created in ISO 8601 format (UTC). Example: \"2023-05-01T20:37:46Z\"

" }, "EngagementId":{ "shape":"EngagementIdentifier", - "documentation":"

The identifier of the engagement associated with this snapshot job. This links the job to a specific engagement context.

" + "documentation":"

The identifier of the engagement associated with this snapshot job. This links the job to a specific engagement context.

" }, "Id":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The unique identifier of the snapshot job. This matches the ResourceSnapshotJobIdentifier provided in the request.

" + "documentation":"

The unique identifier of the snapshot job. This matches the ResourceSnapshotJobIdentifier provided in the request.

" }, "LastFailure":{ "shape":"String", - "documentation":"

If the job has encountered any failures, this field contains the error message from the most recent failure. This can be useful for troubleshooting issues with the job.

" + "documentation":"

If the job has encountered any failures, this field contains the error message from the most recent failure. This can be useful for troubleshooting issues with the job.

" }, "LastSuccessfulExecutionDate":{ "shape":"DateTime", - "documentation":"

The date and time of the last successful execution of the job, in ISO 8601 format (UTC). Example: \"2023-05-01T20:37:46Z\"

" + "documentation":"

The date and time of the last successful execution of the job, in ISO 8601 format (UTC). Example: \"2023-05-01T20:37:46Z\"

" }, "ResourceArn":{ "shape":"ResourceArn", - "documentation":"

The Amazon Resource Name (ARN) of the resource being snapshotted. This provides a globally unique identifier for the resource across AWS.

" + "documentation":"

The Amazon Resource Name (ARN) of the resource being snapshotted. This provides a globally unique identifier for the resource across AWS.

" }, "ResourceId":{ "shape":"ResourceIdentifier", - "documentation":"

The identifier of the specific resource being snapshotted. The format may vary depending on the ResourceType.

" + "documentation":"

The identifier of the specific resource being snapshotted. The format might vary depending on the ResourceType.

" }, "ResourceSnapshotTemplateName":{ "shape":"ResourceTemplateName", - "documentation":"

The name of the template used for creating the snapshot. This is the same as the template name. It defines the structure and content of the snapshot.

" + "documentation":"

The name of the template used for creating the snapshot. This is the same as the template name. It defines the structure and content of the snapshot.

" }, "ResourceType":{ "shape":"ResourceType", - "documentation":"

The type of resource being snapshotted. This would have Opportunity as a value as it is dependent on the supported resource type.

" + "documentation":"

The type of resource being snapshotted. This would have \"Opportunity\" as a value as it is dependent on the supported resource type.

" }, "Status":{ "shape":"ResourceSnapshotJobStatus", - "documentation":"

The current status of the snapshot job. Valid values:

" + "documentation":"

The current status of the snapshot job. Valid values:

" } } }, @@ -3182,7 +3245,7 @@ "members":{ "Arn":{ "shape":"ResourceArn", - "documentation":"

The Amazon Resource Name (ARN) of the snapshot. This globally unique identifier can be used for resource-specific operations across AWS services.

" + "documentation":"

The Amazon Resource Name (ARN) that uniquely identifies the resource snapshot.

" }, "Catalog":{ "shape":"CatalogIdentifier", @@ -3203,19 +3266,19 @@ "Payload":{"shape":"ResourceSnapshotPayload"}, "ResourceId":{ "shape":"ResourceIdentifier", - "documentation":"

The identifier of the specific resource that was snapshotted. Matches the ResourceIdentifier specified in the request.

" + "documentation":"

The identifier of the specific resource that was snapshotted. Matches the ResourceIdentifier specified in the request.

" }, "ResourceSnapshotTemplateName":{ "shape":"ResourceTemplateName", - "documentation":"

The name of the view used for this snapshot. This is the same as the template name.

" + "documentation":"

The name of the view used for this snapshot. This is the same as the template name.

" }, "ResourceType":{ "shape":"ResourceType", - "documentation":"

The type of the resource that was snapshotted. Matches the ResourceType specified in the request.

" + "documentation":"

The type of the resource that was snapshotted. Matches the ResourceType specified in the request.

" }, "Revision":{ "shape":"ResourceSnapshotRevision", - "documentation":"

The revision number of this snapshot. This is a positive integer that is sequential and unique within the context of a resource view.

" + "documentation":"

The revision number of this snapshot. This is a positive integer that is sequential and unique within the context of a resource view.

" } } }, @@ -3595,7 +3658,7 @@ }, "EngagementInvitationId":{ "shape":"EngagementInvitationIdentifier", - "documentation":"

The unique identifier of the engagement identifier created as a result of the task. This field is populated when the task is completed successfully.

" + "documentation":"

The unique identifier of the Engagement Invitation.

" }, "Message":{ "shape":"String", @@ -3761,19 +3824,19 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

The catalog related to the request.

" + "documentation":"

The catalog related to the request.

" }, "Identifier":{ "shape":"EngagementArnOrIdentifier", - "documentation":"

Identifier of the engagement record to retrieve members from.

" + "documentation":"

Identifier of the Engagement record to retrieve members from.

" }, "MaxResults":{ "shape":"MemberPageSize", - "documentation":"

The maximum number of results to return in a single call.

" + "documentation":"

The maximum number of results to return in a single call.

" }, "NextToken":{ "shape":"String", - "documentation":"

The token for the next set of results.

" + "documentation":"

The token for the next set of results.

" } } }, @@ -3787,7 +3850,7 @@ }, "NextToken":{ "shape":"String", - "documentation":"

A pagination token used to retrieve the next set of results. If there are more results available than can be returned in a single response, this token will be present. Use this token in a subsequent request to retrieve the next page of results. If there are no more results, this value will be null.

" + "documentation":"

A pagination token used to retrieve the next set of results. If there are more results available than can be returned in a single response, this token will be present. Use this token in a subsequent request to retrieve the next page of results. If there are no more results, this value will be null.

" } } }, @@ -3797,27 +3860,27 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog in which to search for engagement-resource associations.

" + "documentation":"

Specifies the catalog in which to search for engagement-resource associations. Valid Values: \"AWS\" or \"Sandbox\"

" }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

Filters the results to include only associations with resources owned by the specified AWS account. Use this when you want to find associations related to resources owned by a particular account.

" + "documentation":"

Filters the response to include only snapshots of resources owned by the specified AWS account ID. Use this when you want to find associations related to resources owned by a particular account.

" }, "EngagementIdentifier":{ "shape":"EngagementIdentifier", - "documentation":"

Filters the results to include only associations related to the specified engagement. Use this when you want to find all resources associated with a specific engagement.

" + "documentation":"

Filters the results to include only associations related to the specified engagement. Use this when you want to find all resources associated with a specific engagement.

" }, "MaxResults":{ "shape":"ListEngagementResourceAssociationsRequestMaxResultsInteger", - "documentation":"

Limits the number of results returned in a single call. Use this to control the number of results returned, especially useful for pagination.

" + "documentation":"

Limits the number of results returned in a single call. Use this to control the number of results returned, especially useful for pagination.

" }, "NextToken":{ "shape":"String", - "documentation":"

A token used for pagination of results. Include this token in subsequent requests to retrieve the next set of results.

" + "documentation":"

A token used for pagination of results. Include this token in subsequent requests to retrieve the next set of results.

" }, "ResourceIdentifier":{ "shape":"ResourceIdentifier", - "documentation":"

Filters the results to include only associations with the specified resource. Varies depending on the resource type. Use this when you want to find all engagements associated with a specific resource.

" + "documentation":"

Filters the results to include only associations with the specified resource. Varies depending on the resource type. Use this when you want to find all engagements associated with a specific resource.

" }, "ResourceType":{ "shape":"ResourceType", @@ -3859,19 +3922,19 @@ }, "EngagementIdentifier":{ "shape":"EngagementIdentifiers", - "documentation":"

An array of strings representing engagement identifiers to retrieve.

" + "documentation":"

An array of strings representing engagement identifiers to retrieve.

" }, "ExcludeCreatedBy":{ "shape":"AwsAccountList", - "documentation":"

An array of strings representing AWS Account IDs. Use this to exclude engagements created by specific users.

" + "documentation":"

An array of strings representing AWS Account IDs. Use this to exclude engagements created by specific users.

" }, "MaxResults":{ "shape":"EngagementPageSize", - "documentation":"

The maximum number of results to return in a single call.

" + "documentation":"

The maximum number of results to return in a single call.

" }, "NextToken":{ "shape":"String", - "documentation":"

The token for the next set of results. This value is returned from a previous call.

" + "documentation":"

The token for the next set of results. This value is returned from a previous call.

" }, "Sort":{ "shape":"EngagementSort", @@ -3885,11 +3948,11 @@ "members":{ "EngagementSummaryList":{ "shape":"EngagementSummaryList", - "documentation":"

An array of engagement summary objects.

" + "documentation":"

An array of engagement summary objects.

" }, "NextToken":{ "shape":"String", - "documentation":"

The token to retrieve the next set of results. This field will be null if there are no more results.

" + "documentation":"

The token to retrieve the next set of results. This field will be null if there are no more results.

" } } }, @@ -4036,7 +4099,7 @@ }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

Filters the response to include only snapshots of resources created by the specified AWS account.

" + "documentation":"

Filters the response to include only snapshots of resources owned by the specified AWS account.

" }, "EngagementIdentifier":{ "shape":"EngagementIdentifier", @@ -4056,7 +4119,7 @@ }, "ResourceSnapshotTemplateIdentifier":{ "shape":"ResourceTemplateName", - "documentation":"

Filters the response to include only snapshots created using the specified template.

" + "documentation":"

Filters the response to include only snapshots created using the specified template.

" }, "ResourceType":{ "shape":"ResourceType", @@ -4150,6 +4213,26 @@ } } }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceArn"], + "members":{ + "ResourceArn":{ + "shape":"TaggableResourceArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource for which you want to retrieve tags.

" + } + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "required":["Tags"], + "members":{ + "Tags":{ + "shape":"TagList", + "documentation":"

A map of the key-value pairs for the tag or tags assigned to the specified resource.

" + } + } + }, "ListTasksSortBase":{ "type":"structure", "required":[ @@ -4731,12 +4814,12 @@ "EngagementConflict", "OpportunitySubmissionFailed", "EngagementInvitationConflict", + "InternalError", "OpportunityValidationFailed", "OpportunityConflict", "ResourceSnapshotAccessDenied", "ResourceSnapshotValidationFailed", "ResourceSnapshotConflict", - "InternalError", "ServiceQuotaExceeded", "RequestThrottled" ] @@ -4877,7 +4960,7 @@ }, "EngagementId":{ "shape":"EngagementIdentifier", - "documentation":"

The unique identifier for the engagement within the AWS Partner Central system. This ID is used for direct references to the engagement within the service.

" + "documentation":"

The unique identifier of the Engagement.

" }, "Id":{ "shape":"ResourceSnapshotJobIdentifier", @@ -4885,7 +4968,7 @@ }, "Status":{ "shape":"ResourceSnapshotJobStatus", - "documentation":"

Represents the current status of the resource snapshot job.

" + "documentation":"

The current status of the snapshot job.

Valid values:

" } }, "documentation":"

An object that contains a Resource Snapshot Job's subset of fields.

" @@ -4919,7 +5002,7 @@ }, "CreatedBy":{ "shape":"AwsAccount", - "documentation":"

The AWS account ID of the principal (user or role) who created the snapshot. This helps in tracking the origin of the snapshot.

" + "documentation":"

The AWS account ID of the entity that owns the resource from which the snapshot was created.

" }, "ResourceId":{ "shape":"ResourceIdentifier", @@ -4935,7 +5018,7 @@ }, "Revision":{ "shape":"ResourceSnapshotRevision", - "documentation":"

The revision number of the snapshot. This integer value is incremented each time the snapshot is updated, allowing for version tracking of the resource snapshot.

" + "documentation":"

The revision number of the snapshot. This integer value is incremented each time the snapshot is updated, allowing for version tracking of the resource snapshot.

" } }, "documentation":"

Provides a concise summary of a resource snapshot, including its unique identifier and version information. This structure is used to quickly reference and identify specific versions of resource snapshots.

" @@ -5216,6 +5299,10 @@ "Identifier":{ "shape":"EngagementInvitationArnOrIdentifier", "documentation":"

Specifies the unique identifier of the EngagementInvitation to be accepted. Providing the correct identifier helps ensure that the correct engagement is processed.

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

A list of objects specifying each tag name and value.

" } } }, @@ -5245,7 +5332,7 @@ }, "ResourceSnapshotJobId":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The identifier of the resource snapshot job created as part of this task.

" + "documentation":"

The identifier of the Resource Snapshot Job created as part of this task.

" }, "StartTime":{ "shape":"DateTime", @@ -5287,6 +5374,10 @@ "Identifier":{ "shape":"OpportunityIdentifier", "documentation":"

The unique identifier of the opportunity from which the engagement task is to be initiated. This helps ensure that the task is applied to the correct opportunity.

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

A list of objects specifying each tag name and value.

" } } }, @@ -5300,11 +5391,11 @@ "members":{ "EngagementId":{ "shape":"EngagementIdentifier", - "documentation":"

The identifier of the newly created engagement. Only populated if TaskStatus is COMPLETE.

" + "documentation":"

The identifier of the newly created Engagement. Only populated if TaskStatus is COMPLETE.

" }, "EngagementInvitationId":{ "shape":"EngagementInvitationIdentifier", - "documentation":"

The identifier of the new engagement invitation. Only populated if TaskStatus is COMPLETE.

" + "documentation":"

The identifier of the new Engagement invitation. Only populated if TaskStatus is COMPLETE.

" }, "Message":{ "shape":"String", @@ -5320,7 +5411,7 @@ }, "ResourceSnapshotJobId":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The identifier of the resource snapshot job created to add the opportunity resource snapshot to the Engagement. Only populated if TaskStatus is COMPLETE.

" + "documentation":"

The identifier of the resource snapshot job created to add the opportunity resource snapshot to the Engagement. Only populated if TaskStatus is COMPLETE

" }, "StartTime":{ "shape":"DateTime", @@ -5349,11 +5440,11 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog related to the request.

" + "documentation":"

Specifies the catalog related to the request. Valid values are:

" }, "ResourceSnapshotJobIdentifier":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The identifier of the resource snapshot job to start.

" + "documentation":"

The identifier of the resource snapshot job to start.

" } } }, @@ -5366,11 +5457,11 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog related to the request.

" + "documentation":"

Specifies the catalog related to the request. Valid values are:

" }, "ResourceSnapshotJobIdentifier":{ "shape":"ResourceSnapshotJobIdentifier", - "documentation":"

The identifier of the job to stop.

" + "documentation":"

The identifier of the job to stop.

" } } }, @@ -5385,22 +5476,92 @@ "members":{ "Catalog":{ "shape":"CatalogIdentifier", - "documentation":"

Specifies the catalog related to the request.

" + "documentation":"

Specifies the catalog related to the request. Valid values are:

" }, "Identifier":{ "shape":"OpportunityIdentifier", - "documentation":"

The identifier of the opportunity previously created by partner and needs to be submitted.

" + "documentation":"

The identifier of the Opportunity previously created by partner and needs to be submitted.

" }, "InvolvementType":{ "shape":"SalesInvolvementType", - "documentation":"

Specifies the level of AWS sellers' involvement on the opportunity.

" + "documentation":"

Specifies the level of AWS sellers' involvement on the opportunity. Valid values:

" }, "Visibility":{ "shape":"Visibility", - "documentation":"

Determines whether to restrict visibility of the opportunity from AWS sales. Default value is Full.

" + "documentation":"

Determines whether to restrict visibility of the opportunity from AWS sales. Default value is Full. Valid values:

" + } + } + }, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{ + "shape":"TagKey", + "documentation":"

The key in the tag.

" + }, + "Value":{ + "shape":"TagValue", + "documentation":"

The value in the tag.

" + } + }, + "documentation":"

The key-value pair assigned to a specified resource.

" + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":50, + "min":1 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":1 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "Tags" + ], + "members":{ + "ResourceArn":{ + "shape":"TaggableResourceArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource that you want to tag.

" + }, + "Tags":{ + "shape":"TagList", + "documentation":"

A map of the key-value pairs of the tag or tags to assign to the resource.

" } } }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + }, + "TaggableResourceArn":{ + "type":"string", + "max":1000, + "min":1, + "pattern":"^arn:[\\w+=/,.@-]+:partnercentral:[\\w+=/,.@-]*:[0-9]{12}:catalog/([a-zA-Z]+)/[\\w+=,.@-]+(/[\\w+=,.@-]+)*$" + }, "TaskArn":{ "type":"string", "pattern":"^arn:.*" @@ -5441,6 +5602,28 @@ "documentation":"

This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.

This error occurs when there are too many requests sent. Review the provided Quotas and retry after the provided delay.

", "exception":true }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "TagKeys" + ], + "members":{ + "ResourceArn":{ + "shape":"TaggableResourceArn", + "documentation":"

The Amazon Resource Name (ARN) of the resource that you want to untag.

" + }, + "TagKeys":{ + "shape":"TagKeyList", + "documentation":"

The keys of the key-value pairs for the tag or tags you want to remove from the specified resource.

" + } + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, "UpdateOpportunityRequest":{ "type":"structure", "required":[ @@ -5487,7 +5670,7 @@ }, "PrimaryNeedsFromAws":{ "shape":"PrimaryNeedsFromAws", - "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" + "documentation":"

Identifies the type of support the partner needs from Amazon Web Services.

Valid values:

" }, "Project":{ "shape":"Project", diff --git a/botocore/data/s3/2006-03-01/paginators-1.sdk-extras.json b/botocore/data/s3/2006-03-01/paginators-1.sdk-extras.json index 262275b6be..39e13606ef 100644 --- a/botocore/data/s3/2006-03-01/paginators-1.sdk-extras.json +++ b/botocore/data/s3/2006-03-01/paginators-1.sdk-extras.json @@ -37,7 +37,8 @@ "ChecksumAlgorithm", "Initiator", "Owner", - "StorageClass" + "StorageClass", + "ChecksumType" ] } } diff --git a/botocore/data/s3/2006-03-01/service-2.json b/botocore/data/s3/2006-03-01/service-2.json index 6890770d93..669fe1e139 100644 --- a/botocore/data/s3/2006-03-01/service-2.json +++ b/botocore/data/s3/2006-03-01/service-2.json @@ -28,7 +28,7 @@ {"shape":"NoSuchUpload"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadAbort.html", - "documentation":"

This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.

To verify that all parts have been removed and prevent getting charged for the part storage, you should call the ListParts API operation and ensure that the parts list is empty.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to AbortMultipartUpload:

" + "documentation":"

This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.

To verify that all parts have been removed and prevent getting charged for the part storage, you should call the ListParts API operation and ensure that the parts list is empty.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to AbortMultipartUpload:

" }, "CompleteMultipartUpload":{ "name":"CompleteMultipartUpload", @@ -39,7 +39,7 @@ "input":{"shape":"CompleteMultipartUploadRequest"}, "output":{"shape":"CompleteMultipartUploadOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadComplete.html", - "documentation":"

Completes a multipart upload by assembling previously uploaded parts.

You first initiate the multipart upload and then upload all parts using the UploadPart operation or the UploadPartCopy operation. After successfully uploading all relevant parts of an upload, you call this CompleteMultipartUpload operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list and ensure that the parts list is complete. The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list, you must provide the PartNumber value and the ETag value that are returned after that part was uploaded.

The processing of a CompleteMultipartUpload request could take several minutes to finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial 200 OK response has been sent. This means that a 200 OK response can contain either a success or an error. The error response might be embedded in the 200 OK response. If you call this API operation directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).

Note that if CompleteMultipartUpload fails, applications should be prepared to retry any failed requests (including 500 error responses). For more information, see Amazon S3 Error Best Practices.

You can't use Content-Type: application/x-www-form-urlencoded for the CompleteMultipartUpload requests. Also, if you don't provide a Content-Type header, CompleteMultipartUpload can still return a 200 OK response.

For more information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CompleteMultipartUpload:

" + "documentation":"

Completes a multipart upload by assembling previously uploaded parts.

You first initiate the multipart upload and then upload all parts using the UploadPart operation or the UploadPartCopy operation. After successfully uploading all relevant parts of an upload, you call this CompleteMultipartUpload operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list and ensure that the parts list is complete. The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list, you must provide the PartNumber value and the ETag value that are returned after that part was uploaded.

The processing of a CompleteMultipartUpload request could take several minutes to finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial 200 OK response has been sent. This means that a 200 OK response can contain either a success or an error. The error response might be embedded in the 200 OK response. If you call this API operation directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).

Note that if CompleteMultipartUpload fails, applications should be prepared to retry any failed requests (including 500 error responses). For more information, see Amazon S3 Error Best Practices.

You can't use Content-Type: application/x-www-form-urlencoded for the CompleteMultipartUpload requests. Also, if you don't provide a Content-Type header, CompleteMultipartUpload can still return a 200 OK response.

For more information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CompleteMultipartUpload:

" }, "CopyObject":{ "name":"CopyObject", @@ -53,7 +53,7 @@ {"shape":"ObjectNotInActiveTierError"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html", - "documentation":"

Creates a copy of an object that is already stored in Amazon S3.

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see Copy Object Using the REST Multipart Upload API.

You can copy individual objects between general purpose buckets, between directory buckets, and between general purpose buckets and directory buckets.

Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account. For more information about how to enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services Account Management Guide.

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad Request error. For more information, see Transfer Acceleration.

Authentication and authorization

All CopyObject requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use the IAM credentials to authenticate and authorize your access to the CopyObject API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

You must have read access to the source object and write access to the destination bucket.

Response and special errors

When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1 request, the response would not contain the Content-Length. You always need to read the entire response body to check if the copy succeeds.

Charge

The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. If the copy source is in a different region, the data transfer is billed to the copy source account. For pricing information, see Amazon S3 pricing.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CopyObject:

", + "documentation":"

Creates a copy of an object that is already stored in Amazon S3.

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see Copy Object Using the REST Multipart Upload API.

You can copy individual objects between general purpose buckets, between directory buckets, and between general purpose buckets and directory buckets.

Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account. For more information about how to enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services Account Management Guide.

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad Request error. For more information, see Transfer Acceleration.

Authentication and authorization

All CopyObject requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use the IAM credentials to authenticate and authorize your access to the CopyObject API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

You must have read access to the source object and write access to the destination bucket.

Response and special errors

When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1 request, the response would not contain the Content-Length. You always need to read the entire response body to check if the copy succeeds.

Charge

The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. If the copy source is in a different region, the data transfer is billed to the copy source account. For pricing information, see Amazon S3 pricing.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CopyObject:

", "alias":"PutObjectCopy", "staticContextParams":{ "DisableS3ExpressSessionAuth":{"value":true} @@ -72,7 +72,7 @@ {"shape":"BucketAlreadyOwnedByYou"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html", - "documentation":"

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see CreateBucket .

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.

There are two types of buckets: general purpose buckets and directory buckets. For more information about these bucket types, see Creating, configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to CreateBucket:

", + "documentation":"

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see CreateBucket .

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.

There are two types of buckets: general purpose buckets and directory buckets. For more information about these bucket types, see Creating, configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to CreateBucket:

", "alias":"PutBucket", "staticContextParams":{ "DisableAccessPoints":{"value":true}, @@ -104,7 +104,7 @@ "input":{"shape":"CreateMultipartUploadRequest"}, "output":{"shape":"CreateMultipartUploadOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html", - "documentation":"

This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.

After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload.

If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration.

Request signing

For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4) in the Amazon S3 User Guide.

Permissions
Encryption
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CreateMultipartUpload:

", + "documentation":"

This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.

After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload.

If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration.

Request signing

For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4) in the Amazon S3 User Guide.

Permissions
Encryption
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to CreateMultipartUpload:

", "alias":"InitiateMultipartUpload" }, "CreateSession":{ @@ -118,7 +118,7 @@ "errors":[ {"shape":"NoSuchBucket"} ], - "documentation":"

Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets. For more information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone APIs in the Amazon S3 User Guide.

To make Zonal endpoint API requests on a directory bucket, use the CreateSession API operation. Specifically, you grant s3express:CreateSession permission to a bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the CreateSession API request on the bucket, which returns temporary security credentials that include the access key ID, secret access key, session token, and expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After the session is created, you don’t need to use other policies to grant permissions to each Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by applying the temporary security credentials of the session to the request headers and following the SigV4 protocol for authentication. You also apply the session token to the x-amz-s3session-token request header for authorization. Temporary security credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, any calls that you make with those credentials will fail. You must use IAM credentials again to make a CreateSession API request that generates a new set of temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond the original specified interval.

If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the Amazon S3 User Guide.

Permissions

To obtain temporary security credentials, you must create a bucket policy or an IAM identity-based policy that grants s3express:CreateSession permission to the bucket. In a policy, you can have the s3express:SessionMode condition key to control who can create a ReadWrite or ReadOnly session. For more information about ReadWrite or ReadOnly sessions, see x-amz-create-session-mode . For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.

To grant cross-account access to Zonal endpoint API operations, the bucket policy should also grant both accounts the s3express:CreateSession permission.

If you want to encrypt objects with SSE-KMS, you must also have the kms:GenerateDataKey and the kms:Decrypt permissions in IAM identity-based policies and KMS key policies for the target KMS key.

Encryption

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your CreateSession requests or PUT object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, you authenticate and authorize requests through CreateSession for low latency. To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.

In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket.

When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), it's not supported to override the values of the encryption settings from the CreateSession request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

", + "documentation":"

Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets. For more information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone APIs in the Amazon S3 User Guide.

To make Zonal endpoint API requests on a directory bucket, use the CreateSession API operation. Specifically, you grant s3express:CreateSession permission to a bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the CreateSession API request on the bucket, which returns temporary security credentials that include the access key ID, secret access key, session token, and expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After the session is created, you don’t need to use other policies to grant permissions to each Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by applying the temporary security credentials of the session to the request headers and following the SigV4 protocol for authentication. You also apply the session token to the x-amz-s3session-token request header for authorization. Temporary security credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, any calls that you make with those credentials will fail. You must use IAM credentials again to make a CreateSession API request that generates a new set of temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond the original specified interval.

If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the Amazon S3 User Guide.

Permissions

To obtain temporary security credentials, you must create a bucket policy or an IAM identity-based policy that grants s3express:CreateSession permission to the bucket. In a policy, you can have the s3express:SessionMode condition key to control who can create a ReadWrite or ReadOnly session. For more information about ReadWrite or ReadOnly sessions, see x-amz-create-session-mode . For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.

To grant cross-account access to Zonal endpoint API operations, the bucket policy should also grant both accounts the s3express:CreateSession permission.

If you want to encrypt objects with SSE-KMS, you must also have the kms:GenerateDataKey and the kms:Decrypt permissions in IAM identity-based policies and KMS key policies for the target KMS key.

Encryption

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your CreateSession requests or PUT object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, you authenticate and authorize requests through CreateSession for low latency. To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.

In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket.

When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), it's not supported to override the values of the encryption settings from the CreateSession request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

", "staticContextParams":{ "DisableS3ExpressSessionAuth":{"value":true} } @@ -132,7 +132,7 @@ }, "input":{"shape":"DeleteBucketRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html", - "documentation":"

Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to DeleteBucket:

", + "documentation":"

Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to DeleteBucket:

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -212,7 +212,7 @@ }, "input":{"shape":"DeleteBucketLifecycleRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html", - "documentation":"

Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

For more information about the object expiration, see Elements to Describe Lifecycle Actions.

Related actions include:

", + "documentation":"

Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

For more information about the object expiration, see Elements to Describe Lifecycle Actions.

Related actions include:

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -265,7 +265,7 @@ }, "input":{"shape":"DeleteBucketPolicyRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html", - "documentation":"

Deletes the policy of a specified bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the DeleteBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to DeleteBucketPolicy

", + "documentation":"

Deletes the policy of a specified bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the DeleteBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to DeleteBucketPolicy

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -321,7 +321,7 @@ "input":{"shape":"DeleteObjectRequest"}, "output":{"shape":"DeleteObjectOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html", - "documentation":"

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

To remove a specific version, you must use the versionId query parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header x-amz-delete-marker to true.

If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 User Guide. To see sample requests that use versioning, see Sample Request.

Directory buckets - MFA delete is not supported by directory buckets.

You can delete objects by explicitly calling DELETE Object or calling (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.

Directory buckets - S3 Lifecycle is not supported by directory buckets.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following action is related to DeleteObject:

" + "documentation":"

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

To remove a specific version, you must use the versionId query parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header x-amz-delete-marker to true.

If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 User Guide. To see sample requests that use versioning, see Sample Request.

Directory buckets - MFA delete is not supported by directory buckets.

You can delete objects by explicitly calling DELETE Object or calling (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.

Directory buckets - S3 Lifecycle is not supported by directory buckets.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following action is related to DeleteObject:

" }, "DeleteObjectTagging":{ "name":"DeleteObjectTagging", @@ -343,7 +343,7 @@ "input":{"shape":"DeleteObjectsRequest"}, "output":{"shape":"DeleteObjectsOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html", - "documentation":"

This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.

The request can contain a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.

The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion in a quiet mode, the operation does not return any information about the delete in the response body.

When performing this action on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete in the Amazon S3 User Guide.

Directory buckets - MFA delete is not supported by directory buckets.

Permissions
Content-MD5 request header
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to DeleteObjects:

", + "documentation":"

This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.

The request can contain a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.

The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion in a quiet mode, the operation does not return any information about the delete in the response body.

When performing this action on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete in the Amazon S3 User Guide.

Directory buckets - MFA delete is not supported by directory buckets.

Permissions
Content-MD5 request header
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to DeleteObjects:

", "alias":"DeleteMultipleObjects", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", @@ -479,7 +479,7 @@ }, "input":{"shape":"GetBucketLifecycleConfigurationRequest"}, "output":{"shape":"GetBucketLifecycleConfigurationOutput"}, - "documentation":"

Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API, which is compatible with the new functionality. The previous version of the API supported filtering based only on an object key name prefix, which is supported for general purpose buckets for backward compatibility. For the related API description, see GetBucketLifecycle.

Lifecyle configurations for directory buckets only support expiring objects and cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters are not supported.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

GetBucketLifecycleConfiguration has the following special error:

The following operations are related to GetBucketLifecycleConfiguration:

", + "documentation":"

Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API, which is compatible with the new functionality. The previous version of the API supported filtering based only on an object key name prefix, which is supported for general purpose buckets for backward compatibility. For the related API description, see GetBucketLifecycle.

Lifecyle configurations for directory buckets only support expiring objects and cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters are not supported.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

GetBucketLifecycleConfiguration has the following special error:

The following operations are related to GetBucketLifecycleConfiguration:

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -588,7 +588,7 @@ "input":{"shape":"GetBucketPolicyRequest"}, "output":{"shape":"GetBucketPolicyOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETpolicy.html", - "documentation":"

Returns the policy of a specified bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the GetBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

Example bucket policies

General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.

Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following action is related to GetBucketPolicy:

", + "documentation":"

Returns the policy of a specified bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the GetBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

Example bucket policies

General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.

Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following action is related to GetBucketPolicy:

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -688,10 +688,11 @@ {"shape":"InvalidObjectState"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGET.html", - "documentation":"

Retrieves an object from Amazon S3.

In the GetObject request, specify the full key name for the object.

General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg, specify the object key name as /photos/2006/February/sample.jpg. For a path-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket, specify the object key name as /examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification in the Amazon S3 User Guide.

Directory buckets - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket--use1-az5--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
Storage classes

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an InvalidObjectState error. For information about restoring archived objects, see Restoring Archived Objects in the Amazon S3 User Guide.

Directory buckets - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for the GetObject requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your GetObject requests for the object that uses these types of keys, you’ll get an HTTP 400 Bad Request error.

Directory buckets - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

Overriding response header values through the request

There are times when you want to override certain response header values of a GetObject response. For example, you might override the Content-Disposition response header value through your GetObject request.

You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code 200 OK is returned. The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object.

The response headers that you can override for the GetObject response are Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Type, and Expires.

To override values for a set of response headers in the GetObject response, you can use the following query parameters in the request.

When you use these parameters, you must sign the request by using either an Authorization header or a presigned URL. These parameters cannot be used with an unsigned (anonymous) request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to GetObject:

", + "documentation":"

Retrieves an object from Amazon S3.

In the GetObject request, specify the full key name for the object.

General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg, specify the object key name as /photos/2006/February/sample.jpg. For a path-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket, specify the object key name as /examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification in the Amazon S3 User Guide.

Directory buckets - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket--use1-az5--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
Storage classes

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an InvalidObjectState error. For information about restoring archived objects, see Restoring Archived Objects in the Amazon S3 User Guide.

Directory buckets - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for the GetObject requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your GetObject requests for the object that uses these types of keys, you’ll get an HTTP 400 Bad Request error.

Directory buckets - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

Overriding response header values through the request

There are times when you want to override certain response header values of a GetObject response. For example, you might override the Content-Disposition response header value through your GetObject request.

You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code 200 OK is returned. The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object.

The response headers that you can override for the GetObject response are Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Type, and Expires.

To override values for a set of response headers in the GetObject response, you can use the following query parameters in the request.

When you use these parameters, you must sign the request by using either an Authorization header or a presigned URL. These parameters cannot be used with an unsigned (anonymous) request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to GetObject:

", "httpChecksum":{ "requestValidationModeMember":"ChecksumMode", "responseAlgorithms":[ + "CRC64NVME", "CRC32", "CRC32C", "SHA256", @@ -724,7 +725,7 @@ "errors":[ {"shape":"NoSuchKey"} ], - "documentation":"

Retrieves all the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

GetObjectAttributes combines the functionality of HeadObject and ListParts. All of the data returned with each of those individual calls can be returned with a single call to GetObjectAttributes.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for HEAD requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption header is used when you PUT an object to S3 and want to specify the encryption method. If you include this header in a GET request for an object that uses these types of keys, you’ll get an HTTP 400 Bad Request error. It's because the encryption method can't be changed when you retrieve the object.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.

Directory bucket permissions - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your CreateSession requests or PUT object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

Versioning

Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request.

Conditional request headers

Consider the following when using request headers:

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following actions are related to GetObjectAttributes:

" + "documentation":"

Retrieves all the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

GetObjectAttributes combines the functionality of HeadObject and ListParts. All of the data returned with each of those individual calls can be returned with a single call to GetObjectAttributes.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for HEAD requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption header is used when you PUT an object to S3 and want to specify the encryption method. If you include this header in a GET request for an object that uses these types of keys, you’ll get an HTTP 400 Bad Request error. It's because the encryption method can't be changed when you retrieve the object.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.

Directory bucket permissions - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your CreateSession requests or PUT object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

Versioning

Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request.

Conditional request headers

Consider the following when using request headers:

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following actions are related to GetObjectAttributes:

" }, "GetObjectLegalHold":{ "name":"GetObjectLegalHold", @@ -802,7 +803,7 @@ {"shape":"NoSuchBucket"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketHEAD.html", - "documentation":"

You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a 200 OK if the bucket exists and you have permission to access it.

If the bucket does not exist or you do not have permission to access it, the HEAD request returns a generic 400 Bad Request, 403 Forbidden or 404 Not Found code. A message body is not included, so you cannot determine the exception beyond these HTTP response codes.

Authentication and authorization

General purpose buckets - Request to public buckets that grant the s3:ListBucket permission publicly do not need to be signed. All other HeadBucket requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use IAM credentials to authenticate and authorize your access to the HeadBucket API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

" + "documentation":"

You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a 200 OK if the bucket exists and you have permission to access it.

If the bucket does not exist or you do not have permission to access it, the HEAD request returns a generic 400 Bad Request, 403 Forbidden or 404 Not Found code. A message body is not included, so you cannot determine the exception beyond these HTTP response codes.

Authentication and authorization

General purpose buckets - Request to public buckets that grant the s3:ListBucket permission publicly do not need to be signed. All other HeadBucket requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use IAM credentials to authenticate and authorize your access to the HeadBucket API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

" }, "HeadObject":{ "name":"HeadObject", @@ -816,7 +817,7 @@ {"shape":"NoSuchKey"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html", - "documentation":"

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

A HEAD request has the same options as a GET operation on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic code, such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve the exact exception of these error codes.

Request headers are limited to 8 KB in size. For more information, see Common Request Headers.

Permissions

Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for HEAD requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption header is used when you PUT an object to S3 and want to specify the encryption method. If you include this header in a HEAD request for an object that uses these types of keys, you’ll get an HTTP 400 Bad Request error. It's because the encryption method can't be changed when you retrieve the object.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.

Directory bucket - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

Versioning
  • Directory buckets - Delete marker is not supported for directory buckets.

  • Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

The following actions are related to HeadObject:

" + "documentation":"

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

A HEAD request has the same options as a GET operation on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic code, such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve the exact exception of these error codes.

Request headers are limited to 8 KB in size. For more information, see Common Request Headers.

Permissions

Encryption

Encryption request headers, like x-amz-server-side-encryption, should not be sent for HEAD requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption header is used when you PUT an object to S3 and want to specify the encryption method. If you include this header in a HEAD request for an object that uses these types of keys, you’ll get an HTTP 400 Bad Request error. It's because the encryption method can't be changed when you retrieve the object.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.

Directory bucket - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

Versioning
  • Directory buckets - Delete marker is not supported for directory buckets.

  • Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

The following actions are related to HeadObject:

" }, "ListBucketAnalyticsConfigurations":{ "name":"ListBucketAnalyticsConfigurations", @@ -887,7 +888,7 @@ }, "input":{"shape":"ListDirectoryBucketsRequest"}, "output":{"shape":"ListDirectoryBucketsOutput"}, - "documentation":"

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions

You must have the s3express:ListAllMyDirectoryBuckets permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

The BucketRegion response element is not part of the ListDirectoryBuckets Response Syntax.

", + "documentation":"

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions

You must have the s3express:ListAllMyDirectoryBuckets permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

The BucketRegion response element is not part of the ListDirectoryBuckets Response Syntax.

", "staticContextParams":{ "UseS3ExpressControlEndpoint":{"value":true} } @@ -901,7 +902,7 @@ "input":{"shape":"ListMultipartUploadsRequest"}, "output":{"shape":"ListMultipartUploadsOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadListMPUpload.html", - "documentation":"

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a multipart upload that has been initiated by the CreateMultipartUpload request, but has not yet been completed or aborted.

Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed. To delete these in-progress multipart uploads, use the ListMultipartUploads operation to list the in-progress multipart uploads in the bucket and use the AbortMultipartUpload operation to abort all the in-progress multipart uploads.

The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart uploads is also the default value. You can further limit the number of uploads in a response by specifying the max-uploads request parameter. If there are more than 1,000 multipart uploads that satisfy your ListMultipartUploads request, the response returns an IsTruncated element with the value of true, a NextKeyMarker element, and a NextUploadIdMarker element. To list the remaining multipart uploads, you need to make subsequent ListMultipartUploads requests. In these requests, include two query parameters: key-marker and upload-id-marker. Set the value of key-marker to the NextKeyMarker value from the previous response. Similarly, set the value of upload-id-marker to the NextUploadIdMarker value from the previous response.

Directory buckets - The upload-id-marker element and the NextUploadIdMarker element aren't supported by directory buckets. To list the additional multipart uploads, you only need to set the value of key-marker to the NextKeyMarker value from the previous response.

For more information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
Sorting of multipart uploads in response
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to ListMultipartUploads:

" + "documentation":"

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a multipart upload that has been initiated by the CreateMultipartUpload request, but has not yet been completed or aborted.

Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed. To delete these in-progress multipart uploads, use the ListMultipartUploads operation to list the in-progress multipart uploads in the bucket and use the AbortMultipartUpload operation to abort all the in-progress multipart uploads.

The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart uploads is also the default value. You can further limit the number of uploads in a response by specifying the max-uploads request parameter. If there are more than 1,000 multipart uploads that satisfy your ListMultipartUploads request, the response returns an IsTruncated element with the value of true, a NextKeyMarker element, and a NextUploadIdMarker element. To list the remaining multipart uploads, you need to make subsequent ListMultipartUploads requests. In these requests, include two query parameters: key-marker and upload-id-marker. Set the value of key-marker to the NextKeyMarker value from the previous response. Similarly, set the value of upload-id-marker to the NextUploadIdMarker value from the previous response.

Directory buckets - The upload-id-marker element and the NextUploadIdMarker element aren't supported by directory buckets. To list the additional multipart uploads, you only need to set the value of key-marker to the NextKeyMarker value from the previous response.

For more information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
Sorting of multipart uploads in response
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to ListMultipartUploads:

" }, "ListObjectVersions":{ "name":"ListObjectVersions", @@ -941,7 +942,7 @@ "errors":[ {"shape":"NoSuchBucket"} ], - "documentation":"

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. For more information about listing objects, see Listing object keys programmatically in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets.

Permissions
Sorting order of returned objects
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

This section describes the latest revision of this action. We recommend that you use this revised API operation for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API operation, ListObjects.

The following operations are related to ListObjectsV2:

" + "documentation":"

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. For more information about listing objects, see Listing object keys programmatically in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets.

Permissions
Sorting order of returned objects
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

This section describes the latest revision of this action. We recommend that you use this revised API operation for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API operation, ListObjects.

The following operations are related to ListObjectsV2:

" }, "ListParts":{ "name":"ListParts", @@ -952,7 +953,7 @@ "input":{"shape":"ListPartsRequest"}, "output":{"shape":"ListPartsOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadListParts.html", - "documentation":"

Lists the parts that have been uploaded for a specific multipart upload.

To use this operation, you must provide the upload ID in the request. You obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

The ListParts request returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. To list remaining uploaded parts, in subsequent ListParts requests, include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response.

For more information on multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to ListParts:

" + "documentation":"

Lists the parts that have been uploaded for a specific multipart upload.

To use this operation, you must provide the upload ID in the request. You obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

The ListParts request returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. To list remaining uploaded parts, in subsequent ListParts requests, include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response.

For more information on multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to ListParts:

" }, "PutBucketAccelerateConfiguration":{ "name":"PutBucketAccelerateConfiguration", @@ -1023,7 +1024,7 @@ "requestUri":"/{Bucket}?encryption" }, "input":{"shape":"PutBucketEncryptionRequest"}, - "documentation":"

This operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

By default, all buckets have a default encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3).

If you're specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the key within the requester’s account. This behavior can result in data that's encrypted with a KMS key that belongs to the requester, and not the bucket owner.

Also, this action requires Amazon Web Services Signature Version 4. For more information, see Authenticating Requests (Amazon Web Services Signature Version 4).

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to PutBucketEncryption:

", + "documentation":"

This operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

By default, all buckets have a default encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3).

If you're specifying a customer managed KMS key, we recommend using a fully qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the key within the requester’s account. This behavior can result in data that's encrypted with a KMS key that belongs to the requester, and not the bucket owner.

Also, this action requires Amazon Web Services Signature Version 4. For more information, see Authenticating Requests (Amazon Web Services Signature Version 4).

Permissions
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to PutBucketEncryption:

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":true @@ -1064,7 +1065,7 @@ }, "input":{"shape":"PutBucketLifecycleRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html", - "documentation":"

For an updated version of this API, see PutBucketLifecycleConfiguration. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API.

This operation is not supported for directory buckets.

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Object Lifecycle Management in the Amazon S3 User Guide.

By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the Amazon Web Services account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the s3:PutLifecycleConfiguration permission.

You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:

For more information about permissions, see Managing Access Permissions to your Amazon S3 Resources in the Amazon S3 User Guide.

For more examples of transitioning objects to storage classes such as STANDARD_IA or ONEZONE_IA, see Examples of Lifecycle Configuration.

The following operations are related to PutBucketLifecycle:

", + "documentation":"

This operation is not supported for directory buckets.

For an updated version of this API, see PutBucketLifecycleConfiguration. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API.

This operation is not supported for directory buckets.

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Object Lifecycle Management in the Amazon S3 User Guide.

By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the Amazon Web Services account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the s3:PutLifecycleConfiguration permission.

You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:

For more information about permissions, see Managing Access Permissions to your Amazon S3 Resources in the Amazon S3 User Guide.

For more examples of transitioning objects to storage classes such as STANDARD_IA or ONEZONE_IA, see Examples of Lifecycle Configuration.

The following operations are related to PutBucketLifecycle:

", "deprecated":true, "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", @@ -1082,7 +1083,7 @@ }, "input":{"shape":"PutBucketLifecycleConfigurationRequest"}, "output":{"shape":"PutBucketLifecycleConfigurationOutput"}, - "documentation":"

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if you want to retain any configuration details, they must be included in the new lifecycle configuration. For information about lifecycle configuration, see Managing your storage lifecycle.

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see PutBucketLifecycle.

Rules
Permissions
HTTP Host header syntax

You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.

Bucket lifecycle configuration supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility for general purpose buckets. For the related API description, see PutBucketLifecycle.

Lifecyle configurations for directory buckets only support expiring objects and cancelling multipart uploads. Expiring of versioned objects,transitions and tag filters are not supported.

A lifecycle rule consists of the following:

For more information, see Object Lifecycle Management and Lifecycle Configuration Elements.

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

The following operations are related to PutBucketLifecycleConfiguration:

", + "documentation":"

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if you want to retain any configuration details, they must be included in the new lifecycle configuration. For information about lifecycle configuration, see Managing your storage lifecycle.

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see PutBucketLifecycle.

Rules
Permissions
HTTP Host header syntax

You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.

Bucket lifecycle configuration supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility for general purpose buckets. For the related API description, see PutBucketLifecycle.

Lifecyle configurations for directory buckets only support expiring objects and cancelling multipart uploads. Expiring of versioned objects,transitions and tag filters are not supported.

A lifecycle rule consists of the following:

For more information, see Object Lifecycle Management and Lifecycle Configuration Elements.

Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

The following operations are related to PutBucketLifecycleConfiguration:

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":true @@ -1171,7 +1172,7 @@ }, "input":{"shape":"PutBucketPolicyRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTpolicy.html", - "documentation":"

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the PutBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

Example bucket policies

General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.

Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to PutBucketPolicy:

", + "documentation":"

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions

If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, the calling identity must both have the PutBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

To ensure that bucket owners don't inadvertently lock themselves out of their own buckets, the root principal in a bucket owner's Amazon Web Services account can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal's access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and Amazon Web Services Organizations policies.

Example bucket policies

General purpose buckets example bucket policies - See Bucket policy examples in the Amazon S3 User Guide.

Directory bucket example bucket policies - See Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide.

HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

The following operations are related to PutBucketPolicy:

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":true @@ -1238,7 +1239,7 @@ }, "input":{"shape":"PutBucketVersioningRequest"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html", - "documentation":"

This operation is not supported for directory buckets.

When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. While this change is propagating, you may encounter intermittent HTTP 404 NoSuchKey errors for requests to objects created or updated after enabling versioning. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (PUT or DELETE) on objects in the bucket.

Sets the versioning state of an existing bucket.

You can set the versioning state with one of the following values:

Enabled—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.

Suspended—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.

If the versioning state has never been set on a bucket, it has no versioning state; a GetBucketVersioning request does not return a versioning state value.

In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner and want to enable MFA Delete in the bucket versioning configuration, you must include the x-amz-mfa request header and the Status and the MfaDelete request elements in a request to set the versioning state of the bucket.

If you have an object expiration lifecycle configuration in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle configuration will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see Lifecycle and Versioning.

The following operations are related to PutBucketVersioning:

", + "documentation":"

This operation is not supported for directory buckets.

When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. While this change is propagating, you might encounter intermittent HTTP 404 NoSuchKey errors for requests to objects created or updated after enabling versioning. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (PUT or DELETE) on objects in the bucket.

Sets the versioning state of an existing bucket.

You can set the versioning state with one of the following values:

Enabled—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.

Suspended—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.

If the versioning state has never been set on a bucket, it has no versioning state; a GetBucketVersioning request does not return a versioning state value.

In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner and want to enable MFA Delete in the bucket versioning configuration, you must include the x-amz-mfa request header and the Status and the MfaDelete request elements in a request to set the versioning state of the bucket.

If you have an object expiration lifecycle configuration in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle configuration will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see Lifecycle and Versioning.

The following operations are related to PutBucketVersioning:

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":true @@ -1279,7 +1280,7 @@ {"shape":"EncryptionTypeMismatch"} ], "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html", - "documentation":"

Adds an object to a bucket.

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

Permissions
Data integrity with Content-MD5
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

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

", + "documentation":"

Adds an object to a bucket.

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

Permissions
Data integrity with Content-MD5
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

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

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":false @@ -1417,7 +1418,7 @@ "input":{"shape":"UploadPartRequest"}, "output":{"shape":"UploadPartOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html", - "documentation":"

Uploads a part in a multipart upload.

In this operation, you provide new data as a part of an object in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

You must initiate a multipart upload (see CreateMultipartUpload) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier that you must include in your upload part request.

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.

For more information on multipart uploads, go to Multipart Upload Overview in the Amazon S3 User Guide .

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Permissions
Data integrity

General purpose bucket - To ensure that data is not corrupted traversing the network, specify the Content-MD5 header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256 header as a checksum instead of Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).

Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

Encryption
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to UploadPart:

", + "documentation":"

Uploads a part in a multipart upload.

In this operation, you provide new data as a part of an object in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

You must initiate a multipart upload (see CreateMultipartUpload) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier that you must include in your upload part request.

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.

For more information on multipart uploads, go to Multipart Upload Overview in the Amazon S3 User Guide .

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Permissions
Data integrity

General purpose bucket - To ensure that data is not corrupted traversing the network, specify the Content-MD5 header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256 header as a checksum instead of Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).

Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

Encryption
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to UploadPart:

", "httpChecksum":{ "requestAlgorithmMember":"ChecksumAlgorithm", "requestChecksumRequired":false @@ -1432,7 +1433,7 @@ "input":{"shape":"UploadPartCopyRequest"}, "output":{"shape":"UploadPartCopyOutput"}, "documentationUrl":"http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html", - "documentation":"

Uploads a part by copying data from an existing object as data source. To specify the data source, you add the request header x-amz-copy-source in your request. To specify a byte range, you add the request header x-amz-copy-source-range in your request.

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

Instead of copying data from an existing object as part data, you might use the UploadPart action to upload new data as a part of an object in your request.

You must initiate a multipart upload before you can upload any part. In response to your initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in your upload part request.

For conceptual information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide. For information about copying objects using a single atomic action vs. a multipart upload, see Operations on Objects in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide.

Authentication and authorization

All UploadPartCopy requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use IAM credentials to authenticate and authorize your access to the UploadPartCopy API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

You must have READ access to the source object and WRITE access to the destination bucket.

Encryption
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to UploadPartCopy:

", + "documentation":"

Uploads a part by copying data from an existing object as data source. To specify the data source, you add the request header x-amz-copy-source in your request. To specify a byte range, you add the request header x-amz-copy-source-range in your request.

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

Instead of copying data from an existing object as part data, you might use the UploadPart action to upload new data as a part of an object in your request.

You must initiate a multipart upload before you can upload any part. In response to your initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in your upload part request.

For conceptual information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide. For information about copying objects using a single atomic action vs. a multipart upload, see Operations on Objects in the Amazon S3 User Guide.

Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Available Local Zone for directory buckets in the Amazon S3 User Guide.

Authentication and authorization

All UploadPartCopy requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the x-amz- prefix, including x-amz-copy-source, must be signed. For more information, see REST Authentication.

Directory buckets - You must use IAM credentials to authenticate and authorize your access to the UploadPartCopy API operation, instead of using the temporary security credentials through the CreateSession API operation.

Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.

Permissions

You must have READ access to the source object and WRITE access to the destination bucket.

Encryption
Special errors
HTTP Host header syntax

Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com.

The following operations are related to UploadPartCopy:

", "staticContextParams":{ "DisableS3ExpressSessionAuth":{"value":true} } @@ -1988,19 +1989,27 @@ "members":{ "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This checksum is present if the object was uploaded with the CRC-64NVME checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, CRC-64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

Contains all the possible checksum or digest values for an object.

" @@ -2011,7 +2020,8 @@ "CRC32", "CRC32C", "SHA1", - "SHA256" + "SHA256", + "CRC64NVME" ] }, "ChecksumAlgorithmList":{ @@ -2021,12 +2031,20 @@ }, "ChecksumCRC32":{"type":"string"}, "ChecksumCRC32C":{"type":"string"}, + "ChecksumCRC64NVME":{"type":"string"}, "ChecksumMode":{ "type":"string", "enum":["ENABLED"] }, "ChecksumSHA1":{"type":"string"}, "ChecksumSHA256":{"type":"string"}, + "ChecksumType":{ + "type":"string", + "enum":[ + "COMPOSITE", + "FULL_OBJECT" + ] + }, "CloudFunction":{"type":"string"}, "CloudFunctionConfiguration":{ "type":"structure", @@ -2097,19 +2115,27 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME checksum is always a full object checksum. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum type that was specified during the CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ServerSideEncryption":{ "shape":"ServerSideEncryption", @@ -2178,28 +2204,46 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME checksum is always a full object checksum. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the CreateMultipartUpload request, it’ll result in a BadDigest error. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" + }, + "MpuObjectSize":{ + "shape":"MpuObjectSize", + "documentation":"

The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an HTTP 400 InvalidRequest error.

", + "location":"header", + "locationName":"x-amz-mp-object-size" + }, "RequestPayer":{ "shape":"RequestPayer", "location":"header", @@ -2264,19 +2308,23 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is present if the multipart upload request was created with the CRC-32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is present if the multipart upload request was created with the CRC-32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is present if the multipart upload request was created with the CRC-64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is present if the multipart upload request was created with the SHA-1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is present if the multipart upload request was created with the SHA-256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "PartNumber":{ "shape":"PartNumber", @@ -2381,7 +2429,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

", + "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption context key-value pairs.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -2668,21 +2716,29 @@ "shape":"LastModified", "documentation":"

Creation date of the object.

" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This checksum is present if the object being copied was uploaded with the CRC-64NVME checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, CRC-64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

Container for all response elements.

" @@ -2700,19 +2756,23 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32C checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is present if the multipart upload request was created with the CRC-64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit SHA-1 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit SHA-256 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

Container for all response elements.

" @@ -2738,11 +2798,11 @@ "members":{ "LocationConstraint":{ "shape":"BucketLocationConstraint", - "documentation":"

Specifies the Region where the bucket will be created. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the Europe (Ireland) Region.

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1) by default.

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and Endpoints.

This functionality is not supported for directory buckets.

" + "documentation":"

Specifies the Region where the bucket will be created. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the Europe (Ireland) Region. For more information, see Accessing a bucket in the Amazon S3 User Guide.

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1) by default.

This functionality is not supported for directory buckets.

" }, "Location":{ "shape":"LocationInfo", - "documentation":"

Specifies the location where the bucket will be created.

Directory buckets - The location type is Availability Zone or Local Zone. To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide.

This functionality is only supported by directory buckets.

" + "documentation":"

Specifies the location where the bucket will be created.

Directory buckets - The location type is Availability Zone or Local Zone. When the location type is Local Zone, your Local Zone must be in opt-in status. Otherwise, you get an HTTP 400 Bad Request error with the error code Access denied. To learn more about opt-in Local Zones, see Opt-in Dedicated Local Zonesin the Amazon S3 User Guide.

This functionality is only supported by directory buckets.

" }, "Bucket":{ "shape":"BucketInfo", @@ -2924,7 +2984,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

", + "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -2944,6 +3004,12 @@ "documentation":"

The algorithm that was used to create a checksum of the object.

", "location":"header", "locationName":"x-amz-checksum-algorithm" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" } } }, @@ -3084,7 +3150,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "documentation":"

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -3134,6 +3200,12 @@ "documentation":"

Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-algorithm" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" } } }, @@ -3155,7 +3227,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

", + "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -3203,7 +3275,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "documentation":"

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -3816,7 +3888,7 @@ }, "ChecksumAlgorithm":{ "shape":"ChecksumAlgorithm", - "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm .

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

", + "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

", "location":"header", "locationName":"x-amz-sdk-checksum-algorithm" } @@ -4396,7 +4468,7 @@ }, "TransitionDefaultMinimumObjectSize":{ "shape":"TransitionDefaultMinimumObjectSize", - "documentation":"

Indicates which default minimum object size behavior is applied to the lifecycle configuration.

This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.

To customize the minimum object size for any transition you can add a filter that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body of your transition rule. Custom filters always take precedence over the default transition behavior.

", + "documentation":"

Indicates which default minimum object size behavior is applied to the lifecycle configuration.

This parameter applies to general purpose buckets only. It isn't supported for directory bucket lifecycle configurations.

To customize the minimum object size for any transition you can add a filter that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body of your transition rule. Custom filters always take precedence over the default transition behavior.

", "location":"header", "locationName":"x-amz-transition-default-minimum-object-size" } @@ -5200,28 +5272,40 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header response to verify that the checksum type that is received is the same checksum type that was specified in the CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" + }, "MissingMeta":{ "shape":"MissingMeta", "documentation":"

This is set to the number of metadata entries not returned in the headers that are prefixed with x-amz-meta-. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.

This functionality is not supported for directory buckets.

", @@ -5856,28 +5940,40 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header response to verify that the checksum type that is received is the same checksum type that was specified in CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" + }, "ETag":{ "shape":"ETag", "documentation":"

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.

", @@ -7533,6 +7629,10 @@ "ChecksumAlgorithm":{ "shape":"ChecksumAlgorithm", "documentation":"

The algorithm that was used to create a checksum of the object.

" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header response to verify that the checksum type that is received is the same checksum type that was specified in CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } } }, @@ -7620,7 +7720,7 @@ "documentation":"

The name of the location where the bucket will be created.

For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

" } }, - "documentation":"

Specifies the location where the bucket will be created.

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see Working with directory buckets in the Amazon S3 User Guide.

This functionality is only supported by directory buckets.

" + "documentation":"

Specifies the location where the bucket will be created.

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

This functionality is only supported by directory buckets.

" }, "LocationNameAsString":{"type":"string"}, "LocationPrefix":{"type":"string"}, @@ -7834,6 +7934,7 @@ "box":true }, "MissingMeta":{"type":"integer"}, + "MpuObjectSize":{"type":"integer"}, "MultipartUpload":{ "type":"structure", "members":{ @@ -7864,6 +7965,10 @@ "ChecksumAlgorithm":{ "shape":"ChecksumAlgorithm", "documentation":"

The algorithm that was used to create a checksum of the object.

" + }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

Container for the MultipartUpload for the Amazon S3 object.

" @@ -8019,6 +8124,10 @@ "shape":"ChecksumAlgorithmList", "documentation":"

The algorithm that was used to create a checksum of the object.

" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, "Size":{ "shape":"Size", "documentation":"

Size in bytes of the object

" @@ -8225,19 +8334,23 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is present if the multipart upload request was created with the CRC-32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is present if the multipart upload request was created with the CRC-32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is present if the multipart upload request was created with the CRC-64NVME checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, CRC-64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is present if the multipart upload request was created with the SHA-1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is present if the multipart upload request was created with the SHA-256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

A container for elements related to an individual part.

" @@ -8281,6 +8394,10 @@ "shape":"ChecksumAlgorithmList", "documentation":"

The algorithm that was used to create a checksum of the object.

" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, "Size":{ "shape":"Size", "documentation":"

Size in bytes of the object.

" @@ -8428,19 +8545,23 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is present if the object was uploaded with the CRC-32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is present if the object was uploaded with the CRC-32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is present if the multipart upload request was created with the CRC-64NVME checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, CRC-64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is present if the object was uploaded with the SHA-1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + "documentation":"

The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is present if the object was uploaded with the SHA-256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" } }, "documentation":"

Container for elements related to a part.

" @@ -8636,7 +8757,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -8743,7 +8864,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -8778,7 +8899,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the server-side encryption configuration.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

This functionality is not supported for directory buckets.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the server-side encryption configuration.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

This functionality is not supported for directory buckets.

", "location":"header", "locationName":"Content-MD5" }, @@ -9164,7 +9285,7 @@ }, "ChecksumAlgorithm":{ "shape":"ChecksumAlgorithm", - "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm .

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", + "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", "location":"header", "locationName":"x-amz-sdk-checksum-algorithm" }, @@ -9203,7 +9324,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9249,7 +9370,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9290,7 +9411,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9331,7 +9452,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

>The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9378,7 +9499,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9441,7 +9562,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.>

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.>

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", "location":"header", "locationName":"Content-MD5" }, @@ -9652,28 +9773,40 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This header is present if the object was uploaded with the CRC-64NVME checksum algorithm, or if it was uploaded without a checksum (and Amazon S3 added the default checksum, CRC-64NVME, to the uploaded object). For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, + "ChecksumType":{ + "shape":"ChecksumType", + "documentation":"

This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. For PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-type" + }, "ServerSideEncryption":{ "shape":"ServerSideEncryption", "documentation":"

The server-side encryption algorithm used when you store this object in Amazon S3.

", @@ -9706,7 +9839,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

", + "documentation":"

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -9718,7 +9851,7 @@ }, "Size":{ "shape":"Size", - "documentation":"

The size of the object in bytes. This will only be present if you append to an object.

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

", + "documentation":"

The size of the object in bytes. This value is only be present if you append to an object.

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

", "location":"header", "locationName":"x-amz-object-size" }, @@ -9786,7 +9919,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see REST Authentication.

The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see REST Authentication.

The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

", "location":"header", "locationName":"Content-MD5" }, @@ -9798,31 +9931,37 @@ }, "ChecksumAlgorithm":{ "shape":"ChecksumAlgorithm", - "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum algorithm that matches the provided value in x-amz-checksum-algorithm .

The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the Amazon S3 User Guide.

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", + "documentation":"

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

For the x-amz-checksum-algorithm header, replace algorithm with the supported algorithm from the following list:

For more information, see Checking object integrity in the Amazon S3 User Guide.

If the individual checksum value you provide through x-amz-checksum-algorithm doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the Amazon S3 User Guide.

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", "location":"header", "locationName":"x-amz-sdk-checksum-algorithm" }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME checksum is always a full object checksum. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, @@ -9931,7 +10070,7 @@ }, "SSEKMSEncryptionContext":{ "shape":"SSEKMSEncryptionContext", - "documentation":"

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "documentation":"

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future GetObject operations on this object.

General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", "location":"header", "locationName":"x-amz-server-side-encryption-context" }, @@ -11622,25 +11761,31 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, @@ -11704,7 +11849,7 @@ }, "ContentMD5":{ "shape":"ContentMD5", - "documentation":"

The base64-encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.

This functionality is not supported for directory buckets.

", + "documentation":"

The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.

This functionality is not supported for directory buckets.

", "location":"header", "locationName":"Content-MD5" }, @@ -11716,25 +11861,31 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit CRC-32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

", "location":"header", "locationName":"x-amz-checksum-sha256" }, @@ -11933,25 +12084,31 @@ }, "ChecksumCRC32":{ "shape":"ChecksumCRC32", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the base64-encoded, 32-bit CRC-32 checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC-32 checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", "location":"header", "locationName":"x-amz-fwd-header-x-amz-checksum-crc32" }, "ChecksumCRC32C":{ "shape":"ChecksumCRC32C", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the base64-encoded, 32-bit CRC-32C checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC-32C checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", "location":"header", "locationName":"x-amz-fwd-header-x-amz-checksum-crc32c" }, + "ChecksumCRC64NVME":{ + "shape":"ChecksumCRC64NVME", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "location":"header", + "locationName":"x-amz-fwd-header-x-amz-checksum-crc64nvme" + }, "ChecksumSHA1":{ "shape":"ChecksumSHA1", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the base64-encoded, 160-bit SHA-1 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA-1 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", "location":"header", "locationName":"x-amz-fwd-header-x-amz-checksum-sha1" }, "ChecksumSHA256":{ "shape":"ChecksumSHA256", - "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the base64-encoded, 256-bit SHA-256 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", + "documentation":"

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA-256 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

", "location":"header", "locationName":"x-amz-fwd-header-x-amz-checksum-sha256" }, diff --git a/botocore/data/security-ir/2018-05-10/service-2.json b/botocore/data/security-ir/2018-05-10/service-2.json index 104941de85..a41dafc466 100644 --- a/botocore/data/security-ir/2018-05-10/service-2.json +++ b/botocore/data/security-ir/2018-05-10/service-2.json @@ -2244,7 +2244,7 @@ "UserAgent":{ "type":"string", "max":500, - "min":0 + "min":1 }, "ValidationException":{ "type":"structure", diff --git a/botocore/data/sesv2/2019-09-27/service-2.json b/botocore/data/sesv2/2019-09-27/service-2.json index 6018ffc67a..f666cd6be5 100644 --- a/botocore/data/sesv2/2019-09-27/service-2.json +++ b/botocore/data/sesv2/2019-09-27/service-2.json @@ -6390,7 +6390,8 @@ "DKIM", "DMARC", "SPF", - "BIMI" + "BIMI", + "COMPLAINT" ] }, "RecommendationsList":{ diff --git a/botocore/data/workspaces-thin-client/2023-08-22/service-2.json b/botocore/data/workspaces-thin-client/2023-08-22/service-2.json index 0442a76e60..17834270b8 100644 --- a/botocore/data/workspaces-thin-client/2023-08-22/service-2.json +++ b/botocore/data/workspaces-thin-client/2023-08-22/service-2.json @@ -1136,6 +1136,7 @@ }, "MaintenanceWindow":{ "type":"structure", + "required":["type"], "members":{ "type":{ "shape":"MaintenanceWindowType", diff --git a/botocore/data/workspaces/2015-04-08/service-2.json b/botocore/data/workspaces/2015-04-08/service-2.json index ebc4fada5d..c583e05a31 100644 --- a/botocore/data/workspaces/2015-04-08/service-2.json +++ b/botocore/data/workspaces/2015-04-08/service-2.json @@ -2096,6 +2096,8 @@ "POWER", "GRAPHICS", "POWERPRO", + "GENERALPURPOSE_4XLARGE", + "GENERALPURPOSE_8XLARGE", "GRAPHICSPRO", "GRAPHICS_G4DN", "GRAPHICSPRO_G4DN" diff --git a/botocore/exceptions.py b/botocore/exceptions.py index 9fa0dfaa84..5f2a5a1f76 100644 --- a/botocore/exceptions.py +++ b/botocore/exceptions.py @@ -814,3 +814,12 @@ class EndpointResolutionError(EndpointProviderError): class UnknownEndpointResolutionBuiltInName(EndpointProviderError): fmt = 'Unknown builtin variable name: {name}' + + +class InvalidChecksumConfigError(BotoCoreError): + """Error when an invalid checksum config value is supplied.""" + + fmt = ( + 'Unsupported configuration value for {config_key}. ' + 'Expected one of {valid_options} but got {config_value}.' + ) diff --git a/botocore/handlers.py b/botocore/handlers.py index d0a89e97dd..29a8680a08 100644 --- a/botocore/handlers.py +++ b/botocore/handlers.py @@ -62,8 +62,6 @@ from botocore.utils import ( SAFE_CHARS, ArnParser, - conditionally_calculate_checksum, - conditionally_calculate_md5, percent_encode, switch_host_with_param, ) @@ -1294,6 +1292,33 @@ def add_query_compatibility_header(model, params, **kwargs): params['headers']['x-amzn-query-mode'] = 'true' +def _handle_request_validation_mode_member(params, model, **kwargs): + client_config = kwargs.get("context", {}).get("client_config") + if client_config is None: + return + response_checksum_validation = client_config.response_checksum_validation + http_checksum = model.http_checksum + mode_member = http_checksum.get("requestValidationModeMember") + if ( + mode_member is not None + and response_checksum_validation == "when_supported" + ): + params.setdefault(mode_member, "ENABLED") + + +def _set_extra_headers_for_unsigned_request( + request, signature_version, **kwargs +): + # When sending a checksum in the trailer of an unsigned chunked request, S3 + # requires us to set the "X-Amz-Content-SHA256" header to "STREAMING-UNSIGNED-PAYLOAD-TRAILER". + checksum_context = request.context.get("checksum", {}) + algorithm = checksum_context.get("request_algorithm", {}) + in_trailer = algorithm.get("in") == "trailer" + headers = request.headers + if signature_version == botocore.UNSIGNED and in_trailer: + headers["X-Amz-Content-SHA256"] = "STREAMING-UNSIGNED-PAYLOAD-TRAILER" + + # This is a list of (event_name, handler). # When a Session is created, everything in this list will be # automatically registered with that Session. @@ -1326,6 +1351,7 @@ def add_query_compatibility_header(model, params, **kwargs): ('before-parse.s3.*', handle_expires_header), ('before-parse.s3.*', _handle_200_error, REGISTER_FIRST), ('before-parameter-build', generate_idempotent_uuid), + ('before-parameter-build', _handle_request_validation_mode_member), ('before-parameter-build.s3', validate_bucket_name), ('before-parameter-build.s3', remove_bucket_from_url_paths_from_model), ( @@ -1359,10 +1385,7 @@ def add_query_compatibility_header(model, params, **kwargs): ('before-call.s3', add_expect_header), ('before-call.glacier', add_glacier_version), ('before-call.apigateway', add_accept_header), - ('before-call.s3.PutObject', conditionally_calculate_checksum), - ('before-call.s3.UploadPart', conditionally_calculate_md5), ('before-call.s3.DeleteObjects', escape_xml_payload), - ('before-call.s3.DeleteObjects', conditionally_calculate_checksum), ('before-call.s3.PutBucketLifecycleConfiguration', escape_xml_payload), ('before-call.glacier.UploadArchive', add_glacier_checksums), ('before-call.glacier.UploadMultipartPart', add_glacier_checksums), @@ -1399,6 +1422,7 @@ def add_query_compatibility_header(model, params, **kwargs): ('before-parameter-build.route53', fix_route53_ids), ('before-parameter-build.glacier', inject_account_id), ('before-sign.s3', remove_arn_from_signing_path), + ('before-sign.s3', _set_extra_headers_for_unsigned_request), ( 'before-sign.polly.SynthesizeSpeech', remove_content_type_header_for_presigning, diff --git a/botocore/httpchecksum.py b/botocore/httpchecksum.py index a97eb430d4..a4b7e8648d 100644 --- a/botocore/httpchecksum.py +++ b/botocore/httpchecksum.py @@ -25,17 +25,15 @@ from binascii import crc32 from hashlib import sha1, sha256 -from botocore.compat import HAS_CRT +from botocore.compat import HAS_CRT, urlparse from botocore.exceptions import ( AwsChunkedWrapperError, FlexibleChecksumError, MissingDependencyException, ) +from botocore.model import StructureShape from botocore.response import StreamingBody -from botocore.utils import ( - conditionally_calculate_md5, - determine_content_length, -) +from botocore.utils import determine_content_length, has_checksum_header if HAS_CRT: from awscrt import checksums as crt_checksums @@ -44,6 +42,8 @@ logger = logging.getLogger(__name__) +DEFAULT_CHECKSUM_ALGORITHM = "CRC32" + class BaseChecksum: _CHUNK_SIZE = 1024 * 1024 @@ -109,6 +109,19 @@ def digest(self): return self._int_crc32c.to_bytes(4, byteorder="big") +class CrtCrc64NvmeChecksum(BaseChecksum): + # Note: This class is only used if the CRT is available + def __init__(self): + self._int_crc64nvme = 0 + + def update(self, chunk): + new_checksum = crt_checksums.crc64nvme(chunk, self._int_crc64nvme) + self._int_crc64nvme = new_checksum & 0xFFFFFFFFFFFFFFFF + + def digest(self): + return self._int_crc64nvme.to_bytes(8, byteorder="big") + + class Sha1Checksum(BaseChecksum): def __init__(self): self._checksum = sha1() @@ -246,7 +259,19 @@ def resolve_request_checksum_algorithm( params, supported_algorithms=None, ): + # If the header is already set by the customer, skip calculation + if has_checksum_header(request): + return + + checksum_context = request["context"].get("checksum", {}) + request_checksum_calculation = request["context"][ + "client_config" + ].request_checksum_calculation http_checksum = operation_model.http_checksum + request_checksum_required = ( + operation_model.http_checksum_required + or http_checksum.get("requestChecksumRequired") + ) algorithm_member = http_checksum.get("requestAlgorithmMember") if algorithm_member and algorithm_member in params: # If the client has opted into using flexible checksums and the @@ -267,35 +292,59 @@ def resolve_request_checksum_algorithm( raise FlexibleChecksumError( error_msg=f"Unsupported checksum algorithm: {algorithm_name}" ) + elif request_checksum_required or ( + algorithm_member and request_checksum_calculation == "when_supported" + ): + # Don't use a default checksum for presigned requests. + if request["context"].get("is_presign_request"): + return + algorithm_name = DEFAULT_CHECKSUM_ALGORITHM.lower() + algorithm_member_header = _get_request_algorithm_member_header( + operation_model, request, algorithm_member + ) + if algorithm_member_header is not None: + checksum_context["request_algorithm_header"] = { + "name": algorithm_member_header, + "value": DEFAULT_CHECKSUM_ALGORITHM, + } + else: + return - location_type = "header" - if operation_model.has_streaming_input: + location_type = "header" + if ( + operation_model.has_streaming_input + and urlparse(request["url"]).scheme == "https" + ): + if request["context"]["client_config"].signature_version != 's3': # Operations with streaming input must support trailers. - if request["url"].startswith("https:"): - # We only support unsigned trailer checksums currently. As this - # disables payload signing we'll only use trailers over TLS. - location_type = "trailer" - - algorithm = { - "algorithm": algorithm_name, - "in": location_type, - "name": f"x-amz-checksum-{algorithm_name}", - } + # We only support unsigned trailer checksums currently. As this + # disables payload signing we'll only use trailers over TLS. + location_type = "trailer" + + algorithm = { + "algorithm": algorithm_name, + "in": location_type, + "name": f"x-amz-checksum-{algorithm_name}", + } - if algorithm["name"] in request["headers"]: - # If the header is already set by the customer, skip calculation - return + checksum_context["request_algorithm"] = algorithm + request["context"]["checksum"] = checksum_context - checksum_context = request["context"].get("checksum", {}) - checksum_context["request_algorithm"] = algorithm - request["context"]["checksum"] = checksum_context - elif operation_model.http_checksum_required or http_checksum.get( - "requestChecksumRequired" - ): - # Otherwise apply the old http checksum behavior via Content-MD5 - checksum_context = request["context"].get("checksum", {}) - checksum_context["request_algorithm"] = "conditional-md5" - request["context"]["checksum"] = checksum_context + +def _get_request_algorithm_member_header( + operation_model, request, algorithm_member +): + """Get the name of the header targeted by the "requestAlgorithmMember".""" + operation_input_shape = operation_model.input_shape + if not isinstance(operation_input_shape, StructureShape): + return + + algorithm_member_shape = operation_input_shape.members.get( + algorithm_member + ) + + if algorithm_member_shape: + return algorithm_member_shape.serialization.get("name") def apply_request_checksum(request): @@ -305,10 +354,7 @@ def apply_request_checksum(request): if not algorithm: return - if algorithm == "conditional-md5": - # Special case to handle the http checksum required trait - conditionally_calculate_md5(request) - elif algorithm["in"] == "header": + if algorithm["in"] == "header": _apply_request_header_checksum(request) elif algorithm["in"] == "trailer": _apply_request_trailer_checksum(request) @@ -316,6 +362,11 @@ def apply_request_checksum(request): raise FlexibleChecksumError( error_msg="Unknown checksum variant: {}".format(algorithm["in"]) ) + if "request_algorithm_header" in checksum_context: + request_algorithm_header = checksum_context["request_algorithm_header"] + request["headers"][request_algorithm_header["name"]] = ( + request_algorithm_header["value"] + ) def _apply_request_header_checksum(request): @@ -465,12 +516,13 @@ def _handle_bytes_response(http_response, response, algorithm): "sha1": Sha1Checksum, "sha256": Sha256Checksum, } -_CRT_CHECKSUM_ALGORITHMS = ["crc32", "crc32c"] +_CRT_CHECKSUM_ALGORITHMS = ["crc32", "crc32c", "crc64nvme"] if HAS_CRT: # Use CRT checksum implementations if available _CRT_CHECKSUM_CLS = { "crc32": CrtCrc32Checksum, "crc32c": CrtCrc32cChecksum, + "crc64nvme": CrtCrc64NvmeChecksum, } _CHECKSUM_CLS.update(_CRT_CHECKSUM_CLS) # Validate this list isn't out of sync with _CRT_CHECKSUM_CLS keys @@ -478,4 +530,4 @@ def _handle_bytes_response(http_response, response, algorithm): name in _CRT_CHECKSUM_ALGORITHMS for name in _CRT_CHECKSUM_CLS.keys() ) _SUPPORTED_CHECKSUM_ALGORITHMS = list(_CHECKSUM_CLS.keys()) -_ALGORITHMS_PRIORITY_LIST = ['crc32c', 'crc32', 'sha1', 'sha256'] +_ALGORITHMS_PRIORITY_LIST = ['crc64nvme', 'crc32c', 'crc32', 'sha1', 'sha256'] diff --git a/botocore/utils.py b/botocore/utils.py index 86ebde80fe..30a513ea90 100644 --- a/botocore/utils.py +++ b/botocore/utils.py @@ -3228,6 +3228,7 @@ def get_encoding_from_headers(headers, default='ISO-8859-1'): def calculate_md5(body, **kwargs): + """This function has been deprecated, but is kept for backwards compatibility.""" if isinstance(body, (bytes, bytearray)): binary_md5 = _calculate_md5_from_bytes(body) else: @@ -3236,11 +3237,13 @@ def calculate_md5(body, **kwargs): def _calculate_md5_from_bytes(body_bytes): + """This function has been deprecated, but is kept for backwards compatibility.""" md5 = get_md5(body_bytes) return md5.digest() def _calculate_md5_from_file(fileobj): + """This function has been deprecated, but is kept for backwards compatibility.""" start_position = fileobj.tell() md5 = get_md5() for chunk in iter(lambda: fileobj.read(1024 * 1024), b''): @@ -3256,15 +3259,17 @@ def _is_s3express_request(params): return endpoint_properties.get('backend') == 'S3Express' -def _has_checksum_header(params): +def has_checksum_header(params): + """ + Checks if a header starting with "x-amz-checksum-" is provided in a request. + + This function is considered private and subject to abrupt breaking changes or + removal without prior announcement. Please do not use it directly. + """ headers = params['headers'] - # If a user provided Content-MD5 is present, - # don't try to compute a new one. - if 'Content-MD5' in headers: - return True # If a header matching the x-amz-checksum-* pattern is present, we - # assume a checksum has already been provided and an md5 is not needed + # assume a checksum has already been provided by the user. for header in headers: if CHECKSUM_HEADER_PATTERN.match(header): return True @@ -3273,12 +3278,14 @@ def _has_checksum_header(params): def conditionally_calculate_checksum(params, **kwargs): - if not _has_checksum_header(params): + """This function has been deprecated, but is kept for backwards compatibility.""" + if not has_checksum_header(params): conditionally_calculate_md5(params, **kwargs) conditionally_enable_crc32(params, **kwargs) def conditionally_enable_crc32(params, **kwargs): + """This function has been deprecated, but is kept for backwards compatibility.""" checksum_context = params.get('context', {}).get('checksum', {}) checksum_algorithm = checksum_context.get('request_algorithm') if ( @@ -3296,7 +3303,10 @@ def conditionally_enable_crc32(params, **kwargs): def conditionally_calculate_md5(params, **kwargs): - """Only add a Content-MD5 if the system supports it.""" + """Only add a Content-MD5 if the system supports it. + + This function has been deprecated, but is kept for backwards compatibility. + """ body = params['body'] checksum_context = params.get('context', {}).get('checksum', {}) checksum_algorithm = checksum_context.get('request_algorithm') @@ -3304,7 +3314,7 @@ def conditionally_calculate_md5(params, **kwargs): # Skip for requests that will have a flexible checksum applied return - if _has_checksum_header(params): + if has_checksum_header(params): # Don't add a new header if one is already available. return diff --git a/docs/source/conf.py b/docs/source/conf.py index 5352a9aa98..473e92c2a3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -57,9 +57,9 @@ # built documents. # # The short X.Y version. -version = '1.35.' +version = '1.36' # The full version, including alpha/beta/rc tags. -release = '1.35.99' +release = '1.36.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.cfg b/setup.cfg index 6db04c505b..cb4a541f56 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,4 +9,4 @@ requires_dist = urllib3>=1.25.4,!=2.2.0,<3; python_version>="3.10" [options.extras_require] -crt = awscrt==0.22.0 +crt = awscrt==0.23.4 diff --git a/setup.py b/setup.py index d0e487020d..efc75e788b 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def find_version(*file_paths): ] extras_require = { - 'crt': ['awscrt==0.22.0'], + 'crt': ['awscrt==0.23.4'], } setup( diff --git a/tests/__init__.py b/tests/__init__.py index 13002ebbe4..68af4ac9dc 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -36,6 +36,7 @@ from botocore.awsrequest import AWSResponse from botocore.compat import HAS_CRT, parse_qs, urlparse from botocore.configprovider import create_botocore_default_config_mapping +from botocore.httpchecksum import _CHECKSUM_CLS, DEFAULT_CHECKSUM_ALGORITHM from botocore.stub import Stubber _LOADER = botocore.loaders.Loader() @@ -603,3 +604,14 @@ def mock_load_service_model(service_name, type_name, api_version=None): loader = session.get_component('data_loader') monkeypatch.setattr(loader, 'load_service_model', mock_load_service_model) + + +def get_checksum_cls(algorithm=DEFAULT_CHECKSUM_ALGORITHM.lower()): + """ + This pass through is grabbing our internally supported list of checksums + to ensure we stay in sync, while not exposing them publicly. + + Returns a checksum algorithm class. The default checksum class is used + if one isn't specified. + """ + return _CHECKSUM_CLS[algorithm] diff --git a/tests/functional/endpoint-rules/cognito-identity/endpoint-tests-1.json b/tests/functional/endpoint-rules/cognito-identity/endpoint-tests-1.json index cfc617981e..506b46098b 100644 --- a/tests/functional/endpoint-rules/cognito-identity/endpoint-tests-1.json +++ b/tests/functional/endpoint-rules/cognito-identity/endpoint-tests-1.json @@ -1,237 +1,159 @@ { "testCases": [ { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity.ap-northeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity.ap-south-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity.ap-southeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity.ap-southeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity.ca-central-1.amazonaws.com" + "url": "https://cognito-identity.us-east-1.amazonaws.com" } }, "params": { - "Region": "ca-central-1", + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity.eu-central-1.amazonaws.com" + "url": "https://cognito-identity-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "eu-central-1", - "UseFIPS": false, + "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.eu-north-1.amazonaws.com" + "url": "https://cognito-identity.us-east-1.amazonaws.com" } }, "params": { - "Region": "eu-north-1", + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.eu-west-1.amazonaws.com" + "url": "https://cognito-identity-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "eu-west-1", - "UseFIPS": false, - "UseDualStack": false + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity.eu-west-2.amazonaws.com" + "url": "https://cognito-identity.us-east-2.amazonaws.com" } }, "params": { - "Region": "eu-west-2", + "Region": "us-east-2", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity.eu-west-3.amazonaws.com" + "url": "https://cognito-identity-fips.us-east-2.amazonaws.com" } }, "params": { - "Region": "eu-west-3", - "UseFIPS": false, + "Region": "us-east-2", + "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-2 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.me-south-1.amazonaws.com" + "url": "https://cognito-identity.us-east-2.amazonaws.com" } }, "params": { - "Region": "me-south-1", + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-2 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.sa-east-1.amazonaws.com" + "url": "https://cognito-identity-fips.us-east-2.amazonaws.com" } }, "params": { - "Region": "sa-east-1", - "UseFIPS": false, - "UseDualStack": false + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity.us-east-1.amazonaws.com" + "url": "https://cognito-identity.us-west-1.amazonaws.com" } }, "params": { - "Region": "us-east-1", + "Region": "us-west-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cognito-identity-fips.us-east-1.amazonaws.com" + "url": "https://cognito-identity-fips.us-west-1.amazonaws.com" } }, "params": { - "Region": "us-east-1", + "Region": "us-west-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-west-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.us-east-2.amazonaws.com" + "url": "https://cognito-identity.us-west-1.amazonaws.com" } }, "params": { - "Region": "us-east-2", + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://cognito-identity-fips.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": true, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-west-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.us-west-1.amazonaws.com" + "url": "https://cognito-identity-fips.us-west-1.amazonaws.com" } }, "params": { "Region": "us-west-1", - "UseFIPS": false, - "UseDualStack": false + "UseFIPS": true, + "UseDualStack": true } }, { @@ -261,28 +183,28 @@ } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity-fips.us-east-1.api.aws" + "url": "https://cognito-identity.us-west-2.amazonaws.com" } }, "params": { - "Region": "us-east-1", - "UseFIPS": true, + "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cognito-identity.us-east-1.api.aws" + "url": "https://cognito-identity-fips.us-west-2.amazonaws.com" } }, "params": { - "Region": "us-east-1", - "UseFIPS": false, + "Region": "us-west-2", + "UseFIPS": true, "UseDualStack": true } }, diff --git a/tests/functional/test_httpchecksum.py b/tests/functional/test_httpchecksum.py new file mode 100644 index 0000000000..a71b58e53b --- /dev/null +++ b/tests/functional/test_httpchecksum.py @@ -0,0 +1,551 @@ +# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + + +import pytest + +from botocore.compat import HAS_CRT +from botocore.exceptions import FlexibleChecksumError +from tests import ClientHTTPStubber, patch_load_service_model + +TEST_CHECKSUM_SERVICE_MODEL = { + "version": "2.0", + "documentation": "This is a test service.", + "metadata": { + "apiVersion": "2023-01-01", + "endpointPrefix": "test", + "protocol": "rest-json", + "jsonVersion": "1.1", + "serviceFullName": "Test Service", + "serviceId": "Test Service", + "signatureVersion": "v4", + "signingName": "testservice", + "uid": "testservice-2023-01-01", + }, + "operations": { + "HttpChecksumOperation": { + "name": "HttpChecksumOperation", + "http": {"method": "POST", "requestUri": "/HttpChecksumOperation"}, + "input": {"shape": "SomeInput"}, + "output": {"shape": "SomeOutput"}, + "httpChecksum": { + "requestChecksumRequired": True, + "requestAlgorithmMember": "checksumAlgorithm", + "requestValidationModeMember": "validationMode", + "responseAlgorithms": [ + "CRC32", + "CRC32C", + "CRC64NVME", + "SHA1", + "SHA256", + ], + }, + }, + "HttpChecksumStreamingOperation": { + "name": "HttpChecksumStreamingOperation", + "http": { + "method": "POST", + "requestUri": "/HttpChecksumStreamingOperation", + }, + "input": {"shape": "SomeStreamingInput"}, + "output": {"shape": "SomeStreamingOutput"}, + "httpChecksum": { + "requestChecksumRequired": True, + "requestAlgorithmMember": "checksumAlgorithm", + "requestValidationModeMember": "validationMode", + "responseAlgorithms": [ + "CRC32", + "CRC32C", + "CRC64NVME", + "SHA1", + "SHA256", + ], + }, + }, + }, + "shapes": { + "ChecksumAlgorithm": { + "type": "string", + "enum": {"CRC32", "CRC32C", "CRC64NVME", "SHA1", "SHA256"}, + "member": {"shape": "MockOpParam"}, + }, + "ValidationMode": {"type": "string", "enum": {"ENABLE"}}, + "String": {"type": "string"}, + "Blob": {"type": "blob"}, + "SomeStreamingOutput": { + "type": "structure", + "members": {"body": {"shape": "Blob", "streaming": True}}, + "payload": "body", + }, + "SomeStreamingInput": { + "type": "structure", + "required": ["body"], + "members": { + "body": { + "shape": "Blob", + "streaming": True, + }, + "validationMode": { + "shape": "ValidationMode", + "location": "header", + "locationName": "x-amz-response-validation-mode", + }, + "checksumAlgorithm": { + "shape": "ChecksumAlgorithm", + "location": "header", + "locationName": "x-amz-request-algorithm", + }, + }, + "payload": "body", + }, + "SomeInput": { + "type": "structure", + "required": ["body"], + "members": { + "body": {"shape": "String"}, + "validationMode": { + "shape": "ValidationMode", + "location": "header", + "locationName": "x-amz-response-validation-mode", + }, + "checksumAlgorithm": { + "shape": "ChecksumAlgorithm", + "location": "header", + "locationName": "x-amz-request-algorithm", + }, + }, + "payload": "body", + }, + "SomeOutput": { + "type": "structure", + }, + }, +} + +TEST_CHECKSUM_RULESET = { + "version": "1.0", + "parameters": {}, + "rules": [ + { + "conditions": [], + "type": "endpoint", + "endpoint": { + "url": "https://foo.bar", + "properties": {}, + "headers": {}, + }, + } + ], +} + + +def setup_test_client(patched_session, monkeypatch): + patch_load_service_model( + patched_session, + monkeypatch, + TEST_CHECKSUM_SERVICE_MODEL, + TEST_CHECKSUM_RULESET, + ) + return patched_session.create_client( + "testservice", + region_name="us-west-2", + ) + + +def _request_checksum_calculation_cases(): + request_payload = "Hello world" + cases = [ + ( + None, + request_payload, + { + "x-amz-request-algorithm": "CRC32", + "x-amz-checksum-crc32": "i9aeUg==", + }, + ), + ( + "CRC32", + request_payload, + { + "x-amz-request-algorithm": "CRC32", + "x-amz-checksum-crc32": "i9aeUg==", + }, + ), + ( + "SHA1", + request_payload, + { + "x-amz-request-algorithm": "SHA1", + "x-amz-checksum-sha1": "e1AsOh9IyGCa4hLN+2Od7jlnP14=", + }, + ), + ( + "SHA256", + request_payload, + { + "x-amz-request-algorithm": "SHA256", + "x-amz-checksum-sha256": "ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=", + }, + ), + ] + if HAS_CRT: + cases.extend( + [ + ( + "CRC32C", + request_payload, + { + "x-amz-request-algorithm": "CRC32C", + "x-amz-checksum-crc32c": "crUfeA==", + }, + ), + ( + "CRC64NVME", + request_payload, + { + "x-amz-request-algorithm": "CRC64NVME", + "x-amz-checksum-crc64nvme": "OOJZ0D8xKts=", + }, + ), + ] + ) + return cases + + +@pytest.mark.parametrize( + "checksum_algorithm, request_payload, expected_headers", + _request_checksum_calculation_cases(), +) +def test_request_checksum_calculation( + patched_session, + monkeypatch, + checksum_algorithm, + request_payload, + expected_headers, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200, body=b"") + operation_kwargs = {"body": request_payload} + if checksum_algorithm: + operation_kwargs["checksumAlgorithm"] = checksum_algorithm + client.http_checksum_operation(**operation_kwargs) + actual_headers = http_stubber.requests[0].headers + for key, val in expected_headers.items(): + assert key in actual_headers + assert actual_headers[key].decode() == val + + +def _streaming_request_checksum_calculation_cases(): + request_payload = "Hello world" + cases = [ + ( + None, + request_payload, + { + "x-amz-request-algorithm": "CRC32", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-crc32", + }, + {"x-amz-checksum-crc32": "i9aeUg=="}, + ), + ( + "CRC32", + request_payload, + { + "x-amz-request-algorithm": "CRC32", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-crc32", + }, + {"x-amz-checksum-crc32": "i9aeUg=="}, + ), + ( + "SHA1", + request_payload, + { + "x-amz-request-algorithm": "SHA1", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-sha1", + }, + {"x-amz-checksum-sha1": "e1AsOh9IyGCa4hLN+2Od7jlnP14="}, + ), + ( + "SHA256", + request_payload, + { + "x-amz-request-algorithm": "SHA256", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-sha256", + }, + { + "x-amz-checksum-sha256": "ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=" + }, + ), + ] + if HAS_CRT: + cases.extend( + [ + ( + "CRC32C", + request_payload, + { + "x-amz-request-algorithm": "CRC32C", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-crc32c", + }, + {"x-amz-checksum-crc32c": "crUfeA=="}, + ), + ( + "CRC64NVME", + request_payload, + { + "x-amz-request-algorithm": "CRC64NVME", + "content-encoding": "aws-chunked", + "x-amz-trailer": "x-amz-checksum-crc64nvme", + }, + {"x-amz-checksum-crc64nvme": "OOJZ0D8xKts="}, + ), + ] + ) + return cases + + +@pytest.mark.parametrize( + "checksum_algorithm, request_payload, expected_headers, expected_trailers", + _streaming_request_checksum_calculation_cases(), +) +def test_streaming_request_checksum_calculation( + patched_session, + monkeypatch, + checksum_algorithm, + request_payload, + expected_headers, + expected_trailers, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200, body=b"") + operation_kwargs = {"body": request_payload} + if checksum_algorithm: + operation_kwargs["checksumAlgorithm"] = checksum_algorithm + client.http_checksum_streaming_operation(**operation_kwargs) + request = http_stubber.requests[0] + actual_headers = request.headers + for key, val in expected_headers.items(): + assert key in actual_headers + assert actual_headers[key].decode() == val + read_body = request.body.read() + for key, val in expected_trailers.items(): + assert f"{key}:{val}".encode() in read_body + + +def _successful_response_checksum_validation_cases(): + response_payload = "Hello world" + cases = [ + ( + "CRC32", + response_payload, + {"x-amz-checksum-crc32": "i9aeUg=="}, + ), + ( + "SHA1", + response_payload, + {"x-amz-checksum-sha1": "e1AsOh9IyGCa4hLN+2Od7jlnP14="}, + ), + ( + "SHA256", + response_payload, + { + "x-amz-checksum-sha256": "ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=" + }, + ), + ] + if HAS_CRT: + cases.extend( + [ + ( + "CRC32C", + response_payload, + {"x-amz-checksum-crc32c": "crUfeA=="}, + ), + ( + "CRC64NVME", + response_payload, + {"x-amz-checksum-crc64nvme": "OOJZ0D8xKts="}, + ), + ] + ) + return cases + + +@pytest.mark.parametrize( + "checksum_algorithm, response_payload, response_headers", + _successful_response_checksum_validation_cases(), +) +def test_successful_response_checksum_validation( + patched_session, + monkeypatch, + checksum_algorithm, + response_payload, + response_headers, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response( + status=200, + body=response_payload.encode(), + headers=response_headers, + ) + operation_kwargs = { + "body": response_payload, + "checksumAlgorithm": checksum_algorithm, + } + + client.http_checksum_operation(**operation_kwargs) + + +@pytest.mark.parametrize( + "checksum_algorithm, response_payload, response_headers", + _successful_response_checksum_validation_cases(), +) +def test_successful_streaming_response_checksum_validation( + patched_session, + monkeypatch, + checksum_algorithm, + response_payload, + response_headers, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response( + status=200, + body=response_payload.encode(), + headers=response_headers, + ) + response = client.http_checksum_streaming_operation( + body=response_payload, + checksumAlgorithm=checksum_algorithm, + ) + response["body"].read() + + +def _unsuccessful_response_checksum_validation_cases(): + response_payload = "Hello world" + cases = [ + ( + "CRC32", + response_payload, + {"x-amz-checksum-crc32": "bm90LWEtY2hlY2tzdW0="}, + "i9aeUg==", + ), + ( + "SHA1", + response_payload, + {"x-amz-checksum-sha1": "bm90LWEtY2hlY2tzdW0="}, + "e1AsOh9IyGCa4hLN+2Od7jlnP14=", + ), + ( + "SHA256", + response_payload, + {"x-amz-checksum-sha256": "bm90LWEtY2hlY2tzdW0="}, + "ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=", + ), + ] + if HAS_CRT: + cases.extend( + [ + ( + "CRC32C", + response_payload, + {"x-amz-checksum-crc32c": "bm90LWEtY2hlY2tzdW0="}, + "crUfeA==", + ), + ( + "CRC64NVME", + response_payload, + {"x-amz-checksum-crc64nvme": "bm90LWEtY2hlY2tzdW0="}, + "OOJZ0D8xKts=", + ), + ] + ) + return cases + + +@pytest.mark.parametrize( + "checksum_algorithm, response_payload, response_headers, expected_checksum", + _unsuccessful_response_checksum_validation_cases(), +) +def test_unsuccessful_response_checksum_validation( + patched_session, + monkeypatch, + checksum_algorithm, + response_payload, + response_headers, + expected_checksum, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response( + status=200, + body=response_payload.encode(), + headers=response_headers, + ) + operation_kwargs = { + "body": response_payload, + "checksumAlgorithm": checksum_algorithm, + } + with pytest.raises(FlexibleChecksumError) as expected_error: + client.http_checksum_operation(**operation_kwargs) + error_msg = "Expected checksum {} did not match calculated checksum: {}".format( + response_headers[f'x-amz-checksum-{checksum_algorithm.lower()}'], + expected_checksum, + ) + assert str(expected_error.value) == error_msg + + +@pytest.mark.parametrize( + "checksum_algorithm, response_payload, response_headers, expected_checksum", + _unsuccessful_response_checksum_validation_cases(), +) +def test_unsuccessful_streaming_response_checksum_validation( + patched_session, + monkeypatch, + checksum_algorithm, + response_payload, + response_headers, + expected_checksum, +): + client = setup_test_client(patched_session, monkeypatch) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response( + status=200, + body=response_payload.encode(), + headers=response_headers, + ) + response = client.http_checksum_streaming_operation( + body=response_payload, + checksumAlgorithm=checksum_algorithm, + ) + with pytest.raises(FlexibleChecksumError) as expected_error: + response["body"].read() + error_msg = "Expected checksum {} did not match calculated checksum: {}".format( + response_headers[f'x-amz-checksum-{checksum_algorithm.lower()}'], + expected_checksum, + ) + assert str(expected_error.value) == error_msg diff --git a/tests/functional/test_s3.py b/tests/functional/test_s3.py index 613ef1c016..1206b83272 100644 --- a/tests/functional/test_s3.py +++ b/tests/functional/test_s3.py @@ -10,7 +10,6 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -import base64 import datetime import re @@ -19,7 +18,7 @@ import botocore.session from botocore import UNSIGNED -from botocore.compat import get_md5, parse_qs, urlsplit +from botocore.compat import parse_qs, urlsplit from botocore.config import Config from botocore.exceptions import ( ClientError, @@ -33,6 +32,7 @@ ClientHTTPStubber, FreezeTime, create_session, + get_checksum_cls, mock, requires_crt, temporary_file, @@ -1519,30 +1519,84 @@ def setUp(self): def get_sent_headers(self): return self.http_stubber.requests[0].headers - def test_content_md5_set(self): + def test_trailing_checksum_set(self): with self.http_stubber: self.client.put_object(Bucket="foo", Key="bar", Body="baz") - self.assertIn("content-md5", self.get_sent_headers()) + sent_headers = self.get_sent_headers() + self.assertEqual(sent_headers["Content-Encoding"], b"aws-chunked") + self.assertEqual(sent_headers["Transfer-Encoding"], b"chunked") + self.assertEqual( + sent_headers["X-Amz-Trailer"], b"x-amz-checksum-crc32" + ) + self.assertEqual(sent_headers["X-Amz-Decoded-Content-Length"], b"3") + self.assertEqual( + sent_headers["x-amz-content-sha256"], + b"STREAMING-UNSIGNED-PAYLOAD-TRAILER", + ) + body = self.http_stubber.requests[0].body.read() + self.assertIn(b"x-amz-checksum-crc32:eCQEmA==", body) - def test_content_md5_set_empty_body(self): + def test_trailing_checksum_set_empty_body(self): with self.http_stubber: self.client.put_object(Bucket="foo", Key="bar", Body="") - self.assertIn("content-md5", self.get_sent_headers()) + sent_headers = self.get_sent_headers() + self.assertEqual(sent_headers["Content-Encoding"], b"aws-chunked") + self.assertEqual(sent_headers["Transfer-Encoding"], b"chunked") + self.assertEqual( + sent_headers["X-Amz-Trailer"], b"x-amz-checksum-crc32" + ) + self.assertEqual(sent_headers["X-Amz-Decoded-Content-Length"], b"0") + self.assertEqual( + sent_headers["x-amz-content-sha256"], + b"STREAMING-UNSIGNED-PAYLOAD-TRAILER", + ) + body = self.http_stubber.requests[0].body.read() + self.assertIn(b"x-amz-checksum-crc32:AAAAAA==", body) - def test_content_md5_set_empty_file(self): + def test_trailing_checksum_set_empty_file(self): with self.http_stubber: with temporary_file("rb") as f: assert f.read() == b"" self.client.put_object(Bucket="foo", Key="bar", Body=f) - self.assertIn("content-md5", self.get_sent_headers()) + body = self.http_stubber.requests[0].body.read() + sent_headers = self.get_sent_headers() + self.assertEqual(sent_headers["Content-Encoding"], b"aws-chunked") + self.assertEqual(sent_headers["Transfer-Encoding"], b"chunked") + self.assertEqual( + sent_headers["X-Amz-Trailer"], b"x-amz-checksum-crc32" + ) + self.assertEqual(sent_headers["X-Amz-Decoded-Content-Length"], b"0") + self.assertEqual( + sent_headers["x-amz-content-sha256"], + b"STREAMING-UNSIGNED-PAYLOAD-TRAILER", + ) + self.assertIn(b"x-amz-checksum-crc32:AAAAAA==", body) - def test_content_sha256_set_if_config_value_is_true(self): - # By default, put_object() does not include an x-amz-content-sha256 - # header because it also includes a `Content-MD5` header. The - # `payload_signing_enabled` config overrides this logic and forces the - # header. + def test_content_sha256_set_for_unsigned_request(self): config = Config( - signature_version="s3v4", s3={"payload_signing_enabled": True} + signature_version=UNSIGNED, + ) + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.put_object( + Bucket="foo", Key="bar", Body="baz", ChecksumAlgorithm="CRC32" + ) + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertEqual(sha_header, b"STREAMING-UNSIGNED-PAYLOAD-TRAILER") + + def test_content_sha256_not_set_if_config_value_is_true(self): + # By default, put_object() provides a trailing checksum and includes the + # x-amz-content-sha256 header with a value of "STREAMING-UNSIGNED-PAYLOAD-TRAILER". + # We do not support payload signing for streaming so the `payload_signing_enabled` + # config has no effect here. + config = Config( + signature_version="s3v4", + s3={"payload_signing_enabled": True}, ) self.client = self.session.create_client( "s3", self.region, config=config @@ -1553,11 +1607,16 @@ def test_content_sha256_set_if_config_value_is_true(self): self.client.put_object(Bucket="foo", Key="bar", Body="baz") sent_headers = self.get_sent_headers() sha_header = sent_headers.get("x-amz-content-sha256") - self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + self.assertEqual(sha_header, b"STREAMING-UNSIGNED-PAYLOAD-TRAILER") def test_content_sha256_not_set_if_config_value_is_false(self): + # By default, put_object() provides a trailing checksum and includes the + # x-amz-content-sha256 header with a value of "STREAMING-UNSIGNED-PAYLOAD-TRAILER". + # We do not support payload signing for streaming so the `payload_signing_enabled` + # config has no effect here. config = Config( - signature_version="s3v4", s3={"payload_signing_enabled": False} + signature_version="s3v4", + s3={"payload_signing_enabled": False}, ) self.client = self.session.create_client( "s3", self.region, config=config @@ -1568,15 +1627,18 @@ def test_content_sha256_not_set_if_config_value_is_false(self): self.client.put_object(Bucket="foo", Key="bar", Body="baz") sent_headers = self.get_sent_headers() sha_header = sent_headers.get("x-amz-content-sha256") - self.assertEqual(sha_header, b"UNSIGNED-PAYLOAD") + self.assertEqual(sha_header, b"STREAMING-UNSIGNED-PAYLOAD-TRAILER") - def test_content_sha256_set_if_config_value_not_set_put_object(self): - # The default behavior matches payload_signing_enabled=False. For - # operations where the `Content-MD5` is present this means that - # `x-amz-content-sha256` is present but not set. + def test_content_sha256_not_set_if_config_value_not_set_put_object(self): + # By default, put_object() provides a trailing checksum and includes the + # x-amz-content-sha256 header with a value of "STREAMING-UNSIGNED-PAYLOAD-TRAILER". + # We do not support payload signing for streaming so the `payload_signing_enabled` + # config has no effect here. config = Config(signature_version="s3v4") self.client = self.session.create_client( - "s3", self.region, config=config + "s3", + self.region, + config=config, ) self.http_stubber = ClientHTTPStubber(self.client) self.http_stubber.add_response() @@ -1584,7 +1646,7 @@ def test_content_sha256_set_if_config_value_not_set_put_object(self): self.client.put_object(Bucket="foo", Key="bar", Body="baz") sent_headers = self.get_sent_headers() sha_header = sent_headers.get("x-amz-content-sha256") - self.assertEqual(sha_header, b"UNSIGNED-PAYLOAD") + self.assertEqual(sha_header, b"STREAMING-UNSIGNED-PAYLOAD-TRAILER") def test_content_sha256_set_if_config_value_not_set_list_objects(self): # The default behavior matches payload_signing_enabled=False. For @@ -1620,16 +1682,6 @@ def test_content_sha256_set_s3_on_outpost(self): sha_header = sent_headers.get("x-amz-content-sha256") self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") - def test_content_sha256_set_if_md5_is_unavailable(self): - with mock.patch("botocore.compat.MD5_AVAILABLE", False): - with mock.patch("botocore.utils.MD5_AVAILABLE", False): - with self.http_stubber: - self.client.put_object(Bucket="foo", Key="bar", Body="baz") - sent_headers = self.get_sent_headers() - unsigned = "UNSIGNED-PAYLOAD" - self.assertNotEqual(sent_headers["x-amz-content-sha256"], unsigned) - self.assertNotIn("content-md5", sent_headers) - class TestCanSendIntegerHeaders(BaseSessionTest): def test_int_values_with_sigv4(self): @@ -2265,7 +2317,7 @@ def test_checksums_included_in_expected_operations( stub.add_response() call = getattr(client, operation) call(**operation_kwargs) - assert "Content-MD5" in stub.requests[-1].headers + assert "x-amz-checksum-crc32" in stub.requests[-1].headers @pytest.mark.parametrize( @@ -3702,10 +3754,12 @@ def _verify_presigned_url_addressing( class TestS3XMLPayloadEscape(BaseS3OperationTest): - def assert_correct_content_md5(self, request): - content_md5_bytes = get_md5(request.body).digest() - content_md5 = base64.b64encode(content_md5_bytes) - self.assertEqual(content_md5, request.headers["Content-MD5"]) + def assert_correct_crc32_checksum(self, request): + checksum = get_checksum_cls()() + crc32_checksum = checksum.handle(request.body).encode() + self.assertEqual( + crc32_checksum, request.headers["x-amz-checksum-crc32"] + ) def test_escape_keys_in_xml_delete_objects(self): self.http_stubber.add_response() @@ -3717,7 +3771,7 @@ def test_escape_keys_in_xml_delete_objects(self): request = self.http_stubber.requests[0] self.assertNotIn(b"\r\n\r", request.body) self.assertIn(b" ", request.body) - self.assert_correct_content_md5(request) + self.assert_correct_crc32_checksum(request) def test_escape_keys_in_xml_put_bucket_lifecycle_configuration(self): self.http_stubber.add_response() @@ -3736,7 +3790,7 @@ def test_escape_keys_in_xml_put_bucket_lifecycle_configuration(self): request = self.http_stubber.requests[0] self.assertNotIn(b"my\r\n\rprefix", request.body) self.assertIn(b"my prefix", request.body) - self.assert_correct_content_md5(request) + self.assert_correct_crc32_checksum(request) class TestExpectContinueBehavior(BaseSessionTest): diff --git a/tests/unit/test_args.py b/tests/unit/test_args.py index b68ab31d4f..0a17523b9d 100644 --- a/tests/unit/test_args.py +++ b/tests/unit/test_args.py @@ -615,6 +615,70 @@ def test_bad_value_disable_request_compression(self): config = client_args['client_config'] self.assertFalse(config.disable_request_compression) + def test_checksum_default_client_config(self): + input_config = Config() + client_args = self.call_get_client_args(client_config=input_config) + config = client_args["client_config"] + self.assertEqual(config.request_checksum_calculation, "when_supported") + self.assertEqual(config.response_checksum_validation, "when_supported") + + def test_checksum_client_config(self): + input_config = Config( + request_checksum_calculation="when_required", + response_checksum_validation="when_required", + ) + client_args = self.call_get_client_args(client_config=input_config) + config = client_args['client_config'] + self.assertEqual(config.request_checksum_calculation, "when_required") + self.assertEqual(config.response_checksum_validation, "when_required") + + def test_checksum_config_store(self): + self.config_store.set_config_variable( + "request_checksum_calculation", "when_required" + ) + self.config_store.set_config_variable( + "response_checksum_validation", "when_required" + ) + config = self.call_get_client_args()['client_config'] + self.assertEqual(config.request_checksum_calculation, "when_required") + self.assertEqual(config.response_checksum_validation, "when_required") + + def test_checksum_client_config_overrides_config_store(self): + self.config_store.set_config_variable( + "request_checksum_calculation", "when_supported" + ) + self.config_store.set_config_variable( + "response_checksum_validation", "when_supported" + ) + input_config = Config( + request_checksum_calculation="when_required", + response_checksum_validation="when_required", + ) + client_args = self.call_get_client_args(client_config=input_config) + config = client_args['client_config'] + self.assertEqual(config.request_checksum_calculation, "when_required") + self.assertEqual(config.response_checksum_validation, "when_required") + + def test_request_checksum_calculation_invalid_client_config(self): + with self.assertRaises(exceptions.InvalidChecksumConfigError): + config = Config(request_checksum_calculation="invalid_config") + self.call_get_client_args(client_config=config) + self.config_store.set_config_variable( + 'request_checksum_calculation', "invalid_config" + ) + with self.assertRaises(exceptions.InvalidChecksumConfigError): + self.call_get_client_args() + + def test_response_checksum_validation_invalid_client_config(self): + with self.assertRaises(exceptions.InvalidChecksumConfigError): + config = Config(response_checksum_validation="invalid_config") + self.call_get_client_args(client_config=config) + self.config_store.set_config_variable( + 'response_checksum_validation', "invalid_config" + ) + with self.assertRaises(exceptions.InvalidChecksumConfigError): + self.call_get_client_args() + class TestEndpointResolverBuiltins(unittest.TestCase): def setUp(self): diff --git a/tests/unit/test_handlers.py b/tests/unit/test_handlers.py index b26b4b92b2..bbc6a8d8e7 100644 --- a/tests/unit/test_handlers.py +++ b/tests/unit/test_handlers.py @@ -1961,3 +1961,56 @@ def test_does_not_add_query_compatibility_header(): request_dict = {'headers': {}} handlers.add_query_compatibility_header(operation_model, request_dict) assert 'x-amzn-query-mode' not in request_dict['headers'] + + +@pytest.fixture() +def checksum_operation_model(): + operation_model = mock.Mock(spec=OperationModel) + operation_model.http_checksum = { + "requestValidationModeMember": "ChecksumMode", + } + return operation_model + + +def create_checksum_context( + request_checksum_calculation="when_supported", + response_checksum_validation="when_supported", +): + context = { + "client_config": Config( + request_checksum_calculation=request_checksum_calculation, + response_checksum_validation=response_checksum_validation, + ) + } + return context + + +def test_request_validation_mode_member_default(checksum_operation_model): + params = {} + handlers._handle_request_validation_mode_member( + params, checksum_operation_model, context=create_checksum_context() + ) + assert params["ChecksumMode"] == "ENABLED" + + +def test_request_validation_mode_member_when_required( + checksum_operation_model, +): + params = {} + context = create_checksum_context( + response_checksum_validation="when_required" + ) + handlers._handle_request_validation_mode_member( + params, checksum_operation_model, context=context + ) + assert "ChecksumMode" not in params + + +def test_request_validation_mode_member_set_by_user( + checksum_operation_model, +): + params = {"ChecksumMode": "FAKE_VALUE"} + handlers._handle_request_validation_mode_member( + params, checksum_operation_model, context=create_checksum_context() + ) + assert params["ChecksumMode"] == "FAKE_VALUE" diff --git a/tests/unit/test_httpchecksum.py b/tests/unit/test_httpchecksum.py index bc8265a9b3..ae5269c1fd 100644 --- a/tests/unit/test_httpchecksum.py +++ b/tests/unit/test_httpchecksum.py @@ -15,17 +15,18 @@ from botocore.awsrequest import AWSResponse from botocore.compat import HAS_CRT +from botocore.config import Config from botocore.exceptions import ( AwsChunkedWrapperError, FlexibleChecksumError, MissingDependencyException, ) from botocore.httpchecksum import ( - _CHECKSUM_CLS, AwsChunkedWrapper, Crc32Checksum, CrtCrc32cChecksum, CrtCrc32Checksum, + CrtCrc64NvmeChecksum, Sha1Checksum, Sha256Checksum, StreamingChecksumBody, @@ -34,8 +35,8 @@ resolve_request_checksum_algorithm, resolve_response_checksum_algorithms, ) -from botocore.model import OperationModel -from tests import mock, requires_crt +from botocore.model import OperationModel, StringShape, StructureShape +from tests import get_checksum_cls, mock, requires_crt class TestHttpChecksumHandlers(unittest.TestCase): @@ -53,6 +54,13 @@ def _make_operation_model( operation.http_checksum_required = required operation.has_streaming_output = streaming_output operation.has_streaming_input = streaming_input + if http_checksum and "requestAlgorithmMember" in http_checksum: + shape = mock.Mock(spec=StringShape) + shape.serialization = {"name": "x-amz-request-algorithm"} + operation.input_shape = mock.Mock(spec=StructureShape) + operation.input_shape.members = { + http_checksum["requestAlgorithmMember"]: shape + } return operation def _make_http_response( @@ -88,7 +96,11 @@ def _build_request(self, body): request = { "headers": {}, "body": body, - "context": {}, + "context": { + "client_config": Config( + request_checksum_calculation="when_supported", + ) + }, "url": "https://example.com", } return request @@ -100,25 +112,41 @@ def test_request_checksum_algorithm_no_model(self): resolve_request_checksum_algorithm(request, operation_model, params) self.assertNotIn("checksum", request["context"]) - def test_request_checksum_algorithm_model_opt_in(self): + def test_request_checksum_algorithm_model_default(self): operation_model = self._make_operation_model( http_checksum={"requestAlgorithmMember": "Algorithm"} ) - # Param is not present, no checksum will be set + # Param is not present, crc32 checksum will be set by default params = {} request = self._build_request(b"") resolve_request_checksum_algorithm(request, operation_model, params) - self.assertNotIn("checksum", request["context"]) + expected_algorithm = { + "algorithm": "crc32", + "in": "header", + "name": "x-amz-checksum-crc32", + } + expected_request_algorithm_header = { + "name": "x-amz-request-algorithm", + "value": "CRC32", + } + actual_algorithm = request["context"]["checksum"]["request_algorithm"] + actual_request_algorithm_header = request["context"]["checksum"][ + "request_algorithm_header" + ] + self.assertEqual(actual_algorithm, expected_algorithm) + self.assertEqual( + actual_request_algorithm_header, expected_request_algorithm_header + ) - # Param is present, crc32 checksum will be set - params = {"Algorithm": "crc32"} + # Param is present, sha256 checksum will be set + params = {"Algorithm": "sha256"} request = self._build_request(b"") resolve_request_checksum_algorithm(request, operation_model, params) expected_algorithm = { - "algorithm": "crc32", + "algorithm": "sha256", "in": "header", - "name": "x-amz-checksum-crc32", + "name": "x-amz-checksum-sha256", } actual_algorithm = request["context"]["checksum"]["request_algorithm"] self.assertEqual(actual_algorithm, expected_algorithm) @@ -130,26 +158,42 @@ def test_request_checksum_algorithm_model_opt_in(self): resolve_request_checksum_algorithm(request, operation_model, params) self.assertNotIn("checksum", request["context"]) - def test_request_checksum_algorithm_model_opt_in_streaming(self): + def test_request_checksum_algorithm_model_default_streaming(self): request = self._build_request(b"") operation_model = self._make_operation_model( http_checksum={"requestAlgorithmMember": "Algorithm"}, streaming_input=True, ) - # Param is not present, no checksum will be set + # Param is not present, crc32 checksum will be set params = {} resolve_request_checksum_algorithm(request, operation_model, params) - self.assertNotIn("checksum", request["context"]) - - # Param is present, crc32 checksum will be set in the trailer - params = {"Algorithm": "crc32"} - resolve_request_checksum_algorithm(request, operation_model, params) expected_algorithm = { "algorithm": "crc32", "in": "trailer", "name": "x-amz-checksum-crc32", } + expected_request_algorithm_header = { + "name": "x-amz-request-algorithm", + "value": "CRC32", + } + actual_algorithm = request["context"]["checksum"]["request_algorithm"] + actual_request_algorithm_header = request["context"]["checksum"][ + "request_algorithm_header" + ] + self.assertEqual(actual_algorithm, expected_algorithm) + self.assertEqual( + actual_request_algorithm_header, expected_request_algorithm_header + ) + + # Param is present, sha256 checksum will be set in the trailer + params = {"Algorithm": "sha256"} + resolve_request_checksum_algorithm(request, operation_model, params) + expected_algorithm = { + "algorithm": "sha256", + "in": "trailer", + "name": "x-amz-checksum-sha256", + } actual_algorithm = request["context"]["checksum"]["request_algorithm"] self.assertEqual(actual_algorithm, expected_algorithm) @@ -157,14 +201,49 @@ def test_request_checksum_algorithm_model_opt_in_streaming(self): request = self._build_request(b"") request["url"] = "http://example.com" resolve_request_checksum_algorithm(request, operation_model, params) + expected_algorithm = { + "algorithm": "sha256", + "in": "header", + "name": "x-amz-checksum-sha256", + } + actual_algorithm = request["context"]["checksum"]["request_algorithm"] + self.assertEqual(actual_algorithm, expected_algorithm) + + def test_request_checksum_algorithm_s3_signature_version_input_streaming( + self, + ): + config = Config(signature_version="s3") + request = self._build_request(b"") + request["context"]["client_config"] = config + operation_model = self._make_operation_model( + http_checksum={"requestChecksumRequired": True}, + streaming_input=True, + ) + + params = {} + resolve_request_checksum_algorithm(request, operation_model, params) + actual_algorithm = request["context"]["checksum"]["request_algorithm"] + # Operations with streaming input using the "s3" signature_version should send + # checksums in the header, not trailer. expected_algorithm = { "algorithm": "crc32", "in": "header", "name": "x-amz-checksum-crc32", } - actual_algorithm = request["context"]["checksum"]["request_algorithm"] self.assertEqual(actual_algorithm, expected_algorithm) + def test_request_checksum_algorithm_presigned_request(self): + request = self._build_request(b"") + request["context"]["is_presign_request"] = True + operation_model = self._make_operation_model( + http_checksum={"requestChecksumRequired": True}, + ) + + params = {} + resolve_request_checksum_algorithm(request, operation_model, params) + # Presigned requests shouldn't use flexible checksums by default. + self.assertNotIn("checksum", request["context"]) + def test_request_checksum_algorithm_model_unsupported_algorithm(self): request = self._build_request(b"") operation_model = self._make_operation_model( @@ -193,17 +272,39 @@ def test_request_checksum_algorithm_model_no_crt_crc32c_unsupported(self): str(context.exception), ) - def test_request_checksum_algorithm_model_legacy_md5(self): + @unittest.skipIf(HAS_CRT, "Error only expected when CRT is not available") + def test_request_checksum_algorithm_model_no_crt_crc64nvme_unsupported( + self, + ): + request = self._build_request(b"") + operation_model = self._make_operation_model( + http_checksum={"requestAlgorithmMember": "Algorithm"}, + ) + params = {"Algorithm": "crc64nvme"} + with self.assertRaises(MissingDependencyException) as context: + resolve_request_checksum_algorithm( + request, operation_model, params + ) + self.assertIn( + "Using CRC64NVME requires an additional dependency", + str(context.exception), + ) + + def test_request_checksum_algorithm_model_legacy_crc32(self): request = self._build_request(b"") operation_model = self._make_operation_model(required=True) params = {} resolve_request_checksum_algorithm(request, operation_model, params) + expected_algorithm = { + "algorithm": "crc32", + "in": "header", + "name": "x-amz-checksum-crc32", + } actual_algorithm = request["context"]["checksum"]["request_algorithm"] - expected_algorithm = "conditional-md5" self.assertEqual(actual_algorithm, expected_algorithm) - def test_request_checksum_algorithm_model_new_md5(self): + def test_request_checksum_algorithm_model_new_crc32(self): request = self._build_request(b"") operation_model = self._make_operation_model( http_checksum={"requestChecksumRequired": True} @@ -212,7 +313,11 @@ def test_request_checksum_algorithm_model_new_md5(self): resolve_request_checksum_algorithm(request, operation_model, params) actual_algorithm = request["context"]["checksum"]["request_algorithm"] - expected_algorithm = "conditional-md5" + expected_algorithm = { + "algorithm": "crc32", + "in": "header", + "name": "x-amz-checksum-crc32", + } self.assertEqual(actual_algorithm, expected_algorithm) def test_apply_request_checksum_handles_no_checksum_context(self): @@ -220,7 +325,9 @@ def test_apply_request_checksum_handles_no_checksum_context(self): apply_request_checksum(request) # Build another request and assert the original request is the same expected_request = self._build_request(b"") - self.assertEqual(request, expected_request) + self.assertEqual(request["headers"], expected_request["headers"]) + self.assertEqual(request["body"], expected_request["body"]) + self.assertEqual(request["url"], expected_request["url"]) def test_apply_request_checksum_handles_invalid_context(self): request = self._build_request(b"") @@ -234,14 +341,6 @@ def test_apply_request_checksum_handles_invalid_context(self): with self.assertRaises(FlexibleChecksumError): apply_request_checksum(request) - def test_apply_request_checksum_conditional_md5(self): - request = self._build_request(b"") - request["context"]["checksum"] = { - "request_algorithm": "conditional-md5" - } - apply_request_checksum(request) - self.assertIn("Content-MD5", request["headers"]) - def test_apply_request_checksum_flex_header_bytes(self): request = self._build_request(b"") request["context"]["checksum"] = { @@ -350,6 +449,22 @@ def test_apply_request_checksum_content_encoding_default(self): apply_request_checksum(request) self.assertEqual(request["headers"]["Content-Encoding"], "aws-chunked") + def test_apply_request_checksum_extra_headers(self): + request = self._build_request(b"") + request["context"]["checksum"] = { + "request_algorithm": { + "in": "trailer", + "algorithm": "crc32", + "name": "x-amz-checksum-crc32", + }, + "request_algorithm_header": { + "name": "foo", + "value": "bar", + }, + } + apply_request_checksum(request) + self.assertEqual(request["headers"]["foo"], "bar") + def test_response_checksum_algorithm_no_model(self): request = self._build_request(b"") operation_model = self._make_operation_model() @@ -357,7 +472,7 @@ def test_response_checksum_algorithm_no_model(self): resolve_response_checksum_algorithms(request, operation_model, params) self.assertNotIn("checksum", request["context"]) - def test_response_checksum_algorithm_model_opt_in(self): + def test_response_checksum_algorithm_model_default(self): request = self._build_request(b"") operation_model = self._make_operation_model( http_checksum={ @@ -691,18 +806,27 @@ def test_crt_crc32(self): def test_crt_crc32c(self): self.assert_base64_checksum(CrtCrc32cChecksum, "yZRlqg==") + @requires_crt() + def test_crt_crc64nvme(self): + self.assert_base64_checksum(CrtCrc64NvmeChecksum, "jSnVw/bqjr4=") + class TestCrtChecksumOverrides(unittest.TestCase): @requires_crt() def test_crt_crc32_available(self): - actual_cls = _CHECKSUM_CLS.get("crc32") + actual_cls = get_checksum_cls("crc32") self.assertEqual(actual_cls, CrtCrc32Checksum) @requires_crt() def test_crt_crc32c_available(self): - actual_cls = _CHECKSUM_CLS.get("crc32c") + actual_cls = get_checksum_cls("crc32c") self.assertEqual(actual_cls, CrtCrc32cChecksum) + @requires_crt() + def test_crt_crc64nvme_available(self): + actual_cls = get_checksum_cls("crc64nvme") + self.assertEqual(actual_cls, CrtCrc64NvmeChecksum) + class TestStreamingChecksumBody(unittest.TestCase): def setUp(self):