@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SamplingRule extends Object implements Serializable, Cloneable, StructuredPojo
A sampling rule that services use to decide whether to instrument a request. Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don't match its properties.
Constructor and Description |
---|
SamplingRule() |
Modifier and Type | Method and Description |
---|---|
SamplingRule |
addAttributesEntry(String key,
String value)
Add a single Attributes entry
|
SamplingRule |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
SamplingRule |
clone() |
boolean |
equals(Object obj) |
Map<String,String> |
getAttributes()
Matches attributes derived from the request.
|
Double |
getFixedRate()
The percentage of matching requests to instrument, after the reservoir is exhausted.
|
String |
getHost()
Matches the hostname from a request URL.
|
String |
getHTTPMethod()
Matches the HTTP method of a request.
|
Integer |
getPriority()
The priority of the sampling rule.
|
Integer |
getReservoirSize()
A fixed number of matching requests to instrument per second, prior to applying the fixed rate.
|
String |
getResourceARN()
Matches the ARN of the Amazon Web Services resource on which the service runs.
|
String |
getRuleARN()
The ARN of the sampling rule.
|
String |
getRuleName()
The name of the sampling rule.
|
String |
getServiceName()
Matches the
name that the service uses to identify itself in segments. |
String |
getServiceType()
Matches the
origin that the service uses to identify its type in segments. |
String |
getURLPath()
Matches the path from a request URL.
|
Integer |
getVersion()
The version of the sampling rule format (
1 ). |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAttributes(Map<String,String> attributes)
Matches attributes derived from the request.
|
void |
setFixedRate(Double fixedRate)
The percentage of matching requests to instrument, after the reservoir is exhausted.
|
void |
setHost(String host)
Matches the hostname from a request URL.
|
void |
setHTTPMethod(String hTTPMethod)
Matches the HTTP method of a request.
|
void |
setPriority(Integer priority)
The priority of the sampling rule.
|
void |
setReservoirSize(Integer reservoirSize)
A fixed number of matching requests to instrument per second, prior to applying the fixed rate.
|
void |
setResourceARN(String resourceARN)
Matches the ARN of the Amazon Web Services resource on which the service runs.
|
void |
setRuleARN(String ruleARN)
The ARN of the sampling rule.
|
void |
setRuleName(String ruleName)
The name of the sampling rule.
|
void |
setServiceName(String serviceName)
Matches the
name that the service uses to identify itself in segments. |
void |
setServiceType(String serviceType)
Matches the
origin that the service uses to identify its type in segments. |
void |
setURLPath(String uRLPath)
Matches the path from a request URL.
|
void |
setVersion(Integer version)
The version of the sampling rule format (
1 ). |
String |
toString()
Returns a string representation of this object.
|
SamplingRule |
withAttributes(Map<String,String> attributes)
Matches attributes derived from the request.
|
SamplingRule |
withFixedRate(Double fixedRate)
The percentage of matching requests to instrument, after the reservoir is exhausted.
|
SamplingRule |
withHost(String host)
Matches the hostname from a request URL.
|
SamplingRule |
withHTTPMethod(String hTTPMethod)
Matches the HTTP method of a request.
|
SamplingRule |
withPriority(Integer priority)
The priority of the sampling rule.
|
SamplingRule |
withReservoirSize(Integer reservoirSize)
A fixed number of matching requests to instrument per second, prior to applying the fixed rate.
|
SamplingRule |
withResourceARN(String resourceARN)
Matches the ARN of the Amazon Web Services resource on which the service runs.
|
SamplingRule |
withRuleARN(String ruleARN)
The ARN of the sampling rule.
|
SamplingRule |
withRuleName(String ruleName)
The name of the sampling rule.
|
SamplingRule |
withServiceName(String serviceName)
Matches the
name that the service uses to identify itself in segments. |
SamplingRule |
withServiceType(String serviceType)
Matches the
origin that the service uses to identify its type in segments. |
SamplingRule |
withURLPath(String uRLPath)
Matches the path from a request URL.
|
SamplingRule |
withVersion(Integer version)
The version of the sampling rule format (
1 ). |
public void setRuleName(String ruleName)
The name of the sampling rule. Specify a rule by either name or ARN, but not both.
ruleName
- The name of the sampling rule. Specify a rule by either name or ARN, but not both.public String getRuleName()
The name of the sampling rule. Specify a rule by either name or ARN, but not both.
public SamplingRule withRuleName(String ruleName)
The name of the sampling rule. Specify a rule by either name or ARN, but not both.
ruleName
- The name of the sampling rule. Specify a rule by either name or ARN, but not both.public void setRuleARN(String ruleARN)
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
ruleARN
- The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.public String getRuleARN()
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
public SamplingRule withRuleARN(String ruleARN)
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
ruleARN
- The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.public void setResourceARN(String resourceARN)
Matches the ARN of the Amazon Web Services resource on which the service runs.
resourceARN
- Matches the ARN of the Amazon Web Services resource on which the service runs.public String getResourceARN()
Matches the ARN of the Amazon Web Services resource on which the service runs.
public SamplingRule withResourceARN(String resourceARN)
Matches the ARN of the Amazon Web Services resource on which the service runs.
resourceARN
- Matches the ARN of the Amazon Web Services resource on which the service runs.public void setPriority(Integer priority)
The priority of the sampling rule.
priority
- The priority of the sampling rule.public Integer getPriority()
The priority of the sampling rule.
public SamplingRule withPriority(Integer priority)
The priority of the sampling rule.
priority
- The priority of the sampling rule.public void setFixedRate(Double fixedRate)
The percentage of matching requests to instrument, after the reservoir is exhausted.
fixedRate
- The percentage of matching requests to instrument, after the reservoir is exhausted.public Double getFixedRate()
The percentage of matching requests to instrument, after the reservoir is exhausted.
public SamplingRule withFixedRate(Double fixedRate)
The percentage of matching requests to instrument, after the reservoir is exhausted.
fixedRate
- The percentage of matching requests to instrument, after the reservoir is exhausted.public void setReservoirSize(Integer reservoirSize)
A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
reservoirSize
- A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The
reservoir is not used directly by services, but applies to all services using the rule collectively.public Integer getReservoirSize()
A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
public SamplingRule withReservoirSize(Integer reservoirSize)
A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
reservoirSize
- A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The
reservoir is not used directly by services, but applies to all services using the rule collectively.public void setServiceName(String serviceName)
Matches the name
that the service uses to identify itself in segments.
serviceName
- Matches the name
that the service uses to identify itself in segments.public String getServiceName()
Matches the name
that the service uses to identify itself in segments.
name
that the service uses to identify itself in segments.public SamplingRule withServiceName(String serviceName)
Matches the name
that the service uses to identify itself in segments.
serviceName
- Matches the name
that the service uses to identify itself in segments.public void setServiceType(String serviceType)
Matches the origin
that the service uses to identify its type in segments.
serviceType
- Matches the origin
that the service uses to identify its type in segments.public String getServiceType()
Matches the origin
that the service uses to identify its type in segments.
origin
that the service uses to identify its type in segments.public SamplingRule withServiceType(String serviceType)
Matches the origin
that the service uses to identify its type in segments.
serviceType
- Matches the origin
that the service uses to identify its type in segments.public void setHost(String host)
Matches the hostname from a request URL.
host
- Matches the hostname from a request URL.public String getHost()
Matches the hostname from a request URL.
public SamplingRule withHost(String host)
Matches the hostname from a request URL.
host
- Matches the hostname from a request URL.public void setHTTPMethod(String hTTPMethod)
Matches the HTTP method of a request.
hTTPMethod
- Matches the HTTP method of a request.public String getHTTPMethod()
Matches the HTTP method of a request.
public SamplingRule withHTTPMethod(String hTTPMethod)
Matches the HTTP method of a request.
hTTPMethod
- Matches the HTTP method of a request.public void setURLPath(String uRLPath)
Matches the path from a request URL.
uRLPath
- Matches the path from a request URL.public String getURLPath()
Matches the path from a request URL.
public SamplingRule withURLPath(String uRLPath)
Matches the path from a request URL.
uRLPath
- Matches the path from a request URL.public void setVersion(Integer version)
The version of the sampling rule format (1
).
version
- The version of the sampling rule format (1
).public Integer getVersion()
The version of the sampling rule format (1
).
1
).public SamplingRule withVersion(Integer version)
The version of the sampling rule format (1
).
version
- The version of the sampling rule format (1
).public Map<String,String> getAttributes()
Matches attributes derived from the request.
public void setAttributes(Map<String,String> attributes)
Matches attributes derived from the request.
attributes
- Matches attributes derived from the request.public SamplingRule withAttributes(Map<String,String> attributes)
Matches attributes derived from the request.
attributes
- Matches attributes derived from the request.public SamplingRule addAttributesEntry(String key, String value)
public SamplingRule clearAttributesEntries()
public String toString()
toString
in class Object
Object.toString()
public SamplingRule clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.