@Generated(value="software.amazon.awssdk:codegen") public final class SamplingRule extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SamplingRule.Builder,SamplingRule>
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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
SamplingRule.Builder |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
attributes()
Matches attributes derived from the request.
|
static SamplingRule.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
Double |
fixedRate()
The percentage of matching requests to instrument, after the reservoir is exhausted.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAttributes()
Returns true if the Attributes property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
int |
hashCode() |
String |
host()
Matches the hostname from a request URL.
|
String |
httpMethod()
Matches the HTTP method of a request.
|
Integer |
priority()
The priority of the sampling rule.
|
Integer |
reservoirSize()
A fixed number of matching requests to instrument per second, prior to applying the fixed rate.
|
String |
resourceARN()
Matches the ARN of the AWS resource on which the service runs.
|
String |
ruleARN()
The ARN of the sampling rule.
|
String |
ruleName()
The name of the sampling rule.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends SamplingRule.Builder> |
serializableBuilderClass() |
String |
serviceName()
Matches the
name that the service uses to identify itself in segments. |
String |
serviceType()
Matches the
origin that the service uses to identify its type in segments. |
SamplingRule.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
urlPath()
Matches the path from a request URL.
|
Integer |
version()
The version of the sampling rule format (
1). |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String ruleName()
The name of the sampling rule. Specify a rule by either name or ARN, but not both.
public final String ruleARN()
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
public final String resourceARN()
Matches the ARN of the AWS resource on which the service runs.
public final Integer priority()
The priority of the sampling rule.
public final Double fixedRate()
The percentage of matching requests to instrument, after the reservoir is exhausted.
public final 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.
public final String serviceName()
Matches the name that the service uses to identify itself in segments.
name that the service uses to identify itself in segments.public final String serviceType()
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 final String host()
Matches the hostname from a request URL.
public final String httpMethod()
Matches the HTTP method of a request.
public final String urlPath()
Matches the path from a request URL.
public final Integer version()
The version of the sampling rule format (1).
1).public final boolean hasAttributes()
public final Map<String,String> attributes()
Matches attributes derived from the request.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAttributes() to see if a value was sent in this field.
public SamplingRule.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<SamplingRule.Builder,SamplingRule>public static SamplingRule.Builder builder()
public static Class<? extends SamplingRule.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2021. All rights reserved.