Struct aws_sdk_athena::Client

source ·
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§

source§

impl Client

source

pub fn with_config( client: Client<DynConnector, DynMiddleware<DynConnector>>, conf: Config ) -> Self

Creates a client with the given service configuration.

source

pub fn conf(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn batch_get_named_query(&self) -> BatchGetNamedQuery

Constructs a fluent builder for the BatchGetNamedQuery operation.

source

pub fn batch_get_prepared_statement(&self) -> BatchGetPreparedStatement

Constructs a fluent builder for the BatchGetPreparedStatement operation.

source

pub fn batch_get_query_execution(&self) -> BatchGetQueryExecution

Constructs a fluent builder for the BatchGetQueryExecution operation.

source

pub fn create_data_catalog(&self) -> CreateDataCatalog

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>
source

pub fn create_named_query(&self) -> CreateNamedQuery

Constructs a fluent builder for the CreateNamedQuery operation.

source

pub fn create_notebook(&self) -> CreateNotebook

Constructs a fluent builder for the CreateNotebook operation.

source

pub fn create_prepared_statement(&self) -> CreatePreparedStatement

Constructs a fluent builder for the CreatePreparedStatement operation.

source

pub fn create_presigned_notebook_url(&self) -> CreatePresignedNotebookUrl

Constructs a fluent builder for the CreatePresignedNotebookUrl operation.

source

pub fn create_work_group(&self) -> CreateWorkGroup

Constructs a fluent builder for the CreateWorkGroup operation.

source

pub fn delete_data_catalog(&self) -> DeleteDataCatalog

Constructs a fluent builder for the DeleteDataCatalog operation.

source

pub fn delete_named_query(&self) -> DeleteNamedQuery

Constructs a fluent builder for the DeleteNamedQuery operation.

source

pub fn delete_notebook(&self) -> DeleteNotebook

Constructs a fluent builder for the DeleteNotebook operation.

source

pub fn delete_prepared_statement(&self) -> DeletePreparedStatement

Constructs a fluent builder for the DeletePreparedStatement operation.

source

pub fn delete_work_group(&self) -> DeleteWorkGroup

Constructs a fluent builder for the DeleteWorkGroup operation.

source

pub fn export_notebook(&self) -> ExportNotebook

Constructs a fluent builder for the ExportNotebook operation.

source

pub fn get_calculation_execution(&self) -> GetCalculationExecution

Constructs a fluent builder for the GetCalculationExecution operation.

source

pub fn get_calculation_execution_code(&self) -> GetCalculationExecutionCode

Constructs a fluent builder for the GetCalculationExecutionCode operation.

source

pub fn get_calculation_execution_status(&self) -> GetCalculationExecutionStatus

Constructs a fluent builder for the GetCalculationExecutionStatus operation.

source

pub fn get_database(&self) -> GetDatabase

Constructs a fluent builder for the GetDatabase operation.

source

pub fn get_data_catalog(&self) -> GetDataCatalog

Constructs a fluent builder for the GetDataCatalog operation.

source

pub fn get_named_query(&self) -> GetNamedQuery

Constructs a fluent builder for the GetNamedQuery operation.

source

pub fn get_notebook_metadata(&self) -> GetNotebookMetadata

Constructs a fluent builder for the GetNotebookMetadata operation.

source

pub fn get_prepared_statement(&self) -> GetPreparedStatement

Constructs a fluent builder for the GetPreparedStatement operation.

source

pub fn get_query_execution(&self) -> GetQueryExecution

Constructs a fluent builder for the GetQueryExecution operation.

source

pub fn get_query_results(&self) -> GetQueryResults

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

source

pub fn get_query_runtime_statistics(&self) -> GetQueryRuntimeStatistics

Constructs a fluent builder for the GetQueryRuntimeStatistics operation.

source

pub fn get_session(&self) -> GetSession

Constructs a fluent builder for the GetSession operation.

source

pub fn get_session_status(&self) -> GetSessionStatus

Constructs a fluent builder for the GetSessionStatus operation.

source

pub fn get_table_metadata(&self) -> GetTableMetadata

Constructs a fluent builder for the GetTableMetadata operation.

source

pub fn get_work_group(&self) -> GetWorkGroup

Constructs a fluent builder for the GetWorkGroup operation.

source

pub fn import_notebook(&self) -> ImportNotebook

Constructs a fluent builder for the ImportNotebook operation.

source

pub fn list_application_dpu_sizes(&self) -> ListApplicationDPUSizes

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

source

pub fn list_calculation_executions(&self) -> ListCalculationExecutions

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

source

pub fn list_databases(&self) -> ListDatabases

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

source

pub fn list_data_catalogs(&self) -> ListDataCatalogs

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

source

pub fn list_engine_versions(&self) -> ListEngineVersions

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

source

pub fn list_executors(&self) -> ListExecutors

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

source

pub fn list_named_queries(&self) -> ListNamedQueries

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

source

pub fn list_notebook_metadata(&self) -> ListNotebookMetadata

Constructs a fluent builder for the ListNotebookMetadata operation.

source

pub fn list_notebook_sessions(&self) -> ListNotebookSessions

Constructs a fluent builder for the ListNotebookSessions operation.

source

pub fn list_prepared_statements(&self) -> ListPreparedStatements

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

source

pub fn list_query_executions(&self) -> ListQueryExecutions

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

source

pub fn list_sessions(&self) -> ListSessions

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

source

pub fn list_table_metadata(&self) -> ListTableMetadata

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

source

pub fn list_tags_for_resource(&self) -> ListTagsForResource

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

source

pub fn list_work_groups(&self) -> ListWorkGroups

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

source

pub fn start_calculation_execution(&self) -> StartCalculationExecution

Constructs a fluent builder for the StartCalculationExecution operation.

source

pub fn start_query_execution(&self) -> StartQueryExecution

Constructs a fluent builder for the StartQueryExecution operation.

source

pub fn start_session(&self) -> StartSession

Constructs a fluent builder for the StartSession operation.

source

pub fn stop_calculation_execution(&self) -> StopCalculationExecution

Constructs a fluent builder for the StopCalculationExecution operation.

source

pub fn stop_query_execution(&self) -> StopQueryExecution

Constructs a fluent builder for the StopQueryExecution operation.

source

pub fn tag_resource(&self) -> TagResource

Constructs a fluent builder for the TagResource operation.

source

pub fn terminate_session(&self) -> TerminateSession

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>
source

pub fn untag_resource(&self) -> UntagResource

Constructs a fluent builder for the UntagResource operation.

source

pub fn update_data_catalog(&self) -> UpdateDataCatalog

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>
source

pub fn update_named_query(&self) -> UpdateNamedQuery

Constructs a fluent builder for the UpdateNamedQuery operation.

source

pub fn update_notebook(&self) -> UpdateNotebook

Constructs a fluent builder for the UpdateNotebook operation.

source

pub fn update_notebook_metadata(&self) -> UpdateNotebookMetadata

Constructs a fluent builder for the UpdateNotebookMetadata operation.

source

pub fn update_prepared_statement(&self) -> UpdatePreparedStatement

Constructs a fluent builder for the UpdatePreparedStatement operation.

source

pub fn update_work_group(&self) -> UpdateWorkGroup

Constructs a fluent builder for the UpdateWorkGroup operation.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

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

pub fn from_conf(conf: Config) -> Self

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§

source§

impl Clone for Client

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client

source§

fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more