Class SearchComponents
Search components for use with {@link Values.fromSearchComponents}.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SearchComponents : ISearchComponents
Syntax (vb)
Public Class SearchComponents Implements ISearchComponents
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
var dashboard = new Dashboard(this, "Dash", new DashboardProps {
DefaultInterval = Duration.Days(7),
Variables = new [] { new DashboardVariable(new DashboardVariableOptions {
Id = "functionName",
Type = VariableType.PATTERN,
Label = "Function",
InputType = VariableInputType.RADIO,
Value = "originalFuncNameInDashboard",
// equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
Values = Values.FromSearchComponents(new SearchComponents {
Namespace = "AWS/Lambda",
Dimensions = new [] { "FunctionName" },
MetricName = "Duration",
PopulateFrom = "FunctionName"
}),
DefaultValue = DefaultValue.FIRST,
Visible = true
}) }
});
Synopsis
Constructors
SearchComponents() | Search components for use with {@link Values.fromSearchComponents}. |
Properties
Dimensions | The list of dimensions to be used in the search expression. |
MetricName | The metric name to be used in the search expression. |
Namespace | The namespace to be used in the search expression. |
PopulateFrom | The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from. |
Constructors
SearchComponents()
Search components for use with {@link Values.fromSearchComponents}.
public SearchComponents()
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
var dashboard = new Dashboard(this, "Dash", new DashboardProps {
DefaultInterval = Duration.Days(7),
Variables = new [] { new DashboardVariable(new DashboardVariableOptions {
Id = "functionName",
Type = VariableType.PATTERN,
Label = "Function",
InputType = VariableInputType.RADIO,
Value = "originalFuncNameInDashboard",
// equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
Values = Values.FromSearchComponents(new SearchComponents {
Namespace = "AWS/Lambda",
Dimensions = new [] { "FunctionName" },
MetricName = "Duration",
PopulateFrom = "FunctionName"
}),
DefaultValue = DefaultValue.FIRST,
Visible = true
}) }
});
Properties
Dimensions
The list of dimensions to be used in the search expression.
public string[] Dimensions { get; set; }
Property Value
string[]
Remarks
ExampleMetadata: infused
MetricName
The metric name to be used in the search expression.
public string MetricName { get; set; }
Property Value
Remarks
ExampleMetadata: infused
Namespace
The namespace to be used in the search expression.
public string Namespace { get; set; }
Property Value
Remarks
ExampleMetadata: infused
PopulateFrom
The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.
public string PopulateFrom { get; set; }
Property Value
Remarks
ExampleMetadata: infused