Show / Hide Table of Contents

Interface ICustomWidgetProps

The properties for a CustomWidget.

Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICustomWidgetProps
Syntax (vb)
Public Interface ICustomWidgetProps
Remarks

ExampleMetadata: infused

Examples
Dashboard dashboard;


            // Import or create a lambda function
            var fn = Function.FromFunctionArn(dashboard, "Function", "arn:aws:lambda:us-east-1:123456789012:function:MyFn");

            dashboard.AddWidgets(new CustomWidget(new CustomWidgetProps {
                FunctionArn = fn.FunctionArn,
                Title = "My lambda baked widget"
            }));

Synopsis

Properties

FunctionArn

The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.

Height

Height of the widget.

Params

Parameters passed to the lambda function.

Title

The title of the widget.

UpdateOnRefresh

Update the widget on refresh.

UpdateOnResize

Update the widget on resize.

UpdateOnTimeRangeChange

Update the widget on time range change.

Width

Width of the widget, in a grid of 24 units wide.

Properties

FunctionArn

The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.

string FunctionArn { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Height

Height of the widget.

double? Height { get; }
Property Value

double?

Remarks

Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.

Params

Parameters passed to the lambda function.

object? Params { get; }
Property Value

object

Remarks

Default: - no parameters are passed to the lambda function

Title

The title of the widget.

string Title { get; }
Property Value

string

Remarks

ExampleMetadata: infused

UpdateOnRefresh

Update the widget on refresh.

bool? UpdateOnRefresh { get; }
Property Value

bool?

Remarks

Default: true

UpdateOnResize

Update the widget on resize.

bool? UpdateOnResize { get; }
Property Value

bool?

Remarks

Default: true

UpdateOnTimeRangeChange

Update the widget on time range change.

bool? UpdateOnTimeRangeChange { get; }
Property Value

bool?

Remarks

Default: true

Width

Width of the widget, in a grid of 24 units wide.

double? Width { get; }
Property Value

double?

Remarks

Default: 6

Back to top Generated by DocFX