Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.401.2"
"${LATEST}": "3.401.3"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
4 changes: 4 additions & 0 deletions src/Service/CodeCommit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Changed

- AWS enhancement: Documentation updates.

## 1.3.2

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see
* Quotas [^1] in the *CodeCommit User Guide*.
* Quotas [^1] in the * CodeCommit User Guide*.
*
* [^1]: https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Service/CodeCommit/src/Input/CreateRepositoryInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class CreateRepositoryInput extends Input
*
* > The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to
* > 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information
* > about the limits on repository names, see Quotas [^1] in the *CodeCommit User Guide*. The suffix .git is
* > about the limits on repository names, see Quotas [^1] in the * CodeCommit User Guide*. The suffix .git is
* > prohibited.
*
* [^1]: https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html
Expand Down Expand Up @@ -50,7 +50,7 @@ final class CreateRepositoryInput extends Input
/**
* The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to
* programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see KeyId [^1] in the
* Decrypt API description in the *Key Management Service API Reference*.
* Decrypt API description in the * Key Management Service API Reference*.
*
* If no key is specified, the default `aws/codecommit` Amazon Web Services managed key is used.
*
Expand Down
7 changes: 4 additions & 3 deletions src/Service/CodeCommit/src/ValueObject/RepositoryTrigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ final class RepositoryTrigger

/**
* The repository events that cause the trigger to run actions in another service, such as sending a notification
* through Amazon SNS.
*
* > The valid value "all" cannot be used with any other values.
* through Amazon SNS. ```
* </p> <note> <p>The valid value "all" cannot be used with any other values.</p>
* </note>
* ```.
*
* @var list<RepositoryTriggerEventEnum::*>
*/
Expand Down
1 change: 1 addition & 0 deletions src/Service/CodeDeploy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- AWS api-change: AWS CodeDeploy now returns the deployment mode on GetDeployment and BatchGetDeployments. The new deploymentMode field on DeploymentInfo indicates whether a deployment used the standard deployment process or restarted the application using a previously installed revision (RESTART mode).
- AWS api-change: Adds support for suspending Amazon EC2 Auto Scaling processes during CodeDeploy EC2 in-place deployments. Use ec2DeploymentOptions to choose which processes are suspended and resumed.

## 2.5.0

Expand Down
5 changes: 5 additions & 0 deletions src/Service/CodeDeploy/src/CodeDeployClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use AsyncAws\CodeDeploy\Exception\InvalidApplicationNameException;
use AsyncAws\CodeDeploy\Exception\InvalidAutoRollbackConfigException;
use AsyncAws\CodeDeploy\Exception\InvalidAutoScalingGroupException;
use AsyncAws\CodeDeploy\Exception\InvalidAutoScalingGroupProcessToSuspendException;
use AsyncAws\CodeDeploy\Exception\InvalidComputePlatformException;
use AsyncAws\CodeDeploy\Exception\InvalidDeploymentConfigNameException;
use AsyncAws\CodeDeploy\Exception\InvalidDeploymentGroupNameException;
Expand Down Expand Up @@ -49,6 +50,7 @@
use AsyncAws\CodeDeploy\Result\PutLifecycleEventHookExecutionStatusOutput;
use AsyncAws\CodeDeploy\ValueObject\AlarmConfiguration;
use AsyncAws\CodeDeploy\ValueObject\AutoRollbackConfiguration;
use AsyncAws\CodeDeploy\ValueObject\EC2DeploymentOptions;
use AsyncAws\CodeDeploy\ValueObject\RevisionLocation;
use AsyncAws\CodeDeploy\ValueObject\TargetInstances;
use AsyncAws\Core\AbstractApi;
Expand Down Expand Up @@ -78,6 +80,7 @@ class CodeDeployClient extends AbstractApi
* fileExistsBehavior?: FileExistsBehavior::*|null,
* deploymentMode?: DeploymentMode::*|null,
* overrideAlarmConfiguration?: AlarmConfiguration|array|null,
* ec2DeploymentOptions?: EC2DeploymentOptions|array|null,
* '@region'?: string|null,
* }|CreateDeploymentInput $input
*
Expand All @@ -93,6 +96,7 @@ class CodeDeployClient extends AbstractApi
* @throws InvalidApplicationNameException
* @throws InvalidAutoRollbackConfigException
* @throws InvalidAutoScalingGroupException
* @throws InvalidAutoScalingGroupProcessToSuspendException
* @throws InvalidComputePlatformException
* @throws InvalidDeploymentConfigNameException
* @throws InvalidDeploymentGroupNameException
Expand Down Expand Up @@ -127,6 +131,7 @@ public function createDeployment($input): CreateDeploymentOutput
'InvalidApplicationNameException' => InvalidApplicationNameException::class,
'InvalidAutoRollbackConfigException' => InvalidAutoRollbackConfigException::class,
'InvalidAutoScalingGroupException' => InvalidAutoScalingGroupException::class,
'InvalidAutoScalingGroupProcessToSuspendException' => InvalidAutoScalingGroupProcessToSuspendException::class,
'InvalidComputePlatformException' => InvalidComputePlatformException::class,
'InvalidDeploymentConfigNameException' => InvalidDeploymentConfigNameException::class,
'InvalidDeploymentGroupNameException' => InvalidDeploymentGroupNameException::class,
Expand Down
29 changes: 29 additions & 0 deletions src/Service/CodeDeploy/src/Enum/AutoScalingGroupProcess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace AsyncAws\CodeDeploy\Enum;

