amazonka-iam-1.0.0: 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.CreatePolicy

Contents

Description

Creates a new managed policy for your AWS account.

This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's default version. For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.

For more information about managed policies in general, refer to Managed Policies and Inline Policies in the Using IAM guide.

See: AWS API Reference for CreatePolicy.

Synopsis

Creating a Request

createPolicy Source

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

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

Request Lenses

cpPath :: Lens' CreatePolicy (Maybe Text) Source

The path for the policy.

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 (/).

cpDescription :: Lens' CreatePolicy (Maybe Text) Source

A friendly description of the policy.

Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."

The policy description is immutable. After a value is assigned, it cannot be changed.

cpPolicyName :: Lens' CreatePolicy Text Source

The name of the policy document.

Destructuring the Response

createPolicyResponse Source

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

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

Response Lenses

cprsPolicy :: Lens' CreatePolicyResponse (Maybe Policy) Source

Information about the policy.

cprsStatus :: Lens' CreatePolicyResponse Int Source

The response status code.