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.



7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
# File 'lib/models/porcelain.rb', line 7414

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.



7388
7389
7390
# File 'lib/models/porcelain.rb', line 7388

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.



7391
7392
7393
# File 'lib/models/porcelain.rb', line 7391

def exclude_tags
  @exclude_tags
end

#idObject

Unique identifier of the Connector.



7393
7394
7395
# File 'lib/models/porcelain.rb', line 7393

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



7396
7397
7398
# File 'lib/models/porcelain.rb', line 7396

def include_tags
  @include_tags
end

#nameObject

Unique human-readable name of the Connector.



7398
7399
7400
# File 'lib/models/porcelain.rb', line 7398

def name
  @name
end

#project_idsObject

ProjectIds is the list of GCP Projects the connector will scan



7400
7401
7402
# File 'lib/models/porcelain.rb', line 7400

def project_ids
  @project_ids
end

#scan_periodObject

ScanPeriod identifies which remote system this Connector discovers



7402
7403
7404
# File 'lib/models/porcelain.rb', line 7402

def scan_period
  @scan_period
end

#servicesObject

Services is a list of services this connector should scan.



7404
7405
7406
# File 'lib/models/porcelain.rb', line 7404

def services
  @services
end

#workload_pool_idObject

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



7406
7407
7408
# File 'lib/models/porcelain.rb', line 7406

def workload_pool_id
  @workload_pool_id
end

#workload_project_idObject

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



7408
7409
7410
# File 'lib/models/porcelain.rb', line 7408

def workload_project_id
  @workload_project_id
end

#workload_project_numberObject

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



7410
7411
7412
# File 'lib/models/porcelain.rb', line 7410

def workload_project_number
  @workload_project_number
end

#workload_provider_idObject

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



7412
7413
7414
# File 'lib/models/porcelain.rb', line 7412

def workload_provider_id
  @workload_provider_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7442
7443
7444
7445
7446
7447
7448
# File 'lib/models/porcelain.rb', line 7442

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