Class: Aws::CloudWatchLogs::Types::PutQueryDefinitionRequest

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-cloudwatchlogs/types.rb

Overview

Note:

When making an API call, you may pass PutQueryDefinitionRequest data as a hash:

{
  name: "QueryDefinitionName", # required
  query_definition_id: "QueryId",
  log_group_names: ["LogGroupName"],
  query_string: "QueryDefinitionString", # required
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#log_group_namesArray<String>

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.

Returns:

  • (Array<String>)

2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/aws-sdk-cloudwatchlogs/types.rb', line 2193

class PutQueryDefinitionRequest < Struct.new(
  :name,
  :query_definition_id,
  :log_group_names,
  :query_string)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

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 `queryDefinitionNamePrefix` parameter of [DescribeQueryDefinitions].

[1]: docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html

Returns:

  • (String)

2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/aws-sdk-cloudwatchlogs/types.rb', line 2193

class PutQueryDefinitionRequest < Struct.new(
  :name,
  :query_definition_id,
  :log_group_names,
  :query_string)
  SENSITIVE = []
  include Aws::Structure
end

#query_definition_idString

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.

[1]: docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html

Returns:

  • (String)

2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/aws-sdk-cloudwatchlogs/types.rb', line 2193

class PutQueryDefinitionRequest < Struct.new(
  :name,
  :query_definition_id,
  :log_group_names,
  :query_string)
  SENSITIVE = []
  include Aws::Structure
end

#query_stringString

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

[1]: docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html

Returns:

  • (String)

2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/aws-sdk-cloudwatchlogs/types.rb', line 2193

class PutQueryDefinitionRequest < Struct.new(
  :name,
  :query_definition_id,
  :log_group_names,
  :query_string)
  SENSITIVE = []
  include Aws::Structure
end