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.363.0"
"${LATEST}": "3.363.1"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
1 change: 1 addition & 0 deletions src/Service/CloudWatchLogs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class CloudWatchLogsClient extends AbstractApi
* kmsKeyId?: string|null,
* tags?: array<string, string>|null,
* logGroupClass?: LogGroupClass::*|null,
* deletionProtectionEnabled?: bool|null,
* '@region'?: string|null,
* }|CreateLogGroupRequest $input
*
Expand Down
27 changes: 27 additions & 0 deletions src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>|null,
* logGroupClass?: LogGroupClass::*|null,
* deletionProtectionEnabled?: bool|null,
* '@region'?: string|null,
* } $input
*/
Expand All @@ -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);
}

Expand All @@ -90,6 +101,7 @@ public function __construct(array $input = [])
* kmsKeyId?: string|null,
* tags?: array<string, string>|null,
* logGroupClass?: LogGroupClass::*|null,
* deletionProtectionEnabled?: bool|null,
* '@region'?: string|null,
* }|CreateLogGroupRequest $input
*/
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -210,6 +234,9 @@ private function requestBody(): array
}
$payload['logGroupClass'] = $v;
}
if (null !== $v = $this->deletionProtectionEnabled) {
$payload['deletionProtectionEnabled'] = (bool) $v;
}

return $payload;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

Expand Down
16 changes: 16 additions & 0 deletions src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -133,6 +141,7 @@ final class LogGroup
* inheritedProperties?: array<InheritedProperty::*>|null,
* logGroupClass?: LogGroupClass::*|null,
* logGroupArn?: string|null,
* deletionProtectionEnabled?: bool|null,
* } $input
*/
public function __construct(array $input)
Expand All @@ -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;
}

/**
Expand All @@ -163,6 +173,7 @@ public function __construct(array $input)
* inheritedProperties?: array<InheritedProperty::*>|null,
* logGroupClass?: LogGroupClass::*|null,
* logGroupArn?: string|null,
* deletionProtectionEnabled?: bool|null,
* }|LogGroup $input
*/
public static function create($input): self
Expand All @@ -188,6 +199,11 @@ public function getDataProtectionStatus(): ?string
return $this->dataProtectionStatus;
}

public function getDeletionProtectionEnabled(): ?bool
{
return $this->deletionProtectionEnabled;
}

/**
* @return list<InheritedProperty::*>
*/
Expand Down