Use the AWS::IoT::FleetMetric
resource to declare a fleet metric.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{
"Type" : "AWS::IoT::FleetMetric",
"Properties" : {
"AggregationField" : String
,
"AggregationType" : AggregationType
,
"Description" : String
,
"IndexName" : String
,
"MetricName" : String
,
"Period" : Integer
,
"QueryString" : String
,
"QueryVersion" : String
,
"Tags" : [ Tag, ... ]
,
"Unit" : String
}
}
YAML
Type: AWS::IoT::FleetMetric
Properties:
AggregationField: String
AggregationType:
AggregationType
Description: String
IndexName: String
MetricName: String
Period: Integer
QueryString:
String
QueryVersion: String
Tags:
- Tag
Unit: String
Properties
AggregationField
-
The field to aggregate.
Required: No
Type: String
Update requires: No interruption
AggregationType
-
The type of the aggregation query.
Required: No
Type: AggregationType
Update requires: No interruption
Description
-
The fleet metric description.
Required: No
Type: String
Update requires: No interruption
IndexName
-
The name of the index to search.
Required: No
Type: String
Update requires: No interruption
MetricName
-
The name of the fleet metric to create.
Required: Yes
Type: String
Update requires: Replacement
Period
-
The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
Required: No
Type: Integer
Update requires: No interruption
QueryString
-
The search query string.
Required: No
Type: String
Update requires: No interruption
QueryVersion
-
The query version.
Required: No
Type: String
Update requires: No interruption
-
Metadata which can be used to manage the fleet metric.
Required: No
Type: Array of Tag
Maximum:
50
Update requires: No interruption
Unit
-
Used to support unit transformation such as milliseconds to seconds. Must be a unit supported by CW metric. Default to null.
Required: No
Type: String
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the fleet metric name.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
CreationDate
-
The time the fleet metric was created.
LastModifiedDate
-
The time the fleet metric was last modified.
MetricArn
-
The Amazon Resource Name (ARN) of the fleet metric.
Version
-
The fleet metric version.