List
Returns the list of asymmetric KMS keys in the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListAsymmetricSignatureKeysRequest =
cloudApi.kms.asymmetricsignature_asymmetric_signature_key_service
.ListAsymmetricSignatureKeysRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(
serviceClients.AsymmetricSignatureKeyServiceClient
);
const result = await client.list(
ListAsymmetricSignatureKeysRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
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 (
ListAsymmetricSignatureKeysRequest,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(AsymmetricSignatureKeyServiceStub)
response = service.List(
ListAsymmetricSignatureKeysRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListAsymmetricSignatureKeysRequest
folderId : string
ID of the folder to list asymmetric KMS keys in.
pageSize : int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListAsymmetricSignatureKeysResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100.
pageToken : string
Page token. To get the next page of results, set page_token to the ListAsymmetricSignatureKeysResponse.next_page_token returned by a previous list request.
ListAsymmetricSignatureKeysResponse
keys : AsymmetricSignatureKey
List of asymmetric KMS keys in the specified folder.
nextPageToken : string
This token allows you to get the next page of results for list requests. If the number of results is greater than the specified ListAsymmetricSignatureKeysRequest.page_size, use the next_page_token as the value for the ListAsymmetricSignatureKeysRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.
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][9] method.
INACTIVEThe key is inactive and unusable. Can be set to ACTIVE using the [AsymmetricKeyService.Update][10] 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