blib/lib/Paws/ApplicationAutoScaling/RegisterScalableTarget.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::ApplicationAutoScaling::RegisterScalableTarget;
3 use Moose;
4 has MaxCapacity => (is => 'ro', isa => 'Int');
5 has MinCapacity => (is => 'ro', isa => 'Int');
6 has ResourceId => (is => 'ro', isa => 'Str', required => 1);
7 has RoleARN => (is => 'ro', isa => 'Str');
8 has ScalableDimension => (is => 'ro', isa => 'Str', required => 1);
9 has ServiceNamespace => (is => 'ro', isa => 'Str', required => 1);
10 has SuspendedState => (is => 'ro', isa => 'Paws::ApplicationAutoScaling::SuspendedState');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'RegisterScalableTarget');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApplicationAutoScaling::RegisterScalableTargetResponse');
16 class_has _result_key => (isa => 'Str', is => 'ro');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::ApplicationAutoScaling::RegisterScalableTarget - Arguments for method RegisterScalableTarget on L<Paws::ApplicationAutoScaling>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method RegisterScalableTarget on the
28 L<Application Auto Scaling|Paws::ApplicationAutoScaling> service. Use the attributes of this class
29 as arguments to method RegisterScalableTarget.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to RegisterScalableTarget.
32  
33 =head1 SYNOPSIS
34  
35 my $application-autoscaling = Paws->service('ApplicationAutoScaling');
36 # To register an ECS service as a scalable target
37 # This example registers a scalable target from an Amazon ECS service called
38 # web-app that is running on the default cluster, with a minimum desired count
39 # of 1 task and a maximum desired count of 10 tasks.
40 my $RegisterScalableTargetResponse =
41 $application -autoscaling->RegisterScalableTarget(
42 'MaxCapacity' => 10,
43 'MinCapacity' => 1,
44 'ResourceId' => 'service/default/web-app',
45 'RoleARN' =>
46 'arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole',
47 'ScalableDimension' => 'ecs:service:DesiredCount',
48 'ServiceNamespace' => 'ecs'
49 );
50  
51 # To register an EC2 Spot fleet as a scalable target
52 # This example registers a scalable target from an Amazon EC2 Spot fleet with a
53 # minimum target capacity of 1 and a maximum of 10.
54 my $RegisterScalableTargetResponse =
55 $application -autoscaling->RegisterScalableTarget(
56 'MaxCapacity' => 10,
57 'MinCapacity' => 1,
58 'ResourceId' =>
59 'spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3',
60 'RoleARN' =>
61 'arn:aws:iam::012345678910:role/ApplicationAutoscalingSpotRole',
62 'ScalableDimension' => 'ec2:spot-fleet-request:TargetCapacity',
63 'ServiceNamespace' => 'ec2'
64 );
65  
66  
67 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.
68 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling/RegisterScalableTarget>
69  
70 =head1 ATTRIBUTES
71  
72  
73 =head2 MaxCapacity => Int
74  
75 The maximum value that you plan to scale out to. When a scaling policy
76 is in effect, Application Auto Scaling can scale out (expand) as needed
77 to the maximum capacity limit in response to changing demand. This
78 property is required when registering a new scalable target.
79  
80 Although you can specify a large maximum capacity, note that service
81 quotas may impose lower limits. Each service has its own default quotas
82 for the maximum capacity of the resource. If you want to specify a
83 higher limit, you can request an increase. For more information,
84 consult the documentation for that service. For information about the
85 default quotas for each service, see Service Endpoints and Quotas
86 (https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html)
87 in the I<Amazon Web Services General Reference>.
88  
89  
90  
91 =head2 MinCapacity => Int
92  
93 The minimum value that you plan to scale in to. When a scaling policy
94 is in effect, Application Auto Scaling can scale in (contract) as
95 needed to the minimum capacity limit in response to changing demand.
96 This property is required when registering a new scalable target.
97  
98 For certain resources, the minimum value allowed is 0. This includes
99 Lambda provisioned concurrency, Spot Fleet, ECS services, Aurora DB
100 clusters, EMR clusters, and custom resources. For all other resources,
101 the minimum value allowed is 1.
102  
103  
104  
105 =head2 B<REQUIRED> ResourceId => Str
106  
107 The identifier of the resource that is associated with the scalable
108 target. This string consists of the resource type and unique
109 identifier.
110  
111 =over
112  
113 =item *
114  
115 ECS service - The resource type is C<service> and the unique identifier
116 is the cluster name and service name. Example:
117 C<service/default/sample-webapp>.
118  
119 =item *
120  
121 Spot Fleet request - The resource type is C<spot-fleet-request> and the
122 unique identifier is the Spot Fleet request ID. Example:
123 C<spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE>.
124  
125 =item *
126  
127 EMR cluster - The resource type is C<instancegroup> and the unique
128 identifier is the cluster ID and instance group ID. Example:
129 C<instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0>.
130  
131 =item *
132  
133 AppStream 2.0 fleet - The resource type is C<fleet> and the unique
134 identifier is the fleet name. Example: C<fleet/sample-fleet>.
135  
136 =item *
137  
138 DynamoDB table - The resource type is C<table> and the unique
139 identifier is the table name. Example: C<table/my-table>.
140  
141 =item *
142  
143 DynamoDB global secondary index - The resource type is C<index> and the
144 unique identifier is the index name. Example:
145 C<table/my-table/index/my-table-index>.
146  
147 =item *
148  
149 Aurora DB cluster - The resource type is C<cluster> and the unique
150 identifier is the cluster name. Example: C<cluster:my-db-cluster>.
151  
152 =item *
153  
154 Amazon SageMaker endpoint variant - The resource type is C<variant> and
155 the unique identifier is the resource ID. Example:
156 C<endpoint/my-end-point/variant/KMeansClustering>.
157  
158 =item *
159  
160 Custom resources are not supported with a resource type. This parameter
161 must specify the C<OutputValue> from the CloudFormation template stack
162 used to access the resources. The unique identifier is defined by the
163 service provider. More information is available in our GitHub
164 repository (https://github.com/aws/aws-auto-scaling-custom-resource).
165  
166 =item *
167  
168 Amazon Comprehend document classification endpoint - The resource type
169 and unique identifier are specified using the endpoint ARN. Example:
170 C<arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE>.
171  
172 =item *
173  
174 Amazon Comprehend entity recognizer endpoint - The resource type and
175 unique identifier are specified using the endpoint ARN. Example:
176 C<arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE>.
177  
178 =item *
179  
180 Lambda provisioned concurrency - The resource type is C<function> and
181 the unique identifier is the function name with a function version or
182 alias name suffix that is not C<$LATEST>. Example:
183 C<function:my-function:prod> or C<function:my-function:1>.
184  
185 =item *
186  
187 Amazon Keyspaces table - The resource type is C<table> and the unique
188 identifier is the table name. Example:
189 C<keyspace/mykeyspace/table/mytable>.
190  
191 =item *
192  
193 Amazon MSK cluster - The resource type and unique identifier are
194 specified using the cluster ARN. Example:
195 C<arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5>.
196  
197 =back
198  
199  
200  
201  
202 =head2 RoleARN => Str
203  
204 This parameter is required for services that do not support
205 service-linked roles (such as Amazon EMR), and it must specify the ARN
206 of an IAM role that allows Application Auto Scaling to modify the
207 scalable target on your behalf.
208  
209 If the service supports service-linked roles, Application Auto Scaling
210 uses a service-linked role, which it creates if it does not yet exist.
211 For more information, see Application Auto Scaling IAM roles
212 (https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles).
213  
214  
215  
216 =head2 B<REQUIRED> ScalableDimension => Str
217  
218 The scalable dimension associated with the scalable target. This string
219 consists of the service namespace, resource type, and scaling property.
220  
221 =over
222  
223 =item *
224  
225 C<ecs:service:DesiredCount> - The desired task count of an ECS service.
226  
227 =item *
228  
229 C<ec2:spot-fleet-request:TargetCapacity> - The target capacity of a
230 Spot Fleet request.
231  
232 =item *
233  
234 C<elasticmapreduce:instancegroup:InstanceCount> - The instance count of
235 an EMR Instance Group.
236  
237 =item *
238  
239 C<appstream:fleet:DesiredCapacity> - The desired capacity of an
240 AppStream 2.0 fleet.
241  
242 =item *
243  
244 C<dynamodb:table:ReadCapacityUnits> - The provisioned read capacity for
245 a DynamoDB table.
246  
247 =item *
248  
249 C<dynamodb:table:WriteCapacityUnits> - The provisioned write capacity
250 for a DynamoDB table.
251  
252 =item *
253  
254 C<dynamodb:index:ReadCapacityUnits> - The provisioned read capacity for
255 a DynamoDB global secondary index.
256  
257 =item *
258  
259 C<dynamodb:index:WriteCapacityUnits> - The provisioned write capacity
260 for a DynamoDB global secondary index.
261  
262 =item *
263  
264 C<rds:cluster:ReadReplicaCount> - The count of Aurora Replicas in an
265 Aurora DB cluster. Available for Aurora MySQL-compatible edition and
266 Aurora PostgreSQL-compatible edition.
267  
268 =item *
269  
270 C<sagemaker:variant:DesiredInstanceCount> - The number of EC2 instances
271 for an Amazon SageMaker model endpoint variant.
272  
273 =item *
274  
275 C<custom-resource:ResourceType:Property> - The scalable dimension for a
276 custom resource provided by your own application or service.
277  
278 =item *
279  
280 C<comprehend:document-classifier-endpoint:DesiredInferenceUnits> - The
281 number of inference units for an Amazon Comprehend document
282 classification endpoint.
283  
284 =item *
285  
286 C<comprehend:entity-recognizer-endpoint:DesiredInferenceUnits> - The
287 number of inference units for an Amazon Comprehend entity recognizer
288 endpoint.
289  
290 =item *
291  
292 C<lambda:function:ProvisionedConcurrency> - The provisioned concurrency
293 for a Lambda function.
294  
295 =item *
296  
297 C<cassandra:table:ReadCapacityUnits> - The provisioned read capacity
298 for an Amazon Keyspaces table.
299  
300 =item *
301  
302 C<cassandra:table:WriteCapacityUnits> - The provisioned write capacity
303 for an Amazon Keyspaces table.
304  
305 =item *
306  
307 C<kafka:broker-storage:VolumeSize> - The provisioned volume size (in
308 GiB) for brokers in an Amazon MSK cluster.
309  
310 =back
311  
312  
313 Valid values are: C<"ecs:service:DesiredCount">, C<"ec2:spot-fleet-request:TargetCapacity">, C<"elasticmapreduce:instancegroup:InstanceCount">, C<"appstream:fleet:DesiredCapacity">, C<"dynamodb:table:ReadCapacityUnits">, C<"dynamodb:table:WriteCapacityUnits">, C<"dynamodb:index:ReadCapacityUnits">, C<"dynamodb:index:WriteCapacityUnits">, C<"rds:cluster:ReadReplicaCount">, C<"sagemaker:variant:DesiredInstanceCount">, C<"custom-resource:ResourceType:Property">, C<"comprehend:document-classifier-endpoint:DesiredInferenceUnits">, C<"comprehend:entity-recognizer-endpoint:DesiredInferenceUnits">, C<"lambda:function:ProvisionedConcurrency">, C<"cassandra:table:ReadCapacityUnits">, C<"cassandra:table:WriteCapacityUnits">, C<"kafka:broker-storage:VolumeSize">
314  
315 =head2 B<REQUIRED> ServiceNamespace => Str
316  
317 The namespace of the AWS service that provides the resource. For a
318 resource provided by your own application or service, use
319 C<custom-resource> instead.
320  
321 Valid values are: C<"ecs">, C<"elasticmapreduce">, C<"ec2">, C<"appstream">, C<"dynamodb">, C<"rds">, C<"sagemaker">, C<"custom-resource">, C<"comprehend">, C<"lambda">, C<"cassandra">, C<"kafka">
322  
323 =head2 SuspendedState => L<Paws::ApplicationAutoScaling::SuspendedState>
324  
325 An embedded object that contains attributes and attribute values that
326 are used to suspend and resume automatic scaling. Setting the value of
327 an attribute to C<true> suspends the specified scaling activities.
328 Setting it to C<false> (default) resumes the specified scaling
329 activities.
330  
331 B<Suspension Outcomes>
332  
333 =over
334  
335 =item *
336  
337 For C<DynamicScalingInSuspended>, while a suspension is in effect, all
338 scale-in activities that are triggered by a scaling policy are
339 suspended.
340  
341 =item *
342  
343 For C<DynamicScalingOutSuspended>, while a suspension is in effect, all
344 scale-out activities that are triggered by a scaling policy are
345 suspended.
346  
347 =item *
348  
349 For C<ScheduledScalingSuspended>, while a suspension is in effect, all
350 scaling activities that involve scheduled actions are suspended.
351  
352 =back
353  
354 For more information, see Suspending and resuming scaling
355 (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-suspend-resume-scaling.html)
356 in the I<Application Auto Scaling User Guide>.
357  
358  
359  
360  
361 =head1 SEE ALSO
362  
363 This class forms part of L<Paws>, documenting arguments for method RegisterScalableTarget in L<Paws::ApplicationAutoScaling>
364  
365 =head1 BUGS and CONTRIBUTIONS
366  
367 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
368  
369 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
370  
371 =cut
372