Skip to content

Commit

Permalink
Update generated code (#1784)
Browse files Browse the repository at this point in the history
* update generated code

* Update src/Service/Athena/CHANGELOG.md

* Apply suggestions from code review

---------

Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
  • Loading branch information
async-aws-bot and jderusse authored Oct 22, 2024
1 parent edf51ff commit 0fae706
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 208 deletions.
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.324.5"
"${LATEST}": "3.324.7"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
4 changes: 4 additions & 0 deletions src/Service/Athena/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### BC-BREAK

- AWS api-change: Removing FEDERATED from Create/List/Delete/GetDataCatalog API

## 2.3.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Athena/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
"dev-master": "3.0-dev"
}
}
}
73 changes: 0 additions & 73 deletions src/Service/Athena/src/Enum/ConnectionType.php

This file was deleted.

31 changes: 0 additions & 31 deletions src/Service/Athena/src/Enum/DataCatalogStatus.php

This file was deleted.

2 changes: 0 additions & 2 deletions src/Service/Athena/src/Enum/DataCatalogType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

final class DataCatalogType
{
public const FEDERATED = 'FEDERATED';
public const GLUE = 'GLUE';
public const HIVE = 'HIVE';
public const LAMBDA = 'LAMBDA';

public static function exists(string $value): bool
{
return isset([
self::FEDERATED => true,
self::GLUE => true,
self::HIVE => true,
self::LAMBDA => true,
Expand Down
3 changes: 0 additions & 3 deletions src/Service/Athena/src/Result/GetDataCatalogOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Service/Athena/src/Result/GetQueryResultsOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
16 changes: 9 additions & 7 deletions src/Service/Athena/src/ValueObject/AclConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
91 changes: 2 additions & 89 deletions src/Service/Athena/src/ValueObject/DataCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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::*
*/
Expand Down Expand Up @@ -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:*<glue_connection_arn_to_reuse>*`
* - `connection-type:MYSQL|REDSHIFT|...., connection-properties:"*<json_string>*"`
*
* For *`<json_string>`*, 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<string, string>|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<string, string>,
* Status?: null|DataCatalogStatus::*,
* ConnectionType?: null|ConnectionType::*,
* Error?: null|string,
* } $input
*/
public function __construct(array $input)
Expand All @@ -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;
}

/**
Expand All @@ -153,34 +90,18 @@ public function __construct(array $input)
* Description?: null|string,
* Type: DataCatalogType::*,
* Parameters?: null|array<string, string>,
* Status?: null|DataCatalogStatus::*,
* ConnectionType?: null|ConnectionType::*,
* Error?: null|string,
* }|DataCatalog $input
*/
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;
Expand All @@ -194,14 +115,6 @@ public function getParameters(): array
return $this->parameters ?? [];
}

/**
* @return DataCatalogStatus::*|null
*/
public function getStatus(): ?string
{
return $this->status;
}

/**
* @return DataCatalogType::*
*/
Expand Down

0 comments on commit 0fae706

Please sign in to comment.