Get
Returns the specified asymmetric KMS key.
To get the list of available asymmetric KMS keys, make a SymmetricKeyService.List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetAsymmetricSignatureKeyRequest =
cloudApi.kms.asymmetricsignature_asymmetric_signature_key_service
.GetAsymmetricSignatureKeyRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(
serviceClients.AsymmetricSignatureKeyServiceClient
);
const result = await client.get(
GetAsymmetricSignatureKeyRequest.fromPartial({
keyId: "keyId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.kms.v1.asymmetricsignature.asymmetric_signature_key_service_pb2_grpc import (
AsymmetricSignatureKeyServiceStub,
)
from yandex.cloud.kms.v1.asymmetricsignature.asymmetric_signature_key_service_pb2 import (
GetAsymmetricSignatureKeyRequest,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(AsymmetricSignatureKeyServiceStub)
response = service.Get(GetAsymmetricSignatureKeyRequest(key_id="keyId"))
print(response)
GetAsymmetricSignatureKeyRequest
keyId : string
ID of the asymmetric KMS key to return. To get the ID of an asymmetric KMS key use a AsymmetricSignatureKeyService.List request.
AsymmetricSignatureKey
An asymmetric KMS key that may contain several versions of the cryptographic material.
Status
STATUS_UNSPECIFIEDCREATINGThe key is being created.
ACTIVEThe key is active and can be used for encryption and decryption or signature and verification. Can be set to INACTIVE using the [AsymmetricKeyService.Update][3] method.
INACTIVEThe key is inactive and unusable. Can be set to ACTIVE using the [AsymmetricKeyService.Update][4] method.
id : string
ID of the key.
folderId : string
ID of the folder that the key belongs to.
createdAt : google.protobuf.Timestamp
Time when the key was created.
name : string
Name of the key.
description : string
Description of the key.
labels : string
Custom labels for the key as key:value pairs. Maximum 64 per key.
status : Status
Current status of the key.
signatureAlgorithm : AsymmetricSignatureAlgorithm
Signature Algorithm ID.
deletionProtection : bool
Flag that inhibits deletion of the key