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

filter: Statementstmt 0.0% 0 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 42 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::ModifyInstanceAttribute;
3 use Moose;
4 has Attribute => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'attribute' );
5 has BlockDeviceMappings => (is => 'ro', isa => 'ArrayRef[Paws::EC2::InstanceBlockDeviceMappingSpecification]', traits => ['NameInRequest'], request_name => 'blockDeviceMapping' );
6 has DisableApiTermination => (is => 'ro', isa => 'Paws::EC2::AttributeBooleanValue', traits => ['NameInRequest'], request_name => 'disableApiTermination' );
7 has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
8 has EbsOptimized => (is => 'ro', isa => 'Paws::EC2::AttributeBooleanValue', traits => ['NameInRequest'], request_name => 'ebsOptimized' );
9 has EnaSupport => (is => 'ro', isa => 'Paws::EC2::AttributeBooleanValue', traits => ['NameInRequest'], request_name => 'enaSupport' );
10 has Groups => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'GroupId' );
11 has InstanceId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'instanceId' , required => 1);
12 has InstanceInitiatedShutdownBehavior => (is => 'ro', isa => 'Paws::EC2::AttributeValue', traits => ['NameInRequest'], request_name => 'instanceInitiatedShutdownBehavior' );
13 has InstanceType => (is => 'ro', isa => 'Paws::EC2::AttributeValue', traits => ['NameInRequest'], request_name => 'instanceType' );
14 has Kernel => (is => 'ro', isa => 'Paws::EC2::AttributeValue', traits => ['NameInRequest'], request_name => 'kernel' );
15 has Ramdisk => (is => 'ro', isa => 'Paws::EC2::AttributeValue', traits => ['NameInRequest'], request_name => 'ramdisk' );
16 has SourceDestCheck => (is => 'ro', isa => 'Paws::EC2::AttributeBooleanValue');
17 has SriovNetSupport => (is => 'ro', isa => 'Paws::EC2::AttributeValue', traits => ['NameInRequest'], request_name => 'sriovNetSupport' );
18 has UserData => (is => 'ro', isa => 'Paws::EC2::BlobAttributeValue', traits => ['NameInRequest'], request_name => 'userData' );
19 has Value => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'value' );
20  
21 use MooseX::ClassAttribute;
22  
23 class_has _api_call => (isa => 'Str', is => 'ro', default => 'ModifyInstanceAttribute');
24 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
25 class_has _result_key => (isa => 'Str', is => 'ro');
26 1;
27  
28 ### main pod documentation begin ###
29  
30 =head1 NAME
31  
32 Paws::EC2::ModifyInstanceAttribute - Arguments for method ModifyInstanceAttribute on L<Paws::EC2>
33  
34 =head1 DESCRIPTION
35  
36 This class represents the parameters used for calling the method ModifyInstanceAttribute on the
37 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
38 as arguments to method ModifyInstanceAttribute.
39  
40 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to ModifyInstanceAttribute.
41  
42 =head1 SYNOPSIS
43  
44 my $ec2 = Paws->service('EC2');
45 # To modify the instance type
46 # This example modifies the instance type of the specified stopped instance.
47 $ec2->ModifyInstanceAttribute(
48 'InstanceId' => 'i-1234567890abcdef0',
49 'InstanceType' => {
50 'Value' => 'm5.large'
51 }
52 );
53  
54 # To enable enhanced networking
55 # This example enables enhanced networking for the specified stopped instance.
56 $ec2->ModifyInstanceAttribute(
57 'EnaSupport' => {
58 'Value' => 1
59 },
60 'InstanceId' => 'i-1234567890abcdef0'
61 );
62  
63  
64 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.
65 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/ModifyInstanceAttribute>
66  
67 =head1 ATTRIBUTES
68  
69  
70 =head2 Attribute => Str
71  
72 The name of the attribute.
73  
74 Valid values are: C<"instanceType">, C<"kernel">, C<"ramdisk">, C<"userData">, C<"disableApiTermination">, C<"instanceInitiatedShutdownBehavior">, C<"rootDeviceName">, C<"blockDeviceMapping">, C<"productCodes">, C<"sourceDestCheck">, C<"groupSet">, C<"ebsOptimized">, C<"sriovNetSupport">, C<"enaSupport">, C<"enclaveOptions">
75  
76 =head2 BlockDeviceMappings => ArrayRef[L<Paws::EC2::InstanceBlockDeviceMappingSpecification>]
77  
78 Modifies the C<DeleteOnTermination> attribute for volumes that are
79 currently attached. The volume must be owned by the caller. If no value
80 is specified for C<DeleteOnTermination>, the default is C<true> and the
81 volume is deleted when the instance is terminated.
82  
83 To add instance store volumes to an Amazon EBS-backed instance, you
84 must add them when you launch the instance. For more information, see
85 Updating the block device mapping when launching an instance
86 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM)
87 in the I<Amazon EC2 User Guide>.
88  
89  
90  
91 =head2 DisableApiTermination => L<Paws::EC2::AttributeBooleanValue>
92  
93 If the value is C<true>, you can't terminate the instance using the
94 Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use
95 this parameter for Spot Instances.
96  
97  
98  
99 =head2 DryRun => Bool
100  
101 Checks whether you have the required permissions for the action,
102 without actually making the request, and provides an error response. If
103 you have the required permissions, the error response is
104 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
105  
106  
107  
108 =head2 EbsOptimized => L<Paws::EC2::AttributeBooleanValue>
109  
110 Specifies whether the instance is optimized for Amazon EBS I/O. This
111 optimization provides dedicated throughput to Amazon EBS and an
112 optimized configuration stack to provide optimal EBS I/O performance.
113 This optimization isn't available with all instance types. Additional
114 usage charges apply when using an EBS Optimized instance.
115  
116  
117  
118 =head2 EnaSupport => L<Paws::EC2::AttributeBooleanValue>
119  
120 Set to C<true> to enable enhanced networking with ENA for the instance.
121  
122 This option is supported only for HVM instances. Specifying this option
123 with a PV instance can make it unreachable.
124  
125  
126  
127 =head2 Groups => ArrayRef[Str|Undef]
128  
129 [EC2-VPC] Replaces the security groups of the instance with the
130 specified security groups. You must specify at least one security
131 group, even if it's just the default security group for the VPC. You
132 must specify the security group ID, not the security group name.
133  
134  
135  
136 =head2 B<REQUIRED> InstanceId => Str
137  
138 The ID of the instance.
139  
140  
141  
142 =head2 InstanceInitiatedShutdownBehavior => L<Paws::EC2::AttributeValue>
143  
144 Specifies whether an instance stops or terminates when you initiate
145 shutdown from the instance (using the operating system command for
146 system shutdown).
147  
148  
149  
150 =head2 InstanceType => L<Paws::EC2::AttributeValue>
151  
152 Changes the instance type to the specified value. For more information,
153 see Instance types
154 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
155 in the I<Amazon EC2 User Guide>. If the instance type is not valid, the
156 error returned is C<InvalidInstanceAttributeValue>.
157  
158  
159  
160 =head2 Kernel => L<Paws::EC2::AttributeValue>
161  
162 Changes the instance's kernel to the specified value. We recommend that
163 you use PV-GRUB instead of kernels and RAM disks. For more information,
164 see PV-GRUB
165 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
166  
167  
168  
169 =head2 Ramdisk => L<Paws::EC2::AttributeValue>
170  
171 Changes the instance's RAM disk to the specified value. We recommend
172 that you use PV-GRUB instead of kernels and RAM disks. For more
173 information, see PV-GRUB
174 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
175  
176  
177  
178 =head2 SourceDestCheck => L<Paws::EC2::AttributeBooleanValue>
179  
180 Enable or disable source/destination checks, which ensure that the
181 instance is either the source or the destination of any traffic that it
182 receives. If the value is C<true>, source/destination checks are
183 enabled; otherwise, they are disabled. The default value is C<true>.
184 You must disable source/destination checks if the instance runs
185 services such as network address translation, routing, or firewalls.
186  
187  
188  
189 =head2 SriovNetSupport => L<Paws::EC2::AttributeValue>
190  
191 Set to C<simple> to enable enhanced networking with the Intel 82599
192 Virtual Function interface for the instance.
193  
194 There is no way to disable enhanced networking with the Intel 82599
195 Virtual Function interface at this time.
196  
197 This option is supported only for HVM instances. Specifying this option
198 with a PV instance can make it unreachable.
199  
200  
201  
202 =head2 UserData => L<Paws::EC2::BlobAttributeValue>
203  
204 Changes the instance's user data to the specified value. If you are
205 using an Amazon Web Services SDK or command line tool, base64-encoding
206 is performed for you, and you can load the text from a file. Otherwise,
207 you must provide base64-encoded text.
208  
209  
210  
211 =head2 Value => Str
212  
213 A new value for the attribute. Use only with the C<kernel>, C<ramdisk>,
214 C<userData>, C<disableApiTermination>, or
215 C<instanceInitiatedShutdownBehavior> attribute.
216  
217  
218  
219  
220 =head1 SEE ALSO
221  
222 This class forms part of L<Paws>, documenting arguments for method ModifyInstanceAttribute in L<Paws::EC2>
223  
224 =head1 BUGS and CONTRIBUTIONS
225  
226 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
227  
228 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
229  
230 =cut
231