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.



7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
# File 'lib/models/porcelain.rb', line 7036

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.



7010
7011
7012
# File 'lib/models/porcelain.rb', line 7010

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.



7013
7014
7015
# File 'lib/models/porcelain.rb', line 7013

def exclude_tags
  @exclude_tags
end

#idObject

Unique identifier of the Connector.



7015
7016
7017
# File 'lib/models/porcelain.rb', line 7015

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



7018
7019
7020
# File 'lib/models/porcelain.rb', line 7018

def include_tags
  @include_tags
end

#nameObject

Unique human-readable name of the Connector.



7020
7021
7022
# File 'lib/models/porcelain.rb', line 7020

def name
  @name
end

#project_idsObject

ProjectIds is the list of GCP Projects the connector will scan



7022
7023
7024
# File 'lib/models/porcelain.rb', line 7022

def project_ids
  @project_ids
end

#scan_periodObject

ScanPeriod identifies which remote system this Connector discovers



7024
7025
7026
# File 'lib/models/porcelain.rb', line 7024

def scan_period
  @scan_period
end

#servicesObject

Services is a list of services this connector should scan.



7026
7027
7028
# File 'lib/models/porcelain.rb', line 7026

def services
  @services
end

#workload_pool_idObject

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



7028
7029
7030
# File 'lib/models/porcelain.rb', line 7028

def workload_pool_id
  @workload_pool_id
end

#workload_project_idObject

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



7030
7031
7032
# File 'lib/models/porcelain.rb', line 7030

def workload_project_id
  @workload_project_id
end

#workload_project_numberObject

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



7032
7033
7034
# File 'lib/models/porcelain.rb', line 7032

def workload_project_number
  @workload_project_number
end

#workload_provider_idObject

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



7034
7035
7036
# File 'lib/models/porcelain.rb', line 7034

def workload_provider_id
  @workload_provider_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7064
7065
7066
7067
7068
7069
7070
# File 'lib/models/porcelain.rb', line 7064

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