Key Management Service API, gRPC: AsymmetricEncryptionKeyService
Set of methods for managing asymmetric KMS keys.
Call | Description |
---|---|
Create | control plane Creates an asymmetric KMS key in the specified folder. |
Get | Returns the specified asymmetric KMS key. |
List | Returns the list of asymmetric KMS keys in the specified folder. |
Update | Updates the specified asymmetric KMS key. |
Delete | Deletes the specified asymmetric KMS key. |
ListOperations | Lists operations for the specified asymmetric KMS key. |
ListAccessBindings | Lists existing access bindings for the specified key. |
SetAccessBindings | Sets access bindings for the key. |
UpdateAccessBindings | Updates access bindings for the specified key. |
Calls AsymmetricEncryptionKeyService
Create
control plane Creates an asymmetric KMS key in the specified folder.
rpc Create (CreateAsymmetricEncryptionKeyRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateAsymmetricEncryptionKeyMetadata
Operation.response:AsymmetricEncryptionKey
CreateAsymmetricEncryptionKeyRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create a asymmetric KMS key in. The maximum string length in characters is 50. |
name | string Name of the key. The maximum string length in characters is 100. |
description | string Description of the key. The maximum string length in characters is 1024. |
labels | map<string,string> Custom labels for the asymmetric KMS key as key:value pairs. Maximum 64 per key. For example, "project": "mvp" or "source": "dictionary" . No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The maximum string length in characters for each key is 63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric encryption algorithm.
|
deletion_protection | bool Flag that inhibits deletion of the symmetric KMS key |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateAsymmetricEncryptionKeyMetadata
Field | Description |
---|---|
key_id | string ID of the key being created. |
AsymmetricEncryptionKey
Field | Description |
---|---|
id | string ID of the key. |
folder_id | string ID of the folder that the key belongs to. |
created_at | google.protobuf.Timestamp Time when the key was created. |
name | string Name of the key. |
description | string Description of the key. |
labels | map<string,string> Custom labels for the key as key:value pairs. Maximum 64 per key. |
status | enum Status Current status of the key.
|
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric Encryption Algorithm ID.
|
deletion_protection | bool Flag that inhibits deletion of the key |
Get
Returns the specified asymmetric KMS key.
To get the list of available asymmetric KMS keys, make a SymmetricKeyService.List request.
rpc Get (GetAsymmetricEncryptionKeyRequest) returns (AsymmetricEncryptionKey)
GetAsymmetricEncryptionKeyRequest
Field | Description |
---|---|
key_id | string Required. ID of the asymmetric KMS key to return. To get the ID of an asymmetric KMS key use a AsymmetricEncryptionKeyService.List request. The maximum string length in characters is 50. |
AsymmetricEncryptionKey
Field | Description |
---|---|
id | string ID of the key. |
folder_id | string ID of the folder that the key belongs to. |
created_at | google.protobuf.Timestamp Time when the key was created. |
name | string Name of the key. |
description | string Description of the key. |
labels | map<string,string> Custom labels for the key as key:value pairs. Maximum 64 per key. |
status | enum Status Current status of the key.
|
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric Encryption Algorithm ID.
|
deletion_protection | bool Flag that inhibits deletion of the key |
List
Returns the list of asymmetric KMS keys in the specified folder.
rpc List (ListAsymmetricEncryptionKeysRequest) returns (ListAsymmetricEncryptionKeysResponse)
ListAsymmetricEncryptionKeysRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list asymmetric KMS keys in. The maximum string length in characters is 50. |
page_size | 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 ListAsymmetricEncryptionKeysResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListAsymmetricEncryptionKeysResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListAsymmetricEncryptionKeysResponse
Field | Description |
---|---|
keys[] | AsymmetricEncryptionKey List of asymmetric KMS keys in the specified folder. |
next_page_token | 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 ListAsymmetricEncryptionKeysRequest.page_size, use the next_page_token as the value for the ListAsymmetricEncryptionKeysRequest.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. |
AsymmetricEncryptionKey
Field | Description |
---|---|
id | string ID of the key. |
folder_id | string ID of the folder that the key belongs to. |
created_at | google.protobuf.Timestamp Time when the key was created. |
name | string Name of the key. |
description | string Description of the key. |
labels | map<string,string> Custom labels for the key as key:value pairs. Maximum 64 per key. |
status | enum Status Current status of the key.
|
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric Encryption Algorithm ID.
|
deletion_protection | bool Flag that inhibits deletion of the key |
Update
Updates the specified asymmetric KMS key.
rpc Update (UpdateAsymmetricEncryptionKeyRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateAsymmetricEncryptionKeyMetadata
Operation.response:AsymmetricEncryptionKey
UpdateAsymmetricEncryptionKeyRequest
Field | Description |
---|---|
key_id | string Required. ID of the asymmetric KMS key to update. To get the ID of a asymmetric KMS key use a AsymmetricEncryptionKeyService.List request. The maximum string length in characters is 50. |
update_mask | google.protobuf.FieldMask Required. Field mask that specifies which attributes of the asymmetric KMS key are going to be updated. |
name | string New name for the asymmetric KMS key. The maximum string length in characters is 100. |
description | string New description for the asymmetric KMS key. The maximum string length in characters is 1024. |
status | AsymmetricEncryptionKey.Status New status for the asymmetric KMS key. Using the AsymmetricEncryptionKeyService.Update method you can only set ACTIVE or INACTIVE status. |
labels | map<string,string> Custom labels for the asymmetric KMS key as key:value pairs. Maximum 64 per key. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The maximum string length in characters for each key is 63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
deletion_protection | bool Flag that inhibits deletion of the asymmetric KMS key |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateAsymmetricEncryptionKeyMetadata
Field | Description |
---|---|
key_id | string ID of the key being updated. |
AsymmetricEncryptionKey
Field | Description |
---|---|
id | string ID of the key. |
folder_id | string ID of the folder that the key belongs to. |
created_at | google.protobuf.Timestamp Time when the key was created. |
name | string Name of the key. |
description | string Description of the key. |
labels | map<string,string> Custom labels for the key as key:value pairs. Maximum 64 per key. |
status | enum Status Current status of the key.
|
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric Encryption Algorithm ID.
|
deletion_protection | bool Flag that inhibits deletion of the key |
Delete
Deletes the specified asymmetric KMS key. This action also automatically schedules the destruction of all of the key's versions in 72 hours.
The key and its versions appear absent in AsymmetricEncryptionKeyService.Get and AsymmetricEncryptionKeyService.List requests, but can be restored within 72 hours with a request to tech support.
rpc Delete (DeleteAsymmetricEncryptionKeyRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteAsymmetricEncryptionKeyMetadata
Operation.response:AsymmetricEncryptionKey
DeleteAsymmetricEncryptionKeyRequest
Field | Description |
---|---|
key_id | string Required. ID of the key to be deleted. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteAsymmetricEncryptionKeyMetadata
Field | Description |
---|---|
key_id | string ID of the key being deleted. |
AsymmetricEncryptionKey
Field | Description |
---|---|
id | string ID of the key. |
folder_id | string ID of the folder that the key belongs to. |
created_at | google.protobuf.Timestamp Time when the key was created. |
name | string Name of the key. |
description | string Description of the key. |
labels | map<string,string> Custom labels for the key as key:value pairs. Maximum 64 per key. |
status | enum Status Current status of the key.
|
encryption_algorithm | enum AsymmetricEncryptionAlgorithm Asymmetric Encryption Algorithm ID.
|
deletion_protection | bool Flag that inhibits deletion of the key |
ListOperations
Lists operations for the specified asymmetric KMS key.
rpc ListOperations (ListAsymmetricEncryptionKeyOperationsRequest) returns (ListAsymmetricEncryptionKeyOperationsResponse)
ListAsymmetricEncryptionKeyOperationsRequest
Field | Description |
---|---|
key_id | string Required. ID of the symmetric KMS key to get operations for. To get the key ID, use a [AsymmetricKeyEncryptionService.List] request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page that should be returned. If the number of available results is larger than page_size , the service returns a ListAsymmetricEncryptionKeyOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the [ListAsymmetricKeyOperationsResponse.next_page_token] returned by a previous list request. The maximum string length in characters is 100. |
ListAsymmetricEncryptionKeyOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified key. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListAsymmetricEncryptionKeyOperationsRequest.page_size, use the next_page_token as the value for the ListAsymmetricEncryptionKeyOperationsRequest.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. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty |
ListAccessBindings
Lists existing access bindings for the specified key.
rpc ListAccessBindings (ListAccessBindingsRequest) returns (ListAccessBindingsResponse)
ListAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource to list access bindings for. To get the resource ID, use a corresponding List request. For example, use the yandex.cloud.resourcemanager.v1.CloudService.List request to get the Cloud resource ID. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page that should be returned. If the number of available results is larger than page_size , the service returns a ListAccessBindingsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. Set page_token to the ListAccessBindingsResponse.next_page_token returned by a previous list request to get the next page of results. The maximum string length in characters is 100. |
ListAccessBindingsResponse
Field | Description |
---|---|
access_bindings[] | AccessBinding List of access bindings for the specified resource. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListAccessBindingsRequest.page_size, use the next_page_token as the value for the ListAccessBindingsRequest.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. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
SetAccessBindings
Sets access bindings for the key.
rpc SetAccessBindings (SetAccessBindingsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:SetAccessBindingsMetadata
Operation.response:google.protobuf.Empty
SetAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource for which access bindings are being set. To get the resource ID, use a corresponding List request. The maximum string length in characters is 50. |
access_bindings[] | AccessBinding Required. Access bindings to be set. For more information, see Access Bindings. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
SetAccessBindingsMetadata
Field | Description |
---|---|
resource_id | string ID of the resource for which access bindings are being set. |
UpdateAccessBindings
Updates access bindings for the specified key.
rpc UpdateAccessBindings (UpdateAccessBindingsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateAccessBindingsMetadata
Operation.response:google.protobuf.Empty
UpdateAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource for which access bindings are being updated. The maximum string length in characters is 50. |
access_binding_deltas[] | AccessBindingDelta Required. Updates to access bindings. The number of elements must be greater than 0. |
AccessBindingDelta
Field | Description |
---|---|
action | enum AccessBindingAction Required. The action that is being performed on an access binding.
|
access_binding | AccessBinding Required. Access binding. For more information, see Access Bindings. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateAccessBindingsMetadata
Field | Description |
---|---|
resource_id | string ID of the resource for which access bindings are being updated. |