amazonka-iam-1.3.1: Amazon Identity and Access Management SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.IAM.CreateRole

Contents

Description

Creates a new role for your AWS account. For more information about roles, go to Working with Roles. For information about limitations on role names and the number of roles you can create, go to Limitations on IAM Entities in the Using IAM guide.

The policy in the following example grants permission to an EC2 instance to assume the role.

See: AWS API Reference for CreateRole.

Synopsis

Creating a Request

createRole Source

Creates a value of CreateRole with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

crPath :: Lens' CreateRole (Maybe Text) Source

The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/).

crRoleName :: Lens' CreateRole Text Source

The name of the role to create.

crAssumeRolePolicyDocument :: Lens' CreateRole Text Source

The policy that grants an entity permission to assume the role.

Destructuring the Response

createRoleResponse Source

Creates a value of CreateRoleResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

crrsRole :: Lens' CreateRoleResponse Role Source

Information about the role.