Class: SDM::AWSStore

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, name: nil, region: nil, role_arn: nil, role_external_id: nil, tags: nil) ⇒ AWSStore

Returns a new instance of AWSStore.



894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/models/porcelain.rb', line 894

def initialize(
  id: nil,
  name: nil,
  region: nil,
  role_arn: nil,
  role_external_id: nil,
  tags: nil
)
  @id = id == nil ? "" : id
  @name = name == nil ? "" : name
  @region = region == nil ? "" : region
  @role_arn = role_arn == nil ? "" : role_arn
  @role_external_id = role_external_id == nil ? "" : role_external_id
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#idObject

Unique identifier of the SecretStore.



882
883
884
# File 'lib/models/porcelain.rb', line 882

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



884
885
886
# File 'lib/models/porcelain.rb', line 884

def name
  @name
end

#regionObject

The AWS region to target e.g. us-east-1



886
887
888
# File 'lib/models/porcelain.rb', line 886

def region
  @region
end

#role_arnObject

The role to assume after logging in.



888
889
890
# File 'lib/models/porcelain.rb', line 888

def role_arn
  @role_arn
end

#role_external_idObject

The external ID to associate with assume role requests. Does nothing if a role ARN is not provided.



890
891
892
# File 'lib/models/porcelain.rb', line 890

def role_external_id
  @role_external_id
end

#tagsObject

Tags is a map of key, value pairs.



892
893
894
# File 'lib/models/porcelain.rb', line 892

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



910
911
912
913
914
915
916
# File 'lib/models/porcelain.rb', line 910

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