Class CryptoKey (2.27.0)

public final class CryptoKey extends GeneratedMessageV3 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

Implements

CryptoKeyOrBuilder

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CRYPTO_KEY_BACKEND_FIELD_NUMBER

public static final int CRYPTO_KEY_BACKEND_FIELD_NUMBER
Field Value
TypeDescription
int

DESTROY_SCHEDULED_DURATION_FIELD_NUMBER

public static final int DESTROY_SCHEDULED_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

IMPORT_ONLY_FIELD_NUMBER

public static final int IMPORT_ONLY_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NEXT_ROTATION_TIME_FIELD_NUMBER

public static final int NEXT_ROTATION_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

PRIMARY_FIELD_NUMBER

public static final int PRIMARY_FIELD_NUMBER
Field Value
TypeDescription
int

PURPOSE_FIELD_NUMBER

public static final int PURPOSE_FIELD_NUMBER
Field Value
TypeDescription
int

ROTATION_PERIOD_FIELD_NUMBER

public static final int ROTATION_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

VERSION_TEMPLATE_FIELD_NUMBER

public static final int VERSION_TEMPLATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CryptoKey getDefaultInstance()
Returns
TypeDescription
CryptoKey

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CryptoKey.Builder newBuilder()
Returns
TypeDescription
CryptoKey.Builder

newBuilder(CryptoKey prototype)

public static CryptoKey.Builder newBuilder(CryptoKey prototype)
Parameter
NameDescription
prototypeCryptoKey
Returns
TypeDescription
CryptoKey.Builder

parseDelimitedFrom(InputStream input)

public static CryptoKey parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CryptoKey parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CryptoKey parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CryptoKey parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CryptoKey parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CryptoKey parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CryptoKey> parser()
Returns
TypeDescription
Parser<CryptoKey>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Labels with user-defined metadata. For more information, see Labeling Keys.

map<string, string> labels = 10;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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];

Returns
TypeDescription
Timestamp

The createTime.

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];

Returns
TypeDescription
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) = { ... }

Returns
TypeDescription
String

The cryptoKeyBackend.

getCryptoKeyBackendBytes()

<