Show / Hide Table of Contents

Class CustomWidgetProps

The properties for a CustomWidget.

Inheritance
object
CustomWidgetProps
Implements
ICustomWidgetProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CustomWidgetProps : ICustomWidgetProps
Syntax (vb)
Public Class CustomWidgetProps Implements 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

Constructors

CustomWidgetProps()

The properties for a CustomWidget.

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.

Constructors

CustomWidgetProps()

The properties for a CustomWidget.

public CustomWidgetProps()
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"
            }));

Properties

FunctionArn

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

public string FunctionArn { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

Height

Height of the widget.

public double? Height { get; set; }
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.

public object? Params { get; set; }
Property Value

object

Remarks

Default: - no parameters are passed to the lambda function

Title

The title of the widget.

public string Title { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

UpdateOnRefresh

Update the widget on refresh.

public bool? UpdateOnRefresh { get; set; }
Property Value

bool?

Remarks

Default: true

UpdateOnResize

Update the widget on resize.

public bool? UpdateOnResize { get; set; }
Property Value

bool?

Remarks

Default: true

UpdateOnTimeRangeChange

Update the widget on time range change.

public bool? UpdateOnTimeRangeChange { get; set; }
Property Value

bool?

Remarks

Default: true

Width

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

public double? Width { get; set; }
Property Value

double?

Remarks

Default: 6

Implements

ICustomWidgetProps
Back to top Generated by DocFX