338 lines
18 KiB
C
338 lines
18 KiB
C
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#pragma once
|
|||
|
|
#include <aws/logs/CloudWatchLogs_EXPORTS.h>
|
|||
|
|
#include <aws/logs/CloudWatchLogsRequest.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSString.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSVector.h>
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace CloudWatchLogs
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
*/
|
|||
|
|
class AWS_CLOUDWATCHLOGS_API PutQueryDefinitionRequest : public CloudWatchLogsRequest
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
PutQueryDefinitionRequest();
|
|||
|
|
|
|||
|
|
// Service request name is the Operation name which will send this request out,
|
|||
|
|
// each operation should has unique request name, so that we can get operation's name from this request.
|
|||
|
|
// Note: this is not true for response, multiple operations may have the same response name,
|
|||
|
|
// so we can not get operation's name from response.
|
|||
|
|
inline virtual const char* GetServiceRequestName() const override { return "PutQueryDefinition"; }
|
|||
|
|
|
|||
|
|
Aws::String SerializePayload() const override;
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetName() const{ return m_name; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>A name for the query definition. If you are saving a lot of query
|
|||
|
|
* definitions, we recommend that you name them so that you can easily find the
|
|||
|
|
* ones you want by using the first part of the name as a filter in the
|
|||
|
|
* <code>queryDefinitionNamePrefix</code> parameter of <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithName(const char* value) { SetName(value); return *this;}
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetQueryDefinitionId() const{ return m_queryDefinitionId; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryDefinitionId(const Aws::String& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = value; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryDefinitionId(Aws::String&& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = std::move(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryDefinitionId(const char* value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId.assign(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryDefinitionId(const Aws::String& value) { SetQueryDefinitionId(value); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryDefinitionId(Aws::String&& value) { SetQueryDefinitionId(std::move(value)); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>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 <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>
|
|||
|
|
* to retrieve the IDs of your saved query definitions.</p> <p>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.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryDefinitionId(const char* value) { SetQueryDefinitionId(value); return *this;}
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::Vector<Aws::String>& GetLogGroupNames() const{ return m_logGroupNames; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetLogGroupNames(const Aws::Vector<Aws::String>& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = value; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetLogGroupNames(Aws::Vector<Aws::String>&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = std::move(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithLogGroupNames(const Aws::Vector<Aws::String>& value) { SetLogGroupNames(value); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithLogGroupNames(Aws::Vector<Aws::String>&& value) { SetLogGroupNames(std::move(value)); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& AddLogGroupNames(const Aws::String& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); return *this; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& AddLogGroupNames(Aws::String&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(std::move(value)); return *this; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>Use this parameter to include specific log groups as part of your query
|
|||
|
|
* definition.</p> <p>If you are updating a query definition and you omit this
|
|||
|
|
* parameter, then the updated definition will contain no log groups.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& AddLogGroupNames(const char* value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); return *this; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline const Aws::String& GetQueryString() const{ return m_queryString; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryString(const Aws::String& value) { m_queryStringHasBeenSet = true; m_queryString = value; }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryString(Aws::String&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline void SetQueryString(const char* value) { m_queryStringHasBeenSet = true; m_queryString.assign(value); }
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryString(const Aws::String& value) { SetQueryString(value); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryString(Aws::String&& value) { SetQueryString(std::move(value)); return *this;}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* <p>The query string to use for this definition. For more information, see <a
|
|||
|
|
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch
|
|||
|
|
* Logs Insights Query Syntax</a>.</p>
|
|||
|
|
*/
|
|||
|
|
inline PutQueryDefinitionRequest& WithQueryString(const char* value) { SetQueryString(value); return *this;}
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
|
|||
|
|
Aws::String m_name;
|
|||
|
|
bool m_nameHasBeenSet;
|
|||
|
|
|
|||
|
|
Aws::String m_queryDefinitionId;
|
|||
|
|
bool m_queryDefinitionIdHasBeenSet;
|
|||
|
|
|
|||
|
|
Aws::Vector<Aws::String> m_logGroupNames;
|
|||
|
|
bool m_logGroupNamesHasBeenSet;
|
|||
|
|
|
|||
|
|
Aws::String m_queryString;
|
|||
|
|
bool m_queryStringHasBeenSet;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace CloudWatchLogs
|
|||
|
|
} // namespace Aws
|