blib/lib/Paws/STS/AssumeRoleWithWebIdentity.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::STS::AssumeRoleWithWebIdentity;
3 use Moose;
4 has DurationSeconds => (is => 'ro', isa => 'Int');
5 has Policy => (is => 'ro', isa => 'Str');
6 has PolicyArns => (is => 'ro', isa => 'ArrayRef[Paws::STS::PolicyDescriptorType]');
7 has ProviderId => (is => 'ro', isa => 'Str');
8 has RoleArn => (is => 'ro', isa => 'Str', required => 1);
9 has RoleSessionName => (is => 'ro', isa => 'Str', required => 1);
10 has WebIdentityToken => (is => 'ro', isa => 'Str', required => 1);
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'AssumeRoleWithWebIdentity');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::STS::AssumeRoleWithWebIdentityResponse');
16 class_has _result_key => (isa => 'Str', is => 'ro', default => 'AssumeRoleWithWebIdentityResult');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::STS::AssumeRoleWithWebIdentity - Arguments for method AssumeRoleWithWebIdentity on L<Paws::STS>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method AssumeRoleWithWebIdentity on the
28 L<AWS Security Token Service|Paws::STS> service. Use the attributes of this class
29 as arguments to method AssumeRoleWithWebIdentity.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AssumeRoleWithWebIdentity.
32  
33 =head1 SYNOPSIS
34  
35 my $sts = Paws->service('STS');
36 # To assume a role as an OpenID Connect-federated user
37 my $AssumeRoleWithWebIdentityResponse = $sts->AssumeRoleWithWebIdentity(
38 'DurationSeconds' => 3600,
39 'ProviderId' => 'www.amazon.com',
40 'RoleArn' => 'arn:aws:iam::123456789012:role/FederatedWebIdentityRole',
41 'RoleSessionName' => 'app1',
42 'WebIdentityToken' =>
43 'Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ'
44 );
45  
46 # Results:
47 my $AssumedRoleUser = $AssumeRoleWithWebIdentityResponse->AssumedRoleUser;
48 my $Audience = $AssumeRoleWithWebIdentityResponse->Audience;
49 my $Credentials = $AssumeRoleWithWebIdentityResponse->Credentials;
50 my $PackedPolicySize = $AssumeRoleWithWebIdentityResponse->PackedPolicySize;
51 my $Provider = $AssumeRoleWithWebIdentityResponse->Provider;
52 my $SubjectFromWebIdentityToken =
53 $AssumeRoleWithWebIdentityResponse->SubjectFromWebIdentityToken;
54  
55 # Returns a L<Paws::STS::AssumeRoleWithWebIdentityResponse> object.
56  
57 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.
58 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sts/AssumeRoleWithWebIdentity>
59  
60 =head1 ATTRIBUTES
61  
62  
63 =head2 DurationSeconds => Int
64  
65 The duration, in seconds, of the role session. The value can range from
66 900 seconds (15 minutes) up to the maximum session duration setting for
67 the role. This setting can have a value from 1 hour to 12 hours. If you
68 specify a value higher than this setting, the operation fails. For
69 example, if you specify a session duration of 12 hours, but your
70 administrator set the maximum session duration to 6 hours, your
71 operation fails. To learn how to view the maximum value for your role,
72 see View the Maximum Session Duration Setting for a Role
73 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
74 in the I<IAM User Guide>.
75  
76 By default, the value is set to C<3600> seconds.
77  
78 The C<DurationSeconds> parameter is separate from the duration of a
79 console session that you might request using the returned credentials.
80 The request to the federation endpoint for a console sign-in token
81 takes a C<SessionDuration> parameter that specifies the maximum length
82 of the console session. For more information, see Creating a URL that
83 Enables Federated Users to Access the AWS Management Console
84 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
85 in the I<IAM User Guide>.
86  
87  
88  
89 =head2 Policy => Str
90  
91 An IAM policy in JSON format that you want to use as an inline session
92 policy.
93  
94 This parameter is optional. Passing policies to this operation returns
95 new temporary credentials. The resulting session's permissions are the
96 intersection of the role's identity-based policy and the session
97 policies. You can use the role's temporary credentials in subsequent
98 AWS API calls to access resources in the account that owns the role.
99 You cannot use session policies to grant more permissions than those
100 allowed by the identity-based policy of the role that is being assumed.
101 For more information, see Session Policies
102 (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
103 in the I<IAM User Guide>.
104  
105 The plaintext that you use for both inline and managed session policies
106 can't exceed 2,048 characters. The JSON policy characters can be any
107 ASCII character from the space character to the end of the valid
108 character list (\u0020 through \u00FF). It can also include the tab
109 (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.
110  
111 An AWS conversion compresses the passed session policies and session
112 tags into a packed binary format that has a separate limit. Your
113 request can fail for this limit even if your plaintext meets the other
114 requirements. The C<PackedPolicySize> response element indicates by
115 percentage how close the policies and tags for your request are to the
116 upper size limit.
117  
118  
119  
120 =head2 PolicyArns => ArrayRef[L<Paws::STS::PolicyDescriptorType>]
121  
122 The Amazon Resource Names (ARNs) of the IAM managed policies that you
123 want to use as managed session policies. The policies must exist in the
124 same account as the role.
125  
126 This parameter is optional. You can provide up to 10 managed policy
127 ARNs. However, the plaintext that you use for both inline and managed
128 session policies can't exceed 2,048 characters. For more information
129 about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces
130 (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
131 in the AWS General Reference.
132  
133 An AWS conversion compresses the passed session policies and session
134 tags into a packed binary format that has a separate limit. Your
135 request can fail for this limit even if your plaintext meets the other
136 requirements. The C<PackedPolicySize> response element indicates by
137 percentage how close the policies and tags for your request are to the
138 upper size limit.
139  
140 Passing policies to this operation returns new temporary credentials.
141 The resulting session's permissions are the intersection of the role's
142 identity-based policy and the session policies. You can use the role's
143 temporary credentials in subsequent AWS API calls to access resources
144 in the account that owns the role. You cannot use session policies to
145 grant more permissions than those allowed by the identity-based policy
146 of the role that is being assumed. For more information, see Session
147 Policies
148 (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
149 in the I<IAM User Guide>.
150  
151  
152  
153 =head2 ProviderId => Str
154  
155 The fully qualified host component of the domain name of the identity
156 provider.
157  
158 Specify this value only for OAuth 2.0 access tokens. Currently
159 C<www.amazon.com> and C<graph.facebook.com> are the only supported
160 identity providers for OAuth 2.0 access tokens. Do not include URL
161 schemes and port numbers.
162  
163 Do not specify this value for OpenID Connect ID tokens.
164  
165  
166  
167 =head2 B<REQUIRED> RoleArn => Str
168  
169 The Amazon Resource Name (ARN) of the role that the caller is assuming.
170  
171  
172  
173 =head2 B<REQUIRED> RoleSessionName => Str
174  
175 An identifier for the assumed role session. Typically, you pass the
176 name or identifier that is associated with the user who is using your
177 application. That way, the temporary security credentials that your
178 application will use are associated with that user. This session name
179 is included as part of the ARN and assumed role ID in the
180 C<AssumedRoleUser> response element.
181  
182 The regex used to validate this parameter is a string of characters
183 consisting of upper- and lower-case alphanumeric characters with no
184 spaces. You can also include underscores or any of the following
185 characters: =,.@-
186  
187  
188  
189 =head2 B<REQUIRED> WebIdentityToken => Str
190  
191 The OAuth 2.0 access token or OpenID Connect ID token that is provided
192 by the identity provider. Your application must get this token by
193 authenticating the user who is using your application with a web
194 identity provider before the application makes an
195 C<AssumeRoleWithWebIdentity> call.
196  
197  
198  
199  
200 =head1 SEE ALSO
201  
202 This class forms part of L<Paws>, documenting arguments for method AssumeRoleWithWebIdentity in L<Paws::STS>
203  
204 =head1 BUGS and CONTRIBUTIONS
205  
206 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
207  
208 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
209  
210 =cut
211