Struct aws_sdk_kms::client::fluent_builders::GetParametersForImport
source · [−]pub struct GetParametersForImport<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Fluent builder constructing a request to GetParametersForImport.
Returns the items you need to import key material into a symmetric, customer managed KMS key. For more information about importing key material into KMS, see Importing Key Material in the Key Management Service Developer Guide.
This operation returns a public key and an import token. Use the public key to encrypt the symmetric key material. Store the import token to send with a subsequent ImportKeyMaterial request.
You must specify the key ID of the symmetric KMS key into which you will import key material. This KMS key's Origin must be EXTERNAL. You must also specify the wrapping algorithm and type of wrapping key (public key) that you will use to encrypt the key material. You cannot perform this operation on an asymmetric KMS key or on any KMS key in a different Amazon Web Services account.
To import key material, you must use the public key and import token from the same response. These items are valid for 24 hours. The expiration date and time appear in the GetParametersForImport response. You cannot use an expired token in an ImportKeyMaterial request. If your key and token expire, send another GetParametersForImport request.
The KMS key that you use for this operation must be in a compatible key state. For details, see Key state: Effect on your KMS key 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:GetParametersForImport (key policy)
Related operations:
-
ImportKeyMaterial -
DeleteImportedKeyMaterial
Implementations
impl<C, M, R> GetParametersForImport<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> GetParametersForImport<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<GetParametersForImportOutput, SdkError<GetParametersForImportError>> where
R::Policy: SmithyRetryPolicy<GetParametersForImportInputOperationOutputAlias, GetParametersForImportOutput, GetParametersForImportError, GetParametersForImportInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<GetParametersForImportOutput, SdkError<GetParametersForImportError>> where
R::Policy: SmithyRetryPolicy<GetParametersForImportInputOperationOutputAlias, GetParametersForImportOutput, GetParametersForImportError, GetParametersForImportInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
The identifier of the symmetric KMS key into which you will import key material. The Origin of the KMS key must be EXTERNAL.
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.
The identifier of the symmetric KMS key into which you will import key material. The Origin of the KMS key must be EXTERNAL.
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.
The algorithm you will use to encrypt the key material before importing it with ImportKeyMaterial. For more information, see Encrypt the Key Material in the Key Management Service Developer Guide.
The algorithm you will use to encrypt the key material before importing it with ImportKeyMaterial. For more information, see Encrypt the Key Material in the Key Management Service Developer Guide.
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for GetParametersForImport<C, M, R>
impl<C, M, R> Send for GetParametersForImport<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for GetParametersForImport<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for GetParametersForImport<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for GetParametersForImport<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more