libZSservicesZSamazonka-athenaZSamazonka-athena
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Athena.CreateNamedQuery

Description

Creates a named query in the specified workgroup. Requires that you have access to the workgroup.

For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.

Synopsis

Creating a Request

data CreateNamedQuery Source #

See: newCreateNamedQuery smart constructor.

Constructors

CreateNamedQuery' 

Fields

  • clientRequestToken :: Maybe Text

    A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another CreateNamedQuery request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

    This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

  • description :: Maybe Text

    The query description.

  • workGroup :: Maybe Text

    The name of the workgroup in which the named query is being created.

  • name :: Text

    The query name.

  • database :: Text

    The database to which the query belongs.

  • queryString :: Text

    The contents of the query with all query statements.

Instances

Instances details
Eq CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Read CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Show CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Generic CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Associated Types

type Rep CreateNamedQuery :: Type -> Type #

NFData CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Methods

rnf :: CreateNamedQuery -> () #

Hashable CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

ToJSON CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

AWSRequest CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Associated Types

type AWSResponse CreateNamedQuery #

ToHeaders CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

ToPath CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

ToQuery CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

type Rep CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

type Rep CreateNamedQuery = D1 ('MetaData "CreateNamedQuery" "Amazonka.Athena.CreateNamedQuery" "libZSservicesZSamazonka-athenaZSamazonka-athena" 'False) (C1 ('MetaCons "CreateNamedQuery'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "workGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateNamedQuery Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

newCreateNamedQuery Source #

Create a value of CreateNamedQuery with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientRequestToken:CreateNamedQuery', createNamedQuery_clientRequestToken - A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another CreateNamedQuery request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

$sel:description:CreateNamedQuery', createNamedQuery_description - The query description.

$sel:workGroup:CreateNamedQuery', createNamedQuery_workGroup - The name of the workgroup in which the named query is being created.

$sel:name:CreateNamedQuery', createNamedQuery_name - The query name.

$sel:database:CreateNamedQuery', createNamedQuery_database - The database to which the query belongs.

$sel:queryString:CreateNamedQuery', createNamedQuery_queryString - The contents of the query with all query statements.

Request Lenses

createNamedQuery_clientRequestToken :: Lens' CreateNamedQuery (Maybe Text) Source #

A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another CreateNamedQuery request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

createNamedQuery_workGroup :: Lens' CreateNamedQuery (Maybe Text) Source #

The name of the workgroup in which the named query is being created.

createNamedQuery_database :: Lens' CreateNamedQuery Text Source #

The database to which the query belongs.

createNamedQuery_queryString :: Lens' CreateNamedQuery Text Source #

The contents of the query with all query statements.

Destructuring the Response

data CreateNamedQueryResponse Source #

See: newCreateNamedQueryResponse smart constructor.

Constructors

CreateNamedQueryResponse' 

Fields

Instances

Instances details
Eq CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Read CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Show CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Generic CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

Associated Types

type Rep CreateNamedQueryResponse :: Type -> Type #

NFData CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

type Rep CreateNamedQueryResponse Source # 
Instance details

Defined in Amazonka.Athena.CreateNamedQuery

type Rep CreateNamedQueryResponse = D1 ('MetaData "CreateNamedQueryResponse" "Amazonka.Athena.CreateNamedQuery" "libZSservicesZSamazonka-athenaZSamazonka-athena" 'False) (C1 ('MetaCons "CreateNamedQueryResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "namedQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateNamedQueryResponse Source #

Create a value of CreateNamedQueryResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:namedQueryId:CreateNamedQueryResponse', createNamedQueryResponse_namedQueryId - The unique ID of the query.

$sel:httpStatus:CreateNamedQueryResponse', createNamedQueryResponse_httpStatus - The response's http status code.

Response Lenses