blib/lib/Paws/IAM/PutUserPolicy.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IAM::PutUserPolicy;
3 use Moose;
4 has PolicyDocument => (is => 'ro', isa => 'Str', required => 1);
5 has PolicyName => (is => 'ro', isa => 'Str', required => 1);
6 has UserName => (is => 'ro', isa => 'Str', required => 1);
7  
8 use MooseX::ClassAttribute;
9  
10 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutUserPolicy');
11 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
12 class_has _result_key => (isa => 'Str', is => 'ro');
13 1;
14  
15 ### main pod documentation begin ###
16  
17 =head1 NAME
18  
19 Paws::IAM::PutUserPolicy - Arguments for method PutUserPolicy on L<Paws::IAM>
20  
21 =head1 DESCRIPTION
22  
23 This class represents the parameters used for calling the method PutUserPolicy on the
24 L<AWS Identity and Access Management|Paws::IAM> service. Use the attributes of this class
25 as arguments to method PutUserPolicy.
26  
27 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutUserPolicy.
28  
29 =head1 SYNOPSIS
30  
31 my $iam = Paws->service('IAM');
32 # To attach a policy to an IAM user
33 # The following command attaches a policy to the IAM user named Bob.
34 $iam->PutUserPolicy(
35 'PolicyDocument' =>
36 '{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"*","Resource":"*"}}',
37 'PolicyName' => 'AllAccessPolicy',
38 'UserName' => 'Bob'
39 );
40  
41  
42 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.
43 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iam/PutUserPolicy>
44  
45 =head1 ATTRIBUTES
46  
47  
48 =head2 B<REQUIRED> PolicyDocument => Str
49  
50 The policy document.
51  
52 You must provide policies in JSON format in IAM. However, for AWS
53 CloudFormation templates formatted in YAML, you can provide the policy
54 in JSON or YAML format. AWS CloudFormation always converts a YAML
55 policy to JSON format before submitting it to IAM.
56  
57 The regex pattern (http://wikipedia.org/wiki/regex) used to validate
58 this parameter is a string of characters consisting of the following:
59  
60 =over
61  
62 =item *
63  
64 Any printable ASCII character ranging from the space character
65 (C<\u0020>) through the end of the ASCII character range
66  
67 =item *
68  
69 The printable characters in the Basic Latin and Latin-1 Supplement
70 character set (through C<\u00FF>)
71  
72 =item *
73  
74 The special characters tab (C<\u0009>), line feed (C<\u000A>), and
75 carriage return (C<\u000D>)
76  
77 =back
78  
79  
80  
81  
82 =head2 B<REQUIRED> PolicyName => Str
83  
84 The name of the policy document.
85  
86 This parameter allows (through its regex pattern
87 (http://wikipedia.org/wiki/regex)) a string of characters consisting of
88 upper and lowercase alphanumeric characters with no spaces. You can
89 also include any of the following characters: _+=,.@-
90  
91  
92  
93 =head2 B<REQUIRED> UserName => Str
94  
95 The name of the user to associate the policy with.
96  
97 This parameter allows (through its regex pattern
98 (http://wikipedia.org/wiki/regex)) a string of characters consisting of
99 upper and lowercase alphanumeric characters with no spaces. You can
100 also include any of the following characters: _+=,.@-
101  
102  
103  
104  
105 =head1 SEE ALSO
106  
107 This class forms part of L<Paws>, documenting arguments for method PutUserPolicy in L<Paws::IAM>
108  
109 =head1 BUGS and CONTRIBUTIONS
110  
111 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
112  
113 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
114  
115 =cut
116