2
2
3
3
namespace AsyncAws \Athena \ValueObject ;
4
4
5
+ use AsyncAws \Athena \Enum \ConnectionType ;
6
+ use AsyncAws \Athena \Enum \DataCatalogStatus ;
5
7
use AsyncAws \Athena \Enum \DataCatalogType ;
6
8
use AsyncAws \Core \Exception \InvalidArgument ;
7
9
@@ -30,8 +32,9 @@ final class DataCatalog
30
32
private $ description ;
31
33
32
34
/**
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.
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.
35
38
*
36
39
* @var DataCatalogType::*
37
40
*/
@@ -64,16 +67,73 @@ final class DataCatalog
64
67
* - The `GLUE` data catalog type also applies to the default `AwsDataCatalog` that already exists in your account, of
65
68
* which you can have only one and cannot modify.
66
69
*
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
+ *
67
81
* @var array<string, string>|null
68
82
*/
69
83
private $ parameters ;
70
84
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
+
71
128
/**
72
129
* @param array{
73
130
* Name: string,
74
131
* Description?: null|string,
75
132
* Type: DataCatalogType::*,
76
133
* Parameters?: null|array<string, string>,
134
+ * Status?: null|DataCatalogStatus::*,
135
+ * ConnectionType?: null|ConnectionType::*,
136
+ * Error?: null|string,
77
137
* } $input
78
138
*/
79
139
public function __construct (array $ input )
@@ -82,6 +142,9 @@ public function __construct(array $input)
82
142
$ this ->description = $ input ['Description ' ] ?? null ;
83
143
$ this ->type = $ input ['Type ' ] ?? $ this ->throwException (new InvalidArgument ('Missing required field "Type". ' ));
84
144
$ this ->parameters = $ input ['Parameters ' ] ?? null ;
145
+ $ this ->status = $ input ['Status ' ] ?? null ;
146
+ $ this ->connectionType = $ input ['ConnectionType ' ] ?? null ;
147
+ $ this ->error = $ input ['Error ' ] ?? null ;
85
148
}
86
149
87
150
/**
@@ -90,18 +153,34 @@ public function __construct(array $input)
90
153
* Description?: null|string,
91
154
* Type: DataCatalogType::*,
92
155
* Parameters?: null|array<string, string>,
156
+ * Status?: null|DataCatalogStatus::*,
157
+ * ConnectionType?: null|ConnectionType::*,
158
+ * Error?: null|string,
93
159
* }|DataCatalog $input
94
160
*/
95
161
public static function create ($ input ): self
96
162
{
97
163
return $ input instanceof self ? $ input : new self ($ input );
98
164
}
99
165
166
+ /**
167
+ * @return ConnectionType::*|null
168
+ */
169
+ public function getConnectionType (): ?string
170
+ {
171
+ return $ this ->connectionType ;
172
+ }
173
+
100
174
public function getDescription (): ?string
101
175
{
102
176
return $ this ->description ;
103
177
}
104
178
179
+ public function getError (): ?string
180
+ {
181
+ return $ this ->error ;
182
+ }
183
+
105
184
public function getName (): string
106
185
{
107
186
return $ this ->name ;
@@ -115,6 +194,14 @@ public function getParameters(): array
115
194
return $ this ->parameters ?? [];
116
195
}
117
196
197
+ /**
198
+ * @return DataCatalogStatus::*|null
199
+ */
200
+ public function getStatus (): ?string
201
+ {
202
+ return $ this ->status ;
203
+ }
204
+
118
205
/**
119
206
* @return DataCatalogType::*
120
207
*/
0 commit comments