Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateNamedQuery = CreateNamedQuery' {
- clientRequestToken :: Maybe Text
- description :: Maybe Text
- workGroup :: Maybe Text
- name :: Text
- database :: Text
- queryString :: Text
- newCreateNamedQuery :: Text -> Text -> Text -> CreateNamedQuery
- createNamedQuery_clientRequestToken :: Lens' CreateNamedQuery (Maybe Text)
- createNamedQuery_description :: Lens' CreateNamedQuery (Maybe Text)
- createNamedQuery_workGroup :: Lens' CreateNamedQuery (Maybe Text)
- createNamedQuery_name :: Lens' CreateNamedQuery Text
- createNamedQuery_database :: Lens' CreateNamedQuery Text
- createNamedQuery_queryString :: Lens' CreateNamedQuery Text
- data CreateNamedQueryResponse = CreateNamedQueryResponse' {
- namedQueryId :: Maybe Text
- httpStatus :: Int
- newCreateNamedQueryResponse :: Int -> CreateNamedQueryResponse
- createNamedQueryResponse_namedQueryId :: Lens' CreateNamedQueryResponse (Maybe Text)
- createNamedQueryResponse_httpStatus :: Lens' CreateNamedQueryResponse Int
Creating a Request
data CreateNamedQuery Source #
See: newCreateNamedQuery
smart constructor.
CreateNamedQuery' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> CreateNamedQuery |
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_description :: Lens' CreateNamedQuery (Maybe Text) Source #
The query description.
createNamedQuery_workGroup :: Lens' CreateNamedQuery (Maybe Text) Source #
The name of the workgroup in which the named query is being created.
createNamedQuery_name :: Lens' CreateNamedQuery Text Source #
The query name.
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.
CreateNamedQueryResponse' | |
|
Instances
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
createNamedQueryResponse_namedQueryId :: Lens' CreateNamedQueryResponse (Maybe Text) Source #
The unique ID of the query.
createNamedQueryResponse_httpStatus :: Lens' CreateNamedQueryResponse Int Source #
The response's http status code.