- 3.48.0 (latest)
- 3.47.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.39.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.27.0
- 3.26.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.0.0
- 1.2.5
- 1.1.8
- 0.2.0
public static final class ServiceAccountKey.Builder extends GeneratedMessageV3.Builder<ServiceAccountKey.Builder> 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ServiceAccountKey.BuilderImplements
ServiceAccountKeyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ServiceAccountKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ServiceAccountKey.Builder |
build()
public ServiceAccountKey build()
Type | Description |
ServiceAccountKey |
buildPartial()
public ServiceAccountKey buildPartial()
Type | Description |
ServiceAccountKey |
clear()
public ServiceAccountKey.Builder clear()
Type | Description |
ServiceAccountKey.Builder |
clearField(Descriptors.FieldDescriptor field)
public ServiceAccountKey.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
ServiceAccountKey.Builder |
clearKeyAlgorithm()
public ServiceAccountKey.Builder clearKeyAlgorithm()
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearKeyOrigin()
public ServiceAccountKey.Builder clearKeyOrigin()
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearKeyType()
public ServiceAccountKey.Builder clearKeyType()
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearName()
public ServiceAccountKey.Builder clearName()
The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
.
string name = 1;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public ServiceAccountKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
ServiceAccountKey.Builder |
clearPrivateKeyData()
public ServiceAccountKey.Builder clearPrivateKeyData()
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;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearPrivateKeyType()
public ServiceAccountKey.Builder clearPrivateKeyType()
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;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearPublicKeyData()
public ServiceAccountKey.Builder clearPublicKeyData()
The public key data. Only provided in GetServiceAccountKey
responses.
bytes public_key_data = 7;
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
clearValidAfterTime()
public ServiceAccountKey.Builder clearValidAfterTime()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Type | Description |
ServiceAccountKey.Builder |
clearValidBeforeTime()
public ServiceAccountKey.Builder clearValidBeforeTime()
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;
Type | Description |
ServiceAccountKey.Builder |
clone()
public ServiceAccountKey.Builder clone()
Type | Description |
ServiceAccountKey.Builder |
getDefaultInstanceForType()
public ServiceAccountKey getDefaultInstanceForType()
Type | Description |
ServiceAccountKey |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getKeyAlgorithm()
public ServiceAccountKeyAlgorithm getKeyAlgorithm()
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
Type | Description |
ServiceAccountKeyAlgorithm | The keyAlgorithm. |
getKeyAlgorithmValue()
public int getKeyAlgorithmValue()
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
Type | Description |
int | The enum numeric value on the wire for keyAlgorithm. |
getKeyOrigin()
public ServiceAccountKeyOrigin getKeyOrigin()
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;
Type | Description |
ServiceAccountKeyOrigin | The keyOrigin. |
getKeyOriginValue()
public int getKeyOriginValue()
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;
Type | Description |
int | The enum numeric value on the wire for keyOrigin. |
getKeyType()
public ListServiceAccountKeysRequest.KeyType getKeyType()
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;
Type | Description |
ListServiceAccountKeysRequest.KeyType | The keyType. |
getKeyTypeValue()
public int getKeyTypeValue()
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;
Type | Description |
int | The enum numeric value on the wire for keyType. |
getName()
public String getName()
The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
.
string name = 1;
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
.
string name = 1;
Type | Description |
ByteString | The bytes for name. |
getPrivateKeyData()
public 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;
Type | Description |
ByteString | The privateKeyData. |
getPrivateKeyType()
public ServiceAccountPrivateKeyType 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;
Type | Description |
ServiceAccountPrivateKeyType | The privateKeyType. |
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;
Type | Description |
int | The enum numeric value on the wire for privateKeyType. |
getPublicKeyData()
public ByteString getPublicKeyData()
The public key data. Only provided in GetServiceAccountKey
responses.
bytes public_key_data = 7;
Type | Description |
ByteString | The publicKeyData. |
getValidAfterTime()
public Timestamp getValidAfterTime()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Type | Description |
Timestamp | The validAfterTime. |
getValidAfterTimeBuilder()
public Timestamp.Builder getValidAfterTimeBuilder()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Type | Description |
Builder |
getValidAfterTimeOrBuilder()
public TimestampOrBuilder getValidAfterTimeOrBuilder()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Type | Description |
TimestampOrBuilder |
getValidBeforeTime()
public 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;
Type | Description |
Timestamp | The validBeforeTime. |
getValidBeforeTimeBuilder()
public Timestamp.Builder getValidBeforeTimeBuilder()
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;
Type | Description |
Builder |
getValidBeforeTimeOrBuilder()
public 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;
Type | Description |
TimestampOrBuilder |
hasValidAfterTime()
public boolean hasValidAfterTime()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Type | Description |
boolean | Whether the validAfterTime field is set. |
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;
Type | Description |
boolean | Whether the validBeforeTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(ServiceAccountKey other)
public ServiceAccountKey.Builder mergeFrom(ServiceAccountKey other)
Name | Description |
other | ServiceAccountKey |
Type | Description |
ServiceAccountKey.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ServiceAccountKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ServiceAccountKey.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public ServiceAccountKey.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
ServiceAccountKey.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ServiceAccountKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ServiceAccountKey.Builder |
mergeValidAfterTime(Timestamp value)
public ServiceAccountKey.Builder mergeValidAfterTime(Timestamp value)
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Name | Description |
value | Timestamp |
Type | Description |
ServiceAccountKey.Builder |
mergeValidBeforeTime(Timestamp value)
public ServiceAccountKey.Builder mergeValidBeforeTime(Timestamp value)
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;
Name | Description |
value | Timestamp |
Type | Description |
ServiceAccountKey.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public ServiceAccountKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ServiceAccountKey.Builder |
setKeyAlgorithm(ServiceAccountKeyAlgorithm value)
public ServiceAccountKey.Builder setKeyAlgorithm(ServiceAccountKeyAlgorithm value)
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
Name | Description |
value | ServiceAccountKeyAlgorithm The keyAlgorithm to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setKeyAlgorithmValue(int value)
public ServiceAccountKey.Builder setKeyAlgorithmValue(int value)
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
Name | Description |
value | int The enum numeric value on the wire for keyAlgorithm to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setKeyOrigin(ServiceAccountKeyOrigin value)
public ServiceAccountKey.Builder setKeyOrigin(ServiceAccountKeyOrigin value)
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;
Name | Description |
value | ServiceAccountKeyOrigin The keyOrigin to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setKeyOriginValue(int value)
public ServiceAccountKey.Builder setKeyOriginValue(int value)
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;
Name | Description |
value | int The enum numeric value on the wire for keyOrigin to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setKeyType(ListServiceAccountKeysRequest.KeyType value)
public ServiceAccountKey.Builder setKeyType(ListServiceAccountKeysRequest.KeyType value)
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;
Name | Description |
value | ListServiceAccountKeysRequest.KeyType The keyType to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setKeyTypeValue(int value)
public ServiceAccountKey.Builder setKeyTypeValue(int value)
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;
Name | Description |
value | int The enum numeric value on the wire for keyType to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setName(String value)
public ServiceAccountKey.Builder setName(String value)
The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
.
string name = 1;
Name | Description |
value | String The name to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public ServiceAccountKey.Builder setNameBytes(ByteString value)
The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
.
string name = 1;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setPrivateKeyData(ByteString value)
public ServiceAccountKey.Builder setPrivateKeyData(ByteString value)
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;
Name | Description |
value | ByteString The privateKeyData to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setPrivateKeyType(ServiceAccountPrivateKeyType value)
public ServiceAccountKey.Builder setPrivateKeyType(ServiceAccountPrivateKeyType value)
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;
Name | Description |
value | ServiceAccountPrivateKeyType The privateKeyType to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setPrivateKeyTypeValue(int value)
public ServiceAccountKey.Builder setPrivateKeyTypeValue(int value)
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;
Name | Description |
value | int The enum numeric value on the wire for privateKeyType to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setPublicKeyData(ByteString value)
public ServiceAccountKey.Builder setPublicKeyData(ByteString value)
The public key data. Only provided in GetServiceAccountKey
responses.
bytes public_key_data = 7;
Name | Description |
value | ByteString The publicKeyData to set. |
Type | Description |
ServiceAccountKey.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ServiceAccountKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
ServiceAccountKey.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final ServiceAccountKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ServiceAccountKey.Builder |
setValidAfterTime(Timestamp value)
public ServiceAccountKey.Builder setValidAfterTime(Timestamp value)
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Name | Description |
value | Timestamp |
Type | Description |
ServiceAccountKey.Builder |
setValidAfterTime(Timestamp.Builder builderForValue)
public ServiceAccountKey.Builder setValidAfterTime(Timestamp.Builder builderForValue)
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;
Name | Description |
builderForValue | Builder |
Type | Description |
ServiceAccountKey.Builder |
setValidBeforeTime(Timestamp value)
public ServiceAccountKey.Builder setValidBeforeTime(Timestamp value)
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;
Name | Description |
value | Timestamp |
Type | Description |
ServiceAccountKey.Builder |
setValidBeforeTime(Timestamp.Builder builderForValue)
public ServiceAccountKey.Builder setValidBeforeTime(Timestamp.Builder builderForValue)
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;
Name | Description |
builderForValue | Builder |
Type | Description |
ServiceAccountKey.Builder |