blib/lib/Paws/EC2/ModifyImageAttribute.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::ModifyImageAttribute;
3 use Moose;
4 has Attribute => (is => 'ro', isa => 'Str');
5 has Description => (is => 'ro', isa => 'Paws::EC2::AttributeValue');
6 has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
7 has ImageId => (is => 'ro', isa => 'Str', required => 1);
8 has LaunchPermission => (is => 'ro', isa => 'Paws::EC2::LaunchPermissionModifications');
9 has OperationType => (is => 'ro', isa => 'Str');
10 has ProductCodes => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'ProductCode' );
11 has UserGroups => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'UserGroup' );
12 has UserIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'UserId' );
13 has Value => (is => 'ro', isa => 'Str');
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'ModifyImageAttribute');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
19 class_has _result_key => (isa => 'Str', is => 'ro');
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::EC2::ModifyImageAttribute - Arguments for method ModifyImageAttribute on L<Paws::EC2>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method ModifyImageAttribute on the
31 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
32 as arguments to method ModifyImageAttribute.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to ModifyImageAttribute.
35  
36 =head1 SYNOPSIS
37  
38 my $ec2 = Paws->service('EC2');
39 # To make an AMI public
40 # This example makes the specified AMI public.
41 $ec2->ModifyImageAttribute(
42 'ImageId' => 'ami-5731123e',
43 'LaunchPermission' => {
44 'Add' => [
45  
46 {
47 'Group' => 'all'
48 }
49 ]
50 }
51 );
52  
53 # To grant launch permissions
54 # This example grants launch permissions for the specified AMI to the specified
55 # AWS account.
56 $ec2->ModifyImageAttribute(
57 'ImageId' => 'ami-5731123e',
58 'LaunchPermission' => {
59 'Add' => [
60  
61 {
62 'UserId' => 123456789012
63 }
64 ]
65 }
66 );
67  
68  
69 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.
70 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/ModifyImageAttribute>
71  
72 =head1 ATTRIBUTES
73  
74  
75 =head2 Attribute => Str
76  
77 The name of the attribute to modify. The valid values are
78 C<description>, C<launchPermission>, and C<productCodes>.
79  
80  
81  
82 =head2 Description => L<Paws::EC2::AttributeValue>
83  
84 A new description for the AMI.
85  
86  
87  
88 =head2 DryRun => Bool
89  
90 Checks whether you have the required permissions for the action,
91 without actually making the request, and provides an error response. If
92 you have the required permissions, the error response is
93 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
94  
95  
96  
97 =head2 B<REQUIRED> ImageId => Str
98  
99 The ID of the AMI.
100  
101  
102  
103 =head2 LaunchPermission => L<Paws::EC2::LaunchPermissionModifications>
104  
105 A new launch permission for the AMI.
106  
107  
108  
109 =head2 OperationType => Str
110  
111 The operation type. This parameter can be used only when the
112 C<Attribute> parameter is C<launchPermission>.
113  
114 Valid values are: C<"add">, C<"remove">
115  
116 =head2 ProductCodes => ArrayRef[Str|Undef]
117  
118 The DevPay product codes. After you add a product code to an AMI, it
119 can't be removed.
120  
121  
122  
123 =head2 UserGroups => ArrayRef[Str|Undef]
124  
125 The user groups. This parameter can be used only when the C<Attribute>
126 parameter is C<launchPermission>.
127  
128  
129  
130 =head2 UserIds => ArrayRef[Str|Undef]
131  
132 The AWS account IDs. This parameter can be used only when the
133 C<Attribute> parameter is C<launchPermission>.
134  
135  
136  
137 =head2 Value => Str
138  
139 The value of the attribute being modified. This parameter can be used
140 only when the C<Attribute> parameter is C<description> or
141 C<productCodes>.
142  
143  
144  
145  
146 =head1 SEE ALSO
147  
148 This class forms part of L<Paws>, documenting arguments for method ModifyImageAttribute in L<Paws::EC2>
149  
150 =head1 BUGS and CONTRIBUTIONS
151  
152 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
153  
154 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
155  
156 =cut
157