public class CreateCustomMetricRequest extends AmazonWebServiceRequest implements java.io.Serializable
Use this API to define a Custom Metric published by your devices to Device Defender.
Constructor and Description |
---|
CreateCustomMetricRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClientRequestToken()
Each custom metric must have a unique client request token.
|
java.lang.String |
getDisplayName()
Field represents a friendly name in the console for the custom metric; it
doesn't have to be unique.
|
java.lang.String |
getMetricName()
The name of the custom metric.
|
java.lang.String |
getMetricType()
The type of the custom metric.
|
java.util.List<Tag> |
getTags()
Metadata that can be used to manage the custom metric.
|
int |
hashCode() |
void |
setClientRequestToken(java.lang.String clientRequestToken)
Each custom metric must have a unique client request token.
|
void |
setDisplayName(java.lang.String displayName)
Field represents a friendly name in the console for the custom metric; it
doesn't have to be unique.
|
void |
setMetricName(java.lang.String metricName)
The name of the custom metric.
|
void |
setMetricType(CustomMetricType metricType)
The type of the custom metric.
|
void |
setMetricType(java.lang.String metricType)
The type of the custom metric.
|
void |
setTags(java.util.Collection<Tag> tags)
Metadata that can be used to manage the custom metric.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateCustomMetricRequest |
withClientRequestToken(java.lang.String clientRequestToken)
Each custom metric must have a unique client request token.
|
CreateCustomMetricRequest |
withDisplayName(java.lang.String displayName)
Field represents a friendly name in the console for the custom metric; it
doesn't have to be unique.
|
CreateCustomMetricRequest |
withMetricName(java.lang.String metricName)
The name of the custom metric.
|
CreateCustomMetricRequest |
withMetricType(CustomMetricType metricType)
The type of the custom metric.
|
CreateCustomMetricRequest |
withMetricType(java.lang.String metricType)
The type of the custom metric.
|
CreateCustomMetricRequest |
withTags(java.util.Collection<Tag> tags)
Metadata that can be used to manage the custom metric.
|
CreateCustomMetricRequest |
withTags(Tag... tags)
Metadata that can be used to manage the custom metric.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getMetricName()
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.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
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.
public void setMetricName(java.lang.String 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.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
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.
public CreateCustomMetricRequest withMetricName(java.lang.String 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
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.
public java.lang.String getDisplayName()
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.
Constraints:
Length: - 128
Pattern: [\p{Graph}\x20]*
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.
public void setDisplayName(java.lang.String 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.
Constraints:
Length: - 128
Pattern: [\p{Graph}\x20]*
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.
public CreateCustomMetricRequest withDisplayName(java.lang.String 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 128
Pattern: [\p{Graph}\x20]*
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.
public java.lang.String getMetricType()
The type of the custom metric. Types include string-list
,
ip-address-list
, number-list
, and
number
.
Constraints:
Allowed Values: 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
.
CustomMetricType
public void setMetricType(java.lang.String metricType)
The type of the custom metric. Types include string-list
,
ip-address-list
, number-list
, and
number
.
Constraints:
Allowed Values: string-list, ip-address-list, number-list, number
metricType
-
The type of the custom metric. Types include
string-list
, ip-address-list
,
number-list
, and number
.
CustomMetricType
public CreateCustomMetricRequest withMetricType(java.lang.String metricType)
The type of the custom metric. Types include string-list
,
ip-address-list
, number-list
, and
number
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: string-list, ip-address-list, number-list, number
metricType
-
The type of the custom metric. Types include
string-list
, ip-address-list
,
number-list
, and number
.
CustomMetricType
public void setMetricType(CustomMetricType metricType)
The type of the custom metric. Types include string-list
,
ip-address-list
, number-list
, and
number
.
Constraints:
Allowed Values: string-list, ip-address-list, number-list, number
metricType
-
The type of the custom metric. Types include
string-list
, ip-address-list
,
number-list
, and number
.
CustomMetricType
public CreateCustomMetricRequest withMetricType(CustomMetricType metricType)
The type of the custom metric. Types include string-list
,
ip-address-list
, number-list
, and
number
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: string-list, ip-address-list, number-list, number
metricType
-
The type of the custom metric. Types include
string-list
, ip-address-list
,
number-list
, and number
.
CustomMetricType
public java.util.List<Tag> getTags()
Metadata that can be used to manage the custom metric.
Metadata that can be used to manage the custom metric.
public void setTags(java.util.Collection<Tag> tags)
Metadata that can be used to manage the custom metric.
tags
- Metadata that can be used to manage the custom metric.
public CreateCustomMetricRequest withTags(Tag... tags)
Metadata that can be used to manage the custom metric.
Returns a reference to this object so that method calls can be chained together.
tags
- Metadata that can be used to manage the custom metric.
public CreateCustomMetricRequest withTags(java.util.Collection<Tag> tags)
Metadata that can be used to manage the custom metric.
Returns a reference to this object so that method calls can be chained together.
tags
- Metadata that can be used to manage the custom metric.
public java.lang.String getClientRequestToken()
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, AWS SDKs will automatically generate a unique client request.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
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, AWS SDKs will automatically generate a unique client request.
public void setClientRequestToken(java.lang.String 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, AWS SDKs will automatically generate a unique client request.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
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, AWS SDKs will automatically generate a unique client request.
public CreateCustomMetricRequest withClientRequestToken(java.lang.String 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, AWS SDKs will automatically generate a unique client request.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
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, AWS SDKs will automatically generate a unique client request.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.