pub struct Client { /* private fields */ }
Expand description

Client for Amazon Athena

Client for invoking operations on Amazon Athena. Each operation on Amazon Athena is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_athena::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_athena::config::Builder::from(&shared_config)
  .retry_config(RetryConfig::disabled())
  .build();
let client = aws_sdk_athena::Client::from_conf(config);

Implementations§

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the BatchGetNamedQuery operation.

Constructs a fluent builder for the BatchGetPreparedStatement operation.

Constructs a fluent builder for the BatchGetQueryExecution operation.

Constructs a fluent builder for the CreateDataCatalog operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):

      The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.

    • r#type(DataCatalogType) / set_type(Option<DataCatalogType>):

      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.

    • description(impl Into<String>) / set_description(Option<String>):

      A description of the data catalog to be created.

    • parameters(HashMap<String, String>) / set_parameters(Option<HashMap<String, String>>):

      Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type.

      • For the HIVE data catalog type, use the following syntax. The metadata-function parameter is required. The sdk-version parameter is optional and defaults to the currently supported version.

        metadata-function=lambda_arn, sdk-version=version_number

      • For the LAMBDA data catalog type, use one of the following sets of required parameters, but not both.

        • If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.

          metadata-function=lambda_arn, record-function=lambda_arn

        • If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.

          function=lambda_arn

      • The GLUE type takes a catalog ID parameter and is required. The catalog_id is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.

        catalog-id=catalog_id

        • 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.

        • Queries that specify a Glue Data Catalog other than the default AwsDataCatalog must be run on Athena engine version 2.

        • In Regions where Athena engine version 2 is not available, creating new Glue data catalogs results in an INVALID_INPUT error.

    • tags(Vec<Tag>) / set_tags(Option<Vec<Tag>>):

      A list of comma separated tags to add to the data catalog that is created.

  • On success, responds with CreateDataCatalogOutput
  • On failure, responds with SdkError<CreateDataCatalogError>

Constructs a fluent builder for the CreateNamedQuery operation.

Constructs a fluent builder for the CreateNotebook operation.

Constructs a fluent builder for the CreatePreparedStatement operation.

Constructs a fluent builder for the CreatePresignedNotebookUrl operation.

Constructs a fluent builder for the CreateWorkGroup operation.

Constructs a fluent builder for the DeleteDataCatalog operation.

Constructs a fluent builder for the DeleteNamedQuery operation.

Constructs a fluent builder for the DeleteNotebook operation.

Constructs a fluent builder for the DeletePreparedStatement operation.

Constructs a fluent builder for the DeleteWorkGroup operation.

Constructs a fluent builder for the ExportNotebook operation.

Constructs a fluent builder for the GetCalculationExecution operation.

Constructs a fluent builder for the GetCalculationExecutionCode operation.

Constructs a fluent builder for the GetCalculationExecutionStatus operation.

Constructs a fluent builder for the GetDatabase operation.

Constructs a fluent builder for the GetDataCatalog operation.

Constructs a fluent builder for the GetNamedQuery operation.

Constructs a fluent builder for the GetNotebookMetadata operation.

Constructs a fluent builder for the GetPreparedStatement operation.

Constructs a fluent builder for the GetQueryExecution operation.

Constructs a fluent builder for the GetQueryResults operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetQueryRuntimeStatistics operation.

Constructs a fluent builder for the GetSession operation.

Constructs a fluent builder for the GetSessionStatus operation.

Constructs a fluent builder for the GetTableMetadata operation.

Constructs a fluent builder for the GetWorkGroup operation.

Constructs a fluent builder for the ImportNotebook operation.

Constructs a fluent builder for the ListApplicationDPUSizes operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListCalculationExecutions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDatabases operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDataCatalogs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEngineVersions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListExecutors operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListNamedQueries operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListNotebookMetadata operation.

Constructs a fluent builder for the ListNotebookSessions operation.

Constructs a fluent builder for the ListPreparedStatements operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListQueryExecutions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListSessions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTableMetadata operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTagsForResource operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListWorkGroups operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the StartCalculationExecution operation.

Constructs a fluent builder for the StartQueryExecution operation.

Constructs a fluent builder for the StartSession operation.

Constructs a fluent builder for the StopCalculationExecution operation.

Constructs a fluent builder for the StopQueryExecution operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the TerminateSession operation.

  • The fluent builder is configurable:
  • On success, responds with TerminateSessionOutput with field(s):
    • state(Option<SessionState>):

      The state of the session. A description of each state follows.

      CREATING - The session is being started, including acquiring resources.

      CREATED - The session has been started.

      IDLE - The session is able to accept a calculation.

      BUSY - The session is processing another task and is unable to accept a calculation.

      TERMINATING - The session is in the process of shutting down.

      TERMINATED - The session and its resources are no longer running.

      DEGRADED - The session has no healthy coordinators.

      FAILED - Due to a failure, the session and its resources are no longer running.

  • On failure, responds with SdkError<TerminateSessionError>

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateDataCatalog operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):

      The name of the data catalog to update. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.

    • r#type(DataCatalogType) / set_type(Option<DataCatalogType>):

      Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, HIVE for an external hive metastore, or GLUE for an Glue Data Catalog.

    • description(impl Into<String>) / set_description(Option<String>):

      New or modified text that describes the data catalog.

    • parameters(HashMap<String, String>) / set_parameters(Option<HashMap<String, String>>):

      Specifies the Lambda function or functions to use for updating the data catalog. This is a mapping whose values depend on the catalog type.

      • For the HIVE data catalog type, use the following syntax. The metadata-function parameter is required. The sdk-version parameter is optional and defaults to the currently supported version.

        metadata-function=lambda_arn, sdk-version=version_number

      • For the LAMBDA data catalog type, use one of the following sets of required parameters, but not both.

        • If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.

          metadata-function=lambda_arn, record-function=lambda_arn

        • If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.

          function=lambda_arn

  • On success, responds with UpdateDataCatalogOutput
  • On failure, responds with SdkError<UpdateDataCatalogError>

Constructs a fluent builder for the UpdateNamedQuery operation.

Constructs a fluent builder for the UpdateNotebook operation.

Constructs a fluent builder for the UpdateNotebookMetadata operation.

Constructs a fluent builder for the UpdatePreparedStatement operation.

Constructs a fluent builder for the UpdateWorkGroup operation.

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more