Skip to content
v2.278.0

Dimension Struct ​

Metric dimension.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';

declare const value: any;
const dimension: cloudwatch.Dimension = {
  name: 'name',
  value: value,
};
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_cloudwatch as cloudwatch

# value: Any

dimension = cloudwatch.Dimension(
    name="name",
    value=value
)
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.cloudwatch.*;

Object value;

Dimension dimension = Dimension.builder()
        .name("name")
        .value(value)
        .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.CloudWatch;

var value;

var dimension = new Dimension {
    Name = "name",
    Value = value
};
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"

var value interface{}

dimension := &Dimension{
	Name: jsii.String("name"),
	Value: value,
}

Properties ​

namestringnamestrnameStringNamestringName*string required #
Name of the dimension.
valueanyvalueAnyvalueObjectValueobjectValueinterface{} required #
Value of the dimension.