Class CloudWatchMetricStreamerConfig
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.cloudwatch.config.CloudWatchMetricStreamerConfig
-
public class CloudWatchMetricStreamerConfig extends java.lang.ObjectCarries configuration parameters for theCloudWatchMetricStreamer.- See Also:
CloudWatchMetricStreamer
-
-
Constructor Summary
Constructors Constructor Description CloudWatchMetricStreamerConfig(java.lang.String accessKeyId, java.lang.String secretAccessKey, java.lang.String region, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<CloudWatchMetricStreamDefinition> metricStreams)Creates a newCloudWatchMetricStreamerConfigwith the specified configuration values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAccessKeyId()Returns the access key ID for the AWS account.java.util.List<CloudWatchMetricStreamDefinition>getMetricStreams()Returns the collection of subscribable metric streams.com.elastisys.scale.commons.json.types.TimeIntervalgetPollInterval()Returns the polling interval (given in seconds) for metric streams.java.lang.StringgetRegion()Returns the Amazon EC2 region hosting the CloudWatch service to connect to.java.lang.StringgetSecretAccessKey()Returns the secret access key for the AWS account.inthashCode()java.lang.StringtoString()voidvalidate()Validates the configuration (checks if there are any obvious errors).CloudWatchMetricStreamerConfigwithStreamDefinition(CloudWatchMetricStreamDefinition stream)Returns a copy of thisCloudWatchMetricStreamerConfigwith an additionalCloudWatchMetricStreamDefinition.
-
-
-
Constructor Detail
-
CloudWatchMetricStreamerConfig
public CloudWatchMetricStreamerConfig(java.lang.String accessKeyId, java.lang.String secretAccessKey, java.lang.String region, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<CloudWatchMetricStreamDefinition> metricStreams)Creates a newCloudWatchMetricStreamerConfigwith the specified configuration values.- Parameters:
region- The Amazon EC2 region hosting the CloudWatch service to connect to.pollInterval- The polling interval forMetricStreams.metricStreams- The collection of published metric streams.
-
-
Method Detail
-
getAccessKeyId
public java.lang.String getAccessKeyId()
Returns the access key ID for the AWS account.- Returns:
-
getSecretAccessKey
public java.lang.String getSecretAccessKey()
Returns the secret access key for the AWS account.- Returns:
-
getRegion
public java.lang.String getRegion()
Returns the Amazon EC2 region hosting the CloudWatch service to connect to.- Returns:
-
getPollInterval
public com.elastisys.scale.commons.json.types.TimeInterval getPollInterval()
Returns the polling interval (given in seconds) for metric streams.- Returns:
-
getMetricStreams
public java.util.List<CloudWatchMetricStreamDefinition> getMetricStreams()
Returns the collection of subscribable metric streams.- Returns:
-
validate
public void validate() throws java.lang.IllegalArgumentExceptionValidates the configuration (checks if there are any obvious errors).- Throws:
java.lang.IllegalArgumentException- Thrown if there are obvious errors, such as missing values the values are out of permissible ranges.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
withStreamDefinition
public CloudWatchMetricStreamerConfig withStreamDefinition(CloudWatchMetricStreamDefinition stream)
Returns a copy of thisCloudWatchMetricStreamerConfigwith an additionalCloudWatchMetricStreamDefinition. Note that the instance that this method is invoked on remains unchanged.- Parameters:
stream- TheCloudWatchMetricStreamDefinitionthat will be added in the returned copy.- Returns:
- A copy of this
CloudWatchMetricStreamerConfigwith the stream definition added.
-
-