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.386.2"
"${LATEST}": "3.387.0"
},
"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/CloudFormation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: AWS CloudFormation adds a DeploymentConfig parameter to enable Express mode, which completes stack operations as soon as resource configuration is applied. Also adds a DisableValidation parameter to skip pre-deployment validation, which now runs automatically on CreateStack and UpdateStak.

## 2.1.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CloudFormation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "2.2-dev"
}
}
}
21 changes: 21 additions & 0 deletions src/Service/CloudFormation/src/Enum/DeploymentConfigMode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace AsyncAws\CloudFormation\Enum;

final class DeploymentConfigMode
{
public const EXPRESS = 'EXPRESS';
public const STANDARD = 'STANDARD';
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';

/**
* @psalm-assert-if-true self::* $value
*/
public static function exists(string $value): bool
{
return isset([
self::EXPRESS => true,
self::STANDARD => true,
][$value]);
}
}
11 changes: 11 additions & 0 deletions src/Service/CloudFormation/src/Result/DescribeStacksOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
use AsyncAws\CloudFormation\CloudFormationClient;
use AsyncAws\CloudFormation\Enum\Capability;
use AsyncAws\CloudFormation\Enum\DeletionMode;
use AsyncAws\CloudFormation\Enum\DeploymentConfigMode;
use AsyncAws\CloudFormation\Enum\DetailedStatus;
use AsyncAws\CloudFormation\Enum\OperationType;
use AsyncAws\CloudFormation\Enum\StackDriftStatus;
use AsyncAws\CloudFormation\Enum\StackStatus;
use AsyncAws\CloudFormation\Input\DescribeStacksInput;
use AsyncAws\CloudFormation\ValueObject\DeploymentConfig;
use AsyncAws\CloudFormation\ValueObject\OperationEntry;
use AsyncAws\CloudFormation\ValueObject\Output;
use AsyncAws\CloudFormation\ValueObject\Parameter;
Expand Down Expand Up @@ -131,6 +133,14 @@ private function populateResultCapabilities(\SimpleXMLElement $xml): array
return $items;
}

private function populateResultDeploymentConfig(\SimpleXMLElement $xml): DeploymentConfig
{
return new DeploymentConfig([
'Mode' => (null !== $v = $xml->Mode[0]) ? (!DeploymentConfigMode::exists((string) $xml->Mode) ? DeploymentConfigMode::UNKNOWN_TO_SDK : (string) $xml->Mode) : null,
'DisableRollback' => (null !== $v = $xml->DisableRollback[0]) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null,
]);
}

/**
* @return OperationEntry[]
*/
Expand Down Expand Up @@ -255,6 +265,7 @@ private function populateResultStack(\SimpleXMLElement $xml): Stack
'StackStatus' => !StackStatus::exists((string) $xml->StackStatus) ? StackStatus::UNKNOWN_TO_SDK : (string) $xml->StackStatus,
'StackStatusReason' => (null !== $v = $xml->StackStatusReason[0]) ? (string) $v : null,
'DisableRollback' => (null !== $v = $xml->DisableRollback[0]) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null,
'DeploymentConfig' => 0 === $xml->DeploymentConfig->count() ? null : $this->populateResultDeploymentConfig($xml->DeploymentConfig),
'NotificationARNs' => (0 === ($v = $xml->NotificationARNs)->count()) ? null : $this->populateResultNotificationARNs($v),
'TimeoutInMinutes' => (null !== $v = $xml->TimeoutInMinutes[0]) ? (int) (string) $v : null,
'Capabilities' => (0 === ($v = $xml->Capabilities)->count()) ? null : $this->populateResultCapabilities($v),
Expand Down
68 changes: 68 additions & 0 deletions src/Service/CloudFormation/src/ValueObject/DeploymentConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

namespace AsyncAws\CloudFormation\ValueObject;

use AsyncAws\CloudFormation\Enum\DeploymentConfigMode;

