File Coverage

blib/lib/Paws/ApplicationAutoScaling/PutScalingPolicy.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::ApplicationAutoScaling::PutScalingPolicy;
3 1     1   609 use Moose;
  1         3  
  1         8  
4             has PolicyName => (is => 'ro', isa => 'Str', required => 1);
5             has PolicyType => (is => 'ro', isa => 'Str');
6             has ResourceId => (is => 'ro', isa => 'Str', required => 1);
7             has ScalableDimension => (is => 'ro', isa => 'Str', required => 1);
8             has ServiceNamespace => (is => 'ro', isa => 'Str', required => 1);
9             has StepScalingPolicyConfiguration => (is => 'ro', isa => 'Paws::ApplicationAutoScaling::StepScalingPolicyConfiguration');
10             has TargetTrackingScalingPolicyConfiguration => (is => 'ro', isa => 'Paws::ApplicationAutoScaling::TargetTrackingScalingPolicyConfiguration');
11              
12 1     1   6659 use MooseX::ClassAttribute;
  1         2  
  1         8  
13              
14             class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutScalingPolicy');
15             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApplicationAutoScaling::PutScalingPolicyResponse');
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::PutScalingPolicy - Arguments for method PutScalingPolicy on Paws::ApplicationAutoScaling
24              
25             =head1 DESCRIPTION
26              
27             This class represents the parameters used for calling the method PutScalingPolicy on the
28             Application Auto Scaling service. Use the attributes of this class
29             as arguments to method PutScalingPolicy.
30              
31             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutScalingPolicy.
32              
33             As an example:
34              
35             $service_obj->PutScalingPolicy(Att1 => $value1, Att2 => $value2, ...);
36              
37             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.
38              
39             =head1 ATTRIBUTES
40              
41              
42             =head2 B<REQUIRED> PolicyName => Str
43              
44             The name of the scaling policy.
45              
46              
47              
48             =head2 PolicyType => Str
49              
50             The policy type. If you are creating a new policy, this parameter is
51             required. If you are updating a policy, this parameter is not required.
52              
53             For DynamoDB, only C<TargetTrackingScaling> is supported. For any other
54             service, only C<StepScaling> is supported.
55              
56             Valid values are: C<"StepScaling">, C<"TargetTrackingScaling">
57              
58             =head2 B<REQUIRED> ResourceId => Str
59              
60             The identifier of the resource associated with the scaling policy. This
61             string consists of the resource type and unique identifier.
62              
63             =over
64              
65             =item *
66              
67             ECS service - The resource type is C<service> and the unique identifier
68             is the cluster name and service name. Example:
69             C<service/default/sample-webapp>.
70              
71             =item *
72              
73             Spot fleet request - The resource type is C<spot-fleet-request> and the
74             unique identifier is the Spot fleet request ID. Example:
75             C<spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE>.
76              
77             =item *
78              
79             EMR cluster - The resource type is C<instancegroup> and the unique
80             identifier is the cluster ID and instance group ID. Example:
81             C<instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0>.
82              
83             =item *
84              
85             AppStream 2.0 fleet - The resource type is C<fleet> and the unique
86             identifier is the fleet name. Example: C<fleet/sample-fleet>.
87              
88             =item *
89              
90             DynamoDB table - The resource type is C<table> and the unique
91             identifier is the resource ID. Example: C<table/my-table>.
92              
93             =item *
94              
95             DynamoDB global secondary index - The resource type is C<index> and the
96             unique identifier is the resource ID. Example:
97             C<table/my-table/index/my-table-index>.
98              
99             =back
100              
101              
102              
103              
104             =head2 B<REQUIRED> ScalableDimension => Str
105              
106             The scalable dimension. This string consists of the service namespace,
107             resource type, and scaling property.
108              
109             =over
110              
111             =item *
112              
113             C<ecs:service:DesiredCount> - The desired task count of an ECS service.
114              
115             =item *
116              
117             C<ec2:spot-fleet-request:TargetCapacity> - The target capacity of a
118             Spot fleet request.
119              
120             =item *
121              
122             C<elasticmapreduce:instancegroup:InstanceCount> - The instance count of
123             an EMR Instance Group.
124              
125             =item *
126              
127             C<appstream:fleet:DesiredCapacity> - The desired capacity of an
128             AppStream 2.0 fleet.
129              
130             =item *
131              
132             C<dynamodb:table:ReadCapacityUnits> - The provisioned read capacity for
133             a DynamoDB table.
134              
135             =item *
136              
137             C<dynamodb:table:WriteCapacityUnits> - The provisioned write capacity
138             for a DynamoDB table.
139              
140             =item *
141              
142             C<dynamodb:index:ReadCapacityUnits> - The provisioned read capacity for
143             a DynamoDB global secondary index.
144              
145             =item *
146              
147             C<dynamodb:index:WriteCapacityUnits> - The provisioned write capacity
148             for a DynamoDB global secondary index.
149              
150             =back
151              
152              
153             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">
154              
155             =head2 B<REQUIRED> ServiceNamespace => Str
156              
157             The namespace of the AWS service. For more information, see AWS Service
158             Namespaces in the I<Amazon Web Services General Reference>.
159              
160             Valid values are: C<"ecs">, C<"elasticmapreduce">, C<"ec2">, C<"appstream">, C<"dynamodb">
161              
162             =head2 StepScalingPolicyConfiguration => L<Paws::ApplicationAutoScaling::StepScalingPolicyConfiguration>
163              
164             A step scaling policy.
165              
166             This parameter is required if you are creating a policy and the policy
167             type is C<StepScaling>.
168              
169              
170              
171             =head2 TargetTrackingScalingPolicyConfiguration => L<Paws::ApplicationAutoScaling::TargetTrackingScalingPolicyConfiguration>
172              
173             A target tracking policy.
174              
175             This parameter is required if you are creating a new policy and the
176             policy type is C<TargetTrackingScaling>.
177              
178              
179              
180              
181             =head1 SEE ALSO
182              
183             This class forms part of L<Paws>, documenting arguments for method PutScalingPolicy in L<Paws::ApplicationAutoScaling>
184              
185             =head1 BUGS and CONTRIBUTIONS
186              
187             The source code is located here: https://github.com/pplu/aws-sdk-perl
188              
189             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
190              
191             =cut
192