Skip to content

KMSClient.list_keys

rboto-kms==0.4.0 · Service index · Types

Model summary (excerpt): Gets a list of all KMS keys in the caller's Amazon Web Services account and Region. You can also use ListKeys to list KMS keys in the Region that other Amazon Web Services accounts shared with the caller's Amazon Web Services account through Resource Access Manager (RAM). To list them, use the ResourceOwners parameter. If you omit ResourceOwners , ListKeys lists only the KMS keys in the...

Install and imports

python -m pip install "rboto[kms]==0.4.0"
from rboto import KMSClient
from collections.abc import Sequence
from rboto_kms.types import (
    ListKeysOutput,
    ResourceOwnerType,
)

Signature

async def list_keys(
    *,
    limit: int | None = None,
    marker: str | None = None,
    resource_owners: Sequence[ResourceOwnerType] | None = None,
) -> ListKeysOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
limit No 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.
marker No Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.
resource_owners No Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM). Specify one or two values. Valid values are: SELF Lists the KMS keys in your Amazon Web Services account and Region. OTHER_ACCOUNTS_VIA_RAM Lists the KMS keys in the Region that other Amazon Web...

Output

ListKeysOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
keys list[KeyListEntryOutput] | None Always present KeyListEntryOutput
next_marker str | None Always present —
truncated bool Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ListKeysOutput, ResourceOwnerType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.list_keys(...) accepts the same arguments and returns AsyncIterator[ListKeysOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: marker. Page-size argument: limit.

No output stream.

Errors

Import from rboto_kms.exceptions:

DependencyTimeoutError, InvalidMarkerError, KMSInternalError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model