/**
* The deployment configuration for a stack operation, including the deployment mode.
*/
final class DeploymentConfig
{
/**
* Specifies the deployment mode for the stack operation. Possible values are:
*
* - `STANDARD` - Use the standard deployment behavior, ensuring resources are ready to serve traffic before completing
* the operation. This is the default. You do not need to specify this value explicitly.
* - `EXPRESS` - Complete the stack operation when resource configuration is applied, without waiting for resources to
* become ready to serve traffic. Resources continue becoming ready in the background.
*
* @var DeploymentConfigMode::*|null
*/
private $mode;

/**
* Specifies whether to disable rollback of the stack if the stack operation fails.
*
* Default: `false`
*
* @var bool|null
*/
private $disableRollback;

/**
* @param array{
* Mode?: DeploymentConfigMode::*|null,
* DisableRollback?: bool|null,
* } $input
*/
public function __construct(array $input)
{
$this->mode = $input['Mode'] ?? null;
$this->disableRollback = $input['DisableRollback'] ?? null;
}

/**
* @param array{
* Mode?: DeploymentConfigMode::*|null,
* DisableRollback?: bool|null,
* }|DeploymentConfig $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
}

public function getDisableRollback(): ?bool
{
return $this->disableRollback;
}

/**
* @return DeploymentConfigMode::*|null
*/
public function getMode(): ?string
{
return $this->mode;
}
}
15 changes: 15 additions & 0 deletions src/Service/CloudFormation/src/ValueObject/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ final class Stack
*/
private $disableRollback;

/**
* The deployment configuration for the stack, including the deployment mode used for stack operations.
*
* @var DeploymentConfig|null
*/
private $deploymentConfig;

/**
* Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.
*
Expand Down Expand Up @@ -245,6 +252,7 @@ final class Stack
* StackStatus: StackStatus::*,
* StackStatusReason?: string|null,
* DisableRollback?: bool|null,
* DeploymentConfig?: DeploymentConfig|array|null,
* NotificationARNs?: string[]|null,
* TimeoutInMinutes?: int|null,
* Capabilities?: array<Capability::*>|null,
Expand Down Expand Up @@ -275,6 +283,7 @@ public function __construct(array $input)
$this->stackStatus = $input['StackStatus'] ?? $this->throwException(new InvalidArgument('Missing required field "StackStatus".'));
$this->stackStatusReason = $input['StackStatusReason'] ?? null;
$this->disableRollback = $input['DisableRollback'] ?? null;
$this->deploymentConfig = isset($input['DeploymentConfig']) ? DeploymentConfig::create($input['DeploymentConfig']) : null;
$this->notificationArns = $input['NotificationARNs'] ?? null;
$this->timeoutInMinutes = $input['TimeoutInMinutes'] ?? null;
$this->capabilities = $input['Capabilities'] ?? null;
Expand Down Expand Up @@ -305,6 +314,7 @@ public function __construct(array $input)
* StackStatus: StackStatus::*,
* StackStatusReason?: string|null,
* DisableRollback?: bool|null,
* DeploymentConfig?: DeploymentConfig|array|null,
* NotificationARNs?: string[]|null,
* TimeoutInMinutes?: int|null,
* Capabilities?: array<Capability::*>|null,
Expand Down Expand Up @@ -357,6 +367,11 @@ public function getDeletionTime(): ?\DateTimeImmutable
return $this->deletionTime;
}

public function getDeploymentConfig(): ?DeploymentConfig
{
return $this->deploymentConfig;
}

public function getDescription(): ?string
{
return $this->description;
Expand Down
4 changes: 4 additions & 0 deletions src/Service/CodeBuild/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: Adds support for host kernel selection for on-demand builds.

## 2.12.1

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CodeBuild/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.12-dev"
"dev-master": "2.13-dev"
}
}
}
2 changes: 2 additions & 0 deletions src/Service/CodeBuild/src/CodeBuildClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use AsyncAws\CodeBuild\Enum\ComputeType;
use AsyncAws\CodeBuild\Enum\EnvironmentType;
use AsyncAws\CodeBuild\Enum\HostKernel;
use AsyncAws\CodeBuild\Enum\ImagePullCredentialsType;
use AsyncAws\CodeBuild\Enum\SourceType;
use AsyncAws\CodeBuild\Exception\AccountLimitExceededException;
Expand Down Expand Up @@ -102,6 +103,7 @@ public function batchGetBuilds($input): BatchGetBuildsOutput
* debugSessionEnabled?: bool|null,
* fleetOverride?: ProjectFleet|array|null,
* autoRetryLimitOverride?: int|null,
* hostKernelOverride?: HostKernel::*|null,
* '@region'?: string|null,
* }|StartBuildInput $input
*
Expand Down
23 changes: 23 additions & 0 deletions src/Service/CodeBuild/src/Enum/HostKernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace AsyncAws\CodeBuild\Enum;

final class HostKernel
{
public const LINUX_KERNEL_4 = 'LINUX_KERNEL_4';
public const LINUX_KERNEL_6 = 'LINUX_KERNEL_6';
public const LINUX_KERNEL_LATEST = 'LINUX_KERNEL_LATEST';
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';

/**
* @psalm-assert-if-true self::* $value
*/
public static function exists(string $value): bool
{
return isset([
self::LINUX_KERNEL_4 => true,
self::LINUX_KERNEL_6 => true,
self::LINUX_KERNEL_LATEST => true,
][$value]);
}
}
36 changes: 36 additions & 0 deletions src/Service/CodeBuild/src/Input/StartBuildInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use AsyncAws\CodeBuild\Enum\ComputeType;
use AsyncAws\CodeBuild\Enum\EnvironmentType;
use AsyncAws\CodeBuild\Enum\HostKernel;
use AsyncAws\CodeBuild\Enum\ImagePullCredentialsType;
use AsyncAws\CodeBuild\Enum\SourceType;
use AsyncAws\CodeBuild\ValueObject\BuildStatusConfig;
Expand Down Expand Up @@ -346,6 +347,13 @@ final class StartBuildInput extends Input
*/
private $autoRetryLimitOverride;

