Skip to content

KMSClient.get_parameters_for_import

rboto-kms==0.4.0 · Service index · Types

Model summary (excerpt): Returns the public key and an import token you need to import or reimport key material for a KMS key. By default, KMS keys are created with key material that KMS generates. This operation supports Importing key material , an advanced feature that lets you generate and import the cryptographic key material for a KMS key. Before calling GetParametersForImport , use the CreateKey operation with...

Install and imports

python -m pip install "rboto[kms]==0.4.0"
from rboto import KMSClient
from rboto_kms.types import (
    AlgorithmSpec,
    GetParametersForImportOutput,
    WrappingKeySpec,
)

Signature

async def get_parameters_for_import(
    *,
    key_id: str,
    wrapping_algorithm: AlgorithmSpec,
    wrapping_key_spec: WrappingKeySpec,
) -> GetParametersForImportOutput: ...

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)
key_id Yes The identifier of the KMS key that will be associated with the imported key material. The Origin of the KMS key must be EXTERNAL . All KMS key types are supported, including multi-Region keys. However, you cannot import key material into a KMS key in a custom key store. Specify the key ID or key ARN of the KMS key. For example: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN:...
wrapping_algorithm Yes The algorithm you will use with the RSA public key ( PublicKey ) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide . For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES...
wrapping_key_spec Yes The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import. Use the longest RSA wrapping key that is practical. You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

Output

GetParametersForImportOutput.

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
key_id str | None Always present —
import_token bytes | None Always present —
public_key bytes | None Always present —
parameters_valid_to str | None 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.

AlgorithmSpec, GetParametersForImportOutput, WrappingKeySpec

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, InvalidArnError, KMSInternalError, KMSInvalidStateError, NotFoundError, UnsupportedOperationError.

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

Service guide · Pinned model