- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetParametersForImportCommand
Gets the import token and the wrapping key certificate in PEM format (base64 encoded) to initiate a TR-34 WrappedKeyBlock or a RSA WrappedKeyCryptogram import into Amazon Web Services Payment Cryptography.
The wrapping key certificate wraps the key under import. The import token and wrapping key certificate must be in place and operational before calling ImportKey . The import token expires in 7 days. You can use the same import token to import multiple keys into your service account.
Cross-account use: This operation can't be used across different Amazon Web Services accounts.
Related operations:
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PaymentCryptographyClient, GetParametersForImportCommand } from "@aws-sdk/client-payment-cryptography"; // ES Modules import
// const { PaymentCryptographyClient, GetParametersForImportCommand } = require("@aws-sdk/client-payment-cryptography"); // CommonJS import
const client = new PaymentCryptographyClient(config);
const input = { // GetParametersForImportInput
KeyMaterialType: "STRING_VALUE", // required
WrappingKeyAlgorithm: "STRING_VALUE", // required
};
const command = new GetParametersForImportCommand(input);
const response = await client.send(command);
// { // GetParametersForImportOutput
// WrappingKeyCertificate: "STRING_VALUE", // required
// WrappingKeyCertificateChain: "STRING_VALUE", // required
// WrappingKeyAlgorithm: "STRING_VALUE", // required
// ImportToken: "STRING_VALUE", // required
// ParametersValidUntilTimestamp: new Date("TIMESTAMP"), // required
// };
GetParametersForImportCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
KeyMaterialType Required | KeyMaterialType | undefined | The method to use for key material import. Import token is only required for TR-34 WrappedKeyBlock ( Import token is not required for TR-31, root public key cerificate or trusted public key certificate. |
WrappingKeyAlgorithm Required | KeyAlgorithm | undefined | The wrapping key algorithm to generate a wrapping key certificate. This certificate wraps the key under import. At this time, |
GetParametersForImportCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ImportToken Required | string | undefined | The import token to initiate key import into Amazon Web Services Payment Cryptography. The import token expires after 7 days. You can use the same import token to import multiple keys to the same service account. |
ParametersValidUntilTimestamp Required | Date | undefined | The validity period of the import token. |
WrappingKeyAlgorithm Required | KeyAlgorithm | undefined | The algorithm of the wrapping key for use within TR-34 WrappedKeyBlock or RSA WrappedKeyCryptogram. |
WrappingKeyCertificate Required | string | undefined | The wrapping key certificate in PEM format (base64 encoded) of the wrapping key for use within the TR-34 key block. The certificate expires in 7 days. |
WrappingKeyCertificateChain Required | string | undefined | The Amazon Web Services Payment Cryptography root certificate authority (CA) that signed the wrapping key certificate in PEM format (base64 encoded). |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ConflictException | client | This request can cause an inconsistent state for the resource. |
InternalServerException | server | The request processing has failed because of an unknown error, exception, or failure. |
ResourceNotFoundException | client | The request was denied due to an invalid resource error. |
ServiceQuotaExceededException | client | This request would cause a service quota to be exceeded. |
ServiceUnavailableException | server | The service cannot complete the request. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The request was denied due to an invalid request error. |
PaymentCryptographyServiceException | Base exception class for all service exceptions from PaymentCryptography service. |