/**
* An Amazon EC2 Auto Scaling process that CodeDeploy can suspend during an in-place deployment. Valid values are
* `Terminate`, `AZRebalance`, `InstanceRefresh`, and `ScheduledActions`.
*/
final class AutoScalingGroupProcess
{
public const AZREBALANCE = 'AZRebalance';
public const INSTANCE_REFRESH = 'InstanceRefresh';
public const SCHEDULED_ACTIONS = 'ScheduledActions';
public const TERMINATE = 'Terminate';
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';

/**
* @psalm-assert-if-true self::* $value
*/
public static function exists(string $value): bool
{
return isset([
self::AZREBALANCE => true,
self::INSTANCE_REFRESH => true,
self::SCHEDULED_ACTIONS => true,
self::TERMINATE => true,
][$value]);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace AsyncAws\CodeDeploy\Exception;

use AsyncAws\Core\Exception\Http\ClientException;

/**
* The `autoScalingGroupProcessesToSuspend` list in `ec2DeploymentOptions` contains a process that is not valid. Valid
* values are `Terminate`, `AZRebalance`, `InstanceRefresh`, and `ScheduledActions`. Process names are case sensitive.
*/
final class InvalidAutoScalingGroupProcessToSuspendException extends ClientException
{
}
24 changes: 24 additions & 0 deletions src/Service/CodeDeploy/src/Input/CreateDeploymentInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use AsyncAws\CodeDeploy\Enum\FileExistsBehavior;
use AsyncAws\CodeDeploy\ValueObject\AlarmConfiguration;
use AsyncAws\CodeDeploy\ValueObject\AutoRollbackConfiguration;
use AsyncAws\CodeDeploy\ValueObject\EC2DeploymentOptions;
use AsyncAws\CodeDeploy\ValueObject\RevisionLocation;
use AsyncAws\CodeDeploy\ValueObject\TargetInstances;
use AsyncAws\Core\Exception\InvalidArgument;
Expand Down Expand Up @@ -153,6 +154,11 @@ final class CreateDeploymentInput extends Input
*/
private $overrideAlarmConfiguration;

/**
* @var EC2DeploymentOptions|null
*/
private $ec2DeploymentOptions;

/**
* @param array{
* applicationName?: string,
Expand All @@ -167,6 +173,7 @@ final class CreateDeploymentInput extends Input
* fileExistsBehavior?: FileExistsBehavior::*|null,
* deploymentMode?: DeploymentMode::*|null,
* overrideAlarmConfiguration?: AlarmConfiguration|array|null,
* ec2DeploymentOptions?: EC2DeploymentOptions|array|null,
* '@region'?: string|null,
* } $input
*/
Expand All @@ -184,6 +191,7 @@ public function __construct(array $input = [])
$this->fileExistsBehavior = $input['fileExistsBehavior'] ?? null;
$this->deploymentMode = $input['deploymentMode'] ?? null;
$this->overrideAlarmConfiguration = isset($input['overrideAlarmConfiguration']) ? AlarmConfiguration::create($input['overrideAlarmConfiguration']) : null;
$this->ec2DeploymentOptions = isset($input['ec2DeploymentOptions']) ? EC2DeploymentOptions::create($input['ec2DeploymentOptions']) : null;
parent::__construct($input);
}

Expand All @@ -201,6 +209,7 @@ public function __construct(array $input = [])
* fileExistsBehavior?: FileExistsBehavior::*|null,
* deploymentMode?: DeploymentMode::*|null,
* overrideAlarmConfiguration?: AlarmConfiguration|array|null,
* ec2DeploymentOptions?: EC2DeploymentOptions|array|null,
* '@region'?: string|null,
* }|CreateDeploymentInput $input
*/
Expand Down Expand Up @@ -242,6 +251,11 @@ public function getDescription(): ?string
return $this->description;
}

