Skip to content

Commit cbfa35a

Browse files
Update generated code (#1784)
* update generated code * Update src/Service/Athena/CHANGELOG.md * Apply suggestions from code review --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent a59e8ca commit cbfa35a

9 files changed

+17
-207
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### BC-BREAK
6+
7+
- AWS api-change: Removing FEDERATED from Create/List/Delete/GetDataCatalog API
8+
59
## 2.3.0
610

711
### Added

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"extra": {
3131
"branch-alias": {
32-
"dev-master": "2.3-dev"
32+
"dev-master": "3.0-dev"
3333
}
3434
}
3535
}

src/Enum/ConnectionType.php

-73
This file was deleted.

src/Enum/DataCatalogStatus.php

-31
This file was deleted.

src/Enum/DataCatalogType.php

-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
final class DataCatalogType
66
{
7-
public const FEDERATED = 'FEDERATED';
87
public const GLUE = 'GLUE';
98
public const HIVE = 'HIVE';
109
public const LAMBDA = 'LAMBDA';
1110

1211
public static function exists(string $value): bool
1312
{
1413
return isset([
15-
self::FEDERATED => true,
1614
self::GLUE => true,
1715
self::HIVE => true,
1816
self::LAMBDA => true,

src/Result/GetDataCatalogOutput.php

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ private function populateResultDataCatalog(array $json): DataCatalog
3636
'Description' => isset($json['Description']) ? (string) $json['Description'] : null,
3737
'Type' => (string) $json['Type'],
3838
'Parameters' => !isset($json['Parameters']) ? null : $this->populateResultParametersMap($json['Parameters']),
39-
'Status' => isset($json['Status']) ? (string) $json['Status'] : null,
40-
'ConnectionType' => isset($json['ConnectionType']) ? (string) $json['ConnectionType'] : null,
41-
'Error' => isset($json['Error']) ? (string) $json['Error'] : null,
4239
]);
4340
}
4441

src/Result/GetQueryResultsOutput.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class GetQueryResultsOutput extends Result implements \IteratorAggregate
2020
{
2121
/**
22-
* The number of rows inserted with a `CREATE TABLE AS SELECT` statement.
22+
* The number of rows inserted with a `CREATE TABLE AS SELECT`, `INSERT INTO`, or `UPDATE` statement.
2323
*
2424
* @var int|null
2525
*/

src/ValueObject/AclConfiguration.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
use AsyncAws\Core\Exception\InvalidArgument;
77

88
/**
9-
* Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. When Athena stores
10-
* query results in Amazon S3, the canned ACL is set with the `x-amz-acl` request header. For more information about S3
11-
* Object Ownership, see Object Ownership settings [^1] in the *Amazon S3 User Guide*.
9+
* Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results, including data
10+
* files inserted by Athena as the result of statements like CTAS or INSERT INTO. When Athena stores query results in
11+
* Amazon S3, the canned ACL is set with the `x-amz-acl` request header. For more information about S3 Object Ownership,
12+
* see Object Ownership settings [^1] in the *Amazon S3 User Guide*.
1213
*
1314
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html#object-ownership-overview
1415
*/
1516
final class AclConfiguration
1617
{
1718
/**
18-
* The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned
19-
* ACL is `BUCKET_OWNER_FULL_CONTROL`. If a query runs in a workgroup and the workgroup overrides client-side settings,
20-
* then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the
21-
* workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL [^1] in the *Amazon S3 User Guide*.
19+
* The Amazon S3 canned ACL that Athena should specify when storing query results, including data files inserted by
20+
* Athena as the result of statements like CTAS or INSERT INTO. Currently the only supported canned ACL is
21+
* `BUCKET_OWNER_FULL_CONTROL`. If a query runs in a workgroup and the workgroup overrides client-side settings, then
22+
* the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For
23+
* more information about Amazon S3 canned ACLs, see Canned ACL [^1] in the *Amazon S3 User Guide*.
2224
*
2325
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl
2426
*

src/ValueObject/DataCatalog.php

+2-89
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace AsyncAws\Athena\ValueObject;
44

5-
use AsyncAws\Athena\Enum\ConnectionType;
6-
use AsyncAws\Athena\Enum\DataCatalogStatus;
75
use AsyncAws\Athena\Enum\DataCatalogType;
86
use AsyncAws\Core\Exception\InvalidArgument;
97

@@ -32,9 +30,8 @@ final class DataCatalog
3230
private $description;
3331

3432
/**
35-
* The type of data catalog to create: `LAMBDA` for a federated catalog, `GLUE` for an Glue Data Catalog, and `HIVE` for
36-
* an external Apache Hive metastore. `FEDERATED` is a federated catalog for which Athena creates the connection and the
37-
* Lambda function for you based on the parameters that you pass.
33+
* The type of data catalog to create: `LAMBDA` for a federated catalog, `HIVE` for an external hive metastore, or
34+
* `GLUE` for an Glue Data Catalog.
3835
*
3936
* @var DataCatalogType::*
4037
*/
@@ -67,73 +64,16 @@ final class DataCatalog
6764
* - The `GLUE` data catalog type also applies to the default `AwsDataCatalog` that already exists in your account, of
6865
* which you can have only one and cannot modify.
6966
*
70-
* - The `FEDERATED` data catalog type uses one of the following parameters, but not both. Use `connection-arn` for an
71-
* existing Glue connection. Use `connection-type` and `connection-properties` to specify the configuration setting
72-
* for a new connection.
73-
*
74-
* - `connection-arn:*<glue_connection_arn_to_reuse>*`
75-
* - `connection-type:MYSQL|REDSHIFT|...., connection-properties:"*<json_string>*"`
76-
*
77-
* For *`<json_string>`*, use escaped JSON text, as in the following example.
78-
*
79-
* `"{\"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\"}"`
80-
*
8167
* @var array<string, string>|null
8268
*/
8369
private $parameters;
8470

85-
/**
86-
* The status of the creation or deletion of the data catalog.
87-
*
88-
* - The `LAMBDA`, `GLUE`, and `HIVE` data catalog types are created synchronously. Their status is either
89-
* `CREATE_COMPLETE` or `CREATE_FAILED`.
90-
* - The `FEDERATED` data catalog type is created asynchronously.
91-
*
92-
* Data catalog creation status:
93-
*
94-
* - `CREATE_IN_PROGRESS`: Federated data catalog creation in progress.
95-
* - `CREATE_COMPLETE`: Data catalog creation complete.
96-
* - `CREATE_FAILED`: Data catalog could not be created.
97-
* - `CREATE_FAILED_CLEANUP_IN_PROGRESS`: Federated data catalog creation failed and is being removed.
98-
* - `CREATE_FAILED_CLEANUP_COMPLETE`: Federated data catalog creation failed and was removed.
99-
* - `CREATE_FAILED_CLEANUP_FAILED`: Federated data catalog creation failed but could not be removed.
100-
*
101-
* Data catalog deletion status:
102-
*
103-
* - `DELETE_IN_PROGRESS`: Federated data catalog deletion in progress.
104-
* - `DELETE_COMPLETE`: Federated data catalog deleted.
105-
* - `DELETE_FAILED`: Federated data catalog could not be deleted.
106-
*
107-
* @var DataCatalogStatus::*|null
108-
*/
109-
private $status;
110-
111-
/**
112-
* The type of connection for a `FEDERATED` data catalog (for example, `REDSHIFT`, `MYSQL`, or `SQLSERVER`). For
113-
* information about individual connectors, see Available data source connectors [^1].
114-
*
115-
* [^1]: https://docs.aws.amazon.com/athena/latest/ug/connectors-available.html
116-
*
117-
* @var ConnectionType::*|null
118-
*/
119-
private $connectionType;
120-
121-
/**
122-
* Text of the error that occurred during data catalog creation or deletion.
123-
*
124-
* @var string|null
125-
*/
126-
private $error;
127-
12871
/**
12972
* @param array{
13073
* Name: string,
13174
* Description?: null|string,
13275
* Type: DataCatalogType::*,
13376
* Parameters?: null|array<string, string>,
134-
* Status?: null|DataCatalogStatus::*,
135-
* ConnectionType?: null|ConnectionType::*,
136-
* Error?: null|string,
13777
* } $input
13878
*/
13979
public function __construct(array $input)
@@ -142,9 +82,6 @@ public function __construct(array $input)
14282
$this->description = $input['Description'] ?? null;
14383
$this->type = $input['Type'] ?? $this->throwException(new InvalidArgument('Missing required field "Type".'));
14484
$this->parameters = $input['Parameters'] ?? null;
145-
$this->status = $input['Status'] ?? null;
146-
$this->connectionType = $input['ConnectionType'] ?? null;
147-
$this->error = $input['Error'] ?? null;
14885
}
14986

15087
/**
@@ -153,34 +90,18 @@ public function __construct(array $input)
15390
* Description?: null|string,
15491
* Type: DataCatalogType::*,
15592
* Parameters?: null|array<string, string>,
156-
* Status?: null|DataCatalogStatus::*,
157-
* ConnectionType?: null|ConnectionType::*,
158-
* Error?: null|string,
15993
* }|DataCatalog $input
16094
*/
16195
public static function create($input): self
16296
{
16397
return $input instanceof self ? $input : new self($input);
16498
}
16599

166-
/**
167-
* @return ConnectionType::*|null
168-
*/
169-
public function getConnectionType(): ?string
170-
{
171-
return $this->connectionType;
172-
}
173-
174100
public function getDescription(): ?string
175101
{
176102
return $this->description;
177103
}
178104

179-
public function getError(): ?string
180-
{
181-
return $this->error;
182-
}
183-
184105
public function getName(): string
185106
{
186107
return $this->name;
@@ -194,14 +115,6 @@ public function getParameters(): array
194115
return $this->parameters ?? [];
195116
}
196117

197-
/**
198-
* @return DataCatalogStatus::*|null
199-
*/
200-
public function getStatus(): ?string
201-
{
202-
return $this->status;
203-
}
204-
205118
/**
206119
* @return DataCatalogType::*
207120
*/

0 commit comments

Comments
 (0)