We recommend new projects start with resources from the AWS provider.
aws-native.iot.CustomMetric
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
A custom metric published by your devices to Device Defender.
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var batteryPercentageMetric = new AwsNative.IoT.CustomMetric("batteryPercentageMetric", new()
{
MetricName = "batteryPercentage",
DisplayName = "Remaining battery percentage",
MetricType = AwsNative.IoT.CustomMetricMetricType.Number,
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iot.NewCustomMetric(ctx, "batteryPercentageMetric", &iot.CustomMetricArgs{
MetricName: pulumi.String("batteryPercentage"),
DisplayName: pulumi.String("Remaining battery percentage"),
MetricType: iot.CustomMetricMetricTypeNumber,
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
battery_percentage_metric = aws_native.iot.CustomMetric("batteryPercentageMetric",
metric_name="batteryPercentage",
display_name="Remaining battery percentage",
metric_type=aws_native.iot.CustomMetricMetricType.NUMBER)
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const batteryPercentageMetric = new aws_native.iot.CustomMetric("batteryPercentageMetric", {
metricName: "batteryPercentage",
displayName: "Remaining battery percentage",
metricType: aws_native.iot.CustomMetricMetricType.Number,
});
Coming soon!
Create CustomMetric Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomMetric(name: string, args: CustomMetricArgs, opts?: CustomResourceOptions);
@overload
def CustomMetric(resource_name: str,
args: CustomMetricArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomMetric(resource_name: str,
opts: Optional[ResourceOptions] = None,
metric_type: Optional[CustomMetricMetricType] = None,
display_name: Optional[str] = None,
metric_name: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewCustomMetric(ctx *Context, name string, args CustomMetricArgs, opts ...ResourceOption) (*CustomMetric, error)
public CustomMetric(string name, CustomMetricArgs args, CustomResourceOptions? opts = null)
public CustomMetric(String name, CustomMetricArgs args)
public CustomMetric(String name, CustomMetricArgs args, CustomResourceOptions options)
type: aws-native:iot:CustomMetric
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CustomMetricArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomMetricArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomMetricArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomMetricArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomMetricArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CustomMetric Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CustomMetric resource accepts the following input properties:
- Metric
Type Pulumi.Aws Native. Io T. Custom Metric Metric Type - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- Display
Name string - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- Metric
Name string - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- List<Pulumi.
Aws Native. Inputs. Tag> - An array of key-value pairs to apply to this resource.
- Metric
Type CustomMetric Metric Type - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- Display
Name string - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- Metric
Name string - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- Tag
Args - An array of key-value pairs to apply to this resource.
- metric
Type CustomMetric Metric Type - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- display
Name String - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- metric
Name String - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- List<Tag>
- An array of key-value pairs to apply to this resource.
- metric
Type CustomMetric Metric Type - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- display
Name string - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- metric
Name string - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- Tag[]
- An array of key-value pairs to apply to this resource.
- metric_
type CustomMetric Metric Type - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- display_
name str - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- metric_
name str - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- Sequence[Tag
Args] - An array of key-value pairs to apply to this resource.
- metric
Type "string-list" | "ip-address-list" | "number-list" | "number" - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
- display
Name String - Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
- metric
Name String - The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
- List<Property Map>
- An array of key-value pairs to apply to this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomMetric resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- metric_
arn str - The Amazon Resource Number (ARN) of the custom metric.
Supporting Types
CustomMetricMetricType, CustomMetricMetricTypeArgs
- String
List - string-list
- Ip
Address List - ip-address-list
- Number
List - number-list
- Number
- number
- Custom
Metric Metric Type String List - string-list
- Custom
Metric Metric Type Ip Address List - ip-address-list
- Custom
Metric Metric Type Number List - number-list
- Custom
Metric Metric Type Number - number
- String
List - string-list
- Ip
Address List - ip-address-list
- Number
List - number-list
- Number
- number
- String
List - string-list
- Ip
Address List - ip-address-list
- Number
List - number-list
- Number
- number
- STRING_LIST
- string-list
- IP_ADDRESS_LIST
- ip-address-list
- NUMBER_LIST
- number-list
- NUMBER
- number
- "string-list"
- string-list
- "ip-address-list"
- ip-address-list
- "number-list"
- number-list
- "number"
- number
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.