1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. iot
  5. CustomMetric

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.iot.CustomMetric

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    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:

    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.Inputs.Tag>
    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 TagArgs
    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<Tag>
    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 Tag[]
    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[TagArgs]
    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, CustomMetricMetricTypeArgs

    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

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

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

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi