class Spacer
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.Spacer |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#Spacer |
![]() | software.amazon.awscdk.services.cloudwatch.Spacer |
![]() | aws_cdk.aws_cloudwatch.Spacer |
![]() | 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
Spacer
Props
Properties
Name | Type | Description |
---|---|---|
height | number | The amount of vertical grid units the widget will take up. |
width | number | The 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
Name | Description |
---|---|
position(_x, _y) | Place the widget at a given position. |
to | 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.