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

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