batch_get_secret_value¶
Operation¶
batch_get_secret_value
¶
batch_get_secret_value(request: BatchGetSecretValueInput | BatchGetSecretValueInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchGetSecretValueInputDict]) -> BatchGetSecretValueOutput
Retrieves the contents of the encrypted fields SecretString or
SecretBinary for up to 20 secrets. To retrieve a single secret, call
GetSecretValue.
To choose which secrets to retrieve, you can specify a list of secrets
by name or ARN, or you can use filters. If Secrets Manager encounters
errors such as AccessDeniedException while attempting to retrieve any
of the secrets, you can see the errors in Errors in the response.
Secrets Manager generates CloudTrail GetSecretValue log entries for
each secret you request when you call this action. Do not include
sensitive information in request parameters because it might be logged.
For more information, see Logging Secrets Manager events with
CloudTrail.
Required permissions: secretsmanager:BatchGetSecretValue, and you
must have secretsmanager:GetSecretValue for each secret. If you use
filters, you must also have secretsmanager:ListSecrets. If the secrets
are encrypted using customer-managed keys instead of the Amazon Web
Services managed key aws/secretsmanager, then you also need
kms:Decrypt permissions for the keys. For more information, see IAM
policy actions for Secrets
Manager
and Authentication and access control in Secrets
Manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchGetSecretValueInput | BatchGetSecretValueInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[BatchGetSecretValueInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchGetSecretValueOutput
|
An instance of |
batch_get_secret_value
async
¶
batch_get_secret_value(request: BatchGetSecretValueInput | BatchGetSecretValueInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchGetSecretValueInputDict]) -> BatchGetSecretValueOutput
Retrieves the contents of the encrypted fields SecretString or
SecretBinary for up to 20 secrets. To retrieve a single secret, call
GetSecretValue.
To choose which secrets to retrieve, you can specify a list of secrets
by name or ARN, or you can use filters. If Secrets Manager encounters
errors such as AccessDeniedException while attempting to retrieve any
of the secrets, you can see the errors in Errors in the response.
Secrets Manager generates CloudTrail GetSecretValue log entries for
each secret you request when you call this action. Do not include
sensitive information in request parameters because it might be logged.
For more information, see Logging Secrets Manager events with
CloudTrail.
Required permissions: secretsmanager:BatchGetSecretValue, and you
must have secretsmanager:GetSecretValue for each secret. If you use
filters, you must also have secretsmanager:ListSecrets. If the secrets
are encrypted using customer-managed keys instead of the Amazon Web
Services managed key aws/secretsmanager, then you also need
kms:Decrypt permissions for the keys. For more information, see IAM
policy actions for Secrets
Manager
and Authentication and access control in Secrets
Manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchGetSecretValueInput | BatchGetSecretValueInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[BatchGetSecretValueInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchGetSecretValueOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
BatchGetSecretValueInputDict
¶
Bases: TypedDict
Dictionary form of BatchGetSecretValueInput.
Attributes¶
filters
instance-attribute
¶
filters: Sequence[Filter | FilterDict] | None
The filters to choose which secrets to retrieve. You must include
Filters or SecretIdList, but not both.
max_results
instance-attribute
¶
max_results: int | None
The number of results to include in the response.
If there are more results available, in the response, Secrets Manager
includes NextToken. To get the next results, call
BatchGetSecretValue again with the value from NextToken. To use this
parameter, you must also use the Filters parameter.
BatchGetSecretValueInput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchGetSecretValueInput structure.
Attributes¶
filters
class-attribute
instance-attribute
¶
The filters to choose which secrets to retrieve. You must include
Filters or SecretIdList, but not both.
max_results
class-attribute
instance-attribute
¶
max_results: int | None = ...
The number of results to include in the response.
If there are more results available, in the response, Secrets Manager
includes NextToken. To get the next results, call
BatchGetSecretValue again with the value from NextToken. To use this
parameter, you must also use the Filters parameter.
Output¶
BatchGetSecretValueOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchGetSecretValueOutput structure.
Attributes¶
errors
class-attribute
instance-attribute
¶
errors: list[APIErrorType] | None = ...
A list of errors Secrets Manager encountered while attempting to retrieve individual secrets.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
Secrets Manager includes this value if there's more output available
than what is included in the current response. This can occur even when
the response includes no values at all, such as when you ask for a
filtered view of a long list. To get the next results, call
BatchGetSecretValue again with this value.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
secret_values
class-attribute
instance-attribute
¶
secret_values: list[SecretValueEntry] | None = ...
A list of secret values.