You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::IAM::AccountSummary

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb

Defined Under Namespace

Classes: Collection

Read-Only Attributes collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AccountSummary

Returns a new instance of AccountSummary

Options Hash (options):



15
16
17
18
19
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 15

def initialize(*args)
  options = Hash === args.last ? args.pop.dup : {}
  @data = options.delete(:data)
  @client = options.delete(:client) || Client.new(options)
end

Instance Method Details

#clientClient

Returns:



33
34
35
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 33

def client
  @client
end

#dataTypes::GetAccountSummaryResponse

Returns the data for this Aws::IAM::AccountSummary. Calls Client#get_account_summary if #data_loaded? is false.

Returns:



53
54
55
56
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 53

def data
  load unless @data
  @data
end

#data_loaded?Boolean

Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.

Returns:

  • (Boolean)

    Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.



61
62
63
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 61

def data_loaded?
  !!@data
end

#loadself Also known as: reload

Loads, or reloads #data for the current Aws::IAM::AccountSummary. Returns self making it possible to chain methods.

.reload.data

Returns:

  • (self)


43
44
45
46
47
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 43

def load
  resp = @client.
  @data = resp.data
  self
end

#summary_mapHash<String,Integer>

A set of key value pairs containing information about IAM entity usage and IAM quotas.

Returns:

  • (Hash<String,Integer>)


26
27
28
# File 'gems/aws-sdk-iam/lib/aws-sdk-iam/account_summary.rb', line 26

def summary_map
  data.summary_map
end