Sha256: 0335404674fa2bf00af4510503504cadc7b4e2bd0e3a7a4aba74892b5bc5b0b1

Contents?: true

Size: 1.33 KB

Versions: 55

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module AWS
    class IAM
      class Real
        require 'fog/aws/parsers/iam/basic'

        # Creates a managed policy
        #
        # ==== Parameters
        # * policy_document<~Hash>: policy document, see: http://docs.amazonwebservices.com/IAM/latest/UserGuide/PoliciesOverview.html
        # * role_name<~String>: name of role to update
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'RequestId'<~String> - Id of the request
        #
        # ==== See Also
        # http://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html
        #
        def update_assume_role_policy(policy_document, role_name)
          request({
            'Action'          => 'UpdateAssumeRolePolicy',
            'PolicyDocument'  => Fog::JSON.encode(policy_document),
            'RoleName'        => role_name,
            :parser           => Fog::Parsers::AWS::IAM::Basic.new
          }.reject {|_, value| value.nil?})
        end
        
        class Mock
          def update_assume_role_policy(policy_document, role_name)
            Excon::Response.new.tap do |response|
              response.body = { 'RequestId' => Fog::AWS::Mock.request_id }
              response.status = 200
            end
          end
        end
      end
    end
  end
end

Version data entries

55 entries across 53 versions & 2 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.29.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.28.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.27.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.26.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.25.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.24.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.23.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.22.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.21.1 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.21.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.20.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.19.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.18.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.17.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.16.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.15.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.14.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.13.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb
fog-aws-3.12.0 lib/fog/aws/requests/iam/update_assume_role_policy.rb