From 8a0e030e4d744c32fc45f0c1bf0941fcddab323a Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Tue, 25 Nov 2025 06:38:41 +0000 Subject: [PATCH] update generated code --- manifest.json | 2 +- src/Service/CloudWatchLogs/CHANGELOG.md | 1 + .../src/CloudWatchLogsClient.php | 1 + .../src/Input/CreateLogGroupRequest.php | 27 +++++++++++++++++++ .../src/Result/DescribeLogGroupsResponse.php | 1 + .../src/ValueObject/LogGroup.php | 16 +++++++++++ 6 files changed, 47 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index dddc886e4..44c551537 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.363.0" + "${LATEST}": "3.363.1" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/CloudWatchLogs/CHANGELOG.md b/src/Service/CloudWatchLogs/CHANGELOG.md index b037dd22a..f41428673 100644 --- a/src/Service/CloudWatchLogs/CHANGELOG.md +++ b/src/Service/CloudWatchLogs/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - AWS api-change: Added `us-isob-west-1` region +- AWS api-change: New CloudWatch Logs feature - LogGroup Deletion Protection, a capability that allows customers to safeguard their critical CloudWatch log groups from accidental or unintended deletion. ### Dependency bumped diff --git a/src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php b/src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php index 295cb43a4..839dea4b1 100644 --- a/src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php +++ b/src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php @@ -69,6 +69,7 @@ class CloudWatchLogsClient extends AbstractApi * kmsKeyId?: string|null, * tags?: array|null, * logGroupClass?: LogGroupClass::*|null, + * deletionProtectionEnabled?: bool|null, * '@region'?: string|null, * }|CreateLogGroupRequest $input * diff --git a/src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php b/src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php index 1bac2040c..3dc206b5f 100644 --- a/src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php +++ b/src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php @@ -66,12 +66,22 @@ final class CreateLogGroupRequest extends Input */ private $logGroupClass; + /** + * Use this parameter to enable deletion protection for the new log group. When enabled on a log group, deletion + * protection blocks all deletion operations until it is explicitly disabled. By default log groups are created without + * deletion protection enabled. + * + * @var bool|null + */ + private $deletionProtectionEnabled; + /** * @param array{ * logGroupName?: string, * kmsKeyId?: string|null, * tags?: array|null, * logGroupClass?: LogGroupClass::*|null, + * deletionProtectionEnabled?: bool|null, * '@region'?: string|null, * } $input */ @@ -81,6 +91,7 @@ public function __construct(array $input = []) $this->kmsKeyId = $input['kmsKeyId'] ?? null; $this->tags = $input['tags'] ?? null; $this->logGroupClass = $input['logGroupClass'] ?? null; + $this->deletionProtectionEnabled = $input['deletionProtectionEnabled'] ?? null; parent::__construct($input); } @@ -90,6 +101,7 @@ public function __construct(array $input = []) * kmsKeyId?: string|null, * tags?: array|null, * logGroupClass?: LogGroupClass::*|null, + * deletionProtectionEnabled?: bool|null, * '@region'?: string|null, * }|CreateLogGroupRequest $input */ @@ -98,6 +110,11 @@ public static function create($input): self return $input instanceof self ? $input : new self($input); } + public function getDeletionProtectionEnabled(): ?bool + { + return $this->deletionProtectionEnabled; + } + public function getKmsKeyId(): ?string { return $this->kmsKeyId; @@ -150,6 +167,13 @@ public function request(): Request return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body)); } + public function setDeletionProtectionEnabled(?bool $value): self + { + $this->deletionProtectionEnabled = $value; + + return $this; + } + public function setKmsKeyId(?string $value): self { $this->kmsKeyId = $value; @@ -210,6 +234,9 @@ private function requestBody(): array } $payload['logGroupClass'] = $v; } + if (null !== $v = $this->deletionProtectionEnabled) { + $payload['deletionProtectionEnabled'] = (bool) $v; + } return $payload; } diff --git a/src/Service/CloudWatchLogs/src/Result/DescribeLogGroupsResponse.php b/src/Service/CloudWatchLogs/src/Result/DescribeLogGroupsResponse.php index a5b4f7640..5c29ce62a 100644 --- a/src/Service/CloudWatchLogs/src/Result/DescribeLogGroupsResponse.php +++ b/src/Service/CloudWatchLogs/src/Result/DescribeLogGroupsResponse.php @@ -126,6 +126,7 @@ private function populateResultLogGroup(array $json): LogGroup 'inheritedProperties' => !isset($json['inheritedProperties']) ? null : $this->populateResultInheritedProperties($json['inheritedProperties']), 'logGroupClass' => isset($json['logGroupClass']) ? (string) $json['logGroupClass'] : null, 'logGroupArn' => isset($json['logGroupArn']) ? (string) $json['logGroupArn'] : null, + 'deletionProtectionEnabled' => isset($json['deletionProtectionEnabled']) ? filter_var($json['deletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null, ]); } diff --git a/src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php b/src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php index b895b18d3..1cd51d934 100644 --- a/src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php +++ b/src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php @@ -120,6 +120,14 @@ final class LogGroup */ private $logGroupArn; + /** + * Indicates whether deletion protection is enabled for this log group. When enabled, deletion protection blocks all + * deletion operations until it is explicitly disabled. + * + * @var bool|null + */ + private $deletionProtectionEnabled; + /** * @param array{ * logGroupName?: string|null, @@ -133,6 +141,7 @@ final class LogGroup * inheritedProperties?: array|null, * logGroupClass?: LogGroupClass::*|null, * logGroupArn?: string|null, + * deletionProtectionEnabled?: bool|null, * } $input */ public function __construct(array $input) @@ -148,6 +157,7 @@ public function __construct(array $input) $this->inheritedProperties = $input['inheritedProperties'] ?? null; $this->logGroupClass = $input['logGroupClass'] ?? null; $this->logGroupArn = $input['logGroupArn'] ?? null; + $this->deletionProtectionEnabled = $input['deletionProtectionEnabled'] ?? null; } /** @@ -163,6 +173,7 @@ public function __construct(array $input) * inheritedProperties?: array|null, * logGroupClass?: LogGroupClass::*|null, * logGroupArn?: string|null, + * deletionProtectionEnabled?: bool|null, * }|LogGroup $input */ public static function create($input): self @@ -188,6 +199,11 @@ public function getDataProtectionStatus(): ?string return $this->dataProtectionStatus; } + public function getDeletionProtectionEnabled(): ?bool + { + return $this->deletionProtectionEnabled; + } + /** * @return list */