blib/lib/Paws/STS/GetSessionToken.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 15 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/STS/GetFederationTokenResponse.pm ↑ Summary blib/lib/Paws/STS/GetSessionTokenResponse.pm »
1  
2 package Paws::STS::GetSessionToken;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has DurationSeconds => (is => 'ro', isa => 'Int');
5 1 has SerialNumber => (is => 'ro', isa => 'Str');
6 1 has TokenCode => (is => 'ro', isa => 'Str');
7  
8 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetSessionToken');
11 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::STS::GetSessionTokenResponse');
12 1 class_has _result_key => (isa => 'Str', is => 'ro', default => 'GetSessionTokenResult');
13 1 1;
14  
15 ### main pod documentation begin ###
16  
17 =head1 NAME
18  
19 Paws::STS::GetSessionToken - Arguments for method GetSessionToken on L<Paws::STS>
20  
21 =head1 DESCRIPTION
22  
23 This class represents the parameters used for calling the method GetSessionToken on the
24 L<AWS Security Token Service|Paws::STS> service. Use the attributes of this class
25 as arguments to method GetSessionToken.
26  
27 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetSessionToken.
28  
29 =head1 SYNOPSIS
30  
31 my $sts = Paws->service('STS');
32 # To get temporary credentials for an IAM user or an AWS account
33 my $GetSessionTokenResponse = $sts->GetSessionToken(
34 'DurationSeconds' => 3600,
35 'SerialNumber' => 'YourMFASerialNumber',
36 'TokenCode' => 123456
37 );
38  
39 # Results:
40 my $Credentials = $GetSessionTokenResponse->Credentials;
41  
42 # Returns a L<Paws::STS::GetSessionTokenResponse> object.
43  
44 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.
45 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sts/GetSessionToken>
46  
47 =head1 ATTRIBUTES
48  
49  
50 =head2 DurationSeconds => Int
51  
52 The duration, in seconds, that the credentials should remain valid.
53 Acceptable durations for IAM user sessions range from 900 seconds (15
54 minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
55 as the default. Sessions for AWS account owners are restricted to a
56 maximum of 3,600 seconds (one hour). If the duration is longer than one
57 hour, the session for AWS account owners defaults to one hour.
58  
59  
60  
61 =head2 SerialNumber => Str
62  
63 The identification number of the MFA device that is associated with the
64 IAM user who is making the C<GetSessionToken> call. Specify this value
65 if the IAM user has a policy that requires MFA authentication. The
66 value is either the serial number for a hardware device (such as
67 C<GAHT12345678>) or an Amazon Resource Name (ARN) for a virtual device
68 (such as C<arn:aws:iam::123456789012:mfa/user>). You can find the
69 device for an IAM user by going to the AWS Management Console and
70 viewing the user's security credentials.
71  
72 The regex used to validate this parameter is a string of characters
73 consisting of upper- and lower-case alphanumeric characters with no
74 spaces. You can also include underscores or any of the following
75 characters: =,.@:/-
76  
77  
78  
79 =head2 TokenCode => Str
80  
81 The value provided by the MFA device, if MFA is required. If any policy
82 requires the IAM user to submit an MFA code, specify this value. If MFA
83 authentication is required, the user must provide a code when
84 requesting a set of temporary security credentials. A user who fails to
85 provide the code receives an "access denied" response when requesting
86 resources that require MFA authentication.
87  
88 The format for this parameter, as described by its regex pattern, is a
89 sequence of six numeric digits.
90  
91  
92  
93  
94 =head1 SEE ALSO
95  
96 This class forms part of L<Paws>, documenting arguments for method GetSessionToken in L<Paws::STS>
97  
98 =head1 BUGS and CONTRIBUTIONS
99  
100 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
101  
102 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
103  
104 =cut
105  
« blib/lib/Paws/STS/GetFederationTokenResponse.pm ↑ Summary blib/lib/Paws/STS/GetSessionTokenResponse.pm »