File Coverage

blib/lib/Paws/OpsWorks/DeploymentCommand.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::OpsWorks::DeploymentCommand;
2 1     1   538 use Moose;
  1         3  
  1         7  
3             has Args => (is => 'ro', isa => 'Paws::OpsWorks::DeploymentCommandArgs');
4             has Name => (is => 'ro', isa => 'Str', required => 1);
5             1;
6              
7             ### main pod documentation begin ###
8              
9             =head1 NAME
10              
11             Paws::OpsWorks::DeploymentCommand
12              
13             =head1 USAGE
14              
15             This class represents one of two things:
16              
17             =head3 Arguments in a call to a service
18              
19             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
20             Each attribute should be used as a named argument in the calls that expect this type of object.
21              
22             As an example, if Att1 is expected to be a Paws::OpsWorks::DeploymentCommand object:
23              
24             $service_obj->Method(Att1 => { Args => $value, ..., Name => $value });
25              
26             =head3 Results returned from an API call
27              
28             Use accessors for each attribute. If Att1 is expected to be an Paws::OpsWorks::DeploymentCommand object:
29              
30             $result = $service_obj->Method(...);
31             $result->Att1->Args
32              
33             =head1 DESCRIPTION
34              
35             Used to specify a stack or deployment command.
36              
37             =head1 ATTRIBUTES
38              
39              
40             =head2 Args => L<Paws::OpsWorks::DeploymentCommandArgs>
41              
42             The arguments of those commands that take arguments. It should be set
43             to a JSON object with the following format:
44              
45             C<{"arg_name1" : ["value1", "value2", ...], "arg_name2" : ["value1",
46             "value2", ...], ...}>
47              
48             The C<update_dependencies> command takes two arguments:
49              
50             =over
51              
52             =item *
53              
54             C<upgrade_os_to> - Specifies the desired Amazon Linux version for
55             instances whose OS you want to upgrade, such as C<Amazon Linux
56             2016.09>. You must also set the C<allow_reboot> argument to true.
57              
58             =item *
59              
60             C<allow_reboot> - Specifies whether to allow AWS OpsWorks Stacks to
61             reboot the instances if necessary, after installing the updates. This
62             argument can be set to either C<true> or C<false>. The default value is
63             C<false>.
64              
65             =back
66              
67             For example, to upgrade an instance to Amazon Linux 2016.09, set
68             C<Args> to the following.
69              
70             C<{ "upgrade_os_to":["Amazon Linux 2016.09"], "allow_reboot":["true"]
71             }>
72              
73              
74             =head2 B<REQUIRED> Name => Str
75              
76             Specifies the operation. You can specify only one command.
77              
78             For stacks, the following commands are available:
79              
80             =over
81              
82             =item *
83              
84             C<execute_recipes>: Execute one or more recipes. To specify the
85             recipes, set an C<Args> parameter named C<recipes> to the list of
86             recipes to be executed. For example, to execute C<phpapp::appsetup>,
87             set C<Args> to C<{"recipes":["phpapp::appsetup"]}>.
88              
89             =item *
90              
91             C<install_dependencies>: Install the stack's dependencies.
92              
93             =item *
94              
95             C<update_custom_cookbooks>: Update the stack's custom cookbooks.
96              
97             =item *
98              
99             C<update_dependencies>: Update the stack's dependencies.
100              
101             =back
102              
103             The update_dependencies and install_dependencies commands are supported
104             only for Linux instances. You can run the commands successfully on
105             Windows instances, but they do nothing.
106              
107             For apps, the following commands are available:
108              
109             =over
110              
111             =item *
112              
113             C<deploy>: Deploy an app. Ruby on Rails apps have an optional C<Args>
114             parameter named C<migrate>. Set C<Args> to {"migrate":["true"]} to
115             migrate the database. The default setting is {"migrate":["false"]}.
116              
117             =item *
118              
119             C<rollback> Roll the app back to the previous version. When you update
120             an app, AWS OpsWorks Stacks stores the previous version, up to a
121             maximum of five versions. You can use this command to roll an app back
122             as many as four versions.
123              
124             =item *
125              
126             C<start>: Start the app's web or application server.
127              
128             =item *
129              
130             C<stop>: Stop the app's web or application server.
131              
132             =item *
133              
134             C<restart>: Restart the app's web or application server.
135              
136             =item *
137              
138             C<undeploy>: Undeploy the app.
139              
140             =back
141              
142              
143              
144              
145             =head1 SEE ALSO
146              
147             This class forms part of L<Paws>, describing an object used in L<Paws::OpsWorks>
148              
149             =head1 BUGS and CONTRIBUTIONS
150              
151             The source code is located here: https://github.com/pplu/aws-sdk-perl
152              
153             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
154              
155             =cut
156