| 1 | |||
| 2 | package Paws::STS::GetFederationToken; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has DurationSeconds => (is => 'ro', isa => 'Int'); | |
| 5 | 1 | has Name => (is => 'ro', isa => 'Str', required => 1); | |
| 6 | 1 | has Policy => (is => 'ro', isa => 'Str'); | |
| 7 | 1 | has PolicyArns => (is => 'ro', isa => 'ArrayRef[Paws::STS::PolicyDescriptorType]'); | |
| 8 | 1 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::STS::Tag]'); | |
| 9 | |||
| 10 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetFederationToken'); | |
| 13 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::STS::GetFederationTokenResponse'); | |
| 14 | 1 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'GetFederationTokenResult'); | |
| 15 | 1 | 1; | |
| 16 | |||
| 17 | ### main pod documentation begin ### | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | Paws::STS::GetFederationToken - Arguments for method GetFederationToken on L<Paws::STS> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method GetFederationToken on the | ||
| 26 | L<AWS Security Token Service|Paws::STS> service. Use the attributes of this class | ||
| 27 | as arguments to method GetFederationToken. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetFederationToken. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $sts = Paws->service('STS'); | ||
| 34 | # To get temporary credentials for a role by using GetFederationToken | ||
| 35 | my $GetFederationTokenResponse = $sts->GetFederationToken( | ||
| 36 | 'DurationSeconds' => 3600, | ||
| 37 | 'Name' => 'Bob', | ||
| 38 | 'Policy' => | ||
| 39 | '{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:*","Resource":"*"}]}' | ||
| 40 | ); | ||
| 41 | |||
| 42 | # Results: | ||
| 43 | my $Credentials = $GetFederationTokenResponse->Credentials; | ||
| 44 | my $FederatedUser = $GetFederationTokenResponse->FederatedUser; | ||
| 45 | my $PackedPolicySize = $GetFederationTokenResponse->PackedPolicySize; | ||
| 46 | |||
| 47 | # Returns a L<Paws::STS::GetFederationTokenResponse> object. | ||
| 48 | |||
| 49 | 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. | ||
| 50 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sts/GetFederationToken> | ||
| 51 | |||
| 52 | =head1 ATTRIBUTES | ||
| 53 | |||
| 54 | |||
| 55 | =head2 DurationSeconds => Int | ||
| 56 | |||
| 57 | The duration, in seconds, that the session should last. Acceptable | ||
| 58 | durations for federation sessions range from 900 seconds (15 minutes) | ||
| 59 | to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the | ||
| 60 | default. Sessions obtained using AWS account root user credentials are | ||
| 61 | restricted to a maximum of 3,600 seconds (one hour). If the specified | ||
| 62 | duration is longer than one hour, the session obtained by using root | ||
| 63 | user credentials defaults to one hour. | ||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 | =head2 B<REQUIRED> Name => Str | ||
| 68 | |||
| 69 | The name of the federated user. The name is used as an identifier for | ||
| 70 | the temporary security credentials (such as C<Bob>). For example, you | ||
| 71 | can reference the federated user name in a resource-based policy, such | ||
| 72 | as in an Amazon S3 bucket policy. | ||
| 73 | |||
| 74 | The regex used to validate this parameter is a string of characters | ||
| 75 | consisting of upper- and lower-case alphanumeric characters with no | ||
| 76 | spaces. You can also include underscores or any of the following | ||
| 77 | characters: =,.@- | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | =head2 Policy => Str | ||
| 82 | |||
| 83 | An IAM policy in JSON format that you want to use as an inline session | ||
| 84 | policy. | ||
| 85 | |||
| 86 | You must pass an inline or managed session policy | ||
| 87 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) | ||
| 88 | to this operation. You can pass a single JSON policy document to use as | ||
| 89 | an inline session policy. You can also specify up to 10 managed | ||
| 90 | policies to use as managed session policies. | ||
| 91 | |||
| 92 | This parameter is optional. However, if you do not pass any session | ||
| 93 | policies, then the resulting federated user session has no permissions. | ||
| 94 | |||
| 95 | When you pass session policies, the session permissions are the | ||
| 96 | intersection of the IAM user policies and the session policies that you | ||
| 97 | pass. This gives you a way to further restrict the permissions for a | ||
| 98 | federated user. You cannot use session policies to grant more | ||
| 99 | permissions than those that are defined in the permissions policy of | ||
| 100 | the IAM user. For more information, see Session Policies | ||
| 101 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) | ||
| 102 | in the I<IAM User Guide>. | ||
| 103 | |||
| 104 | The resulting credentials can be used to access a resource that has a | ||
| 105 | resource-based policy. If that policy specifically references the | ||
| 106 | federated user session in the C<Principal> element of the policy, the | ||
| 107 | session has the permissions allowed by the policy. These permissions | ||
| 108 | are granted in addition to the permissions that are granted by the | ||
| 109 | session policies. | ||
| 110 | |||
| 111 | The plaintext that you use for both inline and managed session policies | ||
| 112 | can't exceed 2,048 characters. The JSON policy characters can be any | ||
| 113 | ASCII character from the space character to the end of the valid | ||
| 114 | character list (\u0020 through \u00FF). It can also include the tab | ||
| 115 | (\u0009), linefeed (\u000A), and carriage return (\u000D) characters. | ||
| 116 | |||
| 117 | An AWS conversion compresses the passed session policies and session | ||
| 118 | tags into a packed binary format that has a separate limit. Your | ||
| 119 | request can fail for this limit even if your plaintext meets the other | ||
| 120 | requirements. The C<PackedPolicySize> response element indicates by | ||
| 121 | percentage how close the policies and tags for your request are to the | ||
| 122 | upper size limit. | ||
| 123 | |||
| 124 | |||
| 125 | |||
| 126 | =head2 PolicyArns => ArrayRef[L<Paws::STS::PolicyDescriptorType>] | ||
| 127 | |||
| 128 | The Amazon Resource Names (ARNs) of the IAM managed policies that you | ||
| 129 | want to use as a managed session policy. The policies must exist in the | ||
| 130 | same account as the IAM user that is requesting federated access. | ||
| 131 | |||
| 132 | You must pass an inline or managed session policy | ||
| 133 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) | ||
| 134 | to this operation. You can pass a single JSON policy document to use as | ||
| 135 | an inline session policy. You can also specify up to 10 managed | ||
| 136 | policies to use as managed session policies. The plaintext that you use | ||
| 137 | for both inline and managed session policies can't exceed 2,048 | ||
| 138 | characters. You can provide up to 10 managed policy ARNs. For more | ||
| 139 | information about ARNs, see Amazon Resource Names (ARNs) and AWS | ||
| 140 | Service Namespaces | ||
| 141 | (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) | ||
| 142 | in the AWS General Reference. | ||
| 143 | |||
| 144 | This parameter is optional. However, if you do not pass any session | ||
| 145 | policies, then the resulting federated user session has no permissions. | ||
| 146 | |||
| 147 | When you pass session policies, the session permissions are the | ||
| 148 | intersection of the IAM user policies and the session policies that you | ||
| 149 | pass. This gives you a way to further restrict the permissions for a | ||
| 150 | federated user. You cannot use session policies to grant more | ||
| 151 | permissions than those that are defined in the permissions policy of | ||
| 152 | the IAM user. For more information, see Session Policies | ||
| 153 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) | ||
| 154 | in the I<IAM User Guide>. | ||
| 155 | |||
| 156 | The resulting credentials can be used to access a resource that has a | ||
| 157 | resource-based policy. If that policy specifically references the | ||
| 158 | federated user session in the C<Principal> element of the policy, the | ||
| 159 | session has the permissions allowed by the policy. These permissions | ||
| 160 | are granted in addition to the permissions that are granted by the | ||
| 161 | session policies. | ||
| 162 | |||
| 163 | An AWS conversion compresses the passed session policies and session | ||
| 164 | tags into a packed binary format that has a separate limit. Your | ||
| 165 | request can fail for this limit even if your plaintext meets the other | ||
| 166 | requirements. The C<PackedPolicySize> response element indicates by | ||
| 167 | percentage how close the policies and tags for your request are to the | ||
| 168 | upper size limit. | ||
| 169 | |||
| 170 | |||
| 171 | |||
| 172 | =head2 Tags => ArrayRef[L<Paws::STS::Tag>] | ||
| 173 | |||
| 174 | A list of session tags. Each session tag consists of a key name and an | ||
| 175 | associated value. For more information about session tags, see Passing | ||
| 176 | Session Tags in STS | ||
| 177 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) | ||
| 178 | in the I<IAM User Guide>. | ||
| 179 | |||
| 180 | This parameter is optional. You can pass up to 50 session tags. The | ||
| 181 | plaintext session tag keys canE<rsquo>t exceed 128 characters and the | ||
| 182 | values canE<rsquo>t exceed 256 characters. For these and additional | ||
| 183 | limits, see IAM and STS Character Limits | ||
| 184 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) | ||
| 185 | in the I<IAM User Guide>. | ||
| 186 | |||
| 187 | An AWS conversion compresses the passed session policies and session | ||
| 188 | tags into a packed binary format that has a separate limit. Your | ||
| 189 | request can fail for this limit even if your plaintext meets the other | ||
| 190 | requirements. The C<PackedPolicySize> response element indicates by | ||
| 191 | percentage how close the policies and tags for your request are to the | ||
| 192 | upper size limit. | ||
| 193 | |||
| 194 | You can pass a session tag with the same key as a tag that is already | ||
| 195 | attached to the user you are federating. When you do, session tags | ||
| 196 | override a user tag with the same key. | ||
| 197 | |||
| 198 | Tag keyE<ndash>value pairs are not case sensitive, but case is | ||
| 199 | preserved. This means that you cannot have separate C<Department> and | ||
| 200 | C<department> tag keys. Assume that the role has the | ||
| 201 | C<Department>=C<Marketing> tag and you pass the | ||
| 202 | C<department>=C<engineering> session tag. C<Department> and | ||
| 203 | C<department> are not saved as separate tags, and the session tag | ||
| 204 | passed in the request takes precedence over the role tag. | ||
| 205 | |||
| 206 | |||
| 207 | |||
| 208 | |||
| 209 | =head1 SEE ALSO | ||
| 210 | |||
| 211 | This class forms part of L<Paws>, documenting arguments for method GetFederationToken in L<Paws::STS> | ||
| 212 | |||
| 213 | =head1 BUGS and CONTRIBUTIONS | ||
| 214 | |||
| 215 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 216 | |||
| 217 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 218 | |||
| 219 | =cut | ||
| 220 | |||