Class CfnQueryDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.logs.CfnQueryDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnQueryDefinitionProps>
- Enclosing interface:
CfnQueryDefinitionProps
@Stability(Stable)
public static final class CfnQueryDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnQueryDefinitionProps>
A builder for
CfnQueryDefinitionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.logGroupNames(List<? extends Object> logGroupNames) Sets the value ofCfnQueryDefinitionProps.getLogGroupNames()Sets the value ofCfnQueryDefinitionProps.getName()queryLanguage(String queryLanguage) Sets the value ofCfnQueryDefinitionProps.getQueryLanguage()queryString(String queryString) Sets the value ofCfnQueryDefinitionProps.getQueryString()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofCfnQueryDefinitionProps.getName()- Parameters:
name- A name for the query definition. This parameter is required.You can use the name to create a folder structure for your queries. To create a folder, use a forward slash (/) to prefix your desired query name with your desired folder name. For example,
*folder-name* / *query-name*.- Returns:
this
-
queryString
Sets the value ofCfnQueryDefinitionProps.getQueryString()- Parameters:
queryString- The query string to use for this query definition. This parameter is required. For more information, see CloudWatch Logs Insights Query Syntax .- Returns:
this
-
logGroupNames
@Stability(Stable) public CfnQueryDefinitionProps.Builder logGroupNames(List<? extends Object> logGroupNames) Sets the value ofCfnQueryDefinitionProps.getLogGroupNames()- Parameters:
logGroupNames- Use this parameter if you want the query to query only certain log groups.- Returns:
this
-
queryLanguage
Sets the value ofCfnQueryDefinitionProps.getQueryLanguage()- Parameters:
queryLanguage- The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnQueryDefinitionProps>- Returns:
- a new instance of
CfnQueryDefinitionProps - Throws:
NullPointerException- if any required attribute was not provided
-