public function getEc2DeploymentOptions(): ?EC2DeploymentOptions
{
return $this->ec2DeploymentOptions;
}

/**
* @return FileExistsBehavior::*|null
*/
Expand Down Expand Up @@ -346,6 +360,13 @@ public function setDescription(?string $value): self
return $this;
}

public function setEc2DeploymentOptions(?EC2DeploymentOptions $value): self
{
$this->ec2DeploymentOptions = $value;

return $this;
}

/**
* @param FileExistsBehavior::*|null $value
*/
Expand Down Expand Up @@ -439,6 +460,9 @@ private function requestBody(): array
if (null !== $v = $this->overrideAlarmConfiguration) {
$payload['overrideAlarmConfiguration'] = $v->requestBody();
}
if (null !== $v = $this->ec2DeploymentOptions) {
$payload['ec2DeploymentOptions'] = $v->requestBody();
}

return $payload;
}
Expand Down
29 changes: 29 additions & 0 deletions src/Service/CodeDeploy/src/Result/GetDeploymentOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace AsyncAws\CodeDeploy\Result;

use AsyncAws\CodeDeploy\Enum\AutoRollbackEvent;
use AsyncAws\CodeDeploy\Enum\AutoScalingGroupProcess;
use AsyncAws\CodeDeploy\Enum\BundleType;
use AsyncAws\CodeDeploy\Enum\ComputePlatform;
use AsyncAws\CodeDeploy\Enum\DeploymentCreator;
Expand All @@ -27,6 +28,7 @@
use AsyncAws\CodeDeploy\ValueObject\DeploymentOverview;
use AsyncAws\CodeDeploy\ValueObject\DeploymentReadyOption;
use AsyncAws\CodeDeploy\ValueObject\DeploymentStyle;
use AsyncAws\CodeDeploy\ValueObject\EC2DeploymentOptions;
use AsyncAws\CodeDeploy\ValueObject\EC2TagFilter;
use AsyncAws\CodeDeploy\ValueObject\EC2TagSet;
use AsyncAws\CodeDeploy\ValueObject\ELBInfo;
Expand Down Expand Up @@ -152,6 +154,25 @@ private function populateResultAutoScalingGroupNameList(array $json): array
return $items;
}

