@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SingleMetricAnomalyDetector extends Object implements Serializable, Cloneable
Designates the CloudWatch metric and statistic that provides the time series the anomaly detector uses as input. If you have enabled unified cross-account observability, and this account is a monitoring account, the metric can be in the same account or a source account.
Constructor and Description |
---|
SingleMetricAnomalyDetector() |
Modifier and Type | Method and Description |
---|---|
SingleMetricAnomalyDetector |
clone() |
boolean |
equals(Object obj) |
String |
getAccountId()
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another
account, specify that account ID here.
|
List<Dimension> |
getDimensions()
The metric dimensions to create the anomaly detection model for.
|
String |
getMetricName()
The name of the metric to create the anomaly detection model for.
|
String |
getNamespace()
The namespace of the metric to create the anomaly detection model for.
|
String |
getStat()
The statistic to use for the metric and anomaly detection model.
|
int |
hashCode() |
void |
setAccountId(String accountId)
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another
account, specify that account ID here.
|
void |
setDimensions(Collection<Dimension> dimensions)
The metric dimensions to create the anomaly detection model for.
|
void |
setMetricName(String metricName)
The name of the metric to create the anomaly detection model for.
|
void |
setNamespace(String namespace)
The namespace of the metric to create the anomaly detection model for.
|
void |
setStat(String stat)
The statistic to use for the metric and anomaly detection model.
|
String |
toString()
Returns a string representation of this object.
|
SingleMetricAnomalyDetector |
withAccountId(String accountId)
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another
account, specify that account ID here.
|
SingleMetricAnomalyDetector |
withDimensions(Collection<Dimension> dimensions)
The metric dimensions to create the anomaly detection model for.
|
SingleMetricAnomalyDetector |
withDimensions(Dimension... dimensions)
The metric dimensions to create the anomaly detection model for.
|
SingleMetricAnomalyDetector |
withMetricName(String metricName)
The name of the metric to create the anomaly detection model for.
|
SingleMetricAnomalyDetector |
withNamespace(String namespace)
The namespace of the metric to create the anomaly detection model for.
|
SingleMetricAnomalyDetector |
withStat(String stat)
The statistic to use for the metric and anomaly detection model.
|
public void setAccountId(String accountId)
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another account, specify that account ID here. If you omit this parameter, the current account is used.
accountId
- If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in
another account, specify that account ID here. If you omit this parameter, the current account is used.public String getAccountId()
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another account, specify that account ID here. If you omit this parameter, the current account is used.
public SingleMetricAnomalyDetector withAccountId(String accountId)
If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in another account, specify that account ID here. If you omit this parameter, the current account is used.
accountId
- If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in
another account, specify that account ID here. If you omit this parameter, the current account is used.public void setNamespace(String namespace)
The namespace of the metric to create the anomaly detection model for.
namespace
- The namespace of the metric to create the anomaly detection model for.public String getNamespace()
The namespace of the metric to create the anomaly detection model for.
public SingleMetricAnomalyDetector withNamespace(String namespace)
The namespace of the metric to create the anomaly detection model for.
namespace
- The namespace of the metric to create the anomaly detection model for.public void setMetricName(String metricName)
The name of the metric to create the anomaly detection model for.
metricName
- The name of the metric to create the anomaly detection model for.public String getMetricName()
The name of the metric to create the anomaly detection model for.
public SingleMetricAnomalyDetector withMetricName(String metricName)
The name of the metric to create the anomaly detection model for.
metricName
- The name of the metric to create the anomaly detection model for.public List<Dimension> getDimensions()
The metric dimensions to create the anomaly detection model for.
public void setDimensions(Collection<Dimension> dimensions)
The metric dimensions to create the anomaly detection model for.
dimensions
- The metric dimensions to create the anomaly detection model for.public SingleMetricAnomalyDetector withDimensions(Dimension... dimensions)
The metric dimensions to create the anomaly detection model for.
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection)
or withDimensions(java.util.Collection)
if you want to
override the existing values.
dimensions
- The metric dimensions to create the anomaly detection model for.public SingleMetricAnomalyDetector withDimensions(Collection<Dimension> dimensions)
The metric dimensions to create the anomaly detection model for.
dimensions
- The metric dimensions to create the anomaly detection model for.public void setStat(String stat)
The statistic to use for the metric and anomaly detection model.
stat
- The statistic to use for the metric and anomaly detection model.public String getStat()
The statistic to use for the metric and anomaly detection model.
public SingleMetricAnomalyDetector withStat(String stat)
The statistic to use for the metric and anomaly detection model.
stat
- The statistic to use for the metric and anomaly detection model.public String toString()
toString
in class Object
Object.toString()
public SingleMetricAnomalyDetector clone()