@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:10.168Z") @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$ProxyIConstruct.Jsii$Default| 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(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()
Field that represents a 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)
Field that represents a 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, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, 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
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()
Types include string-list , ip-address-list , number-list , and number .
@Stability(value=Stable)
public void setMetricType(@NotNull
String value)
Types include string-list , ip-address-list , number-list , and number .
@Stability(value=Stable) @Nullable public String getDisplayName()
it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
@Stability(value=Stable)
public void setDisplayName(@Nullable
String value)
it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
@Stability(value=Stable) @Nullable public String getMetricName()
This will be used in the metric report submitted from the device/thing. It shouldn't begin with aws: . Cannot be updated once it's defined.
@Stability(value=Stable)
public void setMetricName(@Nullable
String value)
This will be used in the metric report submitted from the device/thing. It shouldn't begin with aws: . Cannot be updated once it's defined.
Copyright © 2022. All rights reserved.