Reference documentation and code samples for the Cloud KMS V1 Client class CryptoKeyVersionTemplate.
A CryptoKeyVersionTemplate specifies the properties to use when creating a new CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically as a result of auto-rotation.
Generated from protobuf message google.cloud.kms.v1.CryptoKeyVersionTemplate
Namespace
Google \ Cloud \ Kms \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description | 
| data | arrayOptional. Data for populating the Message object. | 
| ↳ protection_level | intProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE. | 
| ↳ algorithm | intRequired. Algorithm to use when creating a CryptoKeyVersion based on this template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT. | 
getProtectionLevel
ProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE.
| Returns | |
|---|---|
| Type | Description | 
| int | Enum of type ProtectionLevel. | 
setProtectionLevel
ProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE.
| Parameter | |
|---|---|
| Name | Description | 
| var | intEnum of type ProtectionLevel. | 
| Returns | |
|---|---|
| Type | Description | 
| $this | |
getAlgorithm
Required.
Algorithm to use when creating a CryptoKeyVersion based on this template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT.
| Returns | |
|---|---|
| Type | Description | 
| int | Enum of type CryptoKeyVersionAlgorithm. | 
setAlgorithm
Required.
Algorithm to use when creating a CryptoKeyVersion based on this template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT.
| Parameter | |
|---|---|
| Name | Description | 
| var | intEnum of type CryptoKeyVersionAlgorithm. | 
| Returns | |
|---|---|
| Type | Description | 
| $this | |