Struct aws_sdk_timestreamquery::operation::query::builders::QueryInputBuilder
source · #[non_exhaustive]pub struct QueryInputBuilder { /* private fields */ }
Expand description
A builder for QueryInput
.
Implementations§
source§impl QueryInputBuilder
impl QueryInputBuilder
sourcepub fn query_string(self, input: impl Into<String>) -> Self
pub fn query_string(self, input: impl Into<String>) -> Self
The query to be run by Timestream.
sourcepub fn set_query_string(self, input: Option<String>) -> Self
pub fn set_query_string(self, input: Option<String>) -> Self
The query to be run by Timestream.
sourcepub fn get_query_string(&self) -> &Option<String>
pub fn get_query_string(&self) -> &Option<String>
The query to be run by Timestream.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive string of up to 64 ASCII characters specified when a Query
request is made. Providing a ClientToken
makes the call to Query
idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query
requests has the same effect as making a single request. When using ClientToken
in a query, note the following:
-
If the Query API is instantiated without a
ClientToken
, the Query SDK generates aClientToken
on your behalf. -
If the
Query
invocation only contains theClientToken
but does not include aNextToken
, that invocation ofQuery
is assumed to be a new query run. -
If the invocation contains
NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to the Query API, and a result set is returned. -
After 4 hours, any request with the same
ClientToken
is treated as a new request.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive string of up to 64 ASCII characters specified when a Query
request is made. Providing a ClientToken
makes the call to Query
idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query
requests has the same effect as making a single request. When using ClientToken
in a query, note the following:
-
If the Query API is instantiated without a
ClientToken
, the Query SDK generates aClientToken
on your behalf. -
If the
Query
invocation only contains theClientToken
but does not include aNextToken
, that invocation ofQuery
is assumed to be a new query run. -
If the invocation contains
NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to the Query API, and a result set is returned. -
After 4 hours, any request with the same
ClientToken
is treated as a new request.
sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<String>
Unique, case-sensitive string of up to 64 ASCII characters specified when a Query
request is made. Providing a ClientToken
makes the call to Query
idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query
requests has the same effect as making a single request. When using ClientToken
in a query, note the following:
-
If the Query API is instantiated without a
ClientToken
, the Query SDK generates aClientToken
on your behalf. -
If the
Query
invocation only contains theClientToken
but does not include aNextToken
, that invocation ofQuery
is assumed to be a new query run. -
If the invocation contains
NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to the Query API, and a result set is returned. -
After 4 hours, any request with the same
ClientToken
is treated as a new request.
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
A pagination token used to return a set of results. When the Query
API is invoked using NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to Query
, and a result set is returned. However, if the Query
invocation only contains the ClientToken
, that invocation of Query
is assumed to be a new query run.
Note the following when using NextToken in a query:
-
A pagination token can be used for up to five
Query
invocations, OR for a duration of up to 1 hour – whichever comes first. -
Using the same
NextToken
will return the same set of records. To keep paginating through the result set, you must to use the most recentnextToken
. -
Suppose a
Query
invocation returns twoNextToken
values,TokenA
andTokenB
. IfTokenB
is used in a subsequentQuery
invocation, thenTokenA
is invalidated and cannot be reused. -
To request a previous result set from a query after pagination has begun, you must re-invoke the Query API.
-
The latest
NextToken
should be used to paginate untilnull
is returned, at which point a newNextToken
should be used. -
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an
Invalid pagination token
error.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
A pagination token used to return a set of results. When the Query
API is invoked using NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to Query
, and a result set is returned. However, if the Query
invocation only contains the ClientToken
, that invocation of Query
is assumed to be a new query run.
Note the following when using NextToken in a query:
-
A pagination token can be used for up to five
Query
invocations, OR for a duration of up to 1 hour – whichever comes first. -
Using the same
NextToken
will return the same set of records. To keep paginating through the result set, you must to use the most recentnextToken
. -
Suppose a
Query
invocation returns twoNextToken
values,TokenA
andTokenB
. IfTokenB
is used in a subsequentQuery
invocation, thenTokenA
is invalidated and cannot be reused. -
To request a previous result set from a query after pagination has begun, you must re-invoke the Query API.
-
The latest
NextToken
should be used to paginate untilnull
is returned, at which point a newNextToken
should be used. -
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an
Invalid pagination token
error.
sourcepub fn get_next_token(&self) -> &Option<String>
pub fn get_next_token(&self) -> &Option<String>
A pagination token used to return a set of results. When the Query
API is invoked using NextToken
, that particular invocation is assumed to be a subsequent invocation of a prior call to Query
, and a result set is returned. However, if the Query
invocation only contains the ClientToken
, that invocation of Query
is assumed to be a new query run.
Note the following when using NextToken in a query:
-
A pagination token can be used for up to five
Query
invocations, OR for a duration of up to 1 hour – whichever comes first. -
Using the same
NextToken
will return the same set of records. To keep paginating through the result set, you must to use the most recentnextToken
. -
Suppose a
Query
invocation returns twoNextToken
values,TokenA
andTokenB
. IfTokenB
is used in a subsequentQuery
invocation, thenTokenA
is invalidated and cannot be reused. -
To request a previous result set from a query after pagination has begun, you must re-invoke the Query API.
-
The latest
NextToken
should be used to paginate untilnull
is returned, at which point a newNextToken
should be used. -
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an
Invalid pagination token
error.
sourcepub fn max_rows(self, input: i32) -> Self
pub fn max_rows(self, input: i32) -> Self
The total number of rows to be returned in the Query
output. The initial run of Query
with a MaxRows
value specified will return the result set of the query in two cases:
-
The size of the result is less than
1MB
. -
The number of rows in the result set is less than the value of
maxRows
.
Otherwise, the initial invocation of Query
only returns a NextToken
, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the NextToken
value in the subsequent command.
If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the response size from exceeding the 1 MB limit. If MaxRows
is not provided, Timestream will send the necessary number of rows to meet the 1 MB limit.
sourcepub fn set_max_rows(self, input: Option<i32>) -> Self
pub fn set_max_rows(self, input: Option<i32>) -> Self
The total number of rows to be returned in the Query
output. The initial run of Query
with a MaxRows
value specified will return the result set of the query in two cases:
-
The size of the result is less than
1MB
. -
The number of rows in the result set is less than the value of
maxRows
.
Otherwise, the initial invocation of Query
only returns a NextToken
, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the NextToken
value in the subsequent command.
If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the response size from exceeding the 1 MB limit. If MaxRows
is not provided, Timestream will send the necessary number of rows to meet the 1 MB limit.
sourcepub fn get_max_rows(&self) -> &Option<i32>
pub fn get_max_rows(&self) -> &Option<i32>
The total number of rows to be returned in the Query
output. The initial run of Query
with a MaxRows
value specified will return the result set of the query in two cases:
-
The size of the result is less than
1MB
. -
The number of rows in the result set is less than the value of
maxRows
.
Otherwise, the initial invocation of Query
only returns a NextToken
, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the NextToken
value in the subsequent command.
If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the response size from exceeding the 1 MB limit. If MaxRows
is not provided, Timestream will send the necessary number of rows to meet the 1 MB limit.
sourcepub fn build(self) -> Result<QueryInput, BuildError>
pub fn build(self) -> Result<QueryInput, BuildError>
Consumes the builder and constructs a QueryInput
.
source§impl QueryInputBuilder
impl QueryInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<QueryOutput, SdkError<QueryError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<QueryOutput, SdkError<QueryError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for QueryInputBuilder
impl Clone for QueryInputBuilder
source§fn clone(&self) -> QueryInputBuilder
fn clone(&self) -> QueryInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QueryInputBuilder
impl Debug for QueryInputBuilder
source§impl Default for QueryInputBuilder
impl Default for QueryInputBuilder
source§fn default() -> QueryInputBuilder
fn default() -> QueryInputBuilder
source§impl PartialEq<QueryInputBuilder> for QueryInputBuilder
impl PartialEq<QueryInputBuilder> for QueryInputBuilder
source§fn eq(&self, other: &QueryInputBuilder) -> bool
fn eq(&self, other: &QueryInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.