Package com.google.iam.admin.v1
Class ServiceAccountKey
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.iam.admin.v1.ServiceAccountKey
- All Implemented Interfaces:
ServiceAccountKeyOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class ServiceAccountKey
extends com.google.protobuf.GeneratedMessage
implements ServiceAccountKeyOrBuilder
Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.Protobuf type
google.iam.admin.v1.ServiceAccountKey- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a service account key.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ServiceAccountKeystatic final com.google.protobuf.Descriptors.DescriptorbooleanThe key status.Specifies the algorithm (and possibly key size) for the key.intSpecifies the algorithm (and possibly key size) for the key.The key origin.intThe key origin.The key type.intThe key type.getName()The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.com.google.protobuf.ByteStringThe resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.com.google.protobuf.Parser<ServiceAccountKey>com.google.protobuf.ByteStringThe private key data.The output format for the private key.intThe output format for the private key.com.google.protobuf.ByteStringThe public key data.intcom.google.protobuf.TimestampThe key can be used after this timestamp.com.google.protobuf.TimestampOrBuilderThe key can be used after this timestamp.com.google.protobuf.TimestampThe key can be used before this timestamp.com.google.protobuf.TimestampOrBuilderThe key can be used before this timestamp.inthashCode()booleanThe key can be used after this timestamp.booleanThe key can be used before this timestamp.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic ServiceAccountKey.Builderstatic ServiceAccountKey.BuildernewBuilder(ServiceAccountKey prototype) protected ServiceAccountKey.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ServiceAccountKeyparseDelimitedFrom(InputStream input) static ServiceAccountKeyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountKeyparseFrom(byte[] data) static ServiceAccountKeyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountKeyparseFrom(com.google.protobuf.ByteString data) static ServiceAccountKeyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountKeyparseFrom(com.google.protobuf.CodedInputStream input) static ServiceAccountKeyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountKeyparseFrom(InputStream input) static ServiceAccountKeyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountKeyparseFrom(ByteBuffer data) static ServiceAccountKeyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<ServiceAccountKey>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
PRIVATE_KEY_TYPE_FIELD_NUMBER
public static final int PRIVATE_KEY_TYPE_FIELD_NUMBER- See Also:
-
KEY_ALGORITHM_FIELD_NUMBER
public static final int KEY_ALGORITHM_FIELD_NUMBER- See Also:
-
PRIVATE_KEY_DATA_FIELD_NUMBER
public static final int PRIVATE_KEY_DATA_FIELD_NUMBER- See Also:
-
PUBLIC_KEY_DATA_FIELD_NUMBER
public static final int PUBLIC_KEY_DATA_FIELD_NUMBER- See Also:
-
VALID_AFTER_TIME_FIELD_NUMBER
public static final int VALID_AFTER_TIME_FIELD_NUMBER- See Also:
-
VALID_BEFORE_TIME_FIELD_NUMBER
public static final int VALID_BEFORE_TIME_FIELD_NUMBER- See Also:
-
KEY_ORIGIN_FIELD_NUMBER
public static final int KEY_ORIGIN_FIELD_NUMBER- See Also:
-
KEY_TYPE_FIELD_NUMBER
public static final int KEY_TYPE_FIELD_NUMBER- See Also:
-
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getName
The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.string name = 1;- Specified by:
getNamein interfaceServiceAccountKeyOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.string name = 1;- Specified by:
getNameBytesin interfaceServiceAccountKeyOrBuilder- Returns:
- The bytes for name.
-
getPrivateKeyTypeValue
public int getPrivateKeyTypeValue()The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
.google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;- Specified by:
getPrivateKeyTypeValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for privateKeyType.
-
getPrivateKeyType
The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
.google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;- Specified by:
getPrivateKeyTypein interfaceServiceAccountKeyOrBuilder- Returns:
- The privateKeyType.
-
getKeyAlgorithmValue
public int getKeyAlgorithmValue()Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;- Specified by:
getKeyAlgorithmValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyAlgorithm.
-
getKeyAlgorithm
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;- Specified by:
getKeyAlgorithmin interfaceServiceAccountKeyOrBuilder- Returns:
- The keyAlgorithm.
-
getPrivateKeyData
public com.google.protobuf.ByteString getPrivateKeyData()The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud auth activate-service-account</a>.
bytes private_key_data = 3;- Specified by:
getPrivateKeyDatain interfaceServiceAccountKeyOrBuilder- Returns:
- The privateKeyData.
-
getPublicKeyData
public com.google.protobuf.ByteString getPublicKeyData()The public key data. Only provided in `GetServiceAccountKey` responses.
bytes public_key_data = 7;- Specified by:
getPublicKeyDatain interfaceServiceAccountKeyOrBuilder- Returns:
- The publicKeyData.
-
hasValidAfterTime
public boolean hasValidAfterTime()The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
hasValidAfterTimein interfaceServiceAccountKeyOrBuilder- Returns:
- Whether the validAfterTime field is set.
-
getValidAfterTime
public com.google.protobuf.Timestamp getValidAfterTime()The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
getValidAfterTimein interfaceServiceAccountKeyOrBuilder- Returns:
- The validAfterTime.
-
getValidAfterTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getValidAfterTimeOrBuilder()The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
getValidAfterTimeOrBuilderin interfaceServiceAccountKeyOrBuilder
-
hasValidBeforeTime
public boolean hasValidBeforeTime()The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
hasValidBeforeTimein interfaceServiceAccountKeyOrBuilder- Returns:
- Whether the validBeforeTime field is set.
-
getValidBeforeTime
public com.google.protobuf.Timestamp getValidBeforeTime()The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
getValidBeforeTimein interfaceServiceAccountKeyOrBuilder- Returns:
- The validBeforeTime.
-
getValidBeforeTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getValidBeforeTimeOrBuilder()The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
getValidBeforeTimeOrBuilderin interfaceServiceAccountKeyOrBuilder
-
getKeyOriginValue
public int getKeyOriginValue()The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;- Specified by:
getKeyOriginValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyOrigin.
-
getKeyOrigin
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;- Specified by:
getKeyOriginin interfaceServiceAccountKeyOrBuilder- Returns:
- The keyOrigin.
-
getKeyTypeValue
public int getKeyTypeValue()The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;- Specified by:
getKeyTypeValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyType.
-
getKeyType
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;- Specified by:
getKeyTypein interfaceServiceAccountKeyOrBuilder- Returns:
- The keyType.
-
getDisabled
public boolean getDisabled()The key status.
bool disabled = 11;- Specified by:
getDisabledin interfaceServiceAccountKeyOrBuilder- Returns:
- The disabled.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ServiceAccountKey parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceAccountKey parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceAccountKey.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-