- 2.57.0 (latest)
- 2.56.0
- 2.55.0
- 2.54.0
- 2.52.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.8
- 2.5.3
- 2.4.4
- 2.3.1
public static final class CryptoKey.Builder extends GeneratedMessageV3.Builder<CryptoKey.Builder> implements CryptoKeyOrBuilder
A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
Protobuf type google.cloud.kms.v1.CryptoKey
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CryptoKey.BuilderImplements
CryptoKeyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CryptoKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CryptoKey.Builder |
build()
public CryptoKey build()
Type | Description |
CryptoKey |
buildPartial()
public CryptoKey buildPartial()
Type | Description |
CryptoKey |
clear()
public CryptoKey.Builder clear()
Type | Description |
CryptoKey.Builder |
clearCreateTime()
public CryptoKey.Builder clearCreateTime()
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKey.Builder |
clearCryptoKeyBackend()
public CryptoKey.Builder clearCryptoKeyBackend()
Immutable. The resource name of the backend environment where the key
material for all CryptoKeyVersions
associated with this CryptoKey reside and
where all related cryptographic operations are performed. Only applicable
if CryptoKeyVersions have a
ProtectionLevel of
EXTERNAL_VPC, with the
resource name in the format projects/*/locations/*/ekmConnections/*
.
Note, this list is non-exhaustive and may apply to additional
ProtectionLevels in the future.
string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
Type | Description |
CryptoKey.Builder | This builder for chaining. |
clearDestroyScheduledDuration()
public CryptoKey.Builder clearDestroyScheduledDuration()
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
CryptoKey.Builder |
clearField(Descriptors.FieldDescriptor field)
public CryptoKey.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
CryptoKey.Builder |
clearImportOnly()
public CryptoKey.Builder clearImportOnly()
Immutable. Whether this key may contain imported versions only.
bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
CryptoKey.Builder | This builder for chaining. |
clearLabels()
public CryptoKey.Builder clearLabels()
Type | Description |
CryptoKey.Builder |
clearName()
public CryptoKey.Builder clearName()
Output only. The resource name for this
CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKey.Builder | This builder for chaining. |
clearNextRotationTime()
public CryptoKey.Builder clearNextRotationTime()
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Type | Description |
CryptoKey.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public CryptoKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
CryptoKey.Builder |
clearPrimary()
public CryptoKey.Builder clearPrimary()
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKey.Builder |
clearPurpose()
public CryptoKey.Builder clearPurpose()
Immutable. The immutable purpose of this CryptoKey.
.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
CryptoKey.Builder | This builder for chaining. |
clearRotationPeriod()
public CryptoKey.Builder clearRotationPeriod()
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Type | Description |
CryptoKey.Builder |
clearRotationSchedule()
public CryptoKey.Builder clearRotationSchedule()
Type | Description |
CryptoKey.Builder |
clearVersionTemplate()
public CryptoKey.Builder clearVersionTemplate()
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Type | Description |
CryptoKey.Builder |
clone()
public CryptoKey.Builder clone()
Type | Description |
CryptoKey.Builder |
containsLabels(String key)
public boolean containsLabels(String key)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
key | String |
Type | Description |
boolean |
getCreateTime()
public Timestamp getCreateTime()
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Timestamp | The createTime. |
getCreateTimeBuilder()
public Timestamp.Builder getCreateTimeBuilder()
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Builder |
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
TimestampOrBuilder |
getCryptoKeyBackend()
public String getCryptoKeyBackend()
Immutable. The resource name of the backend environment where the key
material for all CryptoKeyVersions
associated with this CryptoKey reside and
where all related cryptographic operations are performed. Only applicable
if CryptoKeyVersions have a
ProtectionLevel of
EXTERNAL_VPC, with the
resource name in the format projects/*/locations/*/ekmConnections/*
.
Note, this list is non-exhaustive and may apply to additional
ProtectionLevels in the future.
string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
Type | Description |
String | The cryptoKeyBackend. |
getCryptoKeyBackendBytes()
public ByteString getCryptoKeyBackendBytes()
Immutable. The resource name of the backend environment where the key
material for all CryptoKeyVersions
associated with this CryptoKey reside and
where all related cryptographic operations are performed. Only applicable
if CryptoKeyVersions have a
ProtectionLevel of
EXTERNAL_VPC, with the
resource name in the format projects/*/locations/*/ekmConnections/*
.
Note, this list is non-exhaustive and may apply to additional
ProtectionLevels in the future.
string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
Type | Description |
ByteString | The bytes for cryptoKeyBackend. |
getDefaultInstanceForType()
public CryptoKey getDefaultInstanceForType()
Type | Description |
CryptoKey |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getDestroyScheduledDuration()
public Duration getDestroyScheduledDuration()
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
Duration | The destroyScheduledDuration. |
getDestroyScheduledDurationBuilder()
public Duration.Builder getDestroyScheduledDurationBuilder()
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
Builder |
getDestroyScheduledDurationOrBuilder()
public DurationOrBuilder getDestroyScheduledDurationOrBuilder()
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
DurationOrBuilder |
getImportOnly()
public boolean getImportOnly()
Immutable. Whether this key may contain imported versions only.
bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
boolean | The importOnly. |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Type | Description |
Map<String,String> |
getLabelsCount()
public int getLabelsCount()
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Type | Description |
int |
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
key | String |
Type | Description |
String |
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
getName()
public String getName()
Output only. The resource name for this
CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
Output only. The resource name for this
CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for name. |
getNextRotationTime()
public Timestamp getNextRotationTime()
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Type | Description |
Timestamp | The nextRotationTime. |
getNextRotationTimeBuilder()
public Timestamp.Builder getNextRotationTimeBuilder()
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Type | Description |
Builder |
getNextRotationTimeOrBuilder()
public TimestampOrBuilder getNextRotationTimeOrBuilder()
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Type | Description |
TimestampOrBuilder |
getPrimary()
public CryptoKeyVersion getPrimary()
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKeyVersion | The primary. |
getPrimaryBuilder()
public CryptoKeyVersion.Builder getPrimaryBuilder()
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKeyVersion.Builder |
getPrimaryOrBuilder()
public CryptoKeyVersionOrBuilder getPrimaryOrBuilder()
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
CryptoKeyVersionOrBuilder |
getPurpose()
public CryptoKey.CryptoKeyPurpose getPurpose()
Immutable. The immutable purpose of this CryptoKey.
.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
CryptoKey.CryptoKeyPurpose | The purpose. |
getPurposeValue()
public int getPurposeValue()
Immutable. The immutable purpose of this CryptoKey.
.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
int | The enum numeric value on the wire for purpose. |
getRotationPeriod()
public Duration getRotationPeriod()
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Type | Description |
Duration | The rotationPeriod. |
getRotationPeriodBuilder()
public Duration.Builder getRotationPeriodBuilder()
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Type | Description |
Builder |
getRotationPeriodOrBuilder()
public DurationOrBuilder getRotationPeriodOrBuilder()
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Type | Description |
DurationOrBuilder |
getRotationScheduleCase()
public CryptoKey.RotationScheduleCase getRotationScheduleCase()
Type | Description |
CryptoKey.RotationScheduleCase |
getVersionTemplate()
public CryptoKeyVersionTemplate getVersionTemplate()
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Type | Description |
CryptoKeyVersionTemplate | The versionTemplate. |
getVersionTemplateBuilder()
public CryptoKeyVersionTemplate.Builder getVersionTemplateBuilder()
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Type | Description |
CryptoKeyVersionTemplate.Builder |
getVersionTemplateOrBuilder()
public CryptoKeyVersionTemplateOrBuilder getVersionTemplateOrBuilder()
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Type | Description |
CryptoKeyVersionTemplateOrBuilder |
hasCreateTime()
public boolean hasCreateTime()
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
boolean | Whether the createTime field is set. |
hasDestroyScheduledDuration()
public boolean hasDestroyScheduledDuration()
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Type | Description |
boolean | Whether the destroyScheduledDuration field is set. |
hasNextRotationTime()
public boolean hasNextRotationTime()
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Type | Description |
boolean | Whether the nextRotationTime field is set. |
hasPrimary()
public boolean hasPrimary()
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
boolean | Whether the primary field is set. |
hasRotationPeriod()
public boolean hasRotationPeriod()
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Type | Description |
boolean | Whether the rotationPeriod field is set. |
hasVersionTemplate()
public boolean hasVersionTemplate()
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Type | Description |
boolean | Whether the versionTemplate field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeCreateTime(Timestamp value)
public CryptoKey.Builder mergeCreateTime(Timestamp value)
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | Timestamp |
Type | Description |
CryptoKey.Builder |
mergeDestroyScheduledDuration(Duration value)
public CryptoKey.Builder mergeDestroyScheduledDuration(Duration value)
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
value | Duration |
Type | Description |
CryptoKey.Builder |
mergeFrom(CryptoKey other)
public CryptoKey.Builder mergeFrom(CryptoKey other)
Name | Description |
other | CryptoKey |
Type | Description |
CryptoKey.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CryptoKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
CryptoKey.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public CryptoKey.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
CryptoKey.Builder |
mergeNextRotationTime(Timestamp value)
public CryptoKey.Builder mergeNextRotationTime(Timestamp value)
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Name | Description |
value | Timestamp |
Type | Description |
CryptoKey.Builder |
mergePrimary(CryptoKeyVersion value)
public CryptoKey.Builder mergePrimary(CryptoKeyVersion value)
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | CryptoKeyVersion |
Type | Description |
CryptoKey.Builder |
mergeRotationPeriod(Duration value)
public CryptoKey.Builder mergeRotationPeriod(Duration value)
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Name | Description |
value | Duration |
Type | Description |
CryptoKey.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CryptoKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CryptoKey.Builder |
mergeVersionTemplate(CryptoKeyVersionTemplate value)
public CryptoKey.Builder mergeVersionTemplate(CryptoKeyVersionTemplate value)
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Name | Description |
value | CryptoKeyVersionTemplate |
Type | Description |
CryptoKey.Builder |
putAllLabels(Map<String,String> values)
public CryptoKey.Builder putAllLabels(Map<String,String> values)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
values | Map<String,String> |
Type | Description |
CryptoKey.Builder |
putLabels(String key, String value)
public CryptoKey.Builder putLabels(String key, String value)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
key | String |
value | String |
Type | Description |
CryptoKey.Builder |
removeLabels(String key)
public CryptoKey.Builder removeLabels(String key)
Labels with user-defined metadata. For more information, see Labeling Keys.
map<string, string> labels = 10;
Name | Description |
key | String |
Type | Description |
CryptoKey.Builder |
setCreateTime(Timestamp value)
public CryptoKey.Builder setCreateTime(Timestamp value)
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | Timestamp |
Type | Description |
CryptoKey.Builder |
setCreateTime(Timestamp.Builder builderForValue)
public CryptoKey.Builder setCreateTime(Timestamp.Builder builderForValue)
Output only. The time at which this CryptoKey was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
builderForValue | Builder |
Type | Description |
CryptoKey.Builder |
setCryptoKeyBackend(String value)
public CryptoKey.Builder setCryptoKeyBackend(String value)
Immutable. The resource name of the backend environment where the key
material for all CryptoKeyVersions
associated with this CryptoKey reside and
where all related cryptographic operations are performed. Only applicable
if CryptoKeyVersions have a
ProtectionLevel of
EXTERNAL_VPC, with the
resource name in the format projects/*/locations/*/ekmConnections/*
.
Note, this list is non-exhaustive and may apply to additional
ProtectionLevels in the future.
string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
Name | Description |
value | String The cryptoKeyBackend to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setCryptoKeyBackendBytes(ByteString value)
public CryptoKey.Builder setCryptoKeyBackendBytes(ByteString value)
Immutable. The resource name of the backend environment where the key
material for all CryptoKeyVersions
associated with this CryptoKey reside and
where all related cryptographic operations are performed. Only applicable
if CryptoKeyVersions have a
ProtectionLevel of
EXTERNAL_VPC, with the
resource name in the format projects/*/locations/*/ekmConnections/*
.
Note, this list is non-exhaustive and may apply to additional
ProtectionLevels in the future.
string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
Name | Description |
value | ByteString The bytes for cryptoKeyBackend to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setDestroyScheduledDuration(Duration value)
public CryptoKey.Builder setDestroyScheduledDuration(Duration value)
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
value | Duration |
Type | Description |
CryptoKey.Builder |
setDestroyScheduledDuration(Duration.Builder builderForValue)
public CryptoKey.Builder setDestroyScheduledDuration(Duration.Builder builderForValue)
Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.
.google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
builderForValue | Builder |
Type | Description |
CryptoKey.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public CryptoKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CryptoKey.Builder |
setImportOnly(boolean value)
public CryptoKey.Builder setImportOnly(boolean value)
Immutable. Whether this key may contain imported versions only.
bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
value | boolean The importOnly to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setName(String value)
public CryptoKey.Builder setName(String value)
Output only. The resource name for this
CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The name to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public CryptoKey.Builder setNameBytes(ByteString value)
Output only. The resource name for this
CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setNextRotationTime(Timestamp value)
public CryptoKey.Builder setNextRotationTime(Timestamp value)
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Name | Description |
value | Timestamp |
Type | Description |
CryptoKey.Builder |
setNextRotationTime(Timestamp.Builder builderForValue)
public CryptoKey.Builder setNextRotationTime(Timestamp.Builder builderForValue)
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Timestamp next_rotation_time = 7;
Name | Description |
builderForValue | Builder |
Type | Description |
CryptoKey.Builder |
setPrimary(CryptoKeyVersion value)
public CryptoKey.Builder setPrimary(CryptoKeyVersion value)
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | CryptoKeyVersion |
Type | Description |
CryptoKey.Builder |
setPrimary(CryptoKeyVersion.Builder builderForValue)
public CryptoKey.Builder setPrimary(CryptoKeyVersion.Builder builderForValue)
Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
.google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
builderForValue | CryptoKeyVersion.Builder |
Type | Description |
CryptoKey.Builder |
setPurpose(CryptoKey.CryptoKeyPurpose value)
public CryptoKey.Builder setPurpose(CryptoKey.CryptoKeyPurpose value)
Immutable. The immutable purpose of this CryptoKey.
.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
value | CryptoKey.CryptoKeyPurpose The purpose to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setPurposeValue(int value)
public CryptoKey.Builder setPurposeValue(int value)
Immutable. The immutable purpose of this CryptoKey.
.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE];
Name | Description |
value | int The enum numeric value on the wire for purpose to set. |
Type | Description |
CryptoKey.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CryptoKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
CryptoKey.Builder |
setRotationPeriod(Duration value)
public CryptoKey.Builder setRotationPeriod(Duration value)
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Name | Description |
value | Duration |
Type | Description |
CryptoKey.Builder |
setRotationPeriod(Duration.Builder builderForValue)
public CryptoKey.Builder setRotationPeriod(Duration.Builder builderForValue)
next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.
.google.protobuf.Duration rotation_period = 8;
Name | Description |
builderForValue | Builder |
Type | Description |
CryptoKey.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final CryptoKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CryptoKey.Builder |
setVersionTemplate(CryptoKeyVersionTemplate value)
public CryptoKey.Builder setVersionTemplate(CryptoKeyVersionTemplate value)
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Name | Description |
value | CryptoKeyVersionTemplate |
Type | Description |
CryptoKey.Builder |
setVersionTemplate(CryptoKeyVersionTemplate.Builder builderForValue)
public CryptoKey.Builder setVersionTemplate(CryptoKeyVersionTemplate.Builder builderForValue)
A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
.google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11;
Name | Description |
builderForValue | CryptoKeyVersionTemplate.Builder |
Type | Description |
CryptoKey.Builder |