list_key_rotations¶
Operation¶
list_key_rotations
async
¶
list_key_rotations(request: ListKeyRotationsInput | ListKeyRotationsInputDict, /, *, plugins: list[Plugin] | None = None) -> ListKeyRotationsOutput
list_key_rotations(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListKeyRotationsInputDict]) -> ListKeyRotationsOutput
Returns information about the key materials associated with the
specified KMS key. You can use the optional IncludeKeyMaterial
parameter to control which key materials are included in the response.
You must specify the KMS key in all requests. You can refine the key rotations list by limiting the number of rotations returned.
For detailed information about automatic and on-demand key rotations, see Rotate KMS keys in the Key Management Service Developer Guide.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:ListKeyRotations (key policy)
Related operations:
-
EnableKeyRotation
-
DeleteImportedKeyMaterial
-
DisableKeyRotation
-
GetKeyRotationStatus
-
ImportKeyMaterial
-
RotateKeyOnDemand
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
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
|
Returns:
| Type | Description |
|---|---|
ListKeyRotationsOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
ListKeyRotationsInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListKeyRotationsInput structure.
Attributes¶
include_key_material
class-attribute
instance-attribute
¶
include_key_material: str | None = ...
Use this optional parameter to control which key materials associated
with this key are listed in the response. The default value of this
parameter is ROTATIONS_ONLY. If you omit this parameter, KMS returns
information on the key materials created by automatic or on-demand key
rotation. When you specify a value of ALL_KEY_MATERIAL, KMS adds the
first key material and any imported key material pending rotation to the
response. This parameter can only be used with KMS keys that support
automatic or on-demand key rotation.
key_id
class-attribute
instance-attribute
¶
key_id: str | None = ...
Gets the key rotations for the specified KMS key.
Specify the key ID or key ARN of the KMS key.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab -
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
limit
class-attribute
instance-attribute
¶
limit: int | None = ...
Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.
This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.
Dictionaries¶
ListKeyRotationsInputDict
¶
Bases: TypedDict
Dictionary form of ListKeyRotationsInput.
Attributes¶
include_key_material
instance-attribute
¶
include_key_material: str | None
Use this optional parameter to control which key materials associated
with this key are listed in the response. The default value of this
parameter is ROTATIONS_ONLY. If you omit this parameter, KMS returns
information on the key materials created by automatic or on-demand key
rotation. When you specify a value of ALL_KEY_MATERIAL, KMS adds the
first key material and any imported key material pending rotation to the
response. This parameter can only be used with KMS keys that support
automatic or on-demand key rotation.
key_id
instance-attribute
¶
Gets the key rotations for the specified KMS key.
Specify the key ID or key ARN of the KMS key.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab -
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
limit
instance-attribute
¶
limit: int | None
Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.
This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.
Output¶
ListKeyRotationsOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListKeyRotationsOutput structure.
Attributes¶
next_marker
class-attribute
instance-attribute
¶
next_marker: str | None = ...
When Truncated is true, this element is present and contains the value
to use for the Marker parameter in a subsequent request.
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.
rotations
class-attribute
instance-attribute
¶
rotations: list[RotationsListEntry] | None = ...
A list of completed key material rotations. When the optional input
parameter IncludeKeyMaterial is specified with a value of
ALL_KEY_MATERIAL, this list includes the first key material and any
imported key material pending rotation.
truncated
class-attribute
instance-attribute
¶
truncated: bool = ...
A flag that indicates whether there are more items in the list. When
this value is true, the list in this response is truncated. To get more
items, pass the value of the NextMarker element in this response to
the Marker parameter in a subsequent request.