Module: Cumulus::IAM
- Defined in:
- lib/iam/IAM.rb,
lib/iam/Commands.rb,
lib/iam/loader/Loader.rb,
lib/iam/models/IamDiff.rb,
lib/iam/manager/Manager.rb,
lib/iam/manager/IamRoles.rb,
lib/iam/manager/IamUsers.rb,
lib/iam/manager/IamGroups.rb,
lib/iam/models/RoleConfig.rb,
lib/iam/models/UserConfig.rb,
lib/iam/models/GroupConfig.rb,
lib/iam/manager/IamResource.rb,
lib/iam/models/PolicyConfig.rb,
lib/iam/models/StatementConfig.rb,
lib/iam/migration/PolicyUnifier.rb,
lib/iam/models/ResourceWithPolicy.rb,
lib/iam/migration/AssumeRoleUnifier.rb
Defined Under Namespace
Modules: IamChange, Loader Classes: AssumeRoleUnifier, Commands, GroupConfig, IamDiff, IamGroups, IamResource, IamRoles, IamUsers, Manager, PolicyConfig, PolicyUnifier, ResourceWithPolicy, RoleConfig, StatementConfig, UserConfig
Constant Summary collapse
- @@client =
Aws::IAM::Client.new(Configuration.instance.client)
Class Method Summary collapse
-
.get_instance_profile_arn(name) ⇒ Object
Public: Get the instance profile arn for a role.
-
.get_role_arn(name) ⇒ Object
Public: Static method that will get the ARN of an IAM Role.
Class Method Details
.get_instance_profile_arn(name) ⇒ Object
Public: Get the instance profile arn for a role
name - the name of the role
26 27 28 29 30 31 32 |
# File 'lib/iam/IAM.rb', line 26 def get_instance_profile_arn(name) @@client.get_instance_profile({ instance_profile_name: name }).instance_profile.arn rescue Aws::IAM::Errors::NoSuchEntity nil end |
.get_role_arn(name) ⇒ Object
Public: Static method that will get the ARN of an IAM Role
name - the name of the role to get
Returns the String ARN or nil if there is no role
15 16 17 18 19 20 21 |
# File 'lib/iam/IAM.rb', line 15 def get_role_arn(name) @@client.get_role({ role_name: name }).role.arn rescue Aws::IAM::Errors::NoSuchEntity nil end |