1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// Contains metadata for a column in a table. 10type Column struct { 11 12 // The name of the column. 13 // 14 // This member is required. 15 Name *string 16 17 // Optional information about the column. 18 Comment *string 19 20 // The data type of the column. 21 Type *string 22} 23 24// Information about the columns in a query execution result. 25type ColumnInfo struct { 26 27 // The name of the column. 28 // 29 // This member is required. 30 Name *string 31 32 // The data type of the column. 33 // 34 // This member is required. 35 Type *string 36 37 // Indicates whether values in the column are case-sensitive. 38 CaseSensitive bool 39 40 // The catalog to which the query results belong. 41 CatalogName *string 42 43 // A column label. 44 Label *string 45 46 // Indicates the column's nullable status. 47 Nullable ColumnNullable 48 49 // For DECIMAL data types, specifies the total number of digits, up to 38. For 50 // performance reasons, we recommend up to 18 digits. 51 Precision int32 52 53 // For DECIMAL data types, specifies the total number of digits in the fractional 54 // part of the value. Defaults to 0. 55 Scale int32 56 57 // The schema name (database name) to which the query results belong. 58 SchemaName *string 59 60 // The table name for the query results. 61 TableName *string 62} 63 64// Contains metadata information for a database in a data catalog. 65type Database struct { 66 67 // The name of the database. 68 // 69 // This member is required. 70 Name *string 71 72 // An optional description of the database. 73 Description *string 74 75 // A set of custom key/value pairs. 76 Parameters map[string]string 77} 78 79// Contains information about a data catalog in an AWS account. 80type DataCatalog struct { 81 82 // The name of the data catalog. The catalog name must be unique for the AWS 83 // account and can use a maximum of 128 alphanumeric, underscore, at sign, or 84 // hyphen characters. 85 // 86 // This member is required. 87 Name *string 88 89 // The type of data catalog: LAMBDA for a federated catalog or HIVE for an external 90 // hive metastore. GLUE refers to the AwsDataCatalog that already exists in your 91 // account, of which you can have only one. 92 // 93 // This member is required. 94 Type DataCatalogType 95 96 // An optional description of the data catalog. 97 Description *string 98 99 // Specifies the Lambda function or functions to use for the data catalog. This is 100 // a mapping whose values depend on the catalog type. 101 // 102 // * For the HIVE data catalog 103 // type, use the following syntax. The metadata-function parameter is required. The 104 // sdk-version parameter is optional and defaults to the currently supported 105 // version. metadata-function=lambda_arn, sdk-version=version_number 106 // 107 // * For the 108 // LAMBDA data catalog type, use one of the following sets of required parameters, 109 // but not both. 110 // 111 // * If you have one Lambda function that processes metadata and 112 // another for reading the actual data, use the following syntax. Both parameters 113 // are required. metadata-function=lambda_arn, record-function=lambda_arn 114 // 115 // * If you 116 // have a composite Lambda function that processes both metadata and data, use the 117 // following syntax to specify your Lambda function. function=lambda_arn 118 Parameters map[string]string 119} 120 121// The summary information for the data catalog, which includes its name and type. 122type DataCatalogSummary struct { 123 124 // The name of the data catalog. 125 CatalogName *string 126 127 // The data catalog type. 128 Type DataCatalogType 129} 130 131// A piece of data (a field in the table). 132type Datum struct { 133 134 // The value of the datum. 135 VarCharValue *string 136} 137 138// If query results are encrypted in Amazon S3, indicates the encryption option 139// used (for example, SSE-KMS or CSE-KMS) and key information. 140type EncryptionConfiguration struct { 141 142 // Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys 143 // (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or client-side 144 // encryption with KMS-managed keys (CSE-KMS) is used. If a query runs in a 145 // workgroup and the workgroup overrides client-side settings, then the workgroup's 146 // setting for encryption is used. It specifies whether query results must be 147 // encrypted, for all queries that run in this workgroup. 148 // 149 // This member is required. 150 EncryptionOption EncryptionOption 151 152 // For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. 153 KmsKey *string 154} 155 156// The Athena engine version for running queries. 157type EngineVersion struct { 158 159 // Read only. The engine version on which the query runs. If the user requests a 160 // valid engine version other than Auto, the effective engine version is the same 161 // as the engine version that the user requested. If the user requests Auto, the 162 // effective engine version is chosen by Athena. When a request to update the 163 // engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the 164 // EffectiveEngineVersion field is ignored. 165 EffectiveEngineVersion *string 166 167 // The engine version requested by the user. Possible values are determined by the 168 // output of ListEngineVersions, including Auto. The default is Auto. 169 SelectedEngineVersion *string 170} 171 172// A query, where QueryString is the list of SQL query statements that comprise the 173// query. 174type NamedQuery struct { 175 176 // The database to which the query belongs. 177 // 178 // This member is required. 179 Database *string 180 181 // The query name. 182 // 183 // This member is required. 184 Name *string 185 186 // The SQL query statements that comprise the query. 187 // 188 // This member is required. 189 QueryString *string 190 191 // The query description. 192 Description *string 193 194 // The unique identifier of the query. 195 NamedQueryId *string 196 197 // The name of the workgroup that contains the named query. 198 WorkGroup *string 199} 200 201// A prepared SQL statement for use with Athena. 202type PreparedStatement struct { 203 204 // The description of the prepared statement. 205 Description *string 206 207 // The last modified time of the prepared statement. 208 LastModifiedTime *time.Time 209 210 // The query string for the prepared statement. 211 QueryStatement *string 212 213 // The name of the prepared statement. 214 StatementName *string 215 216 // The name of the workgroup to which the prepared statement belongs. 217 WorkGroupName *string 218} 219 220// The name and last modified time of the prepared statement. 221type PreparedStatementSummary struct { 222 223 // The last modified time of the prepared statement. 224 LastModifiedTime *time.Time 225 226 // The name of the prepared statement. 227 StatementName *string 228} 229 230// Information about a single instance of a query execution. 231type QueryExecution struct { 232 233 // The engine version that executed the query. 234 EngineVersion *EngineVersion 235 236 // The SQL query statements which the query execution ran. 237 Query *string 238 239 // The database in which the query execution occurred. 240 QueryExecutionContext *QueryExecutionContext 241 242 // The unique identifier for each query execution. 243 QueryExecutionId *string 244 245 // The location in Amazon S3 where query results were stored and the encryption 246 // option, if any, used for query results. These are known as "client-side 247 // settings". If workgroup settings override client-side settings, then the query 248 // uses the location for the query results and the encryption configuration that 249 // are specified for the workgroup. 250 ResultConfiguration *ResultConfiguration 251 252 // The type of query statement that was run. DDL indicates DDL query statements. 253 // DML indicates DML (Data Manipulation Language) query statements, such as CREATE 254 // TABLE AS SELECT. UTILITY indicates query statements other than DDL and DML, such 255 // as SHOW CREATE TABLE, or DESCRIBE . 256 StatementType StatementType 257 258 // Query execution statistics, such as the amount of data scanned, the amount of 259 // time that the query took to process, and the type of statement that was run. 260 Statistics *QueryExecutionStatistics 261 262 // The completion date, current state, submission time, and state change reason (if 263 // applicable) for the query execution. 264 Status *QueryExecutionStatus 265 266 // The name of the workgroup in which the query ran. 267 WorkGroup *string 268} 269 270// The database and data catalog context in which the query execution occurs. 271type QueryExecutionContext struct { 272 273 // The name of the data catalog used in the query execution. 274 Catalog *string 275 276 // The name of the database used in the query execution. 277 Database *string 278} 279 280// The amount of data scanned during the query execution and the amount of time 281// that it took to execute, and the type of statement that was run. 282type QueryExecutionStatistics struct { 283 284 // The location and file name of a data manifest file. The manifest file is saved 285 // to the Athena query results location in Amazon S3. The manifest file tracks 286 // files that the query wrote to Amazon S3. If the query fails, the manifest file 287 // also tracks files that the query intended to write. The manifest is useful for 288 // identifying orphaned files resulting from a failed query. For more information, 289 // see Working with Query Results, Output Files, and Query History 290 // (https://docs.aws.amazon.com/athena/latest/ug/querying.html) in the Amazon 291 // Athena User Guide. 292 DataManifestLocation *string 293 294 // The number of bytes in the data that was queried. 295 DataScannedInBytes *int64 296 297 // The number of milliseconds that the query took to execute. 298 EngineExecutionTimeInMillis *int64 299 300 // The number of milliseconds that Athena took to plan the query processing flow. 301 // This includes the time spent retrieving table partitions from the data source. 302 // Note that because the query engine performs the query planning, query planning 303 // time is a subset of engine processing time. 304 QueryPlanningTimeInMillis *int64 305 306 // The number of milliseconds that the query was in your query queue waiting for 307 // resources. Note that if transient errors occur, Athena might automatically add 308 // the query back to the queue. 309 QueryQueueTimeInMillis *int64 310 311 // The number of milliseconds that Athena took to finalize and publish the query 312 // results after the query engine finished running the query. 313 ServiceProcessingTimeInMillis *int64 314 315 // The number of milliseconds that Athena took to run the query. 316 TotalExecutionTimeInMillis *int64 317} 318 319// The completion date, current state, submission time, and state change reason (if 320// applicable) for the query execution. 321type QueryExecutionStatus struct { 322 323 // The date and time that the query completed. 324 CompletionDateTime *time.Time 325 326 // The state of query execution. QUEUED indicates that the query has been submitted 327 // to the service, and Athena will execute the query as soon as resources are 328 // available. RUNNING indicates that the query is in execution phase. SUCCEEDED 329 // indicates that the query completed without errors. FAILED indicates that the 330 // query experienced an error and did not complete processing. CANCELLED indicates 331 // that a user input interrupted query execution. Athena automatically retries your 332 // queries in cases of certain transient errors. As a result, you may see the query 333 // state transition from RUNNING or FAILED to QUEUED. 334 State QueryExecutionState 335 336 // Further detail about the status of the query. 337 StateChangeReason *string 338 339 // The date and time that the query was submitted. 340 SubmissionDateTime *time.Time 341} 342 343// The location in Amazon S3 where query results are stored and the encryption 344// option, if any, used for query results. These are known as "client-side 345// settings". If workgroup settings override client-side settings, then the query 346// uses the workgroup settings. 347type ResultConfiguration struct { 348 349 // If query results are encrypted in Amazon S3, indicates the encryption option 350 // used (for example, SSE-KMS or CSE-KMS) and key information. This is a 351 // client-side setting. If workgroup settings override client-side settings, then 352 // the query uses the encryption configuration that is specified for the workgroup, 353 // and also uses the location for storing query results specified in the workgroup. 354 // See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings 355 // Override Client-Side Settings 356 // (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 357 EncryptionConfiguration *EncryptionConfiguration 358 359 // The location in Amazon S3 where your query results are stored, such as 360 // s3://path/to/query/bucket/. To run the query, you must specify the query results 361 // location using one of the ways: either for individual queries using either this 362 // setting (client-side), or in the workgroup, using WorkGroupConfiguration. If 363 // none of them is set, Athena issues an error that no output location is provided. 364 // For more information, see Query Results 365 // (https://docs.aws.amazon.com/athena/latest/ug/querying.html). If workgroup 366 // settings override client-side settings, then the query uses the settings 367 // specified for the workgroup. See 368 // WorkGroupConfiguration$EnforceWorkGroupConfiguration. 369 OutputLocation *string 370} 371 372// The information about the updates in the query results, such as output location 373// and encryption configuration for the query results. 374type ResultConfigurationUpdates struct { 375 376 // The encryption configuration for the query results. 377 EncryptionConfiguration *EncryptionConfiguration 378 379 // The location in Amazon S3 where your query results are stored, such as 380 // s3://path/to/query/bucket/. For more information, see Query Results 381 // (https://docs.aws.amazon.com/athena/latest/ug/querying.html) If workgroup 382 // settings override client-side settings, then the query uses the location for the 383 // query results and the encryption configuration that are specified for the 384 // workgroup. The "workgroup settings override" is specified in 385 // EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See 386 // WorkGroupConfiguration$EnforceWorkGroupConfiguration. 387 OutputLocation *string 388 389 // If set to "true", indicates that the previously-specified encryption 390 // configuration (also known as the client-side setting) for queries in this 391 // workgroup should be ignored and set to null. If set to "false" or not set, and a 392 // value is present in the EncryptionConfiguration in ResultConfigurationUpdates 393 // (the client-side setting), the EncryptionConfiguration in the workgroup's 394 // ResultConfiguration will be updated with the new value. For more information, 395 // see Workgroup Settings Override Client-Side Settings 396 // (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 397 RemoveEncryptionConfiguration *bool 398 399 // If set to "true", indicates that the previously-specified query results location 400 // (also known as a client-side setting) for queries in this workgroup should be 401 // ignored and set to null. If set to "false" or not set, and a value is present in 402 // the OutputLocation in ResultConfigurationUpdates (the client-side setting), the 403 // OutputLocation in the workgroup's ResultConfiguration will be updated with the 404 // new value. For more information, see Workgroup Settings Override Client-Side 405 // Settings 406 // (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 407 RemoveOutputLocation *bool 408} 409 410// The metadata and rows that comprise a query result set. The metadata describes 411// the column structure and data types. To return a ResultSet object, use 412// GetQueryResults. 413type ResultSet struct { 414 415 // The metadata that describes the column structure and data types of a table of 416 // query results. 417 ResultSetMetadata *ResultSetMetadata 418 419 // The rows in the table. 420 Rows []Row 421} 422 423// The metadata that describes the column structure and data types of a table of 424// query results. To return a ResultSetMetadata object, use GetQueryResults. 425type ResultSetMetadata struct { 426 427 // Information about the columns returned in a query result metadata. 428 ColumnInfo []ColumnInfo 429} 430 431// The rows that comprise a query result table. 432type Row struct { 433 434 // The data that populates a row in a query result table. 435 Data []Datum 436} 437 438// Contains metadata for a table. 439type TableMetadata struct { 440 441 // The name of the table. 442 // 443 // This member is required. 444 Name *string 445 446 // A list of the columns in the table. 447 Columns []Column 448 449 // The time that the table was created. 450 CreateTime *time.Time 451 452 // The last time the table was accessed. 453 LastAccessTime *time.Time 454 455 // A set of custom key/value pairs for table properties. 456 Parameters map[string]string 457 458 // A list of the partition keys in the table. 459 PartitionKeys []Column 460 461 // The type of table. In Athena, only EXTERNAL_TABLE is supported. 462 TableType *string 463} 464 465// A label that you assign to a resource. In Athena, a resource can be a workgroup 466// or data catalog. Each tag consists of a key and an optional value, both of which 467// you define. For example, you can use tags to categorize Athena workgroups or 468// data catalogs by purpose, owner, or environment. Use a consistent set of tag 469// keys to make it easier to search and filter workgroups or data catalogs in your 470// account. For best practices, see Tagging Best Practices 471// (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). Tag 472// keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 473// to 256 UTF-8 Unicode characters. Tags can use letters and numbers representable 474// in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are 475// case-sensitive. Tag keys must be unique per resource. If you specify more than 476// one tag, separate them by commas. 477type Tag struct { 478 479 // A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You 480 // can use letters and numbers representable in UTF-8, and the following 481 // characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per 482 // resource. 483 Key *string 484 485 // A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. 486 // You can use letters and numbers representable in UTF-8, and the following 487 // characters: + - = . _ : / @. Tag values are case-sensitive. 488 Value *string 489} 490 491// Information about a named query ID that could not be processed. 492type UnprocessedNamedQueryId struct { 493 494 // The error code returned when the processing request for the named query failed, 495 // if applicable. 496 ErrorCode *string 497 498 // The error message returned when the processing request for the named query 499 // failed, if applicable. 500 ErrorMessage *string 501 502 // The unique identifier of the named query. 503 NamedQueryId *string 504} 505 506// Describes a query execution that failed to process. 507type UnprocessedQueryExecutionId struct { 508 509 // The error code returned when the query execution failed to process, if 510 // applicable. 511 ErrorCode *string 512 513 // The error message returned when the query execution failed to process, if 514 // applicable. 515 ErrorMessage *string 516 517 // The unique identifier of the query execution. 518 QueryExecutionId *string 519} 520 521// A workgroup, which contains a name, description, creation time, state, and other 522// configuration, listed under WorkGroup$Configuration. Each workgroup enables you 523// to isolate queries for you or your group of users from other queries in the same 524// account, to configure the query results location and the encryption 525// configuration (known as workgroup settings), to enable sending query metrics to 526// Amazon CloudWatch, and to establish per-query data usage control limits for all 527// queries in a workgroup. The workgroup settings override is specified in 528// EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See 529// WorkGroupConfiguration$EnforceWorkGroupConfiguration. 530type WorkGroup struct { 531 532 // The workgroup name. 533 // 534 // This member is required. 535 Name *string 536 537 // The configuration of the workgroup, which includes the location in Amazon S3 538 // where query results are stored, the encryption configuration, if any, used for 539 // query results; whether the Amazon CloudWatch Metrics are enabled for the 540 // workgroup; whether workgroup settings override client-side settings; and the 541 // data usage limits for the amount of data scanned per query or per workgroup. The 542 // workgroup settings override is specified in EnforceWorkGroupConfiguration 543 // (true/false) in the WorkGroupConfiguration. See 544 // WorkGroupConfiguration$EnforceWorkGroupConfiguration. 545 Configuration *WorkGroupConfiguration 546 547 // The date and time the workgroup was created. 548 CreationTime *time.Time 549 550 // The workgroup description. 551 Description *string 552 553 // The state of the workgroup: ENABLED or DISABLED. 554 State WorkGroupState 555} 556 557// The configuration of the workgroup, which includes the location in Amazon S3 558// where query results are stored, the encryption option, if any, used for query 559// results, whether the Amazon CloudWatch Metrics are enabled for the workgroup and 560// whether workgroup settings override query settings, and the data usage limits 561// for the amount of data scanned per query or per workgroup. The workgroup 562// settings override is specified in EnforceWorkGroupConfiguration (true/false) in 563// the WorkGroupConfiguration. See 564// WorkGroupConfiguration$EnforceWorkGroupConfiguration. 565type WorkGroupConfiguration struct { 566 567 // The upper data usage limit (cutoff) for the amount of bytes a single query in a 568 // workgroup is allowed to scan. 569 BytesScannedCutoffPerQuery *int64 570 571 // If set to "true", the settings for the workgroup override client-side settings. 572 // If set to "false", client-side settings are used. For more information, see 573 // Workgroup Settings Override Client-Side Settings 574 // (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 575 EnforceWorkGroupConfiguration *bool 576 577 // The engine version that all queries running on the workgroup use. Queries on the 578 // AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless 579 // of this setting. 580 EngineVersion *EngineVersion 581 582 // Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. 583 PublishCloudWatchMetricsEnabled *bool 584 585 // If set to true, allows members assigned to a workgroup to reference Amazon S3 586 // Requester Pays buckets in queries. If set to false, workgroup members cannot 587 // query data from Requester Pays buckets, and queries that retrieve data from 588 // Requester Pays buckets cause an error. The default is false. For more 589 // information about Requester Pays buckets, see Requester Pays Buckets 590 // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html) in 591 // the Amazon Simple Storage Service Developer Guide. 592 RequesterPaysEnabled *bool 593 594 // The configuration for the workgroup, which includes the location in Amazon S3 595 // where query results are stored and the encryption option, if any, used for query 596 // results. To run the query, you must specify the query results location using one 597 // of the ways: either in the workgroup using this setting, or for individual 598 // queries (client-side), using ResultConfiguration$OutputLocation. If none of them 599 // is set, Athena issues an error that no output location is provided. For more 600 // information, see Query Results 601 // (https://docs.aws.amazon.com/athena/latest/ug/querying.html). 602 ResultConfiguration *ResultConfiguration 603} 604 605// The configuration information that will be updated for this workgroup, which 606// includes the location in Amazon S3 where query results are stored, the 607// encryption option, if any, used for query results, whether the Amazon CloudWatch 608// Metrics are enabled for the workgroup, whether the workgroup settings override 609// the client-side settings, and the data usage limit for the amount of bytes 610// scanned per query, if it is specified. 611type WorkGroupConfigurationUpdates struct { 612 613 // The upper limit (cutoff) for the amount of bytes a single query in a workgroup 614 // is allowed to scan. 615 BytesScannedCutoffPerQuery *int64 616 617 // If set to "true", the settings for the workgroup override client-side settings. 618 // If set to "false" client-side settings are used. For more information, see 619 // Workgroup Settings Override Client-Side Settings 620 // (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 621 EnforceWorkGroupConfiguration *bool 622 623 // The engine version requested when a workgroup is updated. After the update, all 624 // queries on the workgroup run on the requested engine version. If no value was 625 // previously set, the default is Auto. Queries on the 626 // AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless 627 // of this setting. 628 EngineVersion *EngineVersion 629 630 // Indicates whether this workgroup enables publishing metrics to Amazon 631 // CloudWatch. 632 PublishCloudWatchMetricsEnabled *bool 633 634 // Indicates that the data usage control limit per query is removed. 635 // WorkGroupConfiguration$BytesScannedCutoffPerQuery 636 RemoveBytesScannedCutoffPerQuery *bool 637 638 // If set to true, allows members assigned to a workgroup to specify Amazon S3 639 // Requester Pays buckets in queries. If set to false, workgroup members cannot 640 // query data from Requester Pays buckets, and queries that retrieve data from 641 // Requester Pays buckets cause an error. The default is false. For more 642 // information about Requester Pays buckets, see Requester Pays Buckets 643 // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html) in 644 // the Amazon Simple Storage Service Developer Guide. 645 RequesterPaysEnabled *bool 646 647 // The result configuration information about the queries in this workgroup that 648 // will be updated. Includes the updated results location and an updated option for 649 // encrypting query results. 650 ResultConfigurationUpdates *ResultConfigurationUpdates 651} 652 653// The summary information for the workgroup, which includes its name, state, 654// description, and the date and time it was created. 655type WorkGroupSummary struct { 656 657 // The workgroup creation date and time. 658 CreationTime *time.Time 659 660 // The workgroup description. 661 Description *string 662 663 // The engine version setting for all queries on the workgroup. Queries on the 664 // AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless 665 // of this setting. 666 EngineVersion *EngineVersion 667 668 // The name of the workgroup. 669 Name *string 670 671 // The state of the workgroup. 672 State WorkGroupState 673} 674