Skip to content
v2.278.0

QueryParameterProperty Struct ​

This structure defines a query parameter for a saved CloudWatch Logs Insights query definition.

Query parameters are supported only for Logs Insights QL queries. They are placeholder variables that you can reference in a query string using the {{parameterName}} syntax. Each parameter can include a default value and a description.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const queryParameterProperty: logs.CfnQueryDefinition.QueryParameterProperty = {
  name: 'name',

  // the properties below are optional
  defaultValue: 'defaultValue',
  description: 'description',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_logs as logs

query_parameter_property = logs.CfnQueryDefinition.QueryParameterProperty(
    name="name",

    # the properties below are optional
    default_value="defaultValue",
    description="description"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.logs.*;

QueryParameterProperty queryParameterProperty = QueryParameterProperty.builder()
        .name("name")

        // the properties below are optional
        .defaultValue("defaultValue")
        .description("description")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Logs;

var queryParameterProperty = new QueryParameterProperty {
    Name = "name",

    // the properties below are optional
    DefaultValue = "defaultValue",
    Description = "description"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

queryParameterProperty := &QueryParameterProperty{
	Name: jsii.String("name"),

	// the properties below are optional
	DefaultValue: jsii.String("defaultValue"),
	Description: jsii.String("description"),
}

Properties ​

defaultValueoptionalstringdefault_valueoptionalstrdefaultValueoptionalStringDefaultValueoptionalstringDefaultValueoptional*string #
The default value to use for this query parameter if no value is supplied at execution time.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the query parameter that explains its purpose or expected values.
namestringnamestrnameStringNamestringName*string required #
The name of the query parameter.

A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.