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.



1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
# File 'lib/models/porcelain.rb', line 1204

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.



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

def id
  @id
end

#nameObject

Unique human-readable name of the SecretStore.



1194
1195
1196
# File 'lib/models/porcelain.rb', line 1194

def name
  @name
end

#regionObject

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



1196
1197
1198
# File 'lib/models/porcelain.rb', line 1196

def region
  @region
end

#role_arnObject

The role to assume after logging in.



1198
1199
1200
# File 'lib/models/porcelain.rb', line 1198

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.



1200
1201
1202
# File 'lib/models/porcelain.rb', line 1200

def role_external_id
  @role_external_id
end

#tagsObject

Tags is a map of key, value pairs.



1202
1203
1204
# File 'lib/models/porcelain.rb', line 1202

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1220
1221
1222
1223
1224
1225
1226
# File 'lib/models/porcelain.rb', line 1220

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