Skip to content

Commit 8f4f76d

Browse files
Update generated code (#1995)
update generated code
1 parent 5911b8f commit 8f4f76d

File tree

6 files changed

+47
-1
lines changed

6 files changed

+47
-1
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.363.0"
3+
"${LATEST}": "3.363.1"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/CloudWatchLogs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: Added `us-isob-west-1` region
8+
- 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.
89

910
### Dependency bumped
1011

src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class CloudWatchLogsClient extends AbstractApi
6969
* kmsKeyId?: string|null,
7070
* tags?: array<string, string>|null,
7171
* logGroupClass?: LogGroupClass::*|null,
72+
* deletionProtectionEnabled?: bool|null,
7273
* '@region'?: string|null,
7374
* }|CreateLogGroupRequest $input
7475
*

src/Service/CloudWatchLogs/src/Input/CreateLogGroupRequest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,22 @@ final class CreateLogGroupRequest extends Input
6666
*/
6767
private $logGroupClass;
6868

69+
/**
70+
* Use this parameter to enable deletion protection for the new log group. When enabled on a log group, deletion
71+
* protection blocks all deletion operations until it is explicitly disabled. By default log groups are created without
72+
* deletion protection enabled.
73+
*
74+
* @var bool|null
75+
*/
76+
private $deletionProtectionEnabled;
77+
6978
/**
7079
* @param array{
7180
* logGroupName?: string,
7281
* kmsKeyId?: string|null,
7382
* tags?: array<string, string>|null,
7483
* logGroupClass?: LogGroupClass::*|null,
84+
* deletionProtectionEnabled?: bool|null,
7585
* '@region'?: string|null,
7686
* } $input
7787
*/
@@ -81,6 +91,7 @@ public function __construct(array $input = [])
8191
$this->kmsKeyId = $input['kmsKeyId'] ?? null;
8292
$this->tags = $input['tags'] ?? null;
8393
$this->logGroupClass = $input['logGroupClass'] ?? null;
94+
$this->deletionProtectionEnabled = $input['deletionProtectionEnabled'] ?? null;
8495
parent::__construct($input);
8596
}
8697

@@ -90,6 +101,7 @@ public function __construct(array $input = [])
90101
* kmsKeyId?: string|null,
91102
* tags?: array<string, string>|null,
92103
* logGroupClass?: LogGroupClass::*|null,
104+
* deletionProtectionEnabled?: bool|null,
93105
* '@region'?: string|null,
94106
* }|CreateLogGroupRequest $input
95107
*/
@@ -98,6 +110,11 @@ public static function create($input): self
98110
return $input instanceof self ? $input : new self($input);
99111
}
100112

113+
public function getDeletionProtectionEnabled(): ?bool
114+
{
115+
return $this->deletionProtectionEnabled;
116+
}
117+
101118
public function getKmsKeyId(): ?string
102119
{
103120
return $this->kmsKeyId;
@@ -150,6 +167,13 @@ public function request(): Request
150167
return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body));
151168
}
152169

170+
public function setDeletionProtectionEnabled(?bool $value): self
171+
{
172+
$this->deletionProtectionEnabled = $value;
173+
174+
return $this;
175+
}
176+
153177
public function setKmsKeyId(?string $value): self
154178
{
155179
$this->kmsKeyId = $value;
@@ -210,6 +234,9 @@ private function requestBody(): array
210234
}
211235
$payload['logGroupClass'] = $v;
212236
}
237+
if (null !== $v = $this->deletionProtectionEnabled) {
238+
$payload['deletionProtectionEnabled'] = (bool) $v;
239+
}
213240

214241
return $payload;
215242
}

src/Service/CloudWatchLogs/src/Result/DescribeLogGroupsResponse.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ private function populateResultLogGroup(array $json): LogGroup
126126
'inheritedProperties' => !isset($json['inheritedProperties']) ? null : $this->populateResultInheritedProperties($json['inheritedProperties']),
127127
'logGroupClass' => isset($json['logGroupClass']) ? (string) $json['logGroupClass'] : null,
128128
'logGroupArn' => isset($json['logGroupArn']) ? (string) $json['logGroupArn'] : null,
129+
'deletionProtectionEnabled' => isset($json['deletionProtectionEnabled']) ? filter_var($json['deletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null,
129130
]);
130131
}
131132

src/Service/CloudWatchLogs/src/ValueObject/LogGroup.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ final class LogGroup
120120
*/
121121
private $logGroupArn;
122122

123+
/**
124+
* Indicates whether deletion protection is enabled for this log group. When enabled, deletion protection blocks all
125+
* deletion operations until it is explicitly disabled.
126+
*
127+
* @var bool|null
128+
*/
129+
private $deletionProtectionEnabled;
130+
123131
/**
124132
* @param array{
125133
* logGroupName?: string|null,
@@ -133,6 +141,7 @@ final class LogGroup
133141
* inheritedProperties?: array<InheritedProperty::*>|null,
134142
* logGroupClass?: LogGroupClass::*|null,
135143
* logGroupArn?: string|null,
144+
* deletionProtectionEnabled?: bool|null,
136145
* } $input
137146
*/
138147
public function __construct(array $input)
@@ -148,6 +157,7 @@ public function __construct(array $input)
148157
$this->inheritedProperties = $input['inheritedProperties'] ?? null;
149158
$this->logGroupClass = $input['logGroupClass'] ?? null;
150159
$this->logGroupArn = $input['logGroupArn'] ?? null;
160+
$this->deletionProtectionEnabled = $input['deletionProtectionEnabled'] ?? null;
151161
}
152162

153163
/**
@@ -163,6 +173,7 @@ public function __construct(array $input)
163173
* inheritedProperties?: array<InheritedProperty::*>|null,
164174
* logGroupClass?: LogGroupClass::*|null,
165175
* logGroupArn?: string|null,
176+
* deletionProtectionEnabled?: bool|null,
166177
* }|LogGroup $input
167178
*/
168179
public static function create($input): self
@@ -188,6 +199,11 @@ public function getDataProtectionStatus(): ?string
188199
return $this->dataProtectionStatus;
189200
}
190201

202+
public function getDeletionProtectionEnabled(): ?bool
203+
{
204+
return $this->deletionProtectionEnabled;
205+
}
206+
191207
/**
192208
* @return list<InheritedProperty::*>
193209
*/

0 commit comments

Comments
 (0)