Method: Fog::AWS::IAM::Real#add_role_to_instance_profile

Defined in:
lib/fog/aws/requests/iam/add_role_to_instance_profile.rb

#add_role_to_instance_profile(role_name, instance_profile_name) ⇒ Object

Add a role to an instance profile

Parameters

  • instance_profile_name<~String>: Name of the instance profile to update.

  • role_name<~String>:Name of the role to add.

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      • ‘RequestId’<~String> - Id of the request

See Also

docs.amazonwebservices.com/IAM/latest/APIReference/API_AddRoleToInstanceProfile.html

[View source]

22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/iam/add_role_to_instance_profile.rb', line 22

def add_role_to_instance_profile(role_name, instance_profile_name)
  request(
    'Action'    => 'AddRoleToInstanceProfile',
    'InstanceProfileName' => instance_profile_name,
    'RoleName'  => role_name,
    :parser     => Fog::Parsers::AWS::IAM::Basic.new
  )
end