22
33namespace AsyncAws \CodeDeploy \Input ;
44
5+ use AsyncAws \CodeDeploy \Enum \DeploymentMode ;
56use AsyncAws \CodeDeploy \Enum \FileExistsBehavior ;
67use AsyncAws \CodeDeploy \ValueObject \AlarmConfiguration ;
78use AsyncAws \CodeDeploy \ValueObject \AutoRollbackConfiguration ;
@@ -118,6 +119,15 @@ final class CreateDeploymentInput extends Input
118119 */
119120 private $ fileExistsBehavior ;
120121
122+ /**
123+ * The deployment mode to use for the deployment. When set to STANDARD (the default), the deployment runs the standard
124+ * set of deployment lifecycle events. When set to RESTART, an EC2/On-premises in-place deployment runs a shortened set
125+ * of lifecycle events to quickly restart the application on the target instances.
126+ *
127+ * @var DeploymentMode::*|null
128+ */
129+ private $ deploymentMode ;
130+
121131 /**
122132 * Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify
123133 * here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration
@@ -145,6 +155,7 @@ final class CreateDeploymentInput extends Input
145155 * autoRollbackConfiguration?: AutoRollbackConfiguration|array|null,
146156 * updateOutdatedInstancesOnly?: bool|null,
147157 * fileExistsBehavior?: FileExistsBehavior::*|null,
158+ * deploymentMode?: DeploymentMode::*|null,
148159 * overrideAlarmConfiguration?: AlarmConfiguration|array|null,
149160 * '@region'?: string|null,
150161 * } $input
@@ -161,6 +172,7 @@ public function __construct(array $input = [])
161172 $ this ->autoRollbackConfiguration = isset ($ input ['autoRollbackConfiguration ' ]) ? AutoRollbackConfiguration::create ($ input ['autoRollbackConfiguration ' ]) : null ;
162173 $ this ->updateOutdatedInstancesOnly = $ input ['updateOutdatedInstancesOnly ' ] ?? null ;
163174 $ this ->fileExistsBehavior = $ input ['fileExistsBehavior ' ] ?? null ;
175+ $ this ->deploymentMode = $ input ['deploymentMode ' ] ?? null ;
164176 $ this ->overrideAlarmConfiguration = isset ($ input ['overrideAlarmConfiguration ' ]) ? AlarmConfiguration::create ($ input ['overrideAlarmConfiguration ' ]) : null ;
165177 parent ::__construct ($ input );
166178 }
@@ -177,6 +189,7 @@ public function __construct(array $input = [])
177189 * autoRollbackConfiguration?: AutoRollbackConfiguration|array|null,
178190 * updateOutdatedInstancesOnly?: bool|null,
179191 * fileExistsBehavior?: FileExistsBehavior::*|null,
192+ * deploymentMode?: DeploymentMode::*|null,
180193 * overrideAlarmConfiguration?: AlarmConfiguration|array|null,
181194 * '@region'?: string|null,
182195 * }|CreateDeploymentInput $input
@@ -206,6 +219,14 @@ public function getDeploymentGroupName(): ?string
206219 return $ this ->deploymentGroupName ;
207220 }
208221
222+ /**
223+ * @return DeploymentMode::*|null
224+ */
225+ public function getDeploymentMode (): ?string
226+ {
227+ return $ this ->deploymentMode ;
228+ }
229+
209230 public function getDescription (): ?string
210231 {
211232 return $ this ->description ;
@@ -298,6 +319,16 @@ public function setDeploymentGroupName(?string $value): self
298319 return $ this ;
299320 }
300321
322+ /**
323+ * @param DeploymentMode::*|null $value
324+ */
325+ public function setDeploymentMode (?string $ value ): self
326+ {
327+ $ this ->deploymentMode = $ value ;
328+
329+ return $ this ;
330+ }
331+
301332 public function setDescription (?string $ value ): self
302333 {
303334 $ this ->description = $ value ;
@@ -388,6 +419,13 @@ private function requestBody(): array
388419 }
389420 $ payload ['fileExistsBehavior ' ] = $ v ;
390421 }
422+ if (null !== $ v = $ this ->deploymentMode ) {
423+ if (!DeploymentMode::exists ($ v )) {
424+ /** @psalm-suppress NoValue */
425+ throw new InvalidArgument (\sprintf ('Invalid parameter "deploymentMode" for "%s". The value "%s" is not a valid "DeploymentMode". ' , __CLASS__ , $ v ));
426+ }
427+ $ payload ['deploymentMode ' ] = $ v ;
428+ }
391429 if (null !== $ v = $ this ->overrideAlarmConfiguration ) {
392430 $ payload ['overrideAlarmConfiguration ' ] = $ v ->requestBody ();
393431 }
0 commit comments