blib/lib/Paws/Organizations/UpdatePolicy.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 15 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Organizations::UpdatePolicy;
3 use Moose;
4 has Content => (is => 'ro', isa => 'Str');
5 has Description => (is => 'ro', isa => 'Str');
6 has Name => (is => 'ro', isa => 'Str');
7 has PolicyId => (is => 'ro', isa => 'Str', required => 1);
8  
9 use MooseX::ClassAttribute;
10  
11 class_has _api_call => (isa => 'Str', is => 'ro', default => 'UpdatePolicy');
12 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Organizations::UpdatePolicyResponse');
13 class_has _result_key => (isa => 'Str', is => 'ro');
14 1;
15  
16 ### main pod documentation begin ###
17  
18 =head1 NAME
19  
20 Paws::Organizations::UpdatePolicy - Arguments for method UpdatePolicy on L<Paws::Organizations>
21  
22 =head1 DESCRIPTION
23  
24 This class represents the parameters used for calling the method UpdatePolicy on the
25 L<AWS Organizations|Paws::Organizations> service. Use the attributes of this class
26 as arguments to method UpdatePolicy.
27  
28 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UpdatePolicy.
29  
30 =head1 SYNOPSIS
31  
32 my $organizations = Paws->service('Organizations');
33 # To update the details of a policy
34 # The following example shows how to rename a policy and give it a new
35 # description and new content. The output confirms the new name and description
36 # text:/n/n
37 my $UpdatePolicyResponse = $organizations->UpdatePolicy(
38 'Description' => 'This description replaces the original.',
39 'Name' => 'Renamed-Policy',
40 'PolicyId' => 'p-examplepolicyid111'
41 );
42  
43 # Results:
44 my $Policy = $UpdatePolicyResponse->Policy;
45  
46 # Returns a L<Paws::Organizations::UpdatePolicyResponse> object.
47 # To update the content of a policy
48 # The following example shows how to replace the JSON text of the SCP from the
49 # preceding example with a new JSON policy text string that allows S3 actions
50 # instead of EC2 actions:/n/n
51 my $UpdatePolicyResponse = $organizations->UpdatePolicy(
52 'Content' =>
53 '{ \"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\", \"Action\": \"s3:*\", \"Resource\": \"*\" } }',
54 'PolicyId' => 'p-examplepolicyid111'
55 );
56  
57 # Results:
58 my $Policy = $UpdatePolicyResponse->Policy;
59  
60 # Returns a L<Paws::Organizations::UpdatePolicyResponse> 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/organizations/UpdatePolicy>
64  
65 =head1 ATTRIBUTES
66  
67  
68 =head2 Content => Str
69  
70 If provided, the new content for the policy. The text must be correctly
71 formatted JSON that complies with the syntax for the policy's type. For
72 more information, see Service Control Policy Syntax
73 (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
74 in the I<AWS Organizations User Guide.>
75  
76  
77  
78 =head2 Description => Str
79  
80 If provided, the new description for the policy.
81  
82  
83  
84 =head2 Name => Str
85  
86 If provided, the new name for the policy.
87  
88 The regex pattern (http://wikipedia.org/wiki/regex) that is used to
89 validate this parameter is a string of any of the characters in the
90 ASCII character range.
91  
92  
93  
94 =head2 B<REQUIRED> PolicyId => Str
95  
96 The unique identifier (ID) of the policy that you want to update.
97  
98 The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID
99 string requires "p-" followed by from 8 to 128 lowercase or uppercase
100 letters, digits, or the underscore character (_).
101  
102  
103  
104  
105 =head1 SEE ALSO
106  
107 This class forms part of L<Paws>, documenting arguments for method UpdatePolicy in L<Paws::Organizations>
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