Class StartQueryRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.cloudwatchlogs.model.CloudWatchLogsRequest
-
- software.amazon.awssdk.services.cloudwatchlogs.model.StartQueryRequest
-
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<StartQueryRequest.Builder,StartQueryRequest>
@Generated("software.amazon.awssdk:codegen") public final class StartQueryRequest extends CloudWatchLogsRequest implements ToCopyableBuilder<StartQueryRequest.Builder,StartQueryRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StartQueryRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StartQueryRequest.Builder
builder()
Long
endTime()
The end of the time range to query.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
boolean
hasLogGroupIdentifiers()
For responses, this returns true if the service returned a value for the LogGroupIdentifiers property.boolean
hasLogGroupNames()
For responses, this returns true if the service returned a value for the LogGroupNames property.Integer
limit()
The maximum number of log events to return in the query.List<String>
logGroupIdentifiers()
The list of log groups to query.String
logGroupName()
The log group on which to perform the query.List<String>
logGroupNames()
The list of log groups to be queried.String
queryString()
The query string to use.List<SdkField<?>>
sdkFields()
static Class<? extends StartQueryRequest.Builder>
serializableBuilderClass()
Long
startTime()
The beginning of the time range to query.StartQueryRequest.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
logGroupName
public final String logGroupName()
The log group on which to perform the query.
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.- Returns:
- The log group on which to perform the query.
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.
-
hasLogGroupNames
public final boolean hasLogGroupNames()
For responses, this returns true if the service returned a value for the LogGroupNames property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
logGroupNames
public final List<String> logGroupNames()
The list of log groups to be queried. You can include up to 50 log groups.
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLogGroupNames()
method.- Returns:
- The list of log groups to be queried. You can include up to 50 log groups.
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.
-
hasLogGroupIdentifiers
public final boolean hasLogGroupIdentifiers()
For responses, this returns true if the service returned a value for the LogGroupIdentifiers property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
logGroupIdentifiers
public final List<String> logGroupIdentifiers()
The list of log groups to query. You can include up to 50 log groups.
You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.
If you specify an ARN, the ARN can't end with an asterisk (*).
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLogGroupIdentifiers()
method.- Returns:
- The list of log groups to query. You can include up to 50 log groups.
You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.
If you specify an ARN, the ARN can't end with an asterisk (*).
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.
-
startTime
public final Long startTime()
The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.- Returns:
- The beginning of the time range to query. The range is inclusive, so the specified start time is included
in the query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.
-
endTime
public final Long endTime()
The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.- Returns:
- The end of the time range to query. The range is inclusive, so the specified end time is included in the
query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.
-
queryString
public final String queryString()
The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.
- Returns:
- The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.
-
limit
public final Integer limit()
The maximum number of log events to return in the query. If the query string uses the
fields
command, only the specified fields and their values are returned. The default is 1000.- Returns:
- The maximum number of log events to return in the query. If the query string uses the
fields
command, only the specified fields and their values are returned. The default is 1000.
-
toBuilder
public StartQueryRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<StartQueryRequest.Builder,StartQueryRequest>
- Specified by:
toBuilder
in classCloudWatchLogsRequest
-
builder
public static StartQueryRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends StartQueryRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equals
in classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForField
in classSdkRequest
-
-