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, pool_id: nil, project_ids: nil, project_number: nil, provider_id: nil, scan_period: nil, services: nil) ⇒ GCPConnector

Returns a new instance of GCPConnector.



6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
# File 'lib/models/porcelain.rb', line 6990

def initialize(
  description: nil,
  exclude_tags: nil,
  id: nil,
  include_tags: nil,
  name: nil,
  pool_id: nil,
  project_ids: nil,
  project_number: nil,
  provider_id: nil,
  scan_period: nil,
  services: 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
  @pool_id = pool_id == nil ? "" : pool_id
  @project_ids = project_ids == nil ? [] : project_ids
  @project_number = project_number == nil ? "" : project_number
  @provider_id = provider_id == nil ? "" : provider_id
  @scan_period = scan_period == nil ? "" : scan_period
  @services = services == nil ? [] : services
end

Instance Attribute Details

#descriptionObject

Description of the Connector.



6966
6967
6968
# File 'lib/models/porcelain.rb', line 6966

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.



6969
6970
6971
# File 'lib/models/porcelain.rb', line 6969

def exclude_tags
  @exclude_tags
end

#idObject

Unique identifier of the Connector.



6971
6972
6973
# File 'lib/models/porcelain.rb', line 6971

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



6974
6975
6976
# File 'lib/models/porcelain.rb', line 6974

def include_tags
  @include_tags
end

#nameObject

Unique human-readable name of the Connector.



6976
6977
6978
# File 'lib/models/porcelain.rb', line 6976

def name
  @name
end

#pool_idObject

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



6978
6979
6980
# File 'lib/models/porcelain.rb', line 6978

def pool_id
  @pool_id
end

#project_idsObject

ProjectIds is the list of GCP Projects the connector will scan



6980
6981
6982
# File 'lib/models/porcelain.rb', line 6980

def project_ids
  @project_ids
end

#project_numberObject

ProjectNumber is the GCP Project the Workload Pool is defined in



6982
6983
6984
# File 'lib/models/porcelain.rb', line 6982

def project_number
  @project_number
end

#provider_idObject

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



6984
6985
6986
# File 'lib/models/porcelain.rb', line 6984

def provider_id
  @provider_id
end

#scan_periodObject

ScanPeriod identifies which remote system this Connector discovers



6986
6987
6988
# File 'lib/models/porcelain.rb', line 6986

def scan_period
  @scan_period
end

#servicesObject

Services is a list of services this connector should scan.



6988
6989
6990
# File 'lib/models/porcelain.rb', line 6988

def services
  @services
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7016
7017
7018
7019
7020
7021
7022
# File 'lib/models/porcelain.rb', line 7016

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