blib/lib/Paws/Budgets/CreateBudgetAction.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Budgets::CreateBudgetAction;
3 use Moose;
4 has AccountId => (is => 'ro', isa => 'Str', required => 1);
5 has ActionThreshold => (is => 'ro', isa => 'Paws::Budgets::ActionThreshold', required => 1);
6 has ActionType => (is => 'ro', isa => 'Str', required => 1);
7 has ApprovalModel => (is => 'ro', isa => 'Str', required => 1);
8 has BudgetName => (is => 'ro', isa => 'Str', required => 1);
9 has Definition => (is => 'ro', isa => 'Paws::Budgets::Definition', required => 1);
10 has ExecutionRoleArn => (is => 'ro', isa => 'Str', required => 1);
11 has NotificationType => (is => 'ro', isa => 'Str', required => 1);
12 has Subscribers => (is => 'ro', isa => 'ArrayRef[Paws::Budgets::Subscriber]', required => 1);
13  
14 use MooseX::ClassAttribute;
15  
16 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateBudgetAction');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Budgets::CreateBudgetActionResponse');
18 class_has _result_key => (isa => 'Str', is => 'ro');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::Budgets::CreateBudgetAction - Arguments for method CreateBudgetAction on L<Paws::Budgets>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method CreateBudgetAction on the
30 L<AWS Budgets|Paws::Budgets> service. Use the attributes of this class
31 as arguments to method CreateBudgetAction.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateBudgetAction.
34  
35 =head1 SYNOPSIS
36  
37 my $budgets = Paws->service('Budgets');
38 my $CreateBudgetActionResponse = $budgets->CreateBudgetAction(
39 AccountId => 'MyAccountId',
40 ActionThreshold => {
41 ActionThresholdType =>
42 'PERCENTAGE', # values: PERCENTAGE, ABSOLUTE_VALUE
43 ActionThresholdValue => 1, # max: 40000000000
44  
45 },
46 ActionType => 'APPLY_IAM_POLICY',
47 ApprovalModel => 'AUTOMATIC',
48 BudgetName => 'MyBudgetName',
49 Definition => {
50 IamActionDefinition => {
51 PolicyArn => 'MyPolicyArn', # min: 25, max: 684
52 Groups => [
53 'MyGroup', ... # min: 1, max: 640
54 ], # min: 1, max: 100; OPTIONAL
55 Roles => [
56 'MyRole', ... # min: 1, max: 576
57 ], # min: 1, max: 100; OPTIONAL
58 Users => [
59 'MyUser', ... # min: 1, max: 576
60 ], # min: 1, max: 100; OPTIONAL
61 }, # OPTIONAL
62 ScpActionDefinition => {
63 PolicyId => 'MyPolicyId', # min: 10, max: 130
64 TargetIds => [
65 'MyTargetId', ... # min: 12, max: 68
66 ], # min: 1, max: 100
67  
68 }, # OPTIONAL
69 SsmActionDefinition => {
70 ActionSubType => 'STOP_EC2_INSTANCES'
71 , # values: STOP_EC2_INSTANCES, STOP_RDS_INSTANCES
72 InstanceIds => [
73 'MyInstanceId', ... # min: 1, max: 63
74 ], # min: 1, max: 100
75 Region => 'MyRegion', # min: 9, max: 20
76  
77 }, # OPTIONAL
78 },
79 ExecutionRoleArn => 'MyRoleArn',
80 NotificationType => 'ACTUAL',
81 Subscribers => [
82 {
83 Address => 'MySubscriberAddress', # min: 1, max: 2147483647
84 SubscriptionType => 'SNS', # values: SNS, EMAIL
85  
86 },
87 ...
88 ],
89  
90 );
91  
92 # Results:
93 my $AccountId = $CreateBudgetActionResponse->AccountId;
94 my $ActionId = $CreateBudgetActionResponse->ActionId;
95 my $BudgetName = $CreateBudgetActionResponse->BudgetName;
96  
97 # Returns a L<Paws::Budgets::CreateBudgetActionResponse> object.
98  
99 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.
100 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/budgets/CreateBudgetAction>
101  
102 =head1 ATTRIBUTES
103  
104  
105 =head2 B<REQUIRED> AccountId => Str
106  
107  
108  
109  
110  
111 =head2 B<REQUIRED> ActionThreshold => L<Paws::Budgets::ActionThreshold>
112  
113  
114  
115  
116  
117 =head2 B<REQUIRED> ActionType => Str
118  
119 The type of action. This defines the type of tasks that can be carried
120 out by this action. This field also determines the format for
121 definition.
122  
123 Valid values are: C<"APPLY_IAM_POLICY">, C<"APPLY_SCP_POLICY">, C<"RUN_SSM_DOCUMENTS">
124  
125 =head2 B<REQUIRED> ApprovalModel => Str
126  
127 This specifies if the action needs manual or automatic approval.
128  
129 Valid values are: C<"AUTOMATIC">, C<"MANUAL">
130  
131 =head2 B<REQUIRED> BudgetName => Str
132  
133  
134  
135  
136  
137 =head2 B<REQUIRED> Definition => L<Paws::Budgets::Definition>
138  
139  
140  
141  
142  
143 =head2 B<REQUIRED> ExecutionRoleArn => Str
144  
145 The role passed for action execution and reversion. Roles and actions
146 must be in the same account.
147  
148  
149  
150 =head2 B<REQUIRED> NotificationType => Str
151  
152  
153  
154 Valid values are: C<"ACTUAL">, C<"FORECASTED">
155  
156 =head2 B<REQUIRED> Subscribers => ArrayRef[L<Paws::Budgets::Subscriber>]
157  
158  
159  
160  
161  
162  
163 =head1 SEE ALSO
164  
165 This class forms part of L<Paws>, documenting arguments for method CreateBudgetAction in L<Paws::Budgets>
166  
167 =head1 BUGS and CONTRIBUTIONS
168  
169 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
170  
171 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
172  
173 =cut
174