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.



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

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 may be empty if the Cloud product owning the resource does not provide key version data to Asset Inventory. Corresponds to the JSON property cryptoKeyVersion

Returns:

  • (String)


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

def crypto_key_version
  @crypto_key_version
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>)


77
78
79
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 77

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)


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

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)


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

def name
  @name
end

#projectString

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

Returns:

  • (String)


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

def project
  @project
end

#project_idString

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

Returns:

  • (String)


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

def project_id
  @project_id
end

#resource_typeString

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

Returns:

  • (String)


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

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



110
111
112
113
114
115
116
117
118
119
120
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 110

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)
  @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