Class: Google::Apis::SecuritycenterV1::Resource

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

Overview

Information related to the Google Cloud resource that is associated with this finding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Resource

Returns a new instance of Resource.



10237
10238
10239
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10237

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

Instance Attribute Details

#aws_metadataGoogle::Apis::SecuritycenterV1::AwsMetadata

AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services. Corresponds to the JSON property awsMetadata



10148
10149
10150
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10148

def 
  @aws_metadata
end

#azure_metadataGoogle::Apis::SecuritycenterV1::AzureMetadata

Azure metadata associated with the resource, only applicable if the finding's cloud provider is Microsoft Azure. Corresponds to the JSON property azureMetadata



10154
10155
10156
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10154

def 
  @azure_metadata
end

#cloud_providerString

Indicates which cloud provider the finding is from. Corresponds to the JSON property cloudProvider

Returns:

  • (String)


10159
10160
10161
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10159

def cloud_provider
  @cloud_provider
end

#display_nameString

The human readable name of the resource. Corresponds to the JSON property displayName

Returns:

  • (String)


10164
10165
10166
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10164

def display_name
  @display_name
end

#foldersArray<Google::Apis::SecuritycenterV1::Folder>

Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization. Corresponds to the JSON property folders



10171
10172
10173
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10171

def folders
  @folders
end

#locationString

The region or location of the service (if applicable). Corresponds to the JSON property location

Returns:

  • (String)


10176
10177
10178
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10176

def location
  @location
end

#nameString

The full resource name of the resource. See: https://cloud.google.com/apis/ design/resource_names#full_resource_name Corresponds to the JSON property name

Returns:

  • (String)


10182
10183
10184
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10182

def name
  @name
end

#organizationString

Indicates which organization / tenant the finding is for. Corresponds to the JSON property organization

Returns:

  • (String)


10187
10188
10189
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10187

def organization
  @organization
end

#parent_display_nameString

The human readable name of resource's parent. Corresponds to the JSON property parentDisplayName

Returns:

  • (String)


10192
10193
10194
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10192

def parent_display_name
  @parent_display_name
end

#parent_nameString

The full resource name of resource's parent. Corresponds to the JSON property parentName

Returns:

  • (String)


10197
10198
10199
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10197

def parent_name
  @parent_name
end

#project_display_nameString

The project ID that the resource belongs to. Corresponds to the JSON property projectDisplayName

Returns:

  • (String)


10202
10203
10204
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10202

def project_display_name
  @project_display_name
end

#project_nameString

The full resource name of project that the resource belongs to. Corresponds to the JSON property projectName

Returns:

  • (String)


10207
10208
10209
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10207

def project_name
  @project_name
end

#resource_pathGoogle::Apis::SecuritycenterV1::ResourcePath

Represents the path of resources leading up to the resource this finding is about. Corresponds to the JSON property resourcePath



10213
10214
10215
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10213

def resource_path
  @resource_path
end

#resource_path_stringString

A string representation of the resource path. For Google Cloud, it has the format of org/organization_id/folder/folder_id/folder/folder_id/project/ project_idwhere there can be any number of folders. For AWS, it has the format of `org/`organization_id`/ou/`organizational_unit_id`/ou/` organizational_unit_id`/account/`account_id where there can be any number of organizational units. For Azure, it has the format of mg/management_group_id /mg/management_group_id/subscription/subscription_id/rg/ resource_group_name`where there can be any number of management groups. Corresponds to the JSON propertyresourcePathString`

Returns:

  • (String)


10225
10226
10227
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10225

def resource_path_string
  @resource_path_string
end

#serviceString

The service or resource provider associated with the resource. Corresponds to the JSON property service

Returns:

  • (String)


10230
10231
10232
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10230

def service
  @service
end

#typeString

The full resource type of the resource. Corresponds to the JSON property type

Returns:

  • (String)


10235
10236
10237
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10235

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10242

def update!(**args)
  @aws_metadata = args[:aws_metadata] if args.key?(:aws_metadata)
  @azure_metadata = args[:azure_metadata] if args.key?(:azure_metadata)
  @cloud_provider = args[:cloud_provider] if args.key?(:cloud_provider)
  @display_name = args[:display_name] if args.key?(:display_name)
  @folders = args[:folders] if args.key?(:folders)
  @location = args[:location] if args.key?(:location)
  @name = args[:name] if args.key?(:name)
  @organization = args[:organization] if args.key?(:organization)
  @parent_display_name = args[:parent_display_name] if args.key?(:parent_display_name)
  @parent_name = args[:parent_name] if args.key?(:parent_name)
  @project_display_name = args[:project_display_name] if args.key?(:project_display_name)
  @project_name = args[:project_name] if args.key?(:project_name)
  @resource_path = args[:resource_path] if args.key?(:resource_path)
  @resource_path_string = args[:resource_path_string] if args.key?(:resource_path_string)
  @service = args[:service] if args.key?(:service)
  @type = args[:type] if args.key?(:type)
end