diff --git a/manifest.json b/manifest.json index c454f5e9e..1dd85a7b1 100644 --- a/manifest.json +++ b/manifest.json @@ -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": { diff --git a/src/Service/CloudFormation/CHANGELOG.md b/src/Service/CloudFormation/CHANGELOG.md index 6d0739eca..1e80200fa 100644 --- a/src/Service/CloudFormation/CHANGELOG.md +++ b/src/Service/CloudFormation/CHANGELOG.md @@ -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 diff --git a/src/Service/CloudFormation/composer.json b/src/Service/CloudFormation/composer.json index 79fff2dad..0548b06a1 100644 --- a/src/Service/CloudFormation/composer.json +++ b/src/Service/CloudFormation/composer.json @@ -33,7 +33,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/src/Service/CloudFormation/src/Enum/DeploymentConfigMode.php b/src/Service/CloudFormation/src/Enum/DeploymentConfigMode.php new file mode 100644 index 000000000..6d580ddaf --- /dev/null +++ b/src/Service/CloudFormation/src/Enum/DeploymentConfigMode.php @@ -0,0 +1,21 @@ + true, + self::STANDARD => true, + ][$value]); + } +} diff --git a/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php b/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php index 1eb1aa081..57ffb7b5a 100644 --- a/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php +++ b/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php @@ -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; @@ -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[] */ @@ -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), diff --git a/src/Service/CloudFormation/src/ValueObject/DeploymentConfig.php b/src/Service/CloudFormation/src/ValueObject/DeploymentConfig.php new file mode 100644 index 000000000..d620326a0 --- /dev/null +++ b/src/Service/CloudFormation/src/ValueObject/DeploymentConfig.php @@ -0,0 +1,68 @@ +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; + } +} diff --git a/src/Service/CloudFormation/src/ValueObject/Stack.php b/src/Service/CloudFormation/src/ValueObject/Stack.php index dac4597a3..c79e4303d 100644 --- a/src/Service/CloudFormation/src/ValueObject/Stack.php +++ b/src/Service/CloudFormation/src/ValueObject/Stack.php @@ -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. * @@ -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|null, @@ -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; @@ -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|null, @@ -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; diff --git a/src/Service/CodeBuild/CHANGELOG.md b/src/Service/CodeBuild/CHANGELOG.md index 9adc232d1..d8565acc3 100644 --- a/src/Service/CodeBuild/CHANGELOG.md +++ b/src/Service/CodeBuild/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Adds support for host kernel selection for on-demand builds. + ## 2.12.1 ### Changed diff --git a/src/Service/CodeBuild/composer.json b/src/Service/CodeBuild/composer.json index 2681b1b4a..c6d3a777f 100644 --- a/src/Service/CodeBuild/composer.json +++ b/src/Service/CodeBuild/composer.json @@ -32,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.12-dev" + "dev-master": "2.13-dev" } } } diff --git a/src/Service/CodeBuild/src/CodeBuildClient.php b/src/Service/CodeBuild/src/CodeBuildClient.php index eaea6e183..85975d07b 100644 --- a/src/Service/CodeBuild/src/CodeBuildClient.php +++ b/src/Service/CodeBuild/src/CodeBuildClient.php @@ -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; @@ -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 * diff --git a/src/Service/CodeBuild/src/Enum/HostKernel.php b/src/Service/CodeBuild/src/Enum/HostKernel.php new file mode 100644 index 000000000..3bc833983 --- /dev/null +++ b/src/Service/CodeBuild/src/Enum/HostKernel.php @@ -0,0 +1,23 @@ + true, + self::LINUX_KERNEL_6 => true, + self::LINUX_KERNEL_LATEST => true, + ][$value]); + } +} diff --git a/src/Service/CodeBuild/src/Input/StartBuildInput.php b/src/Service/CodeBuild/src/Input/StartBuildInput.php index cb08e644e..b3d90855d 100644 --- a/src/Service/CodeBuild/src/Input/StartBuildInput.php +++ b/src/Service/CodeBuild/src/Input/StartBuildInput.php @@ -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; @@ -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, @@ -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 */ @@ -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); } @@ -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 */ @@ -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; @@ -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; @@ -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; } diff --git a/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php b/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php index 101a60d0d..70a7e7cb2 100644 --- a/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php +++ b/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php @@ -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; @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/Result/StartBuildOutput.php b/src/Service/CodeBuild/src/Result/StartBuildOutput.php index bc30c79d7..6a9a93ad2 100644 --- a/src/Service/CodeBuild/src/Result/StartBuildOutput.php +++ b/src/Service/CodeBuild/src/Result/StartBuildOutput.php @@ -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; @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/Result/StopBuildOutput.php b/src/Service/CodeBuild/src/Result/StopBuildOutput.php index a74b8732f..0a175b9b0 100644 --- a/src/Service/CodeBuild/src/Result/StopBuildOutput.php +++ b/src/Service/CodeBuild/src/Result/StopBuildOutput.php @@ -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; @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/ValueObject/DockerServer.php b/src/Service/CodeBuild/src/ValueObject/DockerServer.php index 9efbaf97b..bffbb6de3 100644 --- a/src/Service/CodeBuild/src/ValueObject/DockerServer.php +++ b/src/Service/CodeBuild/src/ValueObject/DockerServer.php @@ -36,6 +36,8 @@ final class DockerServer /** * A DockerServerStatus object to use for this docker server. * + * > Note that `status` is only an output and cannot be passed in as an input. + * * @var DockerServerStatus|null */ private $status; diff --git a/src/Service/CodeBuild/src/ValueObject/ProjectEnvironment.php b/src/Service/CodeBuild/src/ValueObject/ProjectEnvironment.php index 6123a0a6a..e2d454095 100644 --- a/src/Service/CodeBuild/src/ValueObject/ProjectEnvironment.php +++ b/src/Service/CodeBuild/src/ValueObject/ProjectEnvironment.php @@ -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\Core\Exception\InvalidArgument; @@ -181,6 +182,21 @@ final class ProjectEnvironment */ private $dockerServer; + /** + * The host operating system kernel used for on-demand builds in the build project. The host kernel does not affect the + * build environment operating system, which is determined by the image you specify. Valid values are: + * + * - `LINUX_KERNEL_4`: Runs on an Amazon Linux 2 host (kernel 4.x). + * - `LINUX_KERNEL_6`: Runs on an Amazon Linux 2023 host (kernel 6.x). + * - `LINUX_KERNEL_LATEST`: Runs on the latest supported host kernel. + * + * This setting applies to the `LINUX_CONTAINER`, `ARM_CONTAINER`, `LINUX_EC2`, and `ARM_EC2` environment types. It is + * not applicable to Windows, Lambda, or Mac environment types. + * + * @var HostKernel::*|null + */ + private $hostKernel; + /** * @param array{ * type: EnvironmentType::*, @@ -194,6 +210,7 @@ final class ProjectEnvironment * registryCredential?: RegistryCredential|array|null, * imagePullCredentialsType?: ImagePullCredentialsType::*|null, * dockerServer?: DockerServer|array|null, + * hostKernel?: HostKernel::*|null, * } $input */ public function __construct(array $input) @@ -209,6 +226,7 @@ public function __construct(array $input) $this->registryCredential = isset($input['registryCredential']) ? RegistryCredential::create($input['registryCredential']) : null; $this->imagePullCredentialsType = $input['imagePullCredentialsType'] ?? null; $this->dockerServer = isset($input['dockerServer']) ? DockerServer::create($input['dockerServer']) : null; + $this->hostKernel = $input['hostKernel'] ?? null; } /** @@ -224,6 +242,7 @@ public function __construct(array $input) * registryCredential?: RegistryCredential|array|null, * imagePullCredentialsType?: ImagePullCredentialsType::*|null, * dockerServer?: DockerServer|array|null, + * hostKernel?: HostKernel::*|null, * }|ProjectEnvironment $input */ public static function create($input): self @@ -267,6 +286,14 @@ public function getFleet(): ?ProjectFleet return $this->fleet; } + /** + * @return HostKernel::*|null + */ + public function getHostKernel(): ?string + { + return $this->hostKernel; + } + public function getImage(): string { return $this->image;