/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.logs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutQueryDefinitionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A name for the query definition. If you are saving numerous query definitions, we recommend that you name them.
* This way, you can find the ones you want by using the first part of the name as a filter in the
* queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*
* If you are updating a query definition, use this parameter to specify the ID of the query definition that you * want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. *
** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the * new query definition and include it in the response to this operation. *
*/ private String queryDefinitionId; /** ** Use this parameter to include specific log groups as part of your query definition. *
** If you are updating a query definition and you omit this parameter, then the updated definition will contain no * log groups. *
*/ private com.amazonaws.internal.SdkInternalList* The query string to use for this definition. For more information, see CloudWatch Logs Insights * Query Syntax. *
*/ private String queryString; /** *
* A name for the query definition. If you are saving numerous query definitions, we recommend that you name them.
* This way, you can find the ones you want by using the first part of the name as a filter in the
* queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*
queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A name for the query definition. If you are saving numerous query definitions, we recommend that you name them.
* This way, you can find the ones you want by using the first part of the name as a filter in the
* queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*
queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*/
public String getName() {
return this.name;
}
/**
*
* A name for the query definition. If you are saving numerous query definitions, we recommend that you name them.
* This way, you can find the ones you want by using the first part of the name as a filter in the
* queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
*
queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutQueryDefinitionRequest withName(String name) {
setName(name);
return this;
}
/**
* * If you are updating a query definition, use this parameter to specify the ID of the query definition that you * want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. *
** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the * new query definition and include it in the response to this operation. *
* * @param queryDefinitionId * If you are updating a query definition, use this parameter to specify the ID of the query definition that * you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. ** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID * for the new query definition and include it in the response to this operation. */ public void setQueryDefinitionId(String queryDefinitionId) { this.queryDefinitionId = queryDefinitionId; } /** *
* If you are updating a query definition, use this parameter to specify the ID of the query definition that you * want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. *
** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the * new query definition and include it in the response to this operation. *
* * @return If you are updating a query definition, use this parameter to specify the ID of the query definition that * you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. ** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID * for the new query definition and include it in the response to this operation. */ public String getQueryDefinitionId() { return this.queryDefinitionId; } /** *
* If you are updating a query definition, use this parameter to specify the ID of the query definition that you * want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. *
** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the * new query definition and include it in the response to this operation. *
* * @param queryDefinitionId * If you are updating a query definition, use this parameter to specify the ID of the query definition that * you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. ** If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID * for the new query definition and include it in the response to this operation. * @return Returns a reference to this object so that method calls can be chained together. */ public PutQueryDefinitionRequest withQueryDefinitionId(String queryDefinitionId) { setQueryDefinitionId(queryDefinitionId); return this; } /** *
* Use this parameter to include specific log groups as part of your query definition. *
** If you are updating a query definition and you omit this parameter, then the updated definition will contain no * log groups. *
* * @return Use this parameter to include specific log groups as part of your query definition. *
* If you are updating a query definition and you omit this parameter, then the updated definition will
* contain no log groups.
*/
public java.util.List
* Use this parameter to include specific log groups as part of your query definition.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will contain no
* log groups.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will
* contain no log groups.
*/
public void setLogGroupNames(java.util.Collection
* Use this parameter to include specific log groups as part of your query definition.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will contain no
* log groups.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLogGroupNames(java.util.Collection)} or {@link #withLogGroupNames(java.util.Collection)} if you want
* to override the existing values.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will
* contain no log groups.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutQueryDefinitionRequest withLogGroupNames(String... logGroupNames) {
if (this.logGroupNames == null) {
setLogGroupNames(new com.amazonaws.internal.SdkInternalList
* Use this parameter to include specific log groups as part of your query definition.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will contain no
* log groups.
*
* If you are updating a query definition and you omit this parameter, then the updated definition will
* contain no log groups.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutQueryDefinitionRequest withLogGroupNames(java.util.Collection
* The query string to use for this definition. For more information, see CloudWatch Logs Insights
* Query Syntax.
*
* The query string to use for this definition. For more information, see CloudWatch Logs Insights
* Query Syntax.
*
* The query string to use for this definition. For more information, see CloudWatch Logs Insights
* Query Syntax.
*