Skip to content

Commit c8b856f

Browse files
Update generated code (#1307)
update generated code
1 parent 66e0958 commit c8b856f

30 files changed

+301
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: This release allows you to override the alarm configurations when creating a deployment.
8+
59
## 1.3.0
610

711
### Added

src/CodeDeployClient.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use AsyncAws\CodeDeploy\Enum\FileExistsBehavior;
66
use AsyncAws\CodeDeploy\Enum\LifecycleEventStatus;
7+
use AsyncAws\CodeDeploy\Exception\AlarmsLimitExceededException;
78
use AsyncAws\CodeDeploy\Exception\ApplicationDoesNotExistException;
89
use AsyncAws\CodeDeploy\Exception\ApplicationNameRequiredException;
910
use AsyncAws\CodeDeploy\Exception\DeploymentConfigDoesNotExistException;
@@ -13,6 +14,7 @@
1314
use AsyncAws\CodeDeploy\Exception\DeploymentIdRequiredException;
1415
use AsyncAws\CodeDeploy\Exception\DeploymentLimitExceededException;
1516
use AsyncAws\CodeDeploy\Exception\DescriptionTooLongException;
17+
use AsyncAws\CodeDeploy\Exception\InvalidAlarmConfigException;
1618
use AsyncAws\CodeDeploy\Exception\InvalidApplicationNameException;
1719
use AsyncAws\CodeDeploy\Exception\InvalidAutoRollbackConfigException;
1820
use AsyncAws\CodeDeploy\Exception\InvalidAutoScalingGroupException;
@@ -41,6 +43,7 @@
4143
use AsyncAws\CodeDeploy\Result\CreateDeploymentOutput;
4244
use AsyncAws\CodeDeploy\Result\GetDeploymentOutput;
4345
use AsyncAws\CodeDeploy\Result\PutLifecycleEventHookExecutionStatusOutput;
46+
use AsyncAws\CodeDeploy\ValueObject\AlarmConfiguration;
4447
use AsyncAws\CodeDeploy\ValueObject\AutoRollbackConfiguration;
4548
use AsyncAws\CodeDeploy\ValueObject\RevisionLocation;
4649
use AsyncAws\CodeDeploy\ValueObject\TargetInstances;
@@ -69,6 +72,7 @@ class CodeDeployClient extends AbstractApi
6972
* autoRollbackConfiguration?: AutoRollbackConfiguration|array,
7073
* updateOutdatedInstancesOnly?: bool,
7174
* fileExistsBehavior?: FileExistsBehavior::*,
75+
* overrideAlarmConfiguration?: AlarmConfiguration|array,
7276
* @region?: string,
7377
* }|CreateDeploymentInput $input
7478
*
@@ -86,6 +90,8 @@ class CodeDeployClient extends AbstractApi
8690
* @throws DescriptionTooLongException
8791
* @throws DeploymentLimitExceededException
8892
* @throws InvalidTargetInstancesException
93+
* @throws InvalidAlarmConfigException
94+
* @throws AlarmsLimitExceededException
8995
* @throws InvalidAutoRollbackConfigException
9096
* @throws InvalidLoadBalancerInfoException
9197
* @throws InvalidFileExistsBehaviorException
@@ -115,6 +121,8 @@ public function createDeployment($input): CreateDeploymentOutput
115121
'DescriptionTooLongException' => DescriptionTooLongException::class,
116122
'DeploymentLimitExceededException' => DeploymentLimitExceededException::class,
117123
'InvalidTargetInstancesException' => InvalidTargetInstancesException::class,
124+
'InvalidAlarmConfigException' => InvalidAlarmConfigException::class,
125+
'AlarmsLimitExceededException' => AlarmsLimitExceededException::class,
118126
'InvalidAutoRollbackConfigException' => InvalidAutoRollbackConfigException::class,
119127
'InvalidLoadBalancerInfoException' => InvalidLoadBalancerInfoException::class,
120128
'InvalidFileExistsBehaviorException' => InvalidFileExistsBehaviorException::class,
@@ -159,11 +167,11 @@ public function getDeployment($input): GetDeploymentOutput
159167

