Struct aws_sdk_xray::client::fluent_builders::CreateSamplingRule
source · pub struct CreateSamplingRule { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateSamplingRule
.
Creates a rule to control sampling behavior for instrumented applications. Services retrieve rules with GetSamplingRules, and evaluate each rule in ascending order of priority for each request. If a rule matches, the service records a trace, borrowing it from the reservoir size. After 10 seconds, the service reports back to X-Ray with GetSamplingTargets to get updated versions of each in-use rule. The updated rule contains a trace quota that the service can use instead of borrowing from the reservoir.
Implementations§
source§impl CreateSamplingRule
impl CreateSamplingRule
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateSamplingRule, AwsResponseRetryClassifier>, SdkError<CreateSamplingRuleError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CreateSamplingRule, AwsResponseRetryClassifier>, SdkError<CreateSamplingRuleError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CreateSamplingRuleOutput, SdkError<CreateSamplingRuleError>>
pub async fn send(
self
) -> Result<CreateSamplingRuleOutput, SdkError<CreateSamplingRuleError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn sampling_rule(self, input: SamplingRule) -> Self
pub fn sampling_rule(self, input: SamplingRule) -> Self
The rule definition.
sourcepub fn set_sampling_rule(self, input: Option<SamplingRule>) -> Self
pub fn set_sampling_rule(self, input: Option<SamplingRule>) -> Self
The rule definition.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference.
The following restrictions apply to tags:
-
Maximum number of user-applied tags per resource: 50
-
Maximum tag key length: 128 Unicode characters
-
Maximum tag value length: 256 Unicode characters
-
Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
-
Tag keys and values are case sensitive.
-
Don't use
aws:
as a prefix for keys; it's reserved for Amazon Web Services use.
A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference.
The following restrictions apply to tags:
-
Maximum number of user-applied tags per resource: 50
-
Maximum tag key length: 128 Unicode characters
-
Maximum tag value length: 256 Unicode characters
-
Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
-
Tag keys and values are case sensitive.
-
Don't use
aws:
as a prefix for keys; it's reserved for Amazon Web Services use.
Trait Implementations§
source§impl Clone for CreateSamplingRule
impl Clone for CreateSamplingRule
source§fn clone(&self) -> CreateSamplingRule
fn clone(&self) -> CreateSamplingRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more