From c5d7a5ef3adcd1f980ff9c3ee1ba4eb82e8b3ef7 Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Sat, 22 Nov 2025 06:32:29 +0000 Subject: [PATCH] update generated code --- manifest.json | 2 +- src/Service/Athena/CHANGELOG.md | 4 + src/Service/Athena/src/AthenaClient.php | 7 + .../src/Input/StartQueryExecutionInput.php | 24 ++++ .../Athena/src/Input/StartSessionRequest.php | 115 +++++++++++++++ .../src/Result/GetQueryExecutionOutput.php | 1 + .../Athena/src/Result/GetSessionResponse.php | 108 +++++++++++++- .../Athena/src/Result/GetWorkGroupOutput.php | 119 ++++++++++++++++ .../Athena/src/ValueObject/Classification.php | 82 +++++++++++ .../CloudWatchLoggingConfiguration.php | 132 ++++++++++++++++++ .../src/ValueObject/EngineConfiguration.php | 51 ++++--- .../ManagedLoggingConfiguration.php | 81 +++++++++++ .../ValueObject/MonitoringConfiguration.php | 91 ++++++++++++ .../Athena/src/ValueObject/QueryExecution.php | 2 +- .../ValueObject/QueryExecutionStatistics.php | 15 ++ .../src/ValueObject/QueryExecutionStatus.php | 4 +- .../ValueObject/S3LoggingConfiguration.php | 99 +++++++++++++ .../src/ValueObject/SessionConfiguration.php | 15 ++ src/Service/Athena/src/ValueObject/Tag.php | 83 +++++++++++ .../ValueObject/WorkGroupConfiguration.php | 32 ++++- .../Kms/src/ValueObject/KeyMetadata.php | 8 +- 21 files changed, 1048 insertions(+), 27 deletions(-) create mode 100644 src/Service/Athena/src/ValueObject/Classification.php create mode 100644 src/Service/Athena/src/ValueObject/CloudWatchLoggingConfiguration.php create mode 100644 src/Service/Athena/src/ValueObject/ManagedLoggingConfiguration.php create mode 100644 src/Service/Athena/src/ValueObject/MonitoringConfiguration.php create mode 100644 src/Service/Athena/src/ValueObject/S3LoggingConfiguration.php create mode 100644 src/Service/Athena/src/ValueObject/Tag.php diff --git a/manifest.json b/manifest.json index 4722bd0b6..dddc886e4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.362.1" + "${LATEST}": "3.363.0" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/Athena/CHANGELOG.md b/src/Service/Athena/CHANGELOG.md index 5b49a2a55..2c472b00c 100644 --- a/src/Service/Athena/CHANGELOG.md +++ b/src/Service/Athena/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Introduces Spark workgroup features including log persistence, S3/CloudWatch delivery, UI and History Server APIs, and SparkConnect 3.5.6 support. Adds DPU usage limits at workgroup and query levels as well as DPU usage tracking for Capacity Reservation queries to optimize performance and costs. + ### Dependency bumped - Drop support for PHP versions lower than 8.2 diff --git a/src/Service/Athena/src/AthenaClient.php b/src/Service/Athena/src/AthenaClient.php index 0962f5a01..b51e8f66e 100644 --- a/src/Service/Athena/src/AthenaClient.php +++ b/src/Service/Athena/src/AthenaClient.php @@ -53,9 +53,11 @@ use AsyncAws\Athena\Result\TerminateSessionResponse; use AsyncAws\Athena\ValueObject\CalculationConfiguration; use AsyncAws\Athena\ValueObject\EngineConfiguration; +use AsyncAws\Athena\ValueObject\MonitoringConfiguration; use AsyncAws\Athena\ValueObject\QueryExecutionContext; use AsyncAws\Athena\ValueObject\ResultConfiguration; use AsyncAws\Athena\ValueObject\ResultReuseConfiguration; +use AsyncAws\Athena\ValueObject\Tag; use AsyncAws\Core\AbstractApi; use AsyncAws\Core\AwsError\AwsErrorFactoryInterface; use AsyncAws\Core\AwsError\JsonRpcAwsErrorFactory; @@ -551,6 +553,7 @@ public function startCalculationExecution($input): StartCalculationExecutionResp * WorkGroup?: string|null, * ExecutionParameters?: string[]|null, * ResultReuseConfiguration?: ResultReuseConfiguration|array|null, + * EngineConfiguration?: EngineConfiguration|array|null, * '@region'?: string|null, * }|StartQueryExecutionInput $input * @@ -580,9 +583,13 @@ public function startQueryExecution($input): StartQueryExecutionOutput * Description?: string|null, * WorkGroup: string, * EngineConfiguration: EngineConfiguration|array, + * ExecutionRole?: string|null, + * MonitoringConfiguration?: MonitoringConfiguration|array|null, * NotebookVersion?: string|null, * SessionIdleTimeoutInMinutes?: int|null, * ClientRequestToken?: string|null, + * Tags?: array|null, + * CopyWorkGroupTags?: bool|null, * '@region'?: string|null, * }|StartSessionRequest $input * diff --git a/src/Service/Athena/src/Input/StartQueryExecutionInput.php b/src/Service/Athena/src/Input/StartQueryExecutionInput.php index 10a033445..5a859d329 100644 --- a/src/Service/Athena/src/Input/StartQueryExecutionInput.php +++ b/src/Service/Athena/src/Input/StartQueryExecutionInput.php @@ -2,6 +2,7 @@ namespace AsyncAws\Athena\Input; +use AsyncAws\Athena\ValueObject\EngineConfiguration; use AsyncAws\Athena\ValueObject\QueryExecutionContext; use AsyncAws\Athena\ValueObject\ResultConfiguration; use AsyncAws\Athena\ValueObject\ResultReuseConfiguration; @@ -75,6 +76,11 @@ final class StartQueryExecutionInput extends Input */ private $resultReuseConfiguration; + /** + * @var EngineConfiguration|null + */ + private $engineConfiguration; + /** * @param array{ * QueryString?: string, @@ -84,6 +90,7 @@ final class StartQueryExecutionInput extends Input * WorkGroup?: string|null, * ExecutionParameters?: string[]|null, * ResultReuseConfiguration?: ResultReuseConfiguration|array|null, + * EngineConfiguration?: EngineConfiguration|array|null, * '@region'?: string|null, * } $input */ @@ -96,6 +103,7 @@ public function __construct(array $input = []) $this->workGroup = $input['WorkGroup'] ?? null; $this->executionParameters = $input['ExecutionParameters'] ?? null; $this->resultReuseConfiguration = isset($input['ResultReuseConfiguration']) ? ResultReuseConfiguration::create($input['ResultReuseConfiguration']) : null; + $this->engineConfiguration = isset($input['EngineConfiguration']) ? EngineConfiguration::create($input['EngineConfiguration']) : null; parent::__construct($input); } @@ -108,6 +116,7 @@ public function __construct(array $input = []) * WorkGroup?: string|null, * ExecutionParameters?: string[]|null, * ResultReuseConfiguration?: ResultReuseConfiguration|array|null, + * EngineConfiguration?: EngineConfiguration|array|null, * '@region'?: string|null, * }|StartQueryExecutionInput $input */ @@ -121,6 +130,11 @@ public function getClientRequestToken(): ?string return $this->clientRequestToken; } + public function getEngineConfiguration(): ?EngineConfiguration + { + return $this->engineConfiguration; + } + /** * @return string[] */ @@ -187,6 +201,13 @@ public function setClientRequestToken(?string $value): self return $this; } + public function setEngineConfiguration(?EngineConfiguration $value): self + { + $this->engineConfiguration = $value; + + return $this; + } + /** * @param string[] $value */ @@ -263,6 +284,9 @@ private function requestBody(): array if (null !== $v = $this->resultReuseConfiguration) { $payload['ResultReuseConfiguration'] = $v->requestBody(); } + if (null !== $v = $this->engineConfiguration) { + $payload['EngineConfiguration'] = $v->requestBody(); + } return $payload; } diff --git a/src/Service/Athena/src/Input/StartSessionRequest.php b/src/Service/Athena/src/Input/StartSessionRequest.php index 9e0ed7812..6e80ad491 100644 --- a/src/Service/Athena/src/Input/StartSessionRequest.php +++ b/src/Service/Athena/src/Input/StartSessionRequest.php @@ -3,6 +3,8 @@ namespace AsyncAws\Athena\Input; use AsyncAws\Athena\ValueObject\EngineConfiguration; +use AsyncAws\Athena\ValueObject\MonitoringConfiguration; +use AsyncAws\Athena\ValueObject\Tag; use AsyncAws\Core\Exception\InvalidArgument; use AsyncAws\Core\Input; use AsyncAws\Core\Request; @@ -35,6 +37,22 @@ final class StartSessionRequest extends Input */ private $engineConfiguration; + /** + * The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled + * workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups. + * + * @var string|null + */ + private $executionRole; + + /** + * Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon + * CloudWatch log groups etc. + * + * @var MonitoringConfiguration|null + */ + private $monitoringConfiguration; + /** * The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not * required for programmatic session access. The only valid notebook version is `Athena notebook version 1`. If you @@ -65,14 +83,32 @@ final class StartSessionRequest extends Input */ private $clientRequestToken; + /** + * A list of comma separated tags to add to the session that is created. + * + * @var Tag[]|null + */ + private $tags; + + /** + * Copies the tags from the Workgroup to the Session when. + * + * @var bool|null + */ + private $copyWorkGroupTags; + /** * @param array{ * Description?: string|null, * WorkGroup?: string, * EngineConfiguration?: EngineConfiguration|array, + * ExecutionRole?: string|null, + * MonitoringConfiguration?: MonitoringConfiguration|array|null, * NotebookVersion?: string|null, * SessionIdleTimeoutInMinutes?: int|null, * ClientRequestToken?: string|null, + * Tags?: array|null, + * CopyWorkGroupTags?: bool|null, * '@region'?: string|null, * } $input */ @@ -81,9 +117,13 @@ public function __construct(array $input = []) $this->description = $input['Description'] ?? null; $this->workGroup = $input['WorkGroup'] ?? null; $this->engineConfiguration = isset($input['EngineConfiguration']) ? EngineConfiguration::create($input['EngineConfiguration']) : null; + $this->executionRole = $input['ExecutionRole'] ?? null; + $this->monitoringConfiguration = isset($input['MonitoringConfiguration']) ? MonitoringConfiguration::create($input['MonitoringConfiguration']) : null; $this->notebookVersion = $input['NotebookVersion'] ?? null; $this->sessionIdleTimeoutInMinutes = $input['SessionIdleTimeoutInMinutes'] ?? null; $this->clientRequestToken = $input['ClientRequestToken'] ?? null; + $this->tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null; + $this->copyWorkGroupTags = $input['CopyWorkGroupTags'] ?? null; parent::__construct($input); } @@ -92,9 +132,13 @@ public function __construct(array $input = []) * Description?: string|null, * WorkGroup?: string, * EngineConfiguration?: EngineConfiguration|array, + * ExecutionRole?: string|null, + * MonitoringConfiguration?: MonitoringConfiguration|array|null, * NotebookVersion?: string|null, * SessionIdleTimeoutInMinutes?: int|null, * ClientRequestToken?: string|null, + * Tags?: array|null, + * CopyWorkGroupTags?: bool|null, * '@region'?: string|null, * }|StartSessionRequest $input */ @@ -108,6 +152,11 @@ public function getClientRequestToken(): ?string return $this->clientRequestToken; } + public function getCopyWorkGroupTags(): ?bool + { + return $this->copyWorkGroupTags; + } + public function getDescription(): ?string { return $this->description; @@ -118,6 +167,16 @@ public function getEngineConfiguration(): ?EngineConfiguration return $this->engineConfiguration; } + public function getExecutionRole(): ?string + { + return $this->executionRole; + } + + public function getMonitoringConfiguration(): ?MonitoringConfiguration + { + return $this->monitoringConfiguration; + } + public function getNotebookVersion(): ?string { return $this->notebookVersion; @@ -128,6 +187,14 @@ public function getSessionIdleTimeoutInMinutes(): ?int return $this->sessionIdleTimeoutInMinutes; } + /** + * @return Tag[] + */ + public function getTags(): array + { + return $this->tags ?? []; + } + public function getWorkGroup(): ?string { return $this->workGroup; @@ -166,6 +233,13 @@ public function setClientRequestToken(?string $value): self return $this; } + public function setCopyWorkGroupTags(?bool $value): self + { + $this->copyWorkGroupTags = $value; + + return $this; + } + public function setDescription(?string $value): self { $this->description = $value; @@ -180,6 +254,20 @@ public function setEngineConfiguration(?EngineConfiguration $value): self return $this; } + public function setExecutionRole(?string $value): self + { + $this->executionRole = $value; + + return $this; + } + + public function setMonitoringConfiguration(?MonitoringConfiguration $value): self + { + $this->monitoringConfiguration = $value; + + return $this; + } + public function setNotebookVersion(?string $value): self { $this->notebookVersion = $value; @@ -194,6 +282,16 @@ public function setSessionIdleTimeoutInMinutes(?int $value): self return $this; } + /** + * @param Tag[] $value + */ + public function setTags(array $value): self + { + $this->tags = $value; + + return $this; + } + public function setWorkGroup(?string $value): self { $this->workGroup = $value; @@ -215,6 +313,12 @@ private function requestBody(): array throw new InvalidArgument(\sprintf('Missing parameter "EngineConfiguration" for "%s". The value cannot be null.', __CLASS__)); } $payload['EngineConfiguration'] = $v->requestBody(); + if (null !== $v = $this->executionRole) { + $payload['ExecutionRole'] = $v; + } + if (null !== $v = $this->monitoringConfiguration) { + $payload['MonitoringConfiguration'] = $v->requestBody(); + } if (null !== $v = $this->notebookVersion) { $payload['NotebookVersion'] = $v; } @@ -224,6 +328,17 @@ private function requestBody(): array if (null !== $v = $this->clientRequestToken) { $payload['ClientRequestToken'] = $v; } + if (null !== $v = $this->tags) { + $index = -1; + $payload['Tags'] = []; + foreach ($v as $listValue) { + ++$index; + $payload['Tags'][$index] = $listValue->requestBody(); + } + } + if (null !== $v = $this->copyWorkGroupTags) { + $payload['CopyWorkGroupTags'] = (bool) $v; + } return $payload; } diff --git a/src/Service/Athena/src/Result/GetQueryExecutionOutput.php b/src/Service/Athena/src/Result/GetQueryExecutionOutput.php index bfee29fd1..5c23400b9 100644 --- a/src/Service/Athena/src/Result/GetQueryExecutionOutput.php +++ b/src/Service/Athena/src/Result/GetQueryExecutionOutput.php @@ -147,6 +147,7 @@ private function populateResultQueryExecutionStatistics(array $json): QueryExecu 'QueryPlanningTimeInMillis' => isset($json['QueryPlanningTimeInMillis']) ? (int) $json['QueryPlanningTimeInMillis'] : null, 'ServiceProcessingTimeInMillis' => isset($json['ServiceProcessingTimeInMillis']) ? (int) $json['ServiceProcessingTimeInMillis'] : null, 'ResultReuseInformation' => empty($json['ResultReuseInformation']) ? null : $this->populateResultResultReuseInformation($json['ResultReuseInformation']), + 'DpuCount' => isset($json['DpuCount']) ? (float) $json['DpuCount'] : null, ]); } diff --git a/src/Service/Athena/src/Result/GetSessionResponse.php b/src/Service/Athena/src/Result/GetSessionResponse.php index 076a884af..c849413a2 100644 --- a/src/Service/Athena/src/Result/GetSessionResponse.php +++ b/src/Service/Athena/src/Result/GetSessionResponse.php @@ -2,8 +2,13 @@ namespace AsyncAws\Athena\Result; +use AsyncAws\Athena\ValueObject\Classification; +use AsyncAws\Athena\ValueObject\CloudWatchLoggingConfiguration; use AsyncAws\Athena\ValueObject\EncryptionConfiguration; use AsyncAws\Athena\ValueObject\EngineConfiguration; +use AsyncAws\Athena\ValueObject\ManagedLoggingConfiguration; +use AsyncAws\Athena\ValueObject\MonitoringConfiguration; +use AsyncAws\Athena\ValueObject\S3LoggingConfiguration; use AsyncAws\Athena\ValueObject\SessionConfiguration; use AsyncAws\Athena\ValueObject\SessionStatistics; use AsyncAws\Athena\ValueObject\SessionStatus; @@ -55,6 +60,11 @@ class GetSessionResponse extends Result */ private $notebookVersion; + /** + * @var MonitoringConfiguration|null + */ + private $monitoringConfiguration; + /** * Contains the workgroup configuration information used by the session. * @@ -97,6 +107,13 @@ public function getEngineVersion(): ?string return $this->engineVersion; } + public function getMonitoringConfiguration(): ?MonitoringConfiguration + { + $this->initialize(); + + return $this->monitoringConfiguration; + } + public function getNotebookVersion(): ?string { $this->initialize(); @@ -149,11 +166,43 @@ protected function populateResult(Response $response): void $this->engineVersion = isset($data['EngineVersion']) ? (string) $data['EngineVersion'] : null; $this->engineConfiguration = empty($data['EngineConfiguration']) ? null : $this->populateResultEngineConfiguration($data['EngineConfiguration']); $this->notebookVersion = isset($data['NotebookVersion']) ? (string) $data['NotebookVersion'] : null; + $this->monitoringConfiguration = empty($data['MonitoringConfiguration']) ? null : $this->populateResultMonitoringConfiguration($data['MonitoringConfiguration']); $this->sessionConfiguration = empty($data['SessionConfiguration']) ? null : $this->populateResultSessionConfiguration($data['SessionConfiguration']); $this->status = empty($data['Status']) ? null : $this->populateResultSessionStatus($data['Status']); $this->statistics = empty($data['Statistics']) ? null : $this->populateResultSessionStatistics($data['Statistics']); } + private function populateResultClassification(array $json): Classification + { + return new Classification([ + 'Name' => isset($json['Name']) ? (string) $json['Name'] : null, + 'Properties' => !isset($json['Properties']) ? null : $this->populateResultParametersMap($json['Properties']), + ]); + } + + /** + * @return Classification[] + */ + private function populateResultClassificationList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultClassification($item); + } + + return $items; + } + + private function populateResultCloudWatchLoggingConfiguration(array $json): CloudWatchLoggingConfiguration + { + return new CloudWatchLoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'LogGroup' => isset($json['LogGroup']) ? (string) $json['LogGroup'] : null, + 'LogStreamNamePrefix' => isset($json['LogStreamNamePrefix']) ? (string) $json['LogStreamNamePrefix'] : null, + 'LogTypes' => !isset($json['LogTypes']) ? null : $this->populateResultLogTypesMap($json['LogTypes']), + ]); + } + private function populateResultEncryptionConfiguration(array $json): EncryptionConfiguration { return new EncryptionConfiguration([ @@ -166,10 +215,57 @@ private function populateResultEngineConfiguration(array $json): EngineConfigura { return new EngineConfiguration([ 'CoordinatorDpuSize' => isset($json['CoordinatorDpuSize']) ? (int) $json['CoordinatorDpuSize'] : null, - 'MaxConcurrentDpus' => (int) $json['MaxConcurrentDpus'], + 'MaxConcurrentDpus' => isset($json['MaxConcurrentDpus']) ? (int) $json['MaxConcurrentDpus'] : null, 'DefaultExecutorDpuSize' => isset($json['DefaultExecutorDpuSize']) ? (int) $json['DefaultExecutorDpuSize'] : null, 'AdditionalConfigs' => !isset($json['AdditionalConfigs']) ? null : $this->populateResultParametersMap($json['AdditionalConfigs']), 'SparkProperties' => !isset($json['SparkProperties']) ? null : $this->populateResultParametersMap($json['SparkProperties']), + 'Classifications' => !isset($json['Classifications']) ? null : $this->populateResultClassificationList($json['Classifications']), + ]); + } + + /** + * @return string[] + */ + private function populateResultLogTypeValuesList(array $json): array + { + $items = []; + foreach ($json as $item) { + $a = isset($item) ? (string) $item : null; + if (null !== $a) { + $items[] = $a; + } + } + + return $items; + } + + /** + * @return array + */ + private function populateResultLogTypesMap(array $json): array + { + $items = []; + foreach ($json as $name => $value) { + $items[(string) $name] = $this->populateResultLogTypeValuesList($value); + } + + return $items; + } + + private function populateResultManagedLoggingConfiguration(array $json): ManagedLoggingConfiguration + { + return new ManagedLoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'KmsKey' => isset($json['KmsKey']) ? (string) $json['KmsKey'] : null, + ]); + } + + private function populateResultMonitoringConfiguration(array $json): MonitoringConfiguration + { + return new MonitoringConfiguration([ + 'CloudWatchLoggingConfiguration' => empty($json['CloudWatchLoggingConfiguration']) ? null : $this->populateResultCloudWatchLoggingConfiguration($json['CloudWatchLoggingConfiguration']), + 'ManagedLoggingConfiguration' => empty($json['ManagedLoggingConfiguration']) ? null : $this->populateResultManagedLoggingConfiguration($json['ManagedLoggingConfiguration']), + 'S3LoggingConfiguration' => empty($json['S3LoggingConfiguration']) ? null : $this->populateResultS3LoggingConfiguration($json['S3LoggingConfiguration']), ]); } @@ -186,12 +282,22 @@ private function populateResultParametersMap(array $json): array return $items; } + private function populateResultS3LoggingConfiguration(array $json): S3LoggingConfiguration + { + return new S3LoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'KmsKey' => isset($json['KmsKey']) ? (string) $json['KmsKey'] : null, + 'LogLocation' => isset($json['LogLocation']) ? (string) $json['LogLocation'] : null, + ]); + } + private function populateResultSessionConfiguration(array $json): SessionConfiguration { return new SessionConfiguration([ 'ExecutionRole' => isset($json['ExecutionRole']) ? (string) $json['ExecutionRole'] : null, 'WorkingDirectory' => isset($json['WorkingDirectory']) ? (string) $json['WorkingDirectory'] : null, 'IdleTimeoutSeconds' => isset($json['IdleTimeoutSeconds']) ? (int) $json['IdleTimeoutSeconds'] : null, + 'SessionIdleTimeoutInMinutes' => isset($json['SessionIdleTimeoutInMinutes']) ? (int) $json['SessionIdleTimeoutInMinutes'] : null, 'EncryptionConfiguration' => empty($json['EncryptionConfiguration']) ? null : $this->populateResultEncryptionConfiguration($json['EncryptionConfiguration']), ]); } diff --git a/src/Service/Athena/src/Result/GetWorkGroupOutput.php b/src/Service/Athena/src/Result/GetWorkGroupOutput.php index 6b2dc9535..60ec2e090 100644 --- a/src/Service/Athena/src/Result/GetWorkGroupOutput.php +++ b/src/Service/Athena/src/Result/GetWorkGroupOutput.php @@ -3,14 +3,20 @@ namespace AsyncAws\Athena\Result; use AsyncAws\Athena\ValueObject\AclConfiguration; +use AsyncAws\Athena\ValueObject\Classification; +use AsyncAws\Athena\ValueObject\CloudWatchLoggingConfiguration; use AsyncAws\Athena\ValueObject\CustomerContentEncryptionConfiguration; use AsyncAws\Athena\ValueObject\EncryptionConfiguration; +use AsyncAws\Athena\ValueObject\EngineConfiguration; use AsyncAws\Athena\ValueObject\EngineVersion; use AsyncAws\Athena\ValueObject\IdentityCenterConfiguration; +use AsyncAws\Athena\ValueObject\ManagedLoggingConfiguration; use AsyncAws\Athena\ValueObject\ManagedQueryResultsConfiguration; use AsyncAws\Athena\ValueObject\ManagedQueryResultsEncryptionConfiguration; +use AsyncAws\Athena\ValueObject\MonitoringConfiguration; use AsyncAws\Athena\ValueObject\QueryResultsS3AccessGrantsConfiguration; use AsyncAws\Athena\ValueObject\ResultConfiguration; +use AsyncAws\Athena\ValueObject\S3LoggingConfiguration; use AsyncAws\Athena\ValueObject\WorkGroup; use AsyncAws\Athena\ValueObject\WorkGroupConfiguration; use AsyncAws\Core\Response; @@ -46,6 +52,37 @@ private function populateResultAclConfiguration(array $json): AclConfiguration ]); } + private function populateResultClassification(array $json): Classification + { + return new Classification([ + 'Name' => isset($json['Name']) ? (string) $json['Name'] : null, + 'Properties' => !isset($json['Properties']) ? null : $this->populateResultParametersMap($json['Properties']), + ]); + } + + /** + * @return Classification[] + */ + private function populateResultClassificationList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultClassification($item); + } + + return $items; + } + + private function populateResultCloudWatchLoggingConfiguration(array $json): CloudWatchLoggingConfiguration + { + return new CloudWatchLoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'LogGroup' => isset($json['LogGroup']) ? (string) $json['LogGroup'] : null, + 'LogStreamNamePrefix' => isset($json['LogStreamNamePrefix']) ? (string) $json['LogStreamNamePrefix'] : null, + 'LogTypes' => !isset($json['LogTypes']) ? null : $this->populateResultLogTypesMap($json['LogTypes']), + ]); + } + private function populateResultCustomerContentEncryptionConfiguration(array $json): CustomerContentEncryptionConfiguration { return new CustomerContentEncryptionConfiguration([ @@ -61,6 +98,18 @@ private function populateResultEncryptionConfiguration(array $json): EncryptionC ]); } + private function populateResultEngineConfiguration(array $json): EngineConfiguration + { + return new EngineConfiguration([ + 'CoordinatorDpuSize' => isset($json['CoordinatorDpuSize']) ? (int) $json['CoordinatorDpuSize'] : null, + 'MaxConcurrentDpus' => isset($json['MaxConcurrentDpus']) ? (int) $json['MaxConcurrentDpus'] : null, + 'DefaultExecutorDpuSize' => isset($json['DefaultExecutorDpuSize']) ? (int) $json['DefaultExecutorDpuSize'] : null, + 'AdditionalConfigs' => !isset($json['AdditionalConfigs']) ? null : $this->populateResultParametersMap($json['AdditionalConfigs']), + 'SparkProperties' => !isset($json['SparkProperties']) ? null : $this->populateResultParametersMap($json['SparkProperties']), + 'Classifications' => !isset($json['Classifications']) ? null : $this->populateResultClassificationList($json['Classifications']), + ]); + } + private function populateResultEngineVersion(array $json): EngineVersion { return new EngineVersion([ @@ -77,6 +126,43 @@ private function populateResultIdentityCenterConfiguration(array $json): Identit ]); } + /** + * @return string[] + */ + private function populateResultLogTypeValuesList(array $json): array + { + $items = []; + foreach ($json as $item) { + $a = isset($item) ? (string) $item : null; + if (null !== $a) { + $items[] = $a; + } + } + + return $items; + } + + /** + * @return array + */ + private function populateResultLogTypesMap(array $json): array + { + $items = []; + foreach ($json as $name => $value) { + $items[(string) $name] = $this->populateResultLogTypeValuesList($value); + } + + return $items; + } + + private function populateResultManagedLoggingConfiguration(array $json): ManagedLoggingConfiguration + { + return new ManagedLoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'KmsKey' => isset($json['KmsKey']) ? (string) $json['KmsKey'] : null, + ]); + } + private function populateResultManagedQueryResultsConfiguration(array $json): ManagedQueryResultsConfiguration { return new ManagedQueryResultsConfiguration([ @@ -92,6 +178,28 @@ private function populateResultManagedQueryResultsEncryptionConfiguration(array ]); } + private function populateResultMonitoringConfiguration(array $json): MonitoringConfiguration + { + return new MonitoringConfiguration([ + 'CloudWatchLoggingConfiguration' => empty($json['CloudWatchLoggingConfiguration']) ? null : $this->populateResultCloudWatchLoggingConfiguration($json['CloudWatchLoggingConfiguration']), + 'ManagedLoggingConfiguration' => empty($json['ManagedLoggingConfiguration']) ? null : $this->populateResultManagedLoggingConfiguration($json['ManagedLoggingConfiguration']), + 'S3LoggingConfiguration' => empty($json['S3LoggingConfiguration']) ? null : $this->populateResultS3LoggingConfiguration($json['S3LoggingConfiguration']), + ]); + } + + /** + * @return array + */ + private function populateResultParametersMap(array $json): array + { + $items = []; + foreach ($json as $name => $value) { + $items[(string) $name] = (string) $value; + } + + return $items; + } + private function populateResultQueryResultsS3AccessGrantsConfiguration(array $json): QueryResultsS3AccessGrantsConfiguration { return new QueryResultsS3AccessGrantsConfiguration([ @@ -111,6 +219,15 @@ private function populateResultResultConfiguration(array $json): ResultConfigura ]); } + private function populateResultS3LoggingConfiguration(array $json): S3LoggingConfiguration + { + return new S3LoggingConfiguration([ + 'Enabled' => filter_var($json['Enabled'], \FILTER_VALIDATE_BOOLEAN), + 'KmsKey' => isset($json['KmsKey']) ? (string) $json['KmsKey'] : null, + 'LogLocation' => isset($json['LogLocation']) ? (string) $json['LogLocation'] : null, + ]); + } + private function populateResultWorkGroup(array $json): WorkGroup { return new WorkGroup([ @@ -135,6 +252,8 @@ private function populateResultWorkGroupConfiguration(array $json): WorkGroupCon 'EngineVersion' => empty($json['EngineVersion']) ? null : $this->populateResultEngineVersion($json['EngineVersion']), 'AdditionalConfiguration' => isset($json['AdditionalConfiguration']) ? (string) $json['AdditionalConfiguration'] : null, 'ExecutionRole' => isset($json['ExecutionRole']) ? (string) $json['ExecutionRole'] : null, + 'MonitoringConfiguration' => empty($json['MonitoringConfiguration']) ? null : $this->populateResultMonitoringConfiguration($json['MonitoringConfiguration']), + 'EngineConfiguration' => empty($json['EngineConfiguration']) ? null : $this->populateResultEngineConfiguration($json['EngineConfiguration']), 'CustomerContentEncryptionConfiguration' => empty($json['CustomerContentEncryptionConfiguration']) ? null : $this->populateResultCustomerContentEncryptionConfiguration($json['CustomerContentEncryptionConfiguration']), 'EnableMinimumEncryptionConfiguration' => isset($json['EnableMinimumEncryptionConfiguration']) ? filter_var($json['EnableMinimumEncryptionConfiguration'], \FILTER_VALIDATE_BOOLEAN) : null, 'IdentityCenterConfiguration' => empty($json['IdentityCenterConfiguration']) ? null : $this->populateResultIdentityCenterConfiguration($json['IdentityCenterConfiguration']), diff --git a/src/Service/Athena/src/ValueObject/Classification.php b/src/Service/Athena/src/ValueObject/Classification.php new file mode 100644 index 000000000..719ddd7b6 --- /dev/null +++ b/src/Service/Athena/src/ValueObject/Classification.php @@ -0,0 +1,82 @@ +|null + */ + private $properties; + + /** + * @param array{ + * Name?: string|null, + * Properties?: array|null, + * } $input + */ + public function __construct(array $input) + { + $this->name = $input['Name'] ?? null; + $this->properties = $input['Properties'] ?? null; + } + + /** + * @param array{ + * Name?: string|null, + * Properties?: array|null, + * }|Classification $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getName(): ?string + { + return $this->name; + } + + /** + * @return array + */ + public function getProperties(): array + { + return $this->properties ?? []; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->name) { + $payload['Name'] = $v; + } + if (null !== $v = $this->properties) { + if (empty($v)) { + $payload['Properties'] = new \stdClass(); + } else { + $payload['Properties'] = []; + foreach ($v as $name => $mv) { + $payload['Properties'][$name] = $mv; + } + } + } + + return $payload; + } +} diff --git a/src/Service/Athena/src/ValueObject/CloudWatchLoggingConfiguration.php b/src/Service/Athena/src/ValueObject/CloudWatchLoggingConfiguration.php new file mode 100644 index 000000000..5d31c2647 --- /dev/null +++ b/src/Service/Athena/src/ValueObject/CloudWatchLoggingConfiguration.php @@ -0,0 +1,132 @@ +|null + */ + private $logTypes; + + /** + * @param array{ + * Enabled: bool, + * LogGroup?: string|null, + * LogStreamNamePrefix?: string|null, + * LogTypes?: array|null, + * } $input + */ + public function __construct(array $input) + { + $this->enabled = $input['Enabled'] ?? $this->throwException(new InvalidArgument('Missing required field "Enabled".')); + $this->logGroup = $input['LogGroup'] ?? null; + $this->logStreamNamePrefix = $input['LogStreamNamePrefix'] ?? null; + $this->logTypes = $input['LogTypes'] ?? null; + } + + /** + * @param array{ + * Enabled: bool, + * LogGroup?: string|null, + * LogStreamNamePrefix?: string|null, + * LogTypes?: array|null, + * }|CloudWatchLoggingConfiguration $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getEnabled(): bool + { + return $this->enabled; + } + + public function getLogGroup(): ?string + { + return $this->logGroup; + } + + public function getLogStreamNamePrefix(): ?string + { + return $this->logStreamNamePrefix; + } + + /** + * @return array + */ + public function getLogTypes(): array + { + return $this->logTypes ?? []; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + $v = $this->enabled; + $payload['Enabled'] = (bool) $v; + if (null !== $v = $this->logGroup) { + $payload['LogGroup'] = $v; + } + if (null !== $v = $this->logStreamNamePrefix) { + $payload['LogStreamNamePrefix'] = $v; + } + if (null !== $v = $this->logTypes) { + if (empty($v)) { + $payload['LogTypes'] = new \stdClass(); + } else { + $payload['LogTypes'] = []; + foreach ($v as $name => $mv) { + $index = -1; + $payload['LogTypes'][$name] = []; + foreach ($mv as $listValue) { + ++$index; + $payload['LogTypes'][$name][$index] = $listValue; + } + } + } + } + + return $payload; + } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } +} diff --git a/src/Service/Athena/src/ValueObject/EngineConfiguration.php b/src/Service/Athena/src/ValueObject/EngineConfiguration.php index 4c05bb557..412910c91 100644 --- a/src/Service/Athena/src/ValueObject/EngineConfiguration.php +++ b/src/Service/Athena/src/ValueObject/EngineConfiguration.php @@ -2,8 +2,6 @@ namespace AsyncAws\Athena\ValueObject; -use AsyncAws\Core\Exception\InvalidArgument; - /** * Contains data processing unit (DPU) configuration settings and parameter mappings for a notebook engine. */ @@ -20,7 +18,7 @@ final class EngineConfiguration /** * The maximum number of DPUs that can run concurrently. * - * @var int + * @var int|null */ private $maxConcurrentDpus; @@ -50,31 +48,41 @@ final class EngineConfiguration */ private $sparkProperties; + /** + * The configuration classifications that can be specified for the engine. + * + * @var Classification[]|null + */ + private $classifications; + /** * @param array{ * CoordinatorDpuSize?: int|null, - * MaxConcurrentDpus: int, + * MaxConcurrentDpus?: int|null, * DefaultExecutorDpuSize?: int|null, * AdditionalConfigs?: array|null, * SparkProperties?: array|null, + * Classifications?: array|null, * } $input */ public function __construct(array $input) { $this->coordinatorDpuSize = $input['CoordinatorDpuSize'] ?? null; - $this->maxConcurrentDpus = $input['MaxConcurrentDpus'] ?? $this->throwException(new InvalidArgument('Missing required field "MaxConcurrentDpus".')); + $this->maxConcurrentDpus = $input['MaxConcurrentDpus'] ?? null; $this->defaultExecutorDpuSize = $input['DefaultExecutorDpuSize'] ?? null; $this->additionalConfigs = $input['AdditionalConfigs'] ?? null; $this->sparkProperties = $input['SparkProperties'] ?? null; + $this->classifications = isset($input['Classifications']) ? array_map([Classification::class, 'create'], $input['Classifications']) : null; } /** * @param array{ * CoordinatorDpuSize?: int|null, - * MaxConcurrentDpus: int, + * MaxConcurrentDpus?: int|null, * DefaultExecutorDpuSize?: int|null, * AdditionalConfigs?: array|null, * SparkProperties?: array|null, + * Classifications?: array|null, * }|EngineConfiguration $input */ public static function create($input): self @@ -90,6 +98,14 @@ public function getAdditionalConfigs(): array return $this->additionalConfigs ?? []; } + /** + * @return Classification[] + */ + public function getClassifications(): array + { + return $this->classifications ?? []; + } + public function getCoordinatorDpuSize(): ?int { return $this->coordinatorDpuSize; @@ -100,7 +116,7 @@ public function getDefaultExecutorDpuSize(): ?int return $this->defaultExecutorDpuSize; } - public function getMaxConcurrentDpus(): int + public function getMaxConcurrentDpus(): ?int { return $this->maxConcurrentDpus; } @@ -122,8 +138,9 @@ public function requestBody(): array if (null !== $v = $this->coordinatorDpuSize) { $payload['CoordinatorDpuSize'] = $v; } - $v = $this->maxConcurrentDpus; - $payload['MaxConcurrentDpus'] = $v; + if (null !== $v = $this->maxConcurrentDpus) { + $payload['MaxConcurrentDpus'] = $v; + } if (null !== $v = $this->defaultExecutorDpuSize) { $payload['DefaultExecutorDpuSize'] = $v; } @@ -147,15 +164,15 @@ public function requestBody(): array } } } + if (null !== $v = $this->classifications) { + $index = -1; + $payload['Classifications'] = []; + foreach ($v as $listValue) { + ++$index; + $payload['Classifications'][$index] = $listValue->requestBody(); + } + } return $payload; } - - /** - * @return never - */ - private function throwException(\Throwable $exception) - { - throw $exception; - } } diff --git a/src/Service/Athena/src/ValueObject/ManagedLoggingConfiguration.php b/src/Service/Athena/src/ValueObject/ManagedLoggingConfiguration.php new file mode 100644 index 000000000..0c8c9f957 --- /dev/null +++ b/src/Service/Athena/src/ValueObject/ManagedLoggingConfiguration.php @@ -0,0 +1,81 @@ +enabled = $input['Enabled'] ?? $this->throwException(new InvalidArgument('Missing required field "Enabled".')); + $this->kmsKey = $input['KmsKey'] ?? null; + } + + /** + * @param array{ + * Enabled: bool, + * KmsKey?: string|null, + * }|ManagedLoggingConfiguration $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getEnabled(): bool + { + return $this->enabled; + } + + public function getKmsKey(): ?string + { + return $this->kmsKey; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + $v = $this->enabled; + $payload['Enabled'] = (bool) $v; + if (null !== $v = $this->kmsKey) { + $payload['KmsKey'] = $v; + } + + return $payload; + } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } +} diff --git a/src/Service/Athena/src/ValueObject/MonitoringConfiguration.php b/src/Service/Athena/src/ValueObject/MonitoringConfiguration.php new file mode 100644 index 000000000..6488764a4 --- /dev/null +++ b/src/Service/Athena/src/ValueObject/MonitoringConfiguration.php @@ -0,0 +1,91 @@ +cloudWatchLoggingConfiguration = isset($input['CloudWatchLoggingConfiguration']) ? CloudWatchLoggingConfiguration::create($input['CloudWatchLoggingConfiguration']) : null; + $this->managedLoggingConfiguration = isset($input['ManagedLoggingConfiguration']) ? ManagedLoggingConfiguration::create($input['ManagedLoggingConfiguration']) : null; + $this->s3LoggingConfiguration = isset($input['S3LoggingConfiguration']) ? S3LoggingConfiguration::create($input['S3LoggingConfiguration']) : null; + } + + /** + * @param array{ + * CloudWatchLoggingConfiguration?: CloudWatchLoggingConfiguration|array|null, + * ManagedLoggingConfiguration?: ManagedLoggingConfiguration|array|null, + * S3LoggingConfiguration?: S3LoggingConfiguration|array|null, + * }|MonitoringConfiguration $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getCloudWatchLoggingConfiguration(): ?CloudWatchLoggingConfiguration + { + return $this->cloudWatchLoggingConfiguration; + } + + public function getManagedLoggingConfiguration(): ?ManagedLoggingConfiguration + { + return $this->managedLoggingConfiguration; + } + + public function getS3LoggingConfiguration(): ?S3LoggingConfiguration + { + return $this->s3LoggingConfiguration; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->cloudWatchLoggingConfiguration) { + $payload['CloudWatchLoggingConfiguration'] = $v->requestBody(); + } + if (null !== $v = $this->managedLoggingConfiguration) { + $payload['ManagedLoggingConfiguration'] = $v->requestBody(); + } + if (null !== $v = $this->s3LoggingConfiguration) { + $payload['S3LoggingConfiguration'] = $v->requestBody(); + } + + return $payload; + } +} diff --git a/src/Service/Athena/src/ValueObject/QueryExecution.php b/src/Service/Athena/src/ValueObject/QueryExecution.php index 41c1c777f..c10ac7c6e 100644 --- a/src/Service/Athena/src/ValueObject/QueryExecution.php +++ b/src/Service/Athena/src/ValueObject/QueryExecution.php @@ -26,7 +26,7 @@ final class QueryExecution /** * The type of query statement that was run. `DDL` indicates DDL query statements. `DML` indicates DML (Data * Manipulation Language) query statements, such as `CREATE TABLE AS SELECT`. `UTILITY` indicates query statements other - * than DDL and DML, such as `SHOW CREATE TABLE`, or `DESCRIBE TABLE`. + * than DDL and DML, such as `SHOW CREATE TABLE`, `EXPLAIN`, `DESCRIBE`, or `SHOW TABLES`. * * @var StatementType::*|null */ diff --git a/src/Service/Athena/src/ValueObject/QueryExecutionStatistics.php b/src/Service/Athena/src/ValueObject/QueryExecutionStatistics.php index ec325e581..0587a5480 100644 --- a/src/Service/Athena/src/ValueObject/QueryExecutionStatistics.php +++ b/src/Service/Athena/src/ValueObject/QueryExecutionStatistics.php @@ -81,6 +81,13 @@ final class QueryExecutionStatistics */ private $resultReuseInformation; + /** + * The number of Data Processing Units (DPUs) that Athena used to run the query. + * + * @var float|null + */ + private $dpuCount; + /** * @param array{ * EngineExecutionTimeInMillis?: int|null, @@ -92,6 +99,7 @@ final class QueryExecutionStatistics * QueryPlanningTimeInMillis?: int|null, * ServiceProcessingTimeInMillis?: int|null, * ResultReuseInformation?: ResultReuseInformation|array|null, + * DpuCount?: float|null, * } $input */ public function __construct(array $input) @@ -105,6 +113,7 @@ public function __construct(array $input) $this->queryPlanningTimeInMillis = $input['QueryPlanningTimeInMillis'] ?? null; $this->serviceProcessingTimeInMillis = $input['ServiceProcessingTimeInMillis'] ?? null; $this->resultReuseInformation = isset($input['ResultReuseInformation']) ? ResultReuseInformation::create($input['ResultReuseInformation']) : null; + $this->dpuCount = $input['DpuCount'] ?? null; } /** @@ -118,6 +127,7 @@ public function __construct(array $input) * QueryPlanningTimeInMillis?: int|null, * ServiceProcessingTimeInMillis?: int|null, * ResultReuseInformation?: ResultReuseInformation|array|null, + * DpuCount?: float|null, * }|QueryExecutionStatistics $input */ public static function create($input): self @@ -135,6 +145,11 @@ public function getDataScannedInBytes(): ?int return $this->dataScannedInBytes; } + public function getDpuCount(): ?float + { + return $this->dpuCount; + } + public function getEngineExecutionTimeInMillis(): ?int { return $this->engineExecutionTimeInMillis; diff --git a/src/Service/Athena/src/ValueObject/QueryExecutionStatus.php b/src/Service/Athena/src/ValueObject/QueryExecutionStatus.php index fa4b6f848..6e8d0b429 100644 --- a/src/Service/Athena/src/ValueObject/QueryExecutionStatus.php +++ b/src/Service/Athena/src/ValueObject/QueryExecutionStatus.php @@ -15,8 +15,8 @@ final class QueryExecutionStatus * `SUCCEEDED` indicates that the query completed without errors. `FAILED` indicates that the query experienced an error * and did not complete processing. `CANCELLED` indicates that a user input interrupted query execution. * - * > Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the query - * > state transition from `RUNNING` or `FAILED` to `QUEUED`. + * > For queries that experience certain transient errors, the state transitions from `RUNNING` back to `QUEUED`. The + * > `FAILED` state is always terminal with no automatic retry. * * @var QueryExecutionState::*|null */ diff --git a/src/Service/Athena/src/ValueObject/S3LoggingConfiguration.php b/src/Service/Athena/src/ValueObject/S3LoggingConfiguration.php new file mode 100644 index 000000000..09bae9bdd --- /dev/null +++ b/src/Service/Athena/src/ValueObject/S3LoggingConfiguration.php @@ -0,0 +1,99 @@ +enabled = $input['Enabled'] ?? $this->throwException(new InvalidArgument('Missing required field "Enabled".')); + $this->kmsKey = $input['KmsKey'] ?? null; + $this->logLocation = $input['LogLocation'] ?? null; + } + + /** + * @param array{ + * Enabled: bool, + * KmsKey?: string|null, + * LogLocation?: string|null, + * }|S3LoggingConfiguration $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getEnabled(): bool + { + return $this->enabled; + } + + public function getKmsKey(): ?string + { + return $this->kmsKey; + } + + public function getLogLocation(): ?string + { + return $this->logLocation; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + $v = $this->enabled; + $payload['Enabled'] = (bool) $v; + if (null !== $v = $this->kmsKey) { + $payload['KmsKey'] = $v; + } + if (null !== $v = $this->logLocation) { + $payload['LogLocation'] = $v; + } + + return $payload; + } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } +} diff --git a/src/Service/Athena/src/ValueObject/SessionConfiguration.php b/src/Service/Athena/src/ValueObject/SessionConfiguration.php index b023d0df2..510f5f4f2 100644 --- a/src/Service/Athena/src/ValueObject/SessionConfiguration.php +++ b/src/Service/Athena/src/ValueObject/SessionConfiguration.php @@ -29,6 +29,13 @@ final class SessionConfiguration */ private $idleTimeoutSeconds; + /** + * The idle timeout in seconds for the session. + * + * @var int|null + */ + private $sessionIdleTimeoutInMinutes; + /** * @var EncryptionConfiguration|null */ @@ -39,6 +46,7 @@ final class SessionConfiguration * ExecutionRole?: string|null, * WorkingDirectory?: string|null, * IdleTimeoutSeconds?: int|null, + * SessionIdleTimeoutInMinutes?: int|null, * EncryptionConfiguration?: EncryptionConfiguration|array|null, * } $input */ @@ -47,6 +55,7 @@ public function __construct(array $input) $this->executionRole = $input['ExecutionRole'] ?? null; $this->workingDirectory = $input['WorkingDirectory'] ?? null; $this->idleTimeoutSeconds = $input['IdleTimeoutSeconds'] ?? null; + $this->sessionIdleTimeoutInMinutes = $input['SessionIdleTimeoutInMinutes'] ?? null; $this->encryptionConfiguration = isset($input['EncryptionConfiguration']) ? EncryptionConfiguration::create($input['EncryptionConfiguration']) : null; } @@ -55,6 +64,7 @@ public function __construct(array $input) * ExecutionRole?: string|null, * WorkingDirectory?: string|null, * IdleTimeoutSeconds?: int|null, + * SessionIdleTimeoutInMinutes?: int|null, * EncryptionConfiguration?: EncryptionConfiguration|array|null, * }|SessionConfiguration $input */ @@ -78,6 +88,11 @@ public function getIdleTimeoutSeconds(): ?int return $this->idleTimeoutSeconds; } + public function getSessionIdleTimeoutInMinutes(): ?int + { + return $this->sessionIdleTimeoutInMinutes; + } + public function getWorkingDirectory(): ?string { return $this->workingDirectory; diff --git a/src/Service/Athena/src/ValueObject/Tag.php b/src/Service/Athena/src/ValueObject/Tag.php new file mode 100644 index 000000000..aedc823c1 --- /dev/null +++ b/src/Service/Athena/src/ValueObject/Tag.php @@ -0,0 +1,83 @@ +key = $input['Key'] ?? null; + $this->value = $input['Value'] ?? null; + } + + /** + * @param array{ + * Key?: string|null, + * Value?: string|null, + * }|Tag $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getKey(): ?string + { + return $this->key; + } + + public function getValue(): ?string + { + return $this->value; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->key) { + $payload['Key'] = $v; + } + if (null !== $v = $this->value) { + $payload['Value'] = $v; + } + + return $payload; + } +} diff --git a/src/Service/Athena/src/ValueObject/WorkGroupConfiguration.php b/src/Service/Athena/src/ValueObject/WorkGroupConfiguration.php index ce349b200..d16de3571 100644 --- a/src/Service/Athena/src/ValueObject/WorkGroupConfiguration.php +++ b/src/Service/Athena/src/ValueObject/WorkGroupConfiguration.php @@ -33,7 +33,8 @@ final class WorkGroupConfiguration /** * If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side - * settings are used. For more information, see Workgroup Settings Override Client-Side Settings [^1]. + * settings are used. This property is not required for Apache Spark enabled workgroups. For more information, see + * Workgroup Settings Override Client-Side Settings [^1]. * * [^1]: https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html * @@ -91,6 +92,19 @@ final class WorkGroupConfiguration */ private $executionRole; + /** + * Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon + * CloudWatch log groups etc. + * + * @var MonitoringConfiguration|null + */ + private $monitoringConfiguration; + + /** + * @var EngineConfiguration|null + */ + private $engineConfiguration; + /** * Specifies the KMS key that is used to encrypt the user's data stores in Athena. This setting does not apply to Athena * SQL workgroups. @@ -137,6 +151,8 @@ final class WorkGroupConfiguration * EngineVersion?: EngineVersion|array|null, * AdditionalConfiguration?: string|null, * ExecutionRole?: string|null, + * MonitoringConfiguration?: MonitoringConfiguration|array|null, + * EngineConfiguration?: EngineConfiguration|array|null, * CustomerContentEncryptionConfiguration?: CustomerContentEncryptionConfiguration|array|null, * EnableMinimumEncryptionConfiguration?: bool|null, * IdentityCenterConfiguration?: IdentityCenterConfiguration|array|null, @@ -154,6 +170,8 @@ public function __construct(array $input) $this->engineVersion = isset($input['EngineVersion']) ? EngineVersion::create($input['EngineVersion']) : null; $this->additionalConfiguration = $input['AdditionalConfiguration'] ?? null; $this->executionRole = $input['ExecutionRole'] ?? null; + $this->monitoringConfiguration = isset($input['MonitoringConfiguration']) ? MonitoringConfiguration::create($input['MonitoringConfiguration']) : null; + $this->engineConfiguration = isset($input['EngineConfiguration']) ? EngineConfiguration::create($input['EngineConfiguration']) : null; $this->customerContentEncryptionConfiguration = isset($input['CustomerContentEncryptionConfiguration']) ? CustomerContentEncryptionConfiguration::create($input['CustomerContentEncryptionConfiguration']) : null; $this->enableMinimumEncryptionConfiguration = $input['EnableMinimumEncryptionConfiguration'] ?? null; $this->identityCenterConfiguration = isset($input['IdentityCenterConfiguration']) ? IdentityCenterConfiguration::create($input['IdentityCenterConfiguration']) : null; @@ -171,6 +189,8 @@ public function __construct(array $input) * EngineVersion?: EngineVersion|array|null, * AdditionalConfiguration?: string|null, * ExecutionRole?: string|null, + * MonitoringConfiguration?: MonitoringConfiguration|array|null, + * EngineConfiguration?: EngineConfiguration|array|null, * CustomerContentEncryptionConfiguration?: CustomerContentEncryptionConfiguration|array|null, * EnableMinimumEncryptionConfiguration?: bool|null, * IdentityCenterConfiguration?: IdentityCenterConfiguration|array|null, @@ -207,6 +227,11 @@ public function getEnforceWorkGroupConfiguration(): ?bool return $this->enforceWorkGroupConfiguration; } + public function getEngineConfiguration(): ?EngineConfiguration + { + return $this->engineConfiguration; + } + public function getEngineVersion(): ?EngineVersion { return $this->engineVersion; @@ -227,6 +252,11 @@ public function getManagedQueryResultsConfiguration(): ?ManagedQueryResultsConfi return $this->managedQueryResultsConfiguration; } + public function getMonitoringConfiguration(): ?MonitoringConfiguration + { + return $this->monitoringConfiguration; + } + public function getPublishCloudWatchMetricsEnabled(): ?bool { return $this->publishCloudWatchMetricsEnabled; diff --git a/src/Service/Kms/src/ValueObject/KeyMetadata.php b/src/Service/Kms/src/ValueObject/KeyMetadata.php index 0a162fdfa..006eab834 100644 --- a/src/Service/Kms/src/ValueObject/KeyMetadata.php +++ b/src/Service/Kms/src/ValueObject/KeyMetadata.php @@ -269,10 +269,10 @@ final class KeyMetadata private $xksKeyConfiguration; /** - * Identifies the current key material. This value is present for symmetric encryption keys with `AWS_KMS` origin and - * single-Region, symmetric encryption keys with `EXTERNAL` origin. These KMS keys support automatic or on-demand key - * rotation and can have multiple key materials associated with them. KMS uses the current key material for both - * encryption and decryption, and the non-current key material for decryption operations only. + * Identifies the current key material. This value is present for symmetric encryption keys with `AWS_KMS` or `EXTERNAL` + * origin. These KMS keys support automatic or on-demand key rotation and can have multiple key materials associated + * with them. KMS uses the current key material for both encryption and decryption, and the non-current key material for + * decryption operations only. * * @var string|null */