Class: SDM::GCPConnector

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, exclude_tags: nil, id: nil, include_tags: nil, name: nil, project_ids: nil, scan_period: nil, services: nil, workload_pool_id: nil, workload_project_id: nil, workload_project_number: nil, workload_provider_id: nil) ⇒ GCPConnector

Returns a new instance of GCPConnector.



7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
# File 'lib/models/porcelain.rb', line 7322

def initialize(
  description: nil,
  exclude_tags: nil,
  id: nil,
  include_tags: nil,
  name: nil,
  project_ids: nil,
  scan_period: nil,
  services: nil,
  workload_pool_id: nil,
  workload_project_id: nil,
  workload_project_number: nil,
  workload_provider_id: nil
)
  @description = description == nil ? "" : description
  @exclude_tags = exclude_tags == nil ? [] : exclude_tags
  @id = id == nil ? "" : id
  @include_tags = include_tags == nil ? [] : include_tags
  @name = name == nil ? "" : name
  @project_ids = project_ids == nil ? [] : project_ids
  @scan_period = scan_period == nil ? "" : scan_period
  @services = services == nil ? [] : services
  @workload_pool_id = workload_pool_id == nil ? "" : workload_pool_id
  @workload_project_id = workload_project_id == nil ? "" : workload_project_id
  @workload_project_number = workload_project_number == nil ? "" : workload_project_number
  @workload_provider_id = workload_provider_id == nil ? "" : workload_provider_id
end

Instance Attribute Details

#descriptionObject

Description of the Connector.



7296
7297
7298
# File 'lib/models/porcelain.rb', line 7296

def description
  @description
end

#exclude_tagsObject

ExcludeTags filters out discovered resources that have the tag and value. We do allow duplicate tag names for ExcludeTags to support multiple excluded values for the tag.



7299
7300
7301
# File 'lib/models/porcelain.rb', line 7299

def exclude_tags
  @exclude_tags
end

#idObject

Unique identifier of the Connector.



7301
7302
7303
# File 'lib/models/porcelain.rb', line 7301

def id
  @id
end

#include_tagsObject

IncludeTags only discovers cloud resources that have one of the included tags. We do not allow duplicate tag names for IncludeTags



7304
7305
7306
# File 'lib/models/porcelain.rb', line 7304

def include_tags
  @include_tags
end

#nameObject

Unique human-readable name of the Connector.



7306
7307
7308
# File 'lib/models/porcelain.rb', line 7306

def name
  @name
end

#project_idsObject

ProjectIds is the list of GCP Projects the connector will scan



7308
7309
7310
# File 'lib/models/porcelain.rb', line 7308

def project_ids
  @project_ids
end

#scan_periodObject

ScanPeriod identifies which remote system this Connector discovers



7310
7311
7312
# File 'lib/models/porcelain.rb', line 7310

def scan_period
  @scan_period
end

#servicesObject

Services is a list of services this connector should scan.



7312
7313
7314
# File 'lib/models/porcelain.rb', line 7312

def services
  @services
end

#workload_pool_idObject

WorkloadPoolId is the GCP Workload Pool Identifier used to authenticate our JWT



7314
7315
7316
# File 'lib/models/porcelain.rb', line 7314

def workload_pool_id
  @workload_pool_id
end

#workload_project_idObject

WorkloadProjectId is the GCP Project ID where the Workload Pool is defined



7316
7317
7318
# File 'lib/models/porcelain.rb', line 7316

def workload_project_id
  @workload_project_id
end

#workload_project_numberObject

WorkloadProjectNumber is the GCP Project Number where the Workload Pool is defined



7318
7319
7320
# File 'lib/models/porcelain.rb', line 7318

def workload_project_number
  @workload_project_number
end

#workload_provider_idObject

WorkloadProviderId is the GCP Workload Provider Identifier used to authenticate our JWT



7320
7321
7322
# File 'lib/models/porcelain.rb', line 7320

def workload_provider_id
  @workload_provider_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7350
7351
7352
7353
7354
7355
7356
# File 'lib/models/porcelain.rb', line 7350

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end