Skip to content

Commit

Permalink
Update generated code (#1715)
Browse files Browse the repository at this point in the history
update generated code
  • Loading branch information
async-aws-bot committed May 23, 2024
1 parent 245c88b commit 08de3a6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: Added DeletionMode FORCE_DELETE_STACK for deleting a stack that is stuck in DELETE_FAILED state due to resource deletion failure.

## 1.6.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
}
}
17 changes: 17 additions & 0 deletions src/Enum/DeletionMode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace AsyncAws\CloudFormation\Enum;

final class DeletionMode
{
public const FORCE_DELETE_STACK = 'FORCE_DELETE_STACK';
public const STANDARD = 'STANDARD';

public static function exists(string $value): bool
{
return isset([
self::FORCE_DELETE_STACK => true,
self::STANDARD => true,
][$value]);
}
}
1 change: 1 addition & 0 deletions src/Result/DescribeStacksOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ private function populateResultStacks(\SimpleXMLElement $xml): array
'LastCheckTimestamp' => ($v = $item->DriftInformation->LastCheckTimestamp) ? new \DateTimeImmutable((string) $v) : null,
]),
'RetainExceptOnCreate' => ($v = $item->RetainExceptOnCreate) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null,
'DeletionMode' => ($v = $item->DeletionMode) ? (string) $v : null,
'DetailedStatus' => ($v = $item->DetailedStatus) ? (string) $v : null,
]);
}
Expand Down
22 changes: 22 additions & 0 deletions src/ValueObject/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace AsyncAws\CloudFormation\ValueObject;

use AsyncAws\CloudFormation\Enum\Capability;
use AsyncAws\CloudFormation\Enum\DeletionMode;
use AsyncAws\CloudFormation\Enum\DetailedStatus;
use AsyncAws\CloudFormation\Enum\StackStatus;
use AsyncAws\Core\Exception\InvalidArgument;
Expand Down Expand Up @@ -201,6 +202,16 @@ final class Stack
*/
private $retainExceptOnCreate;

/**
* Specifies the deletion mode for the stack. Possible values are:
*
* - `STANDARD` - Use the standard behavior. Specifying this value is the same as not specifying this parameter.
* - `FORCE_DELETE_STACK` - Delete the stack if it's stuck in a `DELETE_FAILED` state due to resource deletion failure.
*
* @var DeletionMode::*|null
*/
private $deletionMode;

/**
* The detailed status of the resource or stack. If `CONFIGURATION_COMPLETE` is present, the resource or resource
* configuration phase has completed and the stabilization of the resources is in progress. The stack sets
Expand Down Expand Up @@ -238,6 +249,7 @@ final class Stack
* RootId?: null|string,
* DriftInformation?: null|StackDriftInformation|array,
* RetainExceptOnCreate?: null|bool,
* DeletionMode?: null|DeletionMode::*,
* DetailedStatus?: null|DetailedStatus::*,
* } $input
*/
Expand Down Expand Up @@ -266,6 +278,7 @@ public function __construct(array $input)
$this->rootId = $input['RootId'] ?? null;
$this->driftInformation = isset($input['DriftInformation']) ? StackDriftInformation::create($input['DriftInformation']) : null;
$this->retainExceptOnCreate = $input['RetainExceptOnCreate'] ?? null;
$this->deletionMode = $input['DeletionMode'] ?? null;
$this->detailedStatus = $input['DetailedStatus'] ?? null;
}

Expand Down Expand Up @@ -294,6 +307,7 @@ public function __construct(array $input)
* RootId?: null|string,
* DriftInformation?: null|StackDriftInformation|array,
* RetainExceptOnCreate?: null|bool,
* DeletionMode?: null|DeletionMode::*,
* DetailedStatus?: null|DetailedStatus::*,
* }|Stack $input
*/
Expand All @@ -320,6 +334,14 @@ public function getCreationTime(): \DateTimeImmutable
return $this->creationTime;
}

/**
* @return DeletionMode::*|null
*/
public function getDeletionMode(): ?string
{
return $this->deletionMode;
}

public function getDeletionTime(): ?\DateTimeImmutable
{
return $this->deletionTime;
Expand Down

0 comments on commit 08de3a6

Please sign in to comment.