Google Cloud KMS Inventory V1 Client - Class ProtectedResource (0.1.2)

Reference documentation and code samples for the Google Cloud KMS Inventory V1 Client class ProtectedResource.

Metadata about a resource protected by a Cloud KMS key.

Generated from protobuf message google.cloud.kms.inventory.v1.ProtectedResource

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The full resource name of the resource. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1.

↳ project string

Format: projects/{PROJECT_NUMBER}.

↳ project_id string

The ID of the project that owns the resource.

↳ cloud_product string

The Cloud product that owns the resource. Example: compute

↳ resource_type string

Example: compute.googleapis.com/Disk

↳ location string

Location can be global, regional like us-east1, or zonal like us-west1-b.

↳ labels array|Google\Protobuf\Internal\MapField

A key-value pair of the resource's labels (v1) to their values.

↳ crypto_key_version string

The name of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key version data to Asset Inventory. If there are multiple key versions protecting the resource, then this is same value as the first element of crypto_key_versions.

↳ crypto_key_versions array

The names of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key versions data to Asset Inventory. The first element of this field is stored in crypto_key_version.

↳ create_time Google\Protobuf\Timestamp

Output only. The time at which this resource was created. The granularity is in seconds. Timestamp.nanos will always be 0.

getName

The full resource name of the resource.

Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1.

Returns
TypeDescription
string

setName

The full resource name of the resource.

Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProject

Format: projects/{PROJECT_NUMBER}.

Returns
TypeDescription
string

setProject

Format: projects/{PROJECT_NUMBER}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProjectId

The ID of the project that owns the resource.

Returns
TypeDescription
string

setProjectId

The ID of the project that owns the resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCloudProduct

The Cloud product that owns the resource.

Example: compute

Returns
TypeDescription
string

setCloudProduct

The Cloud product that owns the resource.

Example: compute

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResourceType

Example: compute.googleapis.com/Disk

Returns
TypeDescription
string

setResourceType

Example: compute.googleapis.com/Disk

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLocation

Location can be global, regional like us-east1, or zonal like us-west1-b.

Returns
TypeDescription
string

setLocation

Location can be global, regional like us-east1, or zonal like us-west1-b.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabels

A key-value pair of the resource's labels (v1) to their values.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

A key-value pair of the resource's labels (v1) to their values.

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

getCryptoKeyVersion

The name of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key version data to Asset Inventory. If there are multiple key versions protecting the resource, then this is same value as the first element of crypto_key_versions.

Returns
TypeDescription
string

setCryptoKeyVersion

The name of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key version data to Asset Inventory. If there are multiple key versions protecting the resource, then this is same value as the first element of crypto_key_versions.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCryptoKeyVersions

The names of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key versions data to Asset Inventory. The first element of this field is stored in crypto_key_version.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setCryptoKeyVersions

The names of the Cloud KMS CryptoKeyVersion used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key versions data to Asset Inventory. The first element of this field is stored in crypto_key_version.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getCreateTime

Output only. The time at which this resource was created. The granularity is in seconds. Timestamp.nanos will always be 0.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time at which this resource was created. The granularity is in seconds. Timestamp.nanos will always be 0.

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