/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace CloudWatchLogs { namespace Model { /** */ class PutQueryDefinitionRequest : public CloudWatchLogsRequest { public: AWS_CLOUDWATCHLOGS_API 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_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override; AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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.

*/ inline const Aws::String& GetName() const{ return m_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.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

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.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

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.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

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.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

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.

*/ inline PutQueryDefinitionRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

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.

*/ inline PutQueryDefinitionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

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.

*/ inline PutQueryDefinitionRequest& WithName(const char* value) { SetName(value); 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.

*/ inline const Aws::String& GetQueryDefinitionId() const{ return m_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.

*/ inline bool QueryDefinitionIdHasBeenSet() const { return m_queryDefinitionIdHasBeenSet; } /** *

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.

*/ inline void SetQueryDefinitionId(const Aws::String& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = value; } /** *

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.

*/ inline void SetQueryDefinitionId(Aws::String&& value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId = std::move(value); } /** *

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.

*/ inline void SetQueryDefinitionId(const char* value) { m_queryDefinitionIdHasBeenSet = true; m_queryDefinitionId.assign(value); } /** *

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.

*/ inline PutQueryDefinitionRequest& WithQueryDefinitionId(const Aws::String& value) { SetQueryDefinitionId(value); 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.

*/ inline PutQueryDefinitionRequest& WithQueryDefinitionId(Aws::String&& value) { SetQueryDefinitionId(std::move(value)); 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.

*/ inline PutQueryDefinitionRequest& WithQueryDefinitionId(const char* value) { SetQueryDefinitionId(value); 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.

*/ inline const Aws::Vector& GetLogGroupNames() const{ return m_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.

*/ inline bool LogGroupNamesHasBeenSet() const { return m_logGroupNamesHasBeenSet; } /** *

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.

*/ inline void SetLogGroupNames(const Aws::Vector& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = value; } /** *

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.

*/ inline void SetLogGroupNames(Aws::Vector&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames = std::move(value); } /** *

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.

*/ inline PutQueryDefinitionRequest& WithLogGroupNames(const Aws::Vector& value) { SetLogGroupNames(value); 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.

*/ inline PutQueryDefinitionRequest& WithLogGroupNames(Aws::Vector&& value) { SetLogGroupNames(std::move(value)); 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.

*/ inline PutQueryDefinitionRequest& AddLogGroupNames(const Aws::String& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); 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.

*/ inline PutQueryDefinitionRequest& AddLogGroupNames(Aws::String&& value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(std::move(value)); 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.

*/ inline PutQueryDefinitionRequest& AddLogGroupNames(const char* value) { m_logGroupNamesHasBeenSet = true; m_logGroupNames.push_back(value); return *this; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline const Aws::String& GetQueryString() const{ return m_queryString; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(const Aws::String& value) { m_queryStringHasBeenSet = true; m_queryString = value; } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(Aws::String&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline void SetQueryString(const char* value) { m_queryStringHasBeenSet = true; m_queryString.assign(value); } /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline PutQueryDefinitionRequest& WithQueryString(const Aws::String& value) { SetQueryString(value); return *this;} /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline PutQueryDefinitionRequest& WithQueryString(Aws::String&& value) { SetQueryString(std::move(value)); return *this;} /** *

The query string to use for this definition. For more information, see CloudWatch * Logs Insights Query Syntax.

*/ inline PutQueryDefinitionRequest& WithQueryString(const char* value) { SetQueryString(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_queryDefinitionId; bool m_queryDefinitionIdHasBeenSet = false; Aws::Vector m_logGroupNames; bool m_logGroupNamesHasBeenSet = false; Aws::String m_queryString; bool m_queryStringHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws