Skip to content

KMSClient.retire_grant

rboto-kms==0.4.0 · Service index · Types

Model summary (excerpt): Deletes a grant. Typically, you retire a grant when you no longer need its permissions. To identify the grant to retire, use a grant token , or both the grant ID and a key identifier (key ID or key ARN) of the KMS key. The CreateGrant operation returns both values. This operation can be called by the retiring principal for a grant, by the grantee principal if the grant allows the RetireGrant...

Install and imports

python -m pip install "rboto[kms]==0.4.0"
from rboto import KMSClient

Signature

async def retire_grant(
    *,
    grant_token: str | None = None,
    key_id: str | None = None,
    grant_id: str | None = None,
    dry_run: bool | None = None,
) -> None: ...

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)
grant_token No Identifies the grant to be retired. You can use a grant token to identify a new grant even before it has achieved eventual consistency. Only the CreateGrant operation returns a grant token. For details, see Grant token and Eventual consistency in the Key Management Service Developer Guide .
key_id No The key ARN KMS key associated with the grant. To find the key ARN, use the ListKeys operation. For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
grant_id No Identifies the grant to retire. To get the grant ID, use CreateGrant , ListGrants , or ListRetirableGrants . Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
dry_run No Checks if your request will succeed. DryRun is an optional parameter. To learn more about how to use this parameter, see Testing your permissions in the Key Management Service Developer Guide .

Output

None.

| 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.

—

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

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_kms.exceptions:

DependencyTimeoutError, DryRunOperationError, InvalidArnError, InvalidGrantIdError, InvalidGrantTokenError, KMSInternalError, KMSInvalidStateError, NotFoundError.

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

Service guide · Pinned model