/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the logs-2014-03-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudWatchLogs.Model
{
///
/// Container for the parameters to the PutQueryDefinition operation.
/// Creates or updates a query definition for CloudWatch Logs Insights. For more information,
/// see Analyzing
/// Log Data with CloudWatch Logs Insights.
///
///
///
/// To update a query definition, specify its queryDefinitionId
in your request.
/// The values of name
, queryString
, and logGroupNames
/// are changed to the values that you specify in your update operation. No current values
/// are retained from the current query definition. For example, imagine updating a current
/// query definition that includes log groups. If you don't specify the logGroupNames
/// parameter in your update operation, the query definition changes to contain no log
/// groups.
///
///
///
/// You must have the logs:PutQueryDefinition
permission to be able to perform
/// this operation.
///
///
public partial class PutQueryDefinitionRequest : AmazonCloudWatchLogsRequest
{
private List _logGroupNames = new List();
private string _name;
private string _queryDefinitionId;
private string _queryString;
///
/// Gets and sets the property LogGroupNames.
///
/// 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 List LogGroupNames
{
get { return this._logGroupNames; }
set { this._logGroupNames = value; }
}
// Check to see if LogGroupNames property is set
internal bool IsSetLogGroupNames()
{
return this._logGroupNames != null && this._logGroupNames.Count > 0;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=0, Max=256)]
public string QueryDefinitionId
{
get { return this._queryDefinitionId; }
set { this._queryDefinitionId = value; }
}
// Check to see if QueryDefinitionId property is set
internal bool IsSetQueryDefinitionId()
{
return this._queryDefinitionId != null;
}
///
/// Gets and sets the property QueryString.
///
/// The query string to use for this definition. For more information, see CloudWatch
/// Logs Insights Query Syntax.
///
///
[AWSProperty(Required=true, Min=1, Max=10000)]
public string QueryString
{
get { return this._queryString; }
set { this._queryString = value; }
}
// Check to see if QueryString property is set
internal bool IsSetQueryString()
{
return this._queryString != null;
}
}
}