aws-native logo
AWS Native v0.55.0, Mar 28 23

aws-native.iot.CustomMetric

A custom metric published by your devices to Device Defender.

Example Usage

Example

using System.Collections.Generic;
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!

Example

using System.Collections.Generic;
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

new CustomMetric(name: string, args: CustomMetricArgs, opts?: CustomResourceOptions);
@overload
def CustomMetric(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 display_name: Optional[str] = None,
                 metric_name: Optional[str] = None,
                 metric_type: Optional[CustomMetricMetricType] = None,
                 tags: Optional[Sequence[CustomMetricTagArgs]] = None)
@overload
def CustomMetric(resource_name: str,
                 args: CustomMetricArgs,
                 opts: Optional[ResourceOptions] = 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.

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

The CustomMetric resource accepts the following input properties:

MetricType Pulumi.AwsNative.IoT.CustomMetricMetricType

The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.

DisplayName 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.

MetricName 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.

Tags List<Pulumi.AwsNative.IoT.Inputs.CustomMetricTagArgs>

An array of key-value pairs to apply to this resource.

MetricType CustomMetricMetricType

The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.

DisplayName 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.

MetricName 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.

Tags []CustomMetricTagArgs

An array of key-value pairs to apply to this resource.

metricType CustomMetricMetricType

The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.

displayName 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.

metricName 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.

tags List<CustomMetricTagArgs>

An array of key-value pairs to apply to this resource.

metricType CustomMetricMetricType

The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.

displayName 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.

metricName 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.

tags CustomMetricTagArgs[]

An array of key-value pairs to apply to this resource.

metric_type CustomMetricMetricType

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.

tags Sequence[CustomMetricTagArgs]

An array of key-value pairs to apply to this resource.

metricType "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.

displayName 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.

metricName 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.

tags 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 string

The provider-assigned unique ID for this managed resource.

MetricArn string

The Amazon Resource Number (ARN) of the custom metric.

Id string

The provider-assigned unique ID for this managed resource.

MetricArn string

The Amazon Resource Number (ARN) of the custom metric.

id String

The provider-assigned unique ID for this managed resource.

metricArn String

The Amazon Resource Number (ARN) of the custom metric.

id string

The provider-assigned unique ID for this managed resource.

metricArn string

The Amazon Resource Number (ARN) of the custom metric.

id str

The provider-assigned unique ID for this managed resource.

metric_arn str

The Amazon Resource Number (ARN) of the custom metric.

id String

The provider-assigned unique ID for this managed resource.

metricArn String

The Amazon Resource Number (ARN) of the custom metric.

Supporting Types

CustomMetricMetricType

StringList
string-list
IpAddressList
ip-address-list
NumberList
number-list
Number
number
CustomMetricMetricTypeStringList
string-list
CustomMetricMetricTypeIpAddressList
ip-address-list
CustomMetricMetricTypeNumberList
number-list
CustomMetricMetricTypeNumber
number
StringList
string-list
IpAddressList
ip-address-list
NumberList
number-list
Number
number
StringList
string-list
IpAddressList
ip-address-list
NumberList
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

CustomMetricTag

Key string

The tag's key.

Value string

The tag's value.

Key string

The tag's key.

Value string

The tag's value.

key String

The tag's key.

value String

The tag's value.

key string

The tag's key.

value string

The tag's value.

key str

The tag's key.

value str

The tag's value.

key String

The tag's key.

value String

The tag's value.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0