| 1 | |||
| 2 | package Paws::IAM::CreateRole; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has AssumeRolePolicyDocument => (is => 'ro', isa => 'Str', required => 1); | |
| 5 | 1 | has Description => (is => 'ro', isa => 'Str'); | |
| 6 | 1 | has MaxSessionDuration => (is => 'ro', isa => 'Int'); | |
| 7 | 1 | has Path => (is => 'ro', isa => 'Str'); | |
| 8 | 1 | has PermissionsBoundary => (is => 'ro', isa => 'Str'); | |
| 9 | 1 | has RoleName => (is => 'ro', isa => 'Str', required => 1); | |
| 10 | 1 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IAM::Tag]'); | |
| 11 | |||
| 12 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateRole'); | |
| 15 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IAM::CreateRoleResponse'); | |
| 16 | 1 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateRoleResult'); | |
| 17 | 1 | 1; | |
| 18 | |||
| 19 | ### main pod documentation begin ### | ||
| 20 | |||
| 21 | =head1 NAME | ||
| 22 | |||
| 23 | Paws::IAM::CreateRole - Arguments for method CreateRole on L<Paws::IAM> | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This class represents the parameters used for calling the method CreateRole on the | ||
| 28 | L<AWS Identity and Access Management|Paws::IAM> service. Use the attributes of this class | ||
| 29 | as arguments to method CreateRole. | ||
| 30 | |||
| 31 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateRole. | ||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | my $iam = Paws->service('IAM'); | ||
| 36 | # To create an IAM role | ||
| 37 | # The following command creates a role named Test-Role and attaches a trust | ||
| 38 | # policy to it that is provided as a URL-encoded JSON string. | ||
| 39 | my $CreateRoleResponse = $iam->CreateRole( | ||
| 40 | 'AssumeRolePolicyDocument' => '<URL-encoded-JSON>', | ||
| 41 | 'Path' => '/', | ||
| 42 | 'RoleName' => 'Test-Role' | ||
| 43 | ); | ||
| 44 | |||
| 45 | # Results: | ||
| 46 | my $Role = $CreateRoleResponse->Role; | ||
| 47 | |||
| 48 | # Returns a L<Paws::IAM::CreateRoleResponse> object. | ||
| 49 | |||
| 50 | 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. | ||
| 51 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iam/CreateRole> | ||
| 52 | |||
| 53 | =head1 ATTRIBUTES | ||
| 54 | |||
| 55 | |||
| 56 | =head2 B<REQUIRED> AssumeRolePolicyDocument => Str | ||
| 57 | |||
| 58 | The trust relationship policy document that grants an entity permission | ||
| 59 | to assume the role. | ||
| 60 | |||
| 61 | In IAM, you must provide a JSON policy that has been converted to a | ||
| 62 | string. However, for AWS CloudFormation templates formatted in YAML, | ||
| 63 | you can provide the policy in JSON or YAML format. AWS CloudFormation | ||
| 64 | always converts a YAML policy to JSON format before submitting it to | ||
| 65 | IAM. | ||
| 66 | |||
| 67 | The regex pattern (http://wikipedia.org/wiki/regex) used to validate | ||
| 68 | this parameter is a string of characters consisting of the following: | ||
| 69 | |||
| 70 | =over | ||
| 71 | |||
| 72 | =item * | ||
| 73 | |||
| 74 | Any printable ASCII character ranging from the space character | ||
| 75 | (C<\u0020>) through the end of the ASCII character range | ||
| 76 | |||
| 77 | =item * | ||
| 78 | |||
| 79 | The printable characters in the Basic Latin and Latin-1 Supplement | ||
| 80 | character set (through C<\u00FF>) | ||
| 81 | |||
| 82 | =item * | ||
| 83 | |||
| 84 | The special characters tab (C<\u0009>), line feed (C<\u000A>), and | ||
| 85 | carriage return (C<\u000D>) | ||
| 86 | |||
| 87 | =back | ||
| 88 | |||
| 89 | Upon success, the response includes the same trust policy in JSON | ||
| 90 | format. | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | =head2 Description => Str | ||
| 95 | |||
| 96 | A description of the role. | ||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | =head2 MaxSessionDuration => Int | ||
| 101 | |||
| 102 | The maximum session duration (in seconds) that you want to set for the | ||
| 103 | specified role. If you do not specify a value for this setting, the | ||
| 104 | default maximum of one hour is applied. This setting can have a value | ||
| 105 | from 1 hour to 12 hours. | ||
| 106 | |||
| 107 | Anyone who assumes the role from the AWS CLI or API can use the | ||
| 108 | C<DurationSeconds> API parameter or the C<duration-seconds> CLI | ||
| 109 | parameter to request a longer session. The C<MaxSessionDuration> | ||
| 110 | setting determines the maximum duration that can be requested using the | ||
| 111 | C<DurationSeconds> parameter. If users don't specify a value for the | ||
| 112 | C<DurationSeconds> parameter, their security credentials are valid for | ||
| 113 | one hour by default. This applies when you use the C<AssumeRole*> API | ||
| 114 | operations or the C<assume-role*> CLI operations but does not apply | ||
| 115 | when you use those operations to create a console URL. For more | ||
| 116 | information, see Using IAM roles | ||
| 117 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in | ||
| 118 | the I<IAM User Guide>. | ||
| 119 | |||
| 120 | |||
| 121 | |||
| 122 | =head2 Path => Str | ||
| 123 | |||
| 124 | The path to the role. For more information about paths, see IAM | ||
| 125 | Identifiers | ||
| 126 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) | ||
| 127 | in the I<IAM User Guide>. | ||
| 128 | |||
| 129 | This parameter is optional. If it is not included, it defaults to a | ||
| 130 | slash (/). | ||
| 131 | |||
| 132 | This parameter allows (through its regex pattern | ||
| 133 | (http://wikipedia.org/wiki/regex)) a string of characters consisting of | ||
| 134 | either a forward slash (/) by itself or a string that must begin and | ||
| 135 | end with forward slashes. In addition, it can contain any ASCII | ||
| 136 | character from the ! (C<\u0021>) through the DEL character (C<\u007F>), | ||
| 137 | including most punctuation characters, digits, and upper and lowercased | ||
| 138 | letters. | ||
| 139 | |||
| 140 | |||
| 141 | |||
| 142 | =head2 PermissionsBoundary => Str | ||
| 143 | |||
| 144 | The ARN of the policy that is used to set the permissions boundary for | ||
| 145 | the role. | ||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | =head2 B<REQUIRED> RoleName => Str | ||
| 150 | |||
| 151 | The name of the role to create. | ||
| 152 | |||
| 153 | IAM user, group, role, and policy names must be unique within the | ||
| 154 | account. Names are not distinguished by case. For example, you cannot | ||
| 155 | create resources named both "MyResource" and "myresource". | ||
| 156 | |||
| 157 | |||
| 158 | |||
| 159 | =head2 Tags => ArrayRef[L<Paws::IAM::Tag>] | ||
| 160 | |||
| 161 | A list of tags that you want to attach to the new role. Each tag | ||
| 162 | consists of a key name and an associated value. For more information | ||
| 163 | about tagging, see Tagging IAM resources | ||
| 164 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the | ||
| 165 | I<IAM User Guide>. | ||
| 166 | |||
| 167 | If any one of the tags is invalid or if you exceed the allowed maximum | ||
| 168 | number of tags, then the entire request fails and the resource is not | ||
| 169 | created. | ||
| 170 | |||
| 171 | |||
| 172 | |||
| 173 | |||
| 174 | =head1 SEE ALSO | ||
| 175 | |||
| 176 | This class forms part of L<Paws>, documenting arguments for method CreateRole in L<Paws::IAM> | ||
| 177 | |||
| 178 | =head1 BUGS and CONTRIBUTIONS | ||
| 179 | |||
| 180 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 181 | |||
| 182 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 183 | |||
| 184 | =cut | ||
| 185 | |||