Skip to content

Commit

Permalink
Merge branch 'release-1.36.0'
Browse files Browse the repository at this point in the history
* release-1.36.0:
  Bumping version to 1.36.0
  Update endpoints model
  Update to latest models
  Merge customizations for S3
  • Loading branch information
aws-sdk-python-automation committed Jan 15, 2025
2 parents 26a4f34 + 786c28d commit a77c188
Show file tree
Hide file tree
Showing 31 changed files with 2,026 additions and 518 deletions.
67 changes: 67 additions & 0 deletions .changes/1.36.0.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
18 changes: 18 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=======

Expand Down
2 changes: 1 addition & 1 deletion botocore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os
import re

__version__ = '1.35.99'
__version__ = '1.36.0'


class NullHandler(logging.Handler):
Expand Down
49 changes: 49 additions & 0 deletions botocore/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
33 changes: 33 additions & 0 deletions botocore/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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),
]
)

Expand Down
14 changes: 13 additions & 1 deletion botocore/configprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions botocore/data/apigateway/2015-07-09/service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@
},
"domainNameId":{
"shape":"String",
"documentation":"<p>The identifier for the domain name resource. Supported only for private custom domain names.</p>",
"documentation":"<p>The identifier for the domain name resource. Required for private custom domain names.</p>",
"location":"querystring",
"locationName":"domainNameId"
},
Expand Down Expand Up @@ -4474,7 +4474,7 @@
},
"domainNameId":{
"shape":"String",
"documentation":"<p> The identifier for the domain name resource. Supported only for private custom domain names. </p>",
"documentation":"<p> The identifier for the domain name resource. Required for private custom domain names. </p>",
"location":"querystring",
"locationName":"domainNameId"
}
Expand Down
8 changes: 6 additions & 2 deletions botocore/data/bedrock-agent-runtime/2023-07-26/service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{"shape":"AccessDeniedException"},
{"shape":"ServiceQuotaExceededException"}
],
"documentation":"<note> <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeAgent</code>.</p> </note> <p>Sends a prompt for the agent to process and respond to. Note the following fields for the request:</p> <ul> <li> <p>To continue the same conversation with an agent, use the same <code>sessionId</code> value in the request.</p> </li> <li> <p>To activate trace enablement, turn <code>enableTrace</code> to <code>true</code>. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-events\">Trace enablement</a>.</p> </li> <li> <p>To stream agent responses, make sure that only orchestration prompt is enabled. Agent streaming is not supported for the following steps: </p> <ul> <li> <p> <code>Pre-processing</code> </p> </li> <li> <p> <code>Post-processing</code> </p> </li> <li> <p>Agent with 1 Knowledge base and <code>User Input</code> not enabled</p> </li> </ul> </li> <li> <p>End a conversation by setting <code>endSession</code> to <code>true</code>.</p> </li> <li> <p>In the <code>sessionState</code> object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.</p> </li> </ul> <p>The response is returned in the <code>bytes</code> field of the <code>chunk</code> object.</p> <ul> <li> <p>The <code>attribution</code> object contains citations for parts of the response.</p> </li> <li> <p>If you set <code>enableTrace</code> to <code>true</code> in the request, you can trace the agent's steps and reasoning process that led it to the response.</p> </li> <li> <p>If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the <code>returnControl</code> field.</p> </li> <li> <p>Errors are also surfaced in the response.</p> </li> </ul>"
"documentation":"<note> </note> <p>Sends a prompt for the agent to process and respond to. Note the following fields for the request:</p> <ul> <li> <p>To continue the same conversation with an agent, use the same <code>sessionId</code> value in the request.</p> </li> <li> <p>To activate trace enablement, turn <code>enableTrace</code> to <code>true</code>. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-events\">Trace enablement</a>.</p> </li> <li> <p>To stream agent responses, make sure that only orchestration prompt is enabled. Agent streaming is not supported for the following steps: </p> <ul> <li> <p> <code>Pre-processing</code> </p> </li> <li> <p> <code>Post-processing</code> </p> </li> <li> <p>Agent with 1 Knowledge base and <code>User Input</code> not enabled</p> </li> </ul> </li> <li> <p>End a conversation by setting <code>endSession</code> to <code>true</code>.</p> </li> <li> <p>In the <code>sessionState</code> object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.</p> </li> </ul> <p>The response contains both <b>chunk</b> and <b>trace</b> attributes.</p> <p>The final response is returned in the <code>bytes</code> field of the <code>chunk</code> object. The <code>InvokeAgent</code> returns one chunk for the entire interaction.</p> <ul> <li> <p>The <code>attribution</code> object contains citations for parts of the response.</p> </li> <li> <p>If you set <code>enableTrace</code> to <code>true</code> in the request, you can trace the agent's steps and reasoning process that led it to the response.</p> </li> <li> <p>If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the <code>returnControl</code> field.</p> </li> <li> <p>Errors are also surfaced in the response.</p> </li> </ul>"
},
"InvokeFlow":{
"name":"InvokeFlow",
Expand Down Expand Up @@ -146,7 +146,7 @@
{"shape":"AccessDeniedException"},
{"shape":"ServiceQuotaExceededException"}
],
"documentation":"<p> Invokes an inline Amazon Bedrock agent using the configurations you provide with the request. </p> <ul> <li> <p>Specify the following fields for security purposes.</p> <ul> <li> <p>(Optional) <code>customerEncryptionKeyArn</code> – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.</p> </li> <li> <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p> </li> </ul> </li> <li> <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html\">Advanced prompts</a>.</p> </li> <li> <p>The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.</p> </li> </ul> <note> <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeInlineAgent</code>.</p> </note>"
"documentation":"<p> Invokes an inline Amazon Bedrock agent using the configurations you provide with the request. </p> <ul> <li> <p>Specify the following fields for security purposes.</p> <ul> <li> <p>(Optional) <code>customerEncryptionKeyArn</code> – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.</p> </li> <li> <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p> </li> </ul> </li> <li> <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html\">Advanced prompts</a>.</p> </li> <li> <p>The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.</p> </li> </ul> <note> </note>"
},
"OptimizePrompt":{
"name":"OptimizePrompt",
Expand Down Expand Up @@ -2903,6 +2903,10 @@
"documentation":"<p> The unique identifier of the session. Use the same value across requests to continue the same conversation. </p>",
"location":"uri",
"locationName":"sessionId"
},
"streamingConfigurations":{
"shape":"StreamingConfigurations",
"documentation":"<p> Specifies the configurations for streaming. </p> <note> <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p> </note>"
}
}
},
Expand Down
Loading

0 comments on commit a77c188

Please sign in to comment.