commonfields: id: AWS - Athena - Beta version: -1 name: AWS - Athena - Beta display: AWS - Athena category: IT Services provider: Amazon description: Amazon Web Services Athena. configuration: - display: Role Arn name: roleArn type: 0 required: false section: Connect - display: Role Session Name name: roleSessionName type: 0 required: false section: Connect - display: Role Session Duration name: sessionDuration type: 0 required: false section: Connect advanced: true - display: AWS Default Region name: defaultRegion type: 15 required: false options: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - ca-central-1 - eu-west-1 - eu-central-1 - eu-west-2 - ap-northeast-1 - ap-northeast-2 - ap-southeast-1 - ap-southeast-2 - ap-south-1 - sa-east-1 - eu-north-1 - eu-west-3 - us-gov-east-1 - us-gov-west-1 section: Connect - display: Access Key name: credentials type: 9 displaypassword: Secret Key required: false section: Connect - display: Access Key name: access_key defaultvalue: "" type: 0 hidden: true required: false - display: Secret Key name: secret_key type: 4 defaultvalue: "" hidden: true required: false - display: Timeout name: timeout type: 0 required: false defaultvalue: "60,10" additionalinfo: The time in seconds until a timeout exception is reached. You can specify just the read timeout (for example 60) or also the connect timeout followed after a comma (for example 60,10). If a connect timeout is not specified, a default of 10 second will be used. section: Connect advanced: true - display: Retries name: retries type: 0 required: false defaultvalue: 5 additionalinfo: "The maximum number of retry attempts when connection or throttling errors are encountered. Set to 0 to disable retries. The default value is 5 and the limit is 10. Note: Increasing the number of retries will increase the execution time." section: Connect advanced: true - display: AWS STS Regional Endpoints additionalinfo: Sets the AWS_STS_REGIONAL_ENDPOINTS environment variable to specify the AWS STS endpoint resolution logic. By default, this option is set to “legacy” in AWS. Leave empty if the environment variable is already set using server configuration. name: sts_regional_endpoint options: - legacy - regional type: 15 section: Connect required: false - display: Trust any certificate (not secure) name: insecure type: 8 required: false section: Connect - display: Use system proxy settings name: proxy type: 8 required: false section: Connect script: script: '' type: python commands: - name: aws-athena-execute-query arguments: - name: QueryString required: true description: The SQL query statements to be executed. - name: QueryLimit description: A limit (number) to use for the query. If the keyword 'LIMIT' exists within 'QueryString', this parameter will be ignored. defaultValue: 50 - name: ClientRequestToken description: A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. - name: Database description: The name of the database. - name: OutputLocation description: The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. - name: EncryptionOption description: Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3 ), server-side encryption with KMS-managed keys (SSE-KMS ), or client-side encryption with KMS-managed keys (CSE-KMS) is used. - name: KmsKey description: For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID. - name: WorkGroup description: The name of the workgroup in which the query is being started. - name: roleArn description: The Amazon Resource Name (ARN) of the role to assume. - name: roleSessionName description: An identifier for the assumed role session. - name: roleSessionDuration description: The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. - name: region description: The AWS Region, if not specified the default region will be used. - name: QueryExecutionId hidden: true description: ID of the newly created query. Used internally for polling. - name: hide_polling_output hidden: true description: '' description: Execute a new query, wait for the query to complete (using polling), and return query's execution information, and query's results (if successful). Either 'OutputLocation' or 'WorkGroup' must be specified for the query to run. polling: true outputs: - contextPath: AWS.Athena.Query.QueryExecutionId description: The unique identifier for each query execution. type: String - contextPath: AWS.Athena.Query.Query description: The SQL query statements which the query execution ran. type: String - contextPath: AWS.Athena.Query.StatementType description: The type of query statement that was run. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.OutputLocation description: The location in Amazon S3 where your query and calculation results are stored, such as 's3://path/to/query/bucket/'. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.EncryptionConfiguration.EncryptionOption description: If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS) and key information. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.EncryptionConfiguration.KmsKey description: For SSE_KMS and CSE_KMS, this is the KMS key ARN or ID. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.ExpectedBucketOwner description: The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration.OutputLocation. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.AclConfiguration.S3AclOption description: The Amazon S3 canned ACL that Athena should specify when storing query results. type: String - contextPath: AWS.Athena.Query.ResultReuseConfiguration.ResultReuseByAgeConfiguration.Enabled description: True if previous query results can be reused when the query is run; otherwise, false. The default is false. type: Boolean - contextPath: AWS.Athena.Query.ResultReuseConfiguration.ResultReuseByAgeConfiguration.MaxAgeInMinutes description: Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60. type: Number - contextPath: AWS.Athena.Query.QueryExecutionContext.Database description: The name of the database used in the query execution. type: String - contextPath: AWS.Athena.Query.QueryExecutionContext.Catalog description: The name of the data catalog used in the query execution. type: String - contextPath: AWS.Athena.Query.Status.State description: The state of query execution. type: String - contextPath: AWS.Athena.Query.Status.StateChangeReason description: Further detail about the status of the query. type: String - contextPath: AWS.Athena.Query.Status.SubmissionDateTime description: The date and time that the query was submitted. type: String - contextPath: AWS.Athena.Query.Status.CompletionDateTime description: The date and time that the query completed. type: String - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorCategory description: An integer value that specifies the category of a query failure error. type: Number - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorType description: An integer value that provides specific information about an Athena query error. For the meaning of specific values, see the Error Type Reference in the Amazon Athena User Guide. type: Number - contextPath: AWS.Athena.Query.Status.AthenaError.Retryable description: True if the query might succeed if resubmitted. type: Boolean - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorMessage description: Contains a short description of the error that occurred. type: String - contextPath: AWS.Athena.Query.Statistics.EngineExecutionTimeInMillis description: The number of milliseconds that the query took to execute. type: Number - contextPath: AWS.Athena.Query.Statistics.DataScannedInBytes description: The number of bytes in the data that was queried. type: Number - contextPath: AWS.Athena.Query.Statistics.DataManifestLocation description: The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. type: String - contextPath: AWS.Athena.Query.Statistics.TotalExecutionTimeInMillis description: The number of milliseconds that Athena took to run the query. type: Number - contextPath: AWS.Athena.Query.Statistics.QueryQueueTimeInMillis description: The number of milliseconds that the query was in your query queue waiting for resources. type: Number - contextPath: AWS.Athena.Query.Statistics.ServicePreProcessingTimeInMillis description: The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine. type: Number - contextPath: AWS.Athena.Query.Statistics.QueryPlanningTimeInMillis description: The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. type: Number - contextPath: AWS.Athena.Query.Statistics.ServiceProcessingTimeInMillis description: The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query. type: Number - contextPath: AWS.Athena.Query.ResultReuseInformation.ReusedPreviousResult description: True if a previous query result was reused; false if the result was generated from a new run of the query. type: Boolean - contextPath: AWS.Athena.Query.WorkGroup description: The name of the workgroup in which the query ran. type: String - contextPath: AWS.Athena.Query.EngineVersion.SelectedEngineVersion description: The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including AUTO. type: String - contextPath: AWS.Athena.Query.EngineVersion.EffectiveEngineVersion description: The engine version on which the query runs. type: String - contextPath: AWS.Athena.Query.ExecutionParameters description: A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur. The list of parameters is not returned in the response. type: List - contextPath: AWS.Athena.Query.SubstatementType description: The kind of query statement that was run. type: String - contextPath: AWS.Athena.QueryResults description: List of query results. type: List - name: aws-athena-start-query arguments: - name: QueryString required: true description: The SQL query statements to be executed. - name: QueryLimit description: A limit (number) to use for the query. If the keyword 'LIMIT' exists within 'QueryString', this parameter will be ignored. defaultValue: 50 - name: ClientRequestToken description: A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. - name: Database description: The name of the database. - name: OutputLocation description: The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. - name: EncryptionOption description: Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3 ), server-side encryption with KMS-managed keys (SSE-KMS ), or client-side encryption with KMS-managed keys (CSE-KMS) is used. - name: KmsKey description: For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID. - name: WorkGroup description: The name of the workgroup in which the query is being started. - name: roleArn description: The Amazon Resource Name (ARN) of the role to assume. - name: roleSessionName description: An identifier for the assumed role session. - name: roleSessionDuration description: The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. - name: region description: The AWS Region, if not specified the default region will be used. description: Start an Athena query. Either 'OutputLocation' or 'WorkGroup' must be specified for the query to run. outputs: - contextPath: AWS.Athena.Query.QueryExecutionId description: ID of the newly created query. type: String - contextPath: AWS.Athena.Query.Query description: The query string submitted. type: String - name: aws-athena-stop-query arguments: - name: QueryExecutionId description: The unique ID of the query execution to stop. This field is auto-populated if not provided. required: true - name: region description: The AWS Region, if not specified the default region will be used. - name: roleArn description: The Amazon Resource Name (ARN) of the role to assume. - name: roleSessionName description: An identifier for the assumed role session. - name: roleSessionDuration description: The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. description: Stop an existing running query. - name: aws-athena-get-query-execution arguments: - name: region description: The AWS Region, if not specified the default region will be used. - name: roleArn description: The Amazon Resource Name (ARN) of the role to assume. - name: roleSessionName description: An identifier for the assumed role session. - name: roleSessionDuration description: The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. - name: QueryExecutionId description: The unique ID of the query execution. required: true description: Return execution information of a query. outputs: - contextPath: AWS.Athena.Query.QueryExecutionId description: The unique identifier for each query execution. type: String - contextPath: AWS.Athena.Query.Query description: The SQL query statements which the query execution ran. type: String - contextPath: AWS.Athena.Query.StatementType description: The type of query statement that was run. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.OutputLocation description: The location in Amazon S3 where your query and calculation results are stored, such as 's3://path/to/query/bucket/'. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.EncryptionConfiguration.EncryptionOption description: If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS) and key information. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.EncryptionConfiguration.KmsKey description: For SSE_KMS and CSE_KMS, this is the KMS key ARN or ID. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.ExpectedBucketOwner description: The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration.OutputLocation. type: String - contextPath: AWS.Athena.Query.ResultConfiguration.AclConfiguration.S3AclOption description: The Amazon S3 canned ACL that Athena should specify when storing query results. type: String - contextPath: AWS.Athena.Query.ResultReuseConfiguration.ResultReuseByAgeConfiguration.Enabled description: True if previous query results can be reused when the query is run; otherwise, false. The default is false. type: Boolean - contextPath: AWS.Athena.Query.ResultReuseConfiguration.ResultReuseByAgeConfiguration.MaxAgeInMinutes description: Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60. type: Number - contextPath: AWS.Athena.Query.QueryExecutionContext.Database description: The name of the database used in the query execution. type: String - contextPath: AWS.Athena.Query.QueryExecutionContext.Catalog description: The name of the data catalog used in the query execution. type: String - contextPath: AWS.Athena.Query.Status.State description: The state of query execution. type: String - contextPath: AWS.Athena.Query.Status.StateChangeReason description: Further detail about the status of the query. type: String - contextPath: AWS.Athena.Query.Status.SubmissionDateTime description: The date and time that the query was submitted. type: String - contextPath: AWS.Athena.Query.Status.CompletionDateTime description: The date and time that the query completed. type: String - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorCategory description: An integer value that specifies the category of a query failure error. type: Number - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorType description: An integer value that provides specific information about an Athena query error. For the meaning of specific values, see the Error Type Reference in the Amazon Athena User Guide. type: Number - contextPath: AWS.Athena.Query.Status.AthenaError.Retryable description: True if the query might succeed if resubmitted. type: Boolean - contextPath: AWS.Athena.Query.Status.AthenaError.ErrorMessage description: Contains a short description of the error that occurred. type: String - contextPath: AWS.Athena.Query.Statistics.EngineExecutionTimeInMillis description: The number of milliseconds that the query took to execute. type: Number - contextPath: AWS.Athena.Query.Statistics.DataScannedInBytes description: The number of bytes in the data that was queried. type: Number - contextPath: AWS.Athena.Query.Statistics.DataManifestLocation description: The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. type: String - contextPath: AWS.Athena.Query.Statistics.TotalExecutionTimeInMillis description: The number of milliseconds that Athena took to run the query. type: Number - contextPath: AWS.Athena.Query.Statistics.QueryQueueTimeInMillis description: The number of milliseconds that the query was in your query queue waiting for resources. type: Number - contextPath: AWS.Athena.Query.Statistics.ServicePreProcessingTimeInMillis description: The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine. type: Number - contextPath: AWS.Athena.Query.Statistics.QueryPlanningTimeInMillis description: The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. type: Number - contextPath: AWS.Athena.Query.Statistics.ServiceProcessingTimeInMillis description: The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query. type: Number - contextPath: AWS.Athena.Query.ResultReuseInformation.ReusedPreviousResult description: True if a previous query result was reused; false if the result was generated from a new run of the query. type: Boolean - contextPath: AWS.Athena.Query.WorkGroup description: The name of the workgroup in which the query ran. type: String - contextPath: AWS.Athena.Query.EngineVersion.SelectedEngineVersion description: The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including AUTO. type: String - contextPath: AWS.Athena.Query.EngineVersion.EffectiveEngineVersion description: The engine version on which the query runs. type: String - contextPath: AWS.Athena.Query.ExecutionParameters description: A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur. The list of parameters is not returned in the response. type: List - contextPath: AWS.Athena.Query.SubstatementType description: The kind of query statement that was run. type: String - name: aws-athena-get-query-results arguments: - name: QueryExecutionId required: true description: The unique ID of the query execution. - name: region description: The AWS Region, if not specified the default region will be used. - name: roleArn description: The Amazon Resource Name (ARN) of the role to assume. - name: roleSessionName description: An identifier for the assumed role session. - name: roleSessionDuration description: The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. description: Return the results of a query. outputs: - contextPath: AWS.Athena.QueryResults description: List of query results. type: List dockerimage: demisto/boto3py3:1.0.0.10221838 subtype: python3 tests: - No tests fromversion: 5.0.0