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.



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
# File 'lib/models/porcelain.rb', line 1193

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.



1181
1182
1183
# File 'lib/models/porcelain.rb', line 1181

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



1183
1184
1185
# File 'lib/models/porcelain.rb', line 1183

def name
  @name
end

#regionObject

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



1185
1186
1187
# File 'lib/models/porcelain.rb', line 1185

def region
  @region
end

#role_arnObject

The role to assume after logging in.



1187
1188
1189
# File 'lib/models/porcelain.rb', line 1187

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.



1189
1190
1191
# File 'lib/models/porcelain.rb', line 1189

def role_external_id
  @role_external_id
end

#tagsObject

Tags is a map of key, value pairs.



1191
1192
1193
# File 'lib/models/porcelain.rb', line 1191

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1209
1210
1211
1212
1213
1214
1215
# File 'lib/models/porcelain.rb', line 1209

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