« blib/lib/Paws/IAM/CreateOpenIDConnectProviderResponse.pm
↑ Summary
blib/lib/Paws/IAM/CreatePolicyResponse.pm »
| 1 | |||
| 2 | package Paws::IAM::CreatePolicy; | ||
| 3 | use Moose; | ||
| 4 | has Description => (is => 'ro', isa => 'Str'); | ||
| 5 | has Path => (is => 'ro', isa => 'Str'); | ||
| 6 | has PolicyDocument => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has PolicyName => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IAM::Tag]'); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreatePolicy'); | ||
| 13 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IAM::CreatePolicyResponse'); | ||
| 14 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreatePolicyResult'); | ||
| 15 | 1; | ||
| 16 | |||
| 17 | ### main pod documentation begin ### | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | Paws::IAM::CreatePolicy - Arguments for method CreatePolicy on L<Paws::IAM> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method CreatePolicy on the | ||
| 26 | L<AWS Identity and Access Management|Paws::IAM> service. Use the attributes of this class | ||
| 27 | as arguments to method CreatePolicy. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreatePolicy. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $iam = Paws->service('IAM'); | ||
| 34 | my $CreatePolicyResponse = $iam->CreatePolicy( | ||
| 35 | PolicyDocument => 'MypolicyDocumentType', | ||
| 36 | PolicyName => 'MypolicyNameType', | ||
| 37 | Description => 'MypolicyDescriptionType', # OPTIONAL | ||
| 38 | Path => 'MypolicyPathType', # OPTIONAL | ||
| 39 | Tags => [ | ||
| 40 | { | ||
| 41 | Key => 'MytagKeyType', # min: 1, max: 128 | ||
| 42 | Value => 'MytagValueType', # max: 256 | ||
| 43 | |||
| 44 | }, | ||
| 45 | ... | ||
| 46 | ], # OPTIONAL | ||
| 47 | ); | ||
| 48 | |||
| 49 | # Results: | ||
| 50 | my $Policy = $CreatePolicyResponse->Policy; | ||
| 51 | |||
| 52 | # Returns a L<Paws::IAM::CreatePolicyResponse> object. | ||
| 53 | |||
| 54 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 55 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iam/CreatePolicy> | ||
| 56 | |||
| 57 | =head1 ATTRIBUTES | ||
| 58 | |||
| 59 | |||
| 60 | =head2 Description => Str | ||
| 61 | |||
| 62 | A friendly description of the policy. | ||
| 63 | |||
| 64 | Typically used to store information about the permissions defined in | ||
| 65 | the policy. For example, "Grants access to production DynamoDB tables." | ||
| 66 | |||
| 67 | The policy description is immutable. After a value is assigned, it | ||
| 68 | cannot be changed. | ||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | =head2 Path => Str | ||
| 73 | |||
| 74 | The path for the policy. | ||
| 75 | |||
| 76 | For more information about paths, see IAM identifiers | ||
| 77 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) | ||
| 78 | in the I<IAM User Guide>. | ||
| 79 | |||
| 80 | This parameter is optional. If it is not included, it defaults to a | ||
| 81 | slash (/). | ||
| 82 | |||
| 83 | This parameter allows (through its regex pattern | ||
| 84 | (http://wikipedia.org/wiki/regex)) a string of characters consisting of | ||
| 85 | either a forward slash (/) by itself or a string that must begin and | ||
| 86 | end with forward slashes. In addition, it can contain any ASCII | ||
| 87 | character from the ! (C<\u0021>) through the DEL character (C<\u007F>), | ||
| 88 | including most punctuation characters, digits, and upper and lowercased | ||
| 89 | letters. | ||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | =head2 B<REQUIRED> PolicyDocument => Str | ||
| 94 | |||
| 95 | The JSON policy document that you want to use as the content for the | ||
| 96 | new policy. | ||
| 97 | |||
| 98 | You must provide policies in JSON format in IAM. However, for AWS | ||
| 99 | CloudFormation templates formatted in YAML, you can provide the policy | ||
| 100 | in JSON or YAML format. AWS CloudFormation always converts a YAML | ||
| 101 | policy to JSON format before submitting it to IAM. | ||
| 102 | |||
| 103 | To learn more about JSON policy grammar, see Grammar of the IAM JSON | ||
| 104 | policy language | ||
| 105 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) | ||
| 106 | in the I<IAM User Guide>. | ||
| 107 | |||
| 108 | The regex pattern (http://wikipedia.org/wiki/regex) used to validate | ||
| 109 | this parameter is a string of characters consisting of the following: | ||
| 110 | |||
| 111 | =over | ||
| 112 | |||
| 113 | =item * | ||
| 114 | |||
| 115 | Any printable ASCII character ranging from the space character | ||
| 116 | (C<\u0020>) through the end of the ASCII character range | ||
| 117 | |||
| 118 | =item * | ||
| 119 | |||
| 120 | The printable characters in the Basic Latin and Latin-1 Supplement | ||
| 121 | character set (through C<\u00FF>) | ||
| 122 | |||
| 123 | =item * | ||
| 124 | |||
| 125 | The special characters tab (C<\u0009>), line feed (C<\u000A>), and | ||
| 126 | carriage return (C<\u000D>) | ||
| 127 | |||
| 128 | =back | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | |||
| 133 | =head2 B<REQUIRED> PolicyName => Str | ||
| 134 | |||
| 135 | The friendly name of the policy. | ||
| 136 | |||
| 137 | IAM user, group, role, and policy names must be unique within the | ||
| 138 | account. Names are not distinguished by case. For example, you cannot | ||
| 139 | create resources named both "MyResource" and "myresource". | ||
| 140 | |||
| 141 | |||
| 142 | |||
| 143 | =head2 Tags => ArrayRef[L<Paws::IAM::Tag>] | ||
| 144 | |||
| 145 | A list of tags that you want to attach to the new IAM customer managed | ||
| 146 | policy. Each tag consists of a key name and an associated value. For | ||
| 147 | more information about tagging, see Tagging IAM resources | ||
| 148 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the | ||
| 149 | I<IAM User Guide>. | ||
| 150 | |||
| 151 | If any one of the tags is invalid or if you exceed the allowed maximum | ||
| 152 | number of tags, then the entire request fails and the resource is not | ||
| 153 | created. | ||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | |||
| 158 | =head1 SEE ALSO | ||
| 159 | |||
| 160 | This class forms part of L<Paws>, documenting arguments for method CreatePolicy in L<Paws::IAM> | ||
| 161 | |||
| 162 | =head1 BUGS and CONTRIBUTIONS | ||
| 163 | |||
| 164 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 165 | |||
| 166 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 167 | |||
| 168 | =cut | ||
| 169 |