ApiKeyCredentialLocation
- class aws_cdk.aws_bedrock_agentcore_alpha.ApiKeyCredentialLocation(*args: Any, **kwargs)
Bases:
object(experimental) API Key location within the request.
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha api_key_credential_location = bedrock_agentcore_alpha.ApiKeyCredentialLocation.header( credential_parameter_name="credentialParameterName", credential_prefix="credentialPrefix" )
Attributes
- credential_location_type
(experimental) The type of credential location (HEADER or QUERY_PARAMETER).
- Stability:
experimental
- credential_parameter_name
(experimental) The name of the credential parameter.
- Stability:
experimental
- credential_prefix
(experimental) The prefix for the credential value.
- Stability:
experimental
Static Methods
- classmethod header(*, credential_parameter_name=None, credential_prefix=None)
(experimental) Create a header-based API key credential location.
- Parameters:
credential_parameter_name (
Optional[str]) – (experimental) The name of the credential parameter for the API key. This parameter name is used when sending the API key to the target endpoint. Length Constraints: Minimum length of 1. Maximum length of 64. Default: - ‘Authorization’ for HEADER, ‘api_key’ for QUERY_PARAMETERcredential_prefix (
Optional[str]) – (experimental) The prefix for the API key credential. This prefix is added to the API key when sending it to the target endpoint. Length Constraints: Minimum length of 1. Maximum length of 64. Default: - ‘Bearer ‘ for HEADER, no prefix for QUERY_PARAMETER
- Return type:
- Returns:
ApiKeyCredentialLocation configured for header placement
- Stability:
experimental
- classmethod query_parameter(*, credential_parameter_name=None, credential_prefix=None)
(experimental) Create a query parameter-based API key credential location.
- Parameters:
credential_parameter_name (
Optional[str]) – (experimental) The name of the credential parameter for the API key. This parameter name is used when sending the API key to the target endpoint. Length Constraints: Minimum length of 1. Maximum length of 64. Default: - ‘Authorization’ for HEADER, ‘api_key’ for QUERY_PARAMETERcredential_prefix (
Optional[str]) – (experimental) The prefix for the API key credential. This prefix is added to the API key when sending it to the target endpoint. Length Constraints: Minimum length of 1. Maximum length of 64. Default: - ‘Bearer ‘ for HEADER, no prefix for QUERY_PARAMETER
- Return type:
- Returns:
ApiKeyCredentialLocation configured for query parameter placement
- Stability:
experimental