Class ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource
The "cryptoKeys" collection of methods.
Inherited Members
Namespace: Google.Apis.CloudKMS.v1
Assembly: Google.Apis.CloudKMS.v1.dll
Syntax
public class ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource
Constructors
CryptoKeysResource(IClientService)
Constructs a new resource.
Declaration
public CryptoKeysResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Properties
CryptoKeyVersions
Gets the CryptoKeyVersions resource.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.CryptoKeyVersionsResource CryptoKeyVersions { get; }
Property Value
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.CryptoKeyVersionsResource |
Methods
Create(CryptoKey, string)
Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.CreateRequest Create(CryptoKey body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| CryptoKey | body | The body of the request. |
| string | parent | Required. The name of the KeyRing associated with the CryptoKeys. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.CreateRequest |
Decrypt(DecryptRequest, string)
Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.DecryptRequest Decrypt(DecryptRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| DecryptRequest | body | The body of the request. |
| string | name | Required. The resource name of the CryptoKey to use for decryption. The server will choose the appropriate version. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.DecryptRequest |
Delete(string)
Permanently deletes the given CryptoKey. All child CryptoKeyVersions must have been previously deleted using KeyManagementService.DeleteCryptoKeyVersion. The specified crypto key will be immediately and permanently deleted upon calling this method. This action cannot be undone.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the CryptoKey to delete. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.DeleteRequest |
Encrypt(EncryptRequest, string)
Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.EncryptRequest Encrypt(EncryptRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| EncryptRequest | body | The body of the request. |
| string | name | Required. The resource name of the CryptoKey or CryptoKeyVersion to use for encryption. If a CryptoKey is specified, the server will use its primary version. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.EncryptRequest |
Get(string)
Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.GetRequest Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the CryptoKey to get. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.GetRequest |
GetIamPolicy(string)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.GetIamPolicyRequest |
List(string)
Lists CryptoKeys.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.ListRequest List(string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The resource name of the KeyRing to list, in the format
|
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.ListRequest |
Patch(CryptoKey, string)
Update a CryptoKey.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.PatchRequest Patch(CryptoKey body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| CryptoKey | body | The body of the request. |
| string | name | Output only. The resource name for this CryptoKey in the format
|
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.PatchRequest |
SetIamPolicy(SetIamPolicyRequest, string)
Sets the access control policy on the specified resource. Replaces any existing policy. Can
return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| SetIamPolicyRequest | body | The body of the request. |
| string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.SetIamPolicyRequest |
TestIamPermissions(TestIamPermissionsRequest, string)
Returns permissions that a caller has on the specified resource. If the resource does not exist,
this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is
designed to be used for building permission-aware UIs and command-line tools, not for
authorization checking. This operation may "fail open" without warning.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| TestIamPermissionsRequest | body | The body of the request. |
| string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.TestIamPermissionsRequest |
UpdatePrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest, string)
Update the version of a CryptoKey that will be used in Encrypt. Returns an error if called on a key whose purpose is not ENCRYPT_DECRYPT.
Declaration
public virtual ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.UpdatePrimaryVersionRequest UpdatePrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCryptoKeyPrimaryVersionRequest | body | The body of the request. |
| string | name | Required. The resource name of the CryptoKey to update. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeyRingsResource.CryptoKeysResource.UpdatePrimaryVersionRequest |