/**
* The host operating system kernel for this build that overrides the one specified in the build project.
*
* @var HostKernel::*|null
*/
private $hostKernelOverride;

/**
* @param array{
* projectName?: string,
Expand Down Expand Up @@ -381,6 +389,7 @@ final class StartBuildInput extends Input
* debugSessionEnabled?: bool|null,
* fleetOverride?: ProjectFleet|array|null,
* autoRetryLimitOverride?: int|null,
* hostKernelOverride?: HostKernel::*|null,
* '@region'?: string|null,
* } $input
*/
Expand Down Expand Up @@ -419,6 +428,7 @@ public function __construct(array $input = [])
$this->debugSessionEnabled = $input['debugSessionEnabled'] ?? null;
$this->fleetOverride = isset($input['fleetOverride']) ? ProjectFleet::create($input['fleetOverride']) : null;
$this->autoRetryLimitOverride = $input['autoRetryLimitOverride'] ?? null;
$this->hostKernelOverride = $input['hostKernelOverride'] ?? null;
parent::__construct($input);
}

Expand Down Expand Up @@ -457,6 +467,7 @@ public function __construct(array $input = [])
* debugSessionEnabled?: bool|null,
* fleetOverride?: ProjectFleet|array|null,
* autoRetryLimitOverride?: int|null,
* hostKernelOverride?: HostKernel::*|null,
* '@region'?: string|null,
* }|StartBuildInput $input
*/
Expand Down Expand Up @@ -544,6 +555,14 @@ public function getGitSubmodulesConfigOverride(): ?GitSubmodulesConfig
return $this->gitSubmodulesConfigOverride;
}

/**
* @return HostKernel::*|null
*/
public function getHostKernelOverride(): ?string
{
return $this->hostKernelOverride;
}

