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

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::RunScheduledInstances;
3 use Moose;
4 has ClientToken => (is => 'ro', isa => 'Str');
5 has DryRun => (is => 'ro', isa => 'Bool');
6 has InstanceCount => (is => 'ro', isa => 'Int');
7 has LaunchSpecification => (is => 'ro', isa => 'Paws::EC2::ScheduledInstancesLaunchSpecification', required => 1);
8 has ScheduledInstanceId => (is => 'ro', isa => 'Str', required => 1);
9  
10 use MooseX::ClassAttribute;
11  
12 class_has _api_call => (isa => 'Str', is => 'ro', default => 'RunScheduledInstances');
13 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::RunScheduledInstancesResult');
14 class_has _result_key => (isa => 'Str', is => 'ro');
15 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::EC2::RunScheduledInstances - Arguments for method RunScheduledInstances on L<Paws::EC2>
22  
23 =head1 DESCRIPTION
24  
25 This class represents the parameters used for calling the method RunScheduledInstances on the
26 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
27 as arguments to method RunScheduledInstances.
28  
29 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to RunScheduledInstances.
30  
31 =head1 SYNOPSIS
32  
33 my $ec2 = Paws->service('EC2');
34 # To launch a Scheduled Instance in a VPC
35 # This example launches the specified Scheduled Instance in a VPC.
36 my $RunScheduledInstancesResult = $ec2->RunScheduledInstances(
37 'InstanceCount' => 1,
38 'LaunchSpecification' => {
39 'IamInstanceProfile' => {
40 'Name' => 'my-iam-role'
41 },
42 'ImageId' => 'ami-12345678',
43 'InstanceType' => 'c4.large',
44 'KeyName' => 'my-key-pair',
45 'NetworkInterfaces' => [
46  
47 {
48 'AssociatePublicIpAddress' => 1,
49 'DeviceIndex' => 0,
50 'Groups' => ['sg-12345678'],
51 'SubnetId' => 'subnet-12345678'
52 }
53 ]
54 },
55 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012'
56 );
57  
58 # Results:
59 my $InstanceIdSet = $RunScheduledInstancesResult->InstanceIdSet;
60  
61 # Returns a L<Paws::EC2::RunScheduledInstancesResult> object.
62 # To launch a Scheduled Instance in EC2-Classic
63 # This example launches the specified Scheduled Instance in EC2-Classic.
64 my $RunScheduledInstancesResult = $ec2->RunScheduledInstances(
65 'InstanceCount' => 1,
66 'LaunchSpecification' => {
67 'IamInstanceProfile' => {
68 'Name' => 'my-iam-role'
69 },
70 'ImageId' => 'ami-12345678',
71 'InstanceType' => 'c4.large',
72 'KeyName' => 'my-key-pair',
73 'Placement' => {
74 'AvailabilityZone' => 'us-west-2b'
75 },
76 'SecurityGroupIds' => ['sg-12345678']
77 },
78 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012'
79 );
80  
81 # Results:
82 my $InstanceIdSet = $RunScheduledInstancesResult->InstanceIdSet;
83  
84 # Returns a L<Paws::EC2::RunScheduledInstancesResult> object.
85  
86 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.
87 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/RunScheduledInstances>
88  
89 =head1 ATTRIBUTES
90  
91  
92 =head2 ClientToken => Str
93  
94 Unique, case-sensitive identifier that ensures the idempotency of the
95 request. For more information, see Ensuring Idempotency
96 (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
97  
98  
99  
100 =head2 DryRun => Bool
101  
102 Checks whether you have the required permissions for the action,
103 without actually making the request, and provides an error response. If
104 you have the required permissions, the error response is
105 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
106  
107  
108  
109 =head2 InstanceCount => Int
110  
111 The number of instances.
112  
113 Default: 1
114  
115  
116  
117 =head2 B<REQUIRED> LaunchSpecification => L<Paws::EC2::ScheduledInstancesLaunchSpecification>
118  
119 The launch specification. You must match the instance type,
120 Availability Zone, network, and platform of the schedule that you
121 purchased.
122  
123  
124  
125 =head2 B<REQUIRED> ScheduledInstanceId => Str
126  
127 The Scheduled Instance ID.
128  
129  
130  
131  
132 =head1 SEE ALSO
133  
134 This class forms part of L<Paws>, documenting arguments for method RunScheduledInstances in L<Paws::EC2>
135  
136 =head1 BUGS and CONTRIBUTIONS
137  
138 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
139  
140 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
141  
142 =cut
143