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

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

Namespace

Google \ Cloud \ Kms \ Inventory \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
string

setName

The full resource name of the resource.

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

Parameter
Name Description
var string
Returns
Type Description
$this

getProject

Format: projects/{PROJECT_NUMBER}.

Returns
Type Description
string

setProject

Format: projects/{PROJECT_NUMBER}.

Parameter
Name Description
var string
Returns
Type Description
$this

getProjectId

The ID of the project that owns the resource.

Returns
Type Description
string

setProjectId

The ID of the project that owns the resource.

Parameter
Name Description
var string
Returns
Type Description
$this

getCloudProduct

The Cloud product that owns the resource.

Example: compute

Returns
Type Description
string

setCloudProduct

The Cloud product that owns the resource.

Example: compute

Parameter
Name Description
var string
Returns
Type Description
$this

getResourceType

Example: compute.googleapis.com/Disk

Returns
Type Description
string

setResourceType

Example: compute.googleapis.com/Disk

Parameter
Name Description
var string
Returns
Type Description
$this

getLocation

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

Returns
Type Description
string

setLocation

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

Parameter
Name Description
var string
Returns
Type Description
$this

getLabels

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

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

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

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var string[]
Returns
Type Description
$this

getCreateTime

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

Returns
Type Description
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
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this