aws-cdk-lib.aws_cloudwatch.Spacer

class Spacer

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.Spacer
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#Spacer
Javasoftware.amazon.awscdk.services.cloudwatch.Spacer
Pythonaws_cdk.aws_cloudwatch.Spacer
TypeScript (source)aws-cdk-lib » aws_cloudwatch » Spacer

Implements IWidget

A widget that doesn't display anything but takes up space.

Example

// 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';
const spacer = new cloudwatch.Spacer(/* all optional props */ {
  height: 123,
  width: 123,
});

Initializer

new Spacer(props?: SpacerProps)

Parameters

  • props SpacerProps

Properties

NameTypeDescription
heightnumberThe amount of vertical grid units the widget will take up.
widthnumberThe amount of horizontal grid units the widget will take up.

height

Type: number

The amount of vertical grid units the widget will take up.


width

Type: number

The amount of horizontal grid units the widget will take up.

Methods

NameDescription
position(_x, _y)Place the widget at a given position.
toJson()Return the widget JSON for use in the dashboard.

position(_x, _y)

public position(_x: number, _y: number): void

Parameters

  • _x number
  • _y number

Place the widget at a given position.


toJson()

public toJson(): any[]

Returns

  • any[]

Return the widget JSON for use in the dashboard.