Google Cloud Api Keys V2 Client - Class Key (0.1.7)

Reference documentation and code samples for the Google Cloud Api Keys V2 Client class Key.

The representation of a key managed by the API Keys API.

Generated from protobuf message google.api.apikeys.v2.Key

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The resource name of the key. The name has the form: projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>. For example: projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource; hence the only supported value for location is global.

↳ uid string

Output only. Unique id in UUID4 format.

↳ display_name string

Human-readable display name of this key that you can modify. The maximum length is 63 characters.

↳ key_string string

Output only. An encrypted and signed value held by this key. This field can be accessed only through the GetKeyString method.

↳ create_time Google\Protobuf\Timestamp

Output only. A timestamp identifying the time this key was originally created.

↳ update_time Google\Protobuf\Timestamp

Output only. A timestamp identifying the time this key was last updated.

↳ delete_time Google\Protobuf\Timestamp

Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.

↳ annotations array|Google\Protobuf\Internal\MapField

Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.

↳ restrictions Google\Cloud\ApiKeys\V2\Restrictions

Key restrictions.

↳ etag string

Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.

getName

Output only. The resource name of the key.

The name has the form: projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>. For example: projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource; hence the only supported value for location is global.

Returns
TypeDescription
string

setName

Output only. The resource name of the key.

The name has the form: projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>. For example: projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource; hence the only supported value for location is global.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

Output only. Unique id in UUID4 format.

Returns
TypeDescription
string

setUid

Output only. Unique id in UUID4 format.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

Human-readable display name of this key that you can modify.

The maximum length is 63 characters.

Returns
TypeDescription
string

setDisplayName

Human-readable display name of this key that you can modify.

The maximum length is 63 characters.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKeyString

Output only. An encrypted and signed value held by this key.

This field can be accessed only through the GetKeyString method.

Returns
TypeDescription
string

setKeyString

Output only. An encrypted and signed value held by this key.

This field can be accessed only through the GetKeyString method.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. A timestamp identifying the time this key was originally created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. A timestamp identifying the time this key was originally created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. A timestamp identifying the time this key was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. A timestamp identifying the time this key was last updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDeleteTime

Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getAnnotations

Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.

They are not queryable and should be preserved when modifying objects.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAnnotations

Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.

They are not queryable and should be preserved when modifying objects.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getRestrictions

Key restrictions.

Returns
TypeDescription
Google\Cloud\ApiKeys\V2\Restrictions|null

hasRestrictions

clearRestrictions

setRestrictions

Key restrictions.

Parameter
NameDescription
var Google\Cloud\ApiKeys\V2\Restrictions
Returns
TypeDescription
$this

getEtag

Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

See https://google.aip.dev/154.

Returns
TypeDescription
string

setEtag

Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

See https://google.aip.dev/154.

Parameter
NameDescription
var string
Returns
TypeDescription
$this