From ed0ee85d1084da957d882f243b024f371648225e Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Tue, 22 Oct 2024 06:29:11 +0000 Subject: [PATCH 1/3] update generated code --- manifest.json | 2 +- src/Service/Athena/CHANGELOG.md | 4 + src/Service/Athena/composer.json | 2 +- .../Athena/src/Enum/ConnectionType.php | 73 --------------- .../Athena/src/Enum/DataCatalogStatus.php | 31 ------- .../Athena/src/Enum/DataCatalogType.php | 2 - .../src/Result/GetDataCatalogOutput.php | 3 - .../src/Result/GetQueryResultsOutput.php | 2 +- .../src/ValueObject/AclConfiguration.php | 16 ++-- .../Athena/src/ValueObject/DataCatalog.php | 91 +------------------ 10 files changed, 18 insertions(+), 208 deletions(-) delete mode 100644 src/Service/Athena/src/Enum/ConnectionType.php delete mode 100644 src/Service/Athena/src/Enum/DataCatalogStatus.php diff --git a/manifest.json b/manifest.json index de4371809..9f095be90 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.324.5" + "${LATEST}": "3.324.7" }, "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 922792c62..5f2abd83d 100644 --- a/src/Service/Athena/CHANGELOG.md +++ b/src/Service/Athena/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Removing FEDERATED from Create/List/Delete/GetDataCatalog API + ## 2.3.0 ### Added diff --git a/src/Service/Athena/composer.json b/src/Service/Athena/composer.json index e31e8a4f6..1476ce8be 100644 --- a/src/Service/Athena/composer.json +++ b/src/Service/Athena/composer.json @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.4-dev" } } } diff --git a/src/Service/Athena/src/Enum/ConnectionType.php b/src/Service/Athena/src/Enum/ConnectionType.php deleted file mode 100644 index 59ed5f260..000000000 --- a/src/Service/Athena/src/Enum/ConnectionType.php +++ /dev/null @@ -1,73 +0,0 @@ - true, - self::CLOUDERAHIVE => true, - self::CLOUDERAIMPALA => true, - self::CLOUDWATCH => true, - self::CLOUDWATCHMETRICS => true, - self::CMDB => true, - self::DATALAKEGEN2 => true, - self::DB2 => true, - self::DB2AS400 => true, - self::DOCUMENTDB => true, - self::DYNAMODB => true, - self::GOOGLECLOUDSTORAGE => true, - self::HBASE => true, - self::HORTONWORKSHIVE => true, - self::MSK => true, - self::MYSQL => true, - self::NEPTUNE => true, - self::OPENSEARCH => true, - self::ORACLE => true, - self::POSTGRESQL => true, - self::REDIS => true, - self::REDSHIFT => true, - self::SAPHANA => true, - self::SNOWFLAKE => true, - self::SQLSERVER => true, - self::SYNAPSE => true, - self::TERADATA => true, - self::TIMESTREAM => true, - self::TPCDS => true, - self::VERTICA => true, - ][$value]); - } -} diff --git a/src/Service/Athena/src/Enum/DataCatalogStatus.php b/src/Service/Athena/src/Enum/DataCatalogStatus.php deleted file mode 100644 index 659feab6e..000000000 --- a/src/Service/Athena/src/Enum/DataCatalogStatus.php +++ /dev/null @@ -1,31 +0,0 @@ - true, - self::CREATE_FAILED => true, - self::CREATE_FAILED_CLEANUP_COMPLETE => true, - self::CREATE_FAILED_CLEANUP_FAILED => true, - self::CREATE_FAILED_CLEANUP_IN_PROGRESS => true, - self::CREATE_IN_PROGRESS => true, - self::DELETE_COMPLETE => true, - self::DELETE_FAILED => true, - self::DELETE_IN_PROGRESS => true, - ][$value]); - } -} diff --git a/src/Service/Athena/src/Enum/DataCatalogType.php b/src/Service/Athena/src/Enum/DataCatalogType.php index dedbec846..274e9decf 100644 --- a/src/Service/Athena/src/Enum/DataCatalogType.php +++ b/src/Service/Athena/src/Enum/DataCatalogType.php @@ -4,7 +4,6 @@ final class DataCatalogType { - public const FEDERATED = 'FEDERATED'; public const GLUE = 'GLUE'; public const HIVE = 'HIVE'; public const LAMBDA = 'LAMBDA'; @@ -12,7 +11,6 @@ final class DataCatalogType public static function exists(string $value): bool { return isset([ - self::FEDERATED => true, self::GLUE => true, self::HIVE => true, self::LAMBDA => true, diff --git a/src/Service/Athena/src/Result/GetDataCatalogOutput.php b/src/Service/Athena/src/Result/GetDataCatalogOutput.php index 4cba23851..364a390d4 100644 --- a/src/Service/Athena/src/Result/GetDataCatalogOutput.php +++ b/src/Service/Athena/src/Result/GetDataCatalogOutput.php @@ -36,9 +36,6 @@ private function populateResultDataCatalog(array $json): DataCatalog 'Description' => isset($json['Description']) ? (string) $json['Description'] : null, 'Type' => (string) $json['Type'], 'Parameters' => !isset($json['Parameters']) ? null : $this->populateResultParametersMap($json['Parameters']), - 'Status' => isset($json['Status']) ? (string) $json['Status'] : null, - 'ConnectionType' => isset($json['ConnectionType']) ? (string) $json['ConnectionType'] : null, - 'Error' => isset($json['Error']) ? (string) $json['Error'] : null, ]); } diff --git a/src/Service/Athena/src/Result/GetQueryResultsOutput.php b/src/Service/Athena/src/Result/GetQueryResultsOutput.php index e24c99ce9..d94994ceb 100644 --- a/src/Service/Athena/src/Result/GetQueryResultsOutput.php +++ b/src/Service/Athena/src/Result/GetQueryResultsOutput.php @@ -19,7 +19,7 @@ class GetQueryResultsOutput extends Result implements \IteratorAggregate { /** - * The number of rows inserted with a `CREATE TABLE AS SELECT` statement. + * The number of rows inserted with a `CREATE TABLE AS SELECT`, `INSERT INTO`, or `UPDATE` statement. * * @var int|null */ diff --git a/src/Service/Athena/src/ValueObject/AclConfiguration.php b/src/Service/Athena/src/ValueObject/AclConfiguration.php index d89c2418a..7132c7e8c 100644 --- a/src/Service/Athena/src/ValueObject/AclConfiguration.php +++ b/src/Service/Athena/src/ValueObject/AclConfiguration.php @@ -6,19 +6,21 @@ use AsyncAws\Core\Exception\InvalidArgument; /** - * Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. When Athena stores - * query results in Amazon S3, the canned ACL is set with the `x-amz-acl` request header. For more information about S3 - * Object Ownership, see Object Ownership settings [^1] in the *Amazon S3 User Guide*. + * Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results, including data + * files inserted by Athena as the result of statements like CTAS or INSERT INTO. When Athena stores query results in + * Amazon S3, the canned ACL is set with the `x-amz-acl` request header. For more information about S3 Object Ownership, + * see Object Ownership settings [^1] in the *Amazon S3 User Guide*. * * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html#object-ownership-overview */ final class AclConfiguration { /** - * The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned - * ACL is `BUCKET_OWNER_FULL_CONTROL`. If a query runs in a workgroup and the workgroup overrides client-side settings, - * then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the - * workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL [^1] in the *Amazon S3 User Guide*. + * The Amazon S3 canned ACL that Athena should specify when storing query results, including data files inserted by + * Athena as the result of statements like CTAS or INSERT INTO. Currently the only supported canned ACL is + * `BUCKET_OWNER_FULL_CONTROL`. If a query runs in a workgroup and the workgroup overrides client-side settings, then + * the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For + * more information about Amazon S3 canned ACLs, see Canned ACL [^1] in the *Amazon S3 User Guide*. * * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl * diff --git a/src/Service/Athena/src/ValueObject/DataCatalog.php b/src/Service/Athena/src/ValueObject/DataCatalog.php index 121f8539b..7e0455e57 100644 --- a/src/Service/Athena/src/ValueObject/DataCatalog.php +++ b/src/Service/Athena/src/ValueObject/DataCatalog.php @@ -2,8 +2,6 @@ namespace AsyncAws\Athena\ValueObject; -use AsyncAws\Athena\Enum\ConnectionType; -use AsyncAws\Athena\Enum\DataCatalogStatus; use AsyncAws\Athena\Enum\DataCatalogType; use AsyncAws\Core\Exception\InvalidArgument; @@ -32,9 +30,8 @@ final class DataCatalog private $description; /** - * The type of data catalog to create: `LAMBDA` for a federated catalog, `GLUE` for an Glue Data Catalog, and `HIVE` for - * an external Apache Hive metastore. `FEDERATED` is a federated catalog for which Athena creates the connection and the - * Lambda function for you based on the parameters that you pass. + * The type of data catalog to create: `LAMBDA` for a federated catalog, `HIVE` for an external hive metastore, or + * `GLUE` for an Glue Data Catalog. * * @var DataCatalogType::* */ @@ -67,73 +64,16 @@ final class DataCatalog * - The `GLUE` data catalog type also applies to the default `AwsDataCatalog` that already exists in your account, of * which you can have only one and cannot modify. * - * - The `FEDERATED` data catalog type uses one of the following parameters, but not both. Use `connection-arn` for an - * existing Glue connection. Use `connection-type` and `connection-properties` to specify the configuration setting - * for a new connection. - * - * - `connection-arn:**` - * - `connection-type:MYSQL|REDSHIFT|...., connection-properties:"**"` - * - * For *``*, use escaped JSON text, as in the following example. - * - * `"{\"spill_bucket\":\"my_spill\",\"spill_prefix\":\"athena-spill\",\"host\":\"abc12345.snowflakecomputing.com\",\"port\":\"1234\",\"warehouse\":\"DEV_WH\",\"database\":\"TEST\",\"schema\":\"PUBLIC\",\"SecretArn\":\"arn:aws:secretsmanager:ap-south-1:111122223333:secret:snowflake-XHb67j\"}"` - * * @var array|null */ private $parameters; - /** - * The status of the creation or deletion of the data catalog. - * - * - The `LAMBDA`, `GLUE`, and `HIVE` data catalog types are created synchronously. Their status is either - * `CREATE_COMPLETE` or `CREATE_FAILED`. - * - The `FEDERATED` data catalog type is created asynchronously. - * - * Data catalog creation status: - * - * - `CREATE_IN_PROGRESS`: Federated data catalog creation in progress. - * - `CREATE_COMPLETE`: Data catalog creation complete. - * - `CREATE_FAILED`: Data catalog could not be created. - * - `CREATE_FAILED_CLEANUP_IN_PROGRESS`: Federated data catalog creation failed and is being removed. - * - `CREATE_FAILED_CLEANUP_COMPLETE`: Federated data catalog creation failed and was removed. - * - `CREATE_FAILED_CLEANUP_FAILED`: Federated data catalog creation failed but could not be removed. - * - * Data catalog deletion status: - * - * - `DELETE_IN_PROGRESS`: Federated data catalog deletion in progress. - * - `DELETE_COMPLETE`: Federated data catalog deleted. - * - `DELETE_FAILED`: Federated data catalog could not be deleted. - * - * @var DataCatalogStatus::*|null - */ - private $status; - - /** - * The type of connection for a `FEDERATED` data catalog (for example, `REDSHIFT`, `MYSQL`, or `SQLSERVER`). For - * information about individual connectors, see Available data source connectors [^1]. - * - * [^1]: https://docs.aws.amazon.com/athena/latest/ug/connectors-available.html - * - * @var ConnectionType::*|null - */ - private $connectionType; - - /** - * Text of the error that occurred during data catalog creation or deletion. - * - * @var string|null - */ - private $error; - /** * @param array{ * Name: string, * Description?: null|string, * Type: DataCatalogType::*, * Parameters?: null|array, - * Status?: null|DataCatalogStatus::*, - * ConnectionType?: null|ConnectionType::*, - * Error?: null|string, * } $input */ public function __construct(array $input) @@ -142,9 +82,6 @@ public function __construct(array $input) $this->description = $input['Description'] ?? null; $this->type = $input['Type'] ?? $this->throwException(new InvalidArgument('Missing required field "Type".')); $this->parameters = $input['Parameters'] ?? null; - $this->status = $input['Status'] ?? null; - $this->connectionType = $input['ConnectionType'] ?? null; - $this->error = $input['Error'] ?? null; } /** @@ -153,9 +90,6 @@ public function __construct(array $input) * Description?: null|string, * Type: DataCatalogType::*, * Parameters?: null|array, - * Status?: null|DataCatalogStatus::*, - * ConnectionType?: null|ConnectionType::*, - * Error?: null|string, * }|DataCatalog $input */ public static function create($input): self @@ -163,24 +97,11 @@ public static function create($input): self return $input instanceof self ? $input : new self($input); } - /** - * @return ConnectionType::*|null - */ - public function getConnectionType(): ?string - { - return $this->connectionType; - } - public function getDescription(): ?string { return $this->description; } - public function getError(): ?string - { - return $this->error; - } - public function getName(): string { return $this->name; @@ -194,14 +115,6 @@ public function getParameters(): array return $this->parameters ?? []; } - /** - * @return DataCatalogStatus::*|null - */ - public function getStatus(): ?string - { - return $this->status; - } - /** * @return DataCatalogType::* */ From d72b57ae9058022ebd07ee8f90eae1f6e4a61711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 22 Oct 2024 08:43:37 +0200 Subject: [PATCH 2/3] Update src/Service/Athena/CHANGELOG.md --- src/Service/Athena/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Athena/CHANGELOG.md b/src/Service/Athena/CHANGELOG.md index 5f2abd83d..ee3008da0 100644 --- a/src/Service/Athena/CHANGELOG.md +++ b/src/Service/Athena/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Added +### BC Break - AWS api-change: Removing FEDERATED from Create/List/Delete/GetDataCatalog API From 556e9276a195c784f5f26bdba7f7cc72ff10bc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Tue, 22 Oct 2024 09:00:51 +0200 Subject: [PATCH 3/3] Apply suggestions from code review --- src/Service/Athena/CHANGELOG.md | 2 +- src/Service/Athena/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/Athena/CHANGELOG.md b/src/Service/Athena/CHANGELOG.md index ee3008da0..1162ecd3f 100644 --- a/src/Service/Athena/CHANGELOG.md +++ b/src/Service/Athena/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### BC Break +### BC-BREAK - AWS api-change: Removing FEDERATED from Create/List/Delete/GetDataCatalog API diff --git a/src/Service/Athena/composer.json b/src/Service/Athena/composer.json index 1476ce8be..4e453ebd1 100644 --- a/src/Service/Athena/composer.json +++ b/src/Service/Athena/composer.json @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.0-dev" } } }