libZSservicesZSamazonka-iotZSamazonka-iot
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.IoT.CreateCustomMetric

Description

Use this API to define a Custom Metric published by your devices to Device Defender.

Requires permission to access the CreateCustomMetric action.

Synopsis

Creating a Request

data CreateCustomMetric Source #

See: newCreateCustomMetric smart constructor.

Constructors

CreateCustomMetric' 

Fields

  • displayName :: Maybe Text

    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.

  • tags :: Maybe [Tag]

    Metadata that can be used to manage the custom metric.

  • metricName :: Text

    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.

  • metricType :: CustomMetricType

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

  • clientRequestToken :: Text

    Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

Instances

Instances details
Eq CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Read CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Show CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Generic CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Associated Types

type Rep CreateCustomMetric :: Type -> Type #

NFData CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Methods

rnf :: CreateCustomMetric -> () #

Hashable CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

ToJSON CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

AWSRequest CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Associated Types

type AWSResponse CreateCustomMetric #

ToHeaders CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

ToPath CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

ToQuery CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

type Rep CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

type Rep CreateCustomMetric = D1 ('MetaData "CreateCustomMetric" "Amazonka.IoT.CreateCustomMetric" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CreateCustomMetric'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag]))) :*: (S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "metricType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomMetricType) :*: S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateCustomMetric Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

newCreateCustomMetric Source #

Create a value of CreateCustomMetric with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:displayName:CreateCustomMetric', createCustomMetric_displayName - 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.

$sel:tags:CreateCustomMetric', createCustomMetric_tags - Metadata that can be used to manage the custom metric.

$sel:metricName:CreateCustomMetric', createCustomMetric_metricName - 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.

$sel:metricType:CreateCustomMetric', createCustomMetric_metricType - The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.

$sel:clientRequestToken:CreateCustomMetric', createCustomMetric_clientRequestToken - Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

Request Lenses

createCustomMetric_displayName :: Lens' CreateCustomMetric (Maybe Text) Source #

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.

createCustomMetric_tags :: Lens' CreateCustomMetric (Maybe [Tag]) Source #

Metadata that can be used to manage the custom metric.

createCustomMetric_metricName :: Lens' CreateCustomMetric Text Source #

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.

createCustomMetric_metricType :: Lens' CreateCustomMetric CustomMetricType Source #

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

createCustomMetric_clientRequestToken :: Lens' CreateCustomMetric Text Source #

Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

Destructuring the Response

data CreateCustomMetricResponse Source #

See: newCreateCustomMetricResponse smart constructor.

Constructors

CreateCustomMetricResponse' 

Fields

  • metricName :: Maybe Text

    The name of the custom metric to be used in the metric report.

  • metricArn :: Maybe Text

    The Amazon Resource Number (ARN) of the custom metric, e.g. arn:aws-partition:iot:region:accountId:custommetric/metricName

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Read CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Show CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Generic CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

Associated Types

type Rep CreateCustomMetricResponse :: Type -> Type #

NFData CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

type Rep CreateCustomMetricResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateCustomMetric

type Rep CreateCustomMetricResponse = D1 ('MetaData "CreateCustomMetricResponse" "Amazonka.IoT.CreateCustomMetric" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CreateCustomMetricResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "metricArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateCustomMetricResponse Source #

Create a value of CreateCustomMetricResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:metricName:CreateCustomMetric', createCustomMetricResponse_metricName - The name of the custom metric to be used in the metric report.

$sel:metricArn:CreateCustomMetricResponse', createCustomMetricResponse_metricArn - The Amazon Resource Number (ARN) of the custom metric, e.g. arn:aws-partition:iot:region:accountId:custommetric/metricName

$sel:httpStatus:CreateCustomMetricResponse', createCustomMetricResponse_httpStatus - The response's http status code.

Response Lenses

createCustomMetricResponse_metricName :: Lens' CreateCustomMetricResponse (Maybe Text) Source #

The name of the custom metric to be used in the metric report.

createCustomMetricResponse_metricArn :: Lens' CreateCustomMetricResponse (Maybe Text) Source #

The Amazon Resource Number (ARN) of the custom metric, e.g. arn:aws-partition:iot:region:accountId:custommetric/metricName