Class: Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ProtectedResource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/kmsinventory_v1/classes.rb,
lib/google/apis/kmsinventory_v1/representations.rb,
lib/google/apis/kmsinventory_v1/representations.rb

Overview

Metadata about a resource protected by a Cloud KMS key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudKmsInventoryV1ProtectedResource

Returns a new instance of GoogleCloudKmsInventoryV1ProtectedResource.



116
117
118
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 116

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cloud_productString

The Cloud product that owns the resource. Example: compute Corresponds to the JSON property cloudProduct

Returns:

  • (String)


57
58
59
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 57

def cloud_product
  @cloud_product
end

#create_timeString

Output only. The time at which this resource was created. The granularity is in seconds. Timestamp.nanos will always be 0. Corresponds to the JSON property createTime

Returns:

  • (String)


63
64
65
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 63

def create_time
  @create_time
end

#crypto_key_versionString

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. Corresponds to the JSON property cryptoKeyVersion

Returns:

  • (String)


73
74
75
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 73

def crypto_key_version
  @crypto_key_version
end

#crypto_key_versionsArray<String>

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. Corresponds to the JSON property cryptoKeyVersions

Returns:

  • (Array<String>)


83
84
85
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 83

def crypto_key_versions
  @crypto_key_versions
end

#labelsHash<String,String>

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

Returns:

  • (Hash<String,String>)


88
89
90
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 88

def labels
  @labels
end

#locationString

Location can be global, regional like us-east1, or zonal like us-west1-b. Corresponds to the JSON property location

Returns:

  • (String)


93
94
95
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 93

def location
  @location
end

#nameString

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

Returns:

  • (String)


99
100
101
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 99

def name
  @name
end

#projectString

Format: projects/PROJECT_NUMBER`. Corresponds to the JSON propertyproject`

Returns:

  • (String)


104
105
106
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 104

def project
  @project
end

#project_idString

The ID of the project that owns the resource. Corresponds to the JSON property projectId

Returns:

  • (String)


109
110
111
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 109

def project_id
  @project_id
end

#resource_typeString

Example: compute.googleapis.com/Disk Corresponds to the JSON property resourceType

Returns:

  • (String)


114
115
116
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 114

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 121

def update!(**args)
  @cloud_product = args[:cloud_product] if args.key?(:cloud_product)
  @create_time = args[:create_time] if args.key?(:create_time)
  @crypto_key_version = args[:crypto_key_version] if args.key?(:crypto_key_version)
  @crypto_key_versions = args[:crypto_key_versions] if args.key?(:crypto_key_versions)
  @labels = args[:labels] if args.key?(:labels)
  @location = args[:location] if args.key?(:location)
  @name = args[:name] if args.key?(:name)
  @project = args[:project] if args.key?(:project)
  @project_id = args[:project_id] if args.key?(:project_id)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
end