public function getIdempotencyToken(): ?string
{
return $this->idempotencyToken;
Expand Down Expand Up @@ -787,6 +806,16 @@ public function setGitSubmodulesConfigOverride(?GitSubmodulesConfig $value): sel
return $this;
}

/**
* @param HostKernel::*|null $value
*/
public function setHostKernelOverride(?string $value): self
{
$this->hostKernelOverride = $value;

return $this;
}

public function setIdempotencyToken(?string $value): self
{
$this->idempotencyToken = $value;
Expand Down Expand Up @@ -1074,6 +1103,13 @@ private function requestBody(): array
if (null !== $v = $this->autoRetryLimitOverride) {
$payload['autoRetryLimitOverride'] = $v;
}
if (null !== $v = $this->hostKernelOverride) {
if (!HostKernel::exists($v)) {
/** @psalm-suppress NoValue */
throw new InvalidArgument(\sprintf('Invalid parameter "hostKernelOverride" for "%s". The value "%s" is not a valid "HostKernel".', __CLASS__, $v));
}
$payload['hostKernelOverride'] = $v;
}

return $payload;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use AsyncAws\CodeBuild\Enum\EnvironmentType;
use AsyncAws\CodeBuild\Enum\EnvironmentVariableType;
use AsyncAws\CodeBuild\Enum\FileSystemType;
use AsyncAws\CodeBuild\Enum\HostKernel;
use AsyncAws\CodeBuild\Enum\ImagePullCredentialsType;
use AsyncAws\CodeBuild\Enum\LogsConfigStatusType;
use AsyncAws\CodeBuild\Enum\MachineType;
Expand Down Expand Up @@ -424,6 +425,7 @@ private function populateResultProjectEnvironment(array $json): ProjectEnvironme
'registryCredential' => empty($json['registryCredential']) ? null : $this->populateResultRegistryCredential($json['registryCredential']),
'imagePullCredentialsType' => isset($json['imagePullCredentialsType']) ? (!ImagePullCredentialsType::exists((string) $json['imagePullCredentialsType']) ? ImagePullCredentialsType::UNKNOWN_TO_SDK : (string) $json['imagePullCredentialsType']) : null,
'dockerServer' => empty($json['dockerServer']) ? null : $this->populateResultDockerServer($json['dockerServer']),
'hostKernel' => isset($json['hostKernel']) ? (!HostKernel::exists((string) $json['hostKernel']) ? HostKernel::UNKNOWN_TO_SDK : (string) $json['hostKernel']) : null,
]);
}

Expand Down
2 changes: 2 additions & 0 deletions src/Service/CodeBuild/src/Result/StartBuildOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use AsyncAws\CodeBuild\Enum\EnvironmentType;
use AsyncAws\CodeBuild\Enum\EnvironmentVariableType;
use AsyncAws\CodeBuild\Enum\FileSystemType;
use AsyncAws\CodeBuild\Enum\HostKernel;
use AsyncAws\CodeBuild\Enum\ImagePullCredentialsType;
use AsyncAws\CodeBuild\Enum\LogsConfigStatusType;
use AsyncAws\CodeBuild\Enum\MachineType;
Expand Down Expand Up @@ -374,6 +375,7 @@ private function populateResultProjectEnvironment(array $json): ProjectEnvironme
'registryCredential' => empty($json['registryCredential']) ? null : $this->populateResultRegistryCredential($json['registryCredential']),
'imagePullCredentialsType' => isset($json['imagePullCredentialsType']) ? (!ImagePullCredentialsType::exists((string) $json['imagePullCredentialsType']) ? ImagePullCredentialsType::UNKNOWN_TO_SDK : (string) $json['imagePullCredentialsType']) : null,
'dockerServer' => empty($json['dockerServer']) ? null : $this->populateResultDockerServer($json['dockerServer']),
'hostKernel' => isset($json['hostKernel']) ? (!HostKernel::exists((string) $json['hostKernel']) ? HostKernel::UNKNOWN_TO_SDK : (string) $json['hostKernel']) : null,
]);
}

Expand Down
Loading
Loading