160168
/**
161169
* Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses
162-
* the AWS Lambda or Amazon ECS compute platform. For AWS Lambda deployments, the available lifecycle hooks are
170+
* the Lambda or Amazon ECS compute platform. For Lambda deployments, the available lifecycle hooks are
163171
* `BeforeAllowTraffic` and `AfterAllowTraffic`. For Amazon ECS deployments, the available lifecycle hooks are
164172
* `BeforeInstall`, `AfterInstall`, `AfterAllowTestTraffic`, `BeforeAllowTraffic`, and `AfterAllowTraffic`. Lambda
165-
* validation functions return `Succeeded` or `Failed`. For more information, see AppSpec 'hooks' Section for an AWS
166-
* Lambda Deployment and AppSpec 'hooks' Section for an Amazon ECS Deployment.
173+
* validation functions return `Succeeded` or `Failed`. For more information, see AppSpec 'hooks' Section for an Lambda
174+
* Deployment and AppSpec 'hooks' Section for an Amazon ECS Deployment.
167175
*
168176
* @see https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda
169177
* @see https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs

src/Enum/DeploymentCreator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* - `user`: A user created the deployment.
99
* - `autoscaling`: Amazon EC2 Auto Scaling created the deployment.
1010
* - `codeDeployRollback`: A rollback process created the deployment.
11-
* - `CodeDeployAutoUpdate`: An auto-update process created the deployment when it detected outdated EC2 instances.
11+
* - `CodeDeployAutoUpdate`: An auto-update process created the deployment when it detected outdated Amazon EC2
12+
* instances.
1213
*/
1314
final class DeploymentCreator
1415
{

src/Enum/ErrorCode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace AsyncAws\CodeDeploy\Enum;
44

55
/**
6-
* For more information, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.
6+
* For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide.
77
* The error code:.
88
*
99
* - APPLICATION_MISSING: The application was missing. This error code is most likely raised if the application is
@@ -21,7 +21,7 @@
2121
* - NO_INSTANCES: No instances were specified, or no instances can be found.
2222
* - OVER_MAX_INSTANCES: The maximum number of instances was exceeded.
2323
* - THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more
24-
* AWS services.
24+
* Amazon Web Services services.
2525
* - TIMEOUT: The deployment has timed out.
2626
* - REVISION_MISSING: The revision ID was missing. This error code is most likely raised if the revision is deleted
2727
* after the deployment is created, but before it is started.

src/Enum/FileExistsBehavior.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace AsyncAws\CodeDeploy\Enum;
44

55
/**
6-
* Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't
7-
* part of the previous successful deployment.
6+
* Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of
7+
* the previous successful deployment.
88
* The `fileExistsBehavior` parameter takes any of the following values:.
99
*
1010
* - DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

src/Enum/LifecycleEventStatus.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace AsyncAws\CodeDeploy\Enum;
44

55
/**
6-
* The result of a Lambda function that validates a deployment lifecycle event. `Succeeded` and `Failed` are the only
7-
* valid values for `status`.
6+
* The result of a Lambda function that validates a deployment lifecycle event. The values listed in **Valid Values**
7+
* are valid for lifecycle statuses in general; however, only `Succeeded` and `Failed` can be passed successfully in
8+
* your API call.
89
*/
910
final class LifecycleEventStatus
1011
{

src/Enum/RevisionLocationType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*
88
* - S3: An application revision stored in Amazon S3.
99
* - GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
10-
* - String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
11-
* - AppSpecContent: An `AppSpecContent` object that contains the contents of an AppSpec file for an AWS Lambda or
12-
* Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
10+
* - String: A YAML-formatted or JSON-formatted string (Lambda deployments only).
11+
* - AppSpecContent: An `AppSpecContent` object that contains the contents of an AppSpec file for an Lambda or Amazon
12+
* ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
1313
*/
1414
final class RevisionLocationType
1515
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\CodeDeploy\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The maximum number of alarms for a deployment group (10) was exceeded.
9+
*/
10+
final class AlarmsLimitExceededException extends ClientException
11+
{
12+
}

src/Exception/ApplicationDoesNotExistException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The application does not exist with the IAM user or AWS account.
8+
* The application does not exist with the IAM user or Amazon Web Services account.
99
*/
1010
final class ApplicationDoesNotExistException extends ClientException
1111
{

src/Exception/DeploymentConfigDoesNotExistException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The deployment configuration does not exist with the IAM user or AWS account.
8+
* The deployment configuration does not exist with the IAM user or Amazon Web Services account.
99
*/
1010
final class DeploymentConfigDoesNotExistException extends ClientException
1111
{

src/Exception/DeploymentDoesNotExistException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The deployment with the IAM user or AWS account does not exist.
8+
* The deployment with the IAM user or Amazon Web Services account does not exist.
99
*/
1010
final class DeploymentDoesNotExistException extends ClientException
1111
{

src/Exception/DeploymentGroupDoesNotExistException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The named deployment group with the IAM user or AWS account does not exist.
8+
* The named deployment group with the IAM user or Amazon Web Services account does not exist.
99
*/
1010
final class DeploymentGroupDoesNotExistException extends ClientException
1111
{
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace AsyncAws\CodeDeploy\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The format of the alarm configuration is invalid. Possible causes include:.
9+
*
10+
* - The alarm list is null.
11+
* - The alarm object is null.
12+
* - The alarm name is empty or null or exceeds the limit of 255 characters.
13+
* - Two alarms with the same name have been specified.
14+
* - The alarm configuration is enabled, but the alarm list is empty.
15+
*/
16+
final class InvalidAlarmConfigException extends ClientException
17+
{
18+
}

src/Exception/InvalidFileExistsBehaviorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy handles files or directories that
8+
* An invalid fileExistsBehavior option was specified to determine how CodeDeploy handles files or directories that
99
* already exist in a deployment target location, but weren't part of the previous successful deployment. Valid values
1010
* include "DISALLOW," "OVERWRITE," and "RETAIN.".
1111
*/

src/Exception/InvalidIgnoreApplicationStopFailuresValueException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, `false` is expected. For
9-
* EC2/On-premises deployments, `true` or `false` is expected.
8+
* The IgnoreApplicationStopFailures value is invalid. For Lambda deployments, `false` is expected. For EC2/On-premises
9+
* deployments, `true` or `false` is expected.
1010
*/
1111
final class InvalidIgnoreApplicationStopFailuresValueException extends ClientException
1212
{

src/Exception/InvalidUpdateOutdatedInstancesOnlyValueException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The UpdateOutdatedInstancesOnly value is invalid. For AWS Lambda deployments, `false` is expected. For
9-
* EC2/On-premises deployments, `true` or `false` is expected.
8+
* The UpdateOutdatedInstancesOnly value is invalid. For Lambda deployments, `false` is expected. For EC2/On-premises
9+
* deployments, `true` or `false` is expected.
1010
*/
1111
final class InvalidUpdateOutdatedInstancesOnlyValueException extends ClientException
1212
{

src/Exception/RevisionDoesNotExistException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* The named revision does not exist with the IAM user or AWS account.
8+
* The named revision does not exist with the IAM user or Amazon Web Services account.
99
*/
1010
final class RevisionDoesNotExistException extends ClientException
1111
{

src/Input/CreateDeploymentInput.php

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace AsyncAws\CodeDeploy\Input;
44

55
use AsyncAws\CodeDeploy\Enum\FileExistsBehavior;
6+
use AsyncAws\CodeDeploy\ValueObject\Alarm;
7+
use AsyncAws\CodeDeploy\ValueObject\AlarmConfiguration;
68
use AsyncAws\CodeDeploy\ValueObject\AutoRollbackConfiguration;
79
use AsyncAws\CodeDeploy\ValueObject\RevisionLocation;
810
use AsyncAws\CodeDeploy\ValueObject\TargetInstances;
@@ -17,7 +19,7 @@
1719
final class CreateDeploymentInput extends Input
1820
{
1921
/**
20-
* The name of an AWS CodeDeploy application associated with the IAM user or AWS account.
22+
* The name of an CodeDeploy application associated with the IAM user or Amazon Web Services account.
2123
*
2224
* @required
2325
*
@@ -40,7 +42,7 @@ final class CreateDeploymentInput extends Input
4042
private $revision;
4143

4244
/**
43-
* The name of a deployment configuration associated with the IAM user or AWS account.
45+
* The name of a deployment configuration associated with the IAM user or Amazon Web Services account.
4446
*
4547
* @var string|null
4648
*/
@@ -87,13 +89,25 @@ final class CreateDeploymentInput extends Input
8789
private $updateOutdatedInstancesOnly;
8890

8991
/**
90-
* Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't
91-
* part of the previous successful deployment.
92+
* Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of
93+
* the previous successful deployment.
9294
*
9395
* @var FileExistsBehavior::*|null
9496
*/
9597
private $fileExistsBehavior;
9698

99+
/**
100+
* Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify
101+
* here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration
102+
* if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would
103+
* call `CreateDeployment` to create a new deployment that uses a previous application revision that is known to work,
104+
* and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment
105+
* proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.
106+
*
107+
* @var AlarmConfiguration|null
108+
*/
109+
private $overrideAlarmConfiguration;
110+
97111
/**
98112
* @param array{
99113
* applicationName?: string,
@@ -106,6 +120,7 @@ final class CreateDeploymentInput extends Input
106120
* autoRollbackConfiguration?: AutoRollbackConfiguration|array,
107121
* updateOutdatedInstancesOnly?: bool,
108122
* fileExistsBehavior?: FileExistsBehavior::*,
123+
* overrideAlarmConfiguration?: AlarmConfiguration|array,
109124
* @region?: string,
110125
* } $input
111126
*/
@@ -121,6 +136,7 @@ public function __construct(array $input = [])
121136
$this->autoRollbackConfiguration = isset($input['autoRollbackConfiguration']) ? AutoRollbackConfiguration::create($input['autoRollbackConfiguration']) : null;
122137
$this->updateOutdatedInstancesOnly = $input['updateOutdatedInstancesOnly'] ?? null;
123138
$this->fileExistsBehavior = $input['fileExistsBehavior'] ?? null;
139+
$this->overrideAlarmConfiguration = isset($input['overrideAlarmConfiguration']) ? AlarmConfiguration::create($input['overrideAlarmConfiguration']) : null;
124140
parent::__construct($input);
125141
}
126142

@@ -167,6 +183,11 @@ public function getIgnoreApplicationStopFailures(): ?bool
167183
return $this->ignoreApplicationStopFailures;
168184
}
169185

186+
public function getOverrideAlarmConfiguration(): ?AlarmConfiguration
187+
{
188+
return $this->overrideAlarmConfiguration;
189+
}
190+
170191
public function getRevision(): ?RevisionLocation
171192
{
172193
return $this->revision;
@@ -259,6 +280,13 @@ public function setIgnoreApplicationStopFailures(?bool $value): self
259280
return $this;
260281
}
261282

283+
public function setOverrideAlarmConfiguration(?AlarmConfiguration $value): self
284+
{
285+
$this->overrideAlarmConfiguration = $value;
286+
287+
return $this;
288+
}
289+
262290
public function setRevision(?RevisionLocation $value): self
263291
{
264292
$this->revision = $value;
@@ -317,6 +345,9 @@ private function requestBody(): array
317345
}
318346
$payload['fileExistsBehavior'] = $v;
319347
}
348+
if (null !== $v = $this->overrideAlarmConfiguration) {
349+
$payload['overrideAlarmConfiguration'] = $v->requestBody();
350+
}
320351

321352
return $payload;
322353
}

src/Input/GetDeploymentInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
final class GetDeploymentInput extends Input
1414
{
1515
/**
16-
* The unique ID of a deployment associated with the IAM user or AWS account.
16+
* The unique ID of a deployment associated with the IAM user or Amazon Web Services account.
1717
*
1818
* @required
1919
*

src/Input/PutLifecycleEventHookExecutionStatusInput.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ final class PutLifecycleEventHookExecutionStatusInput extends Input
2626
private $lifecycleEventHookExecutionId;
2727

2828
/**
29-
* The result of a Lambda function that validates a deployment lifecycle event. `Succeeded` and `Failed` are the only
30-
* valid values for `status`.
29+
* The result of a Lambda function that validates a deployment lifecycle event. The values listed in **Valid Values**
30+
* are valid for lifecycle statuses in general; however, only `Succeeded` and `Failed` can be passed successfully in
31+
* your API call.
3132
*
3233
* @var LifecycleEventStatus::*|null
3334
*/

0 commit comments

Comments
 (0)