@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.853Z") @Stability(value=Stable) public class CfnCustomMetric extends CfnResource implements IInspectable
Use the AWS::IoT::CustomMetric resource to define a custom metric published by your devices to Device Defender. For API reference, see CreateCustomMetric and for general information, see Custom metrics .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;
CfnCustomMetric cfnCustomMetric = CfnCustomMetric.Builder.create(this, "MyCfnCustomMetric")
.metricType("metricType")
// the properties below are optional
.displayName("displayName")
.metricName("metricName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnCustomMetric.Builder
A fluent builder for
CfnCustomMetric. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnCustomMetric(software.constructs.Construct scope,
String id,
CfnCustomMetricProps props)
Create a new `AWS::IoT::CustomMetric`.
|
protected |
CfnCustomMetric(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnCustomMetric(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrMetricArn()
The Amazon Resource Number (ARN) of the custom metric;
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDisplayName()
The friendly name in the console for the custom metric.
|
String |
getMetricName()
The name of the custom metric.
|
String |
getMetricType()
The type of the custom metric.
|
TagManager |
getTags()
Metadata that can be used to manage the custom metric.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDisplayName(String value)
The friendly name in the console for the custom metric.
|
void |
setMetricName(String value)
The name of the custom metric.
|
void |
setMetricType(String value)
The type of the custom metric.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnCustomMetric(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCustomMetric(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnCustomMetric(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnCustomMetricProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrMetricArn()
for example, arn: *aws-partition* :iot: *region* : *accountId* :custommetric/ *metricName* .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getMetricType()
The type
numberonly takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.
@Stability(value=Stable)
public void setMetricType(@NotNull
String value)
The type
numberonly takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.
@Stability(value=Stable) @Nullable public String getDisplayName()
This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.
@Stability(value=Stable)
public void setDisplayName(@Nullable
String value)
This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.
@Stability(value=Stable) @Nullable public String getMetricName()
This will be used in the metric report submitted from the device/thing. The name can't begin with aws: . You can’t change the name after you define it.
@Stability(value=Stable)
public void setMetricName(@Nullable
String value)
This will be used in the metric report submitted from the device/thing. The name can't begin with aws: . You can’t change the name after you define it.
Copyright © 2022. All rights reserved.