blib/lib/Paws/AutoScaling/PutLifecycleHook.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::AutoScaling::PutLifecycleHook;
3 use Moose;
4 has AutoScalingGroupName => (is => 'ro', isa => 'Str', required => 1);
5 has DefaultResult => (is => 'ro', isa => 'Str');
6 has HeartbeatTimeout => (is => 'ro', isa => 'Int');
7 has LifecycleHookName => (is => 'ro', isa => 'Str', required => 1);
8 has LifecycleTransition => (is => 'ro', isa => 'Str');
9 has NotificationMetadata => (is => 'ro', isa => 'Str');
10 has NotificationTargetARN => (is => 'ro', isa => 'Str');
11 has RoleARN => (is => 'ro', isa => 'Str');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutLifecycleHook');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::AutoScaling::PutLifecycleHookAnswer');
17 class_has _result_key => (isa => 'Str', is => 'ro', default => 'PutLifecycleHookResult');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::AutoScaling::PutLifecycleHook - Arguments for method PutLifecycleHook on L<Paws::AutoScaling>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method PutLifecycleHook on the
29 L<Auto Scaling|Paws::AutoScaling> service. Use the attributes of this class
30 as arguments to method PutLifecycleHook.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutLifecycleHook.
33  
34 =head1 SYNOPSIS
35  
36 my $autoscaling = Paws->service('AutoScaling');
37 # To create a lifecycle hook
38 # This example creates a lifecycle hook.
39 my $PutLifecycleHookAnswer = $autoscaling->PutLifecycleHook(
40 'AutoScalingGroupName' => 'my-auto-scaling-group',
41 'LifecycleHookName' => 'my-lifecycle-hook',
42 'LifecycleTransition' => 'autoscaling:EC2_INSTANCE_LAUNCHING',
43 'NotificationTargetARN' =>
44 'arn:aws:sns:us-west-2:123456789012:my-sns-topic --role-arn',
45 'RoleARN' => 'arn:aws:iam::123456789012:role/my-auto-scaling-role'
46 );
47  
48  
49 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.
50 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/autoscaling/PutLifecycleHook>
51  
52 =head1 ATTRIBUTES
53  
54  
55 =head2 B<REQUIRED> AutoScalingGroupName => Str
56  
57 The name of the Auto Scaling group.
58  
59  
60  
61 =head2 DefaultResult => Str
62  
63 Defines the action the Auto Scaling group should take when the
64 lifecycle hook timeout elapses or if an unexpected failure occurs. This
65 parameter can be either C<CONTINUE> or C<ABANDON>. The default value is
66 C<ABANDON>.
67  
68  
69  
70 =head2 HeartbeatTimeout => Int
71  
72 The maximum time, in seconds, that can elapse before the lifecycle hook
73 times out. The range is from C<30> to C<7200> seconds. The default
74 value is C<3600> seconds (1 hour).
75  
76 If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
77 action that you specified in the C<DefaultResult> parameter. You can
78 prevent the lifecycle hook from timing out by calling the
79 RecordLifecycleActionHeartbeat API.
80  
81  
82  
83 =head2 B<REQUIRED> LifecycleHookName => Str
84  
85 The name of the lifecycle hook.
86  
87  
88  
89 =head2 LifecycleTransition => Str
90  
91 The instance state to which you want to attach the lifecycle hook. The
92 valid values are:
93  
94 =over
95  
96 =item *
97  
98 autoscaling:EC2_INSTANCE_LAUNCHING
99  
100 =item *
101  
102 autoscaling:EC2_INSTANCE_TERMINATING
103  
104 =back
105  
106 Required for new lifecycle hooks, but optional when updating existing
107 hooks.
108  
109  
110  
111 =head2 NotificationMetadata => Str
112  
113 Additional information that you want to include any time Amazon EC2
114 Auto Scaling sends a message to the notification target.
115  
116  
117  
118 =head2 NotificationTargetARN => Str
119  
120 The ARN of the notification target that Amazon EC2 Auto Scaling uses to
121 notify you when an instance is in the transition state for the
122 lifecycle hook. This target can be either an SQS queue or an SNS topic.
123  
124 If you specify an empty string, this overrides the current ARN.
125  
126 This operation uses the JSON format when sending notifications to an
127 Amazon SQS queue, and an email key-value pair format when sending
128 notifications to an Amazon SNS topic.
129  
130 When you specify a notification target, Amazon EC2 Auto Scaling sends
131 it a test message. Test messages contain the following additional
132 key-value pair: C<"Event": "autoscaling:TEST_NOTIFICATION">.
133  
134  
135  
136 =head2 RoleARN => Str
137  
138 The ARN of the IAM role that allows the Auto Scaling group to publish
139 to the specified notification target, for example, an Amazon SNS topic
140 or an Amazon SQS queue.
141  
142 Required for new lifecycle hooks, but optional when updating existing
143 hooks.
144  
145  
146  
147  
148 =head1 SEE ALSO
149  
150 This class forms part of L<Paws>, documenting arguments for method PutLifecycleHook in L<Paws::AutoScaling>
151  
152 =head1 BUGS and CONTRIBUTIONS
153  
154 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
155  
156 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
157  
158 =cut
159