/**
* @return list<AutoScalingGroupProcess::*>
*/
private function populateResultAutoScalingGroupProcessesToSuspendList(array $json): array
{
$items = [];
foreach ($json as $item) {
$a = isset($item) ? (string) $item : null;
if (null !== $a) {
if (!AutoScalingGroupProcess::exists($a)) {
$a = AutoScalingGroupProcess::UNKNOWN_TO_SDK;
}
$items[] = $a;
}
}

return $items;
}

private function populateResultBlueGreenDeploymentConfiguration(array $json): BlueGreenDeploymentConfiguration
{
return new BlueGreenDeploymentConfiguration([
Expand Down Expand Up @@ -203,6 +224,7 @@ private function populateResultDeploymentInfo(array $json): DeploymentInfo
'externalId' => isset($json['externalId']) ? (string) $json['externalId'] : null,
'relatedDeployments' => empty($json['relatedDeployments']) ? null : $this->populateResultRelatedDeployments($json['relatedDeployments']),
'overrideAlarmConfiguration' => empty($json['overrideAlarmConfiguration']) ? null : $this->populateResultAlarmConfiguration($json['overrideAlarmConfiguration']),
'ec2DeploymentOptions' => empty($json['ec2DeploymentOptions']) ? null : $this->populateResultEC2DeploymentOptions($json['ec2DeploymentOptions']),
]);
}

Expand Down Expand Up @@ -266,6 +288,13 @@ private function populateResultDeploymentsList(array $json): array
return $items;
}

private function populateResultEC2DeploymentOptions(array $json): EC2DeploymentOptions
{
return new EC2DeploymentOptions([
'autoScalingGroupProcessesToSuspend' => !isset($json['autoScalingGroupProcessesToSuspend']) ? null : $this->populateResultAutoScalingGroupProcessesToSuspendList($json['autoScalingGroupProcessesToSuspend']),
]);
}

private function populateResultEC2TagFilter(array $json): EC2TagFilter
{
return new EC2TagFilter([
Expand Down
13 changes: 13 additions & 0 deletions src/Service/CodeDeploy/src/ValueObject/DeploymentInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ final class DeploymentInfo
*/
private $overrideAlarmConfiguration;

/**
* @var EC2DeploymentOptions|null
*/
private $ec2DeploymentOptions;

/**
* @param array{
* applicationName?: string|null,
Expand Down Expand Up @@ -302,6 +307,7 @@ final class DeploymentInfo
* externalId?: string|null,
* relatedDeployments?: RelatedDeployments|array|null,
* overrideAlarmConfiguration?: AlarmConfiguration|array|null,
* ec2DeploymentOptions?: EC2DeploymentOptions|array|null,
* } $input
*/
public function __construct(array $input)
Expand Down Expand Up @@ -337,6 +343,7 @@ public function __construct(array $input)
$this->externalId = $input['externalId'] ?? null;
$this->relatedDeployments = isset($input['relatedDeployments']) ? RelatedDeployments::create($input['relatedDeployments']) : null;
$this->overrideAlarmConfiguration = isset($input['overrideAlarmConfiguration']) ? AlarmConfiguration::create($input['overrideAlarmConfiguration']) : null;
$this->ec2DeploymentOptions = isset($input['ec2DeploymentOptions']) ? EC2DeploymentOptions::create($input['ec2DeploymentOptions']) : null;
}

/**
Expand Down Expand Up @@ -372,6 +379,7 @@ public function __construct(array $input)
* externalId?: string|null,
* relatedDeployments?: RelatedDeployments|array|null,
* overrideAlarmConfiguration?: AlarmConfiguration|array|null,
* ec2DeploymentOptions?: EC2DeploymentOptions|array|null,
* }|DeploymentInfo $input
*/
public static function create($input): self
Expand Down Expand Up @@ -471,6 +479,11 @@ public function getDescription(): ?string
return $this->description;
}

public function getEc2DeploymentOptions(): ?EC2DeploymentOptions
{
return $this->ec2DeploymentOptions;
}

public function getErrorInformation(): ?ErrorInformation
{
return $this->errorInformation;
Expand Down
Loading
Loading