Class CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.xray.CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSamplingRulePropsMixin.SamplingRuleProperty>
- Enclosing interface:
CfnSamplingRulePropsMixin.SamplingRuleProperty
@Stability(Stable)
public static final class CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSamplingRulePropsMixin.SamplingRuleProperty>
A builder for
CfnSamplingRulePropsMixin.SamplingRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributes(Map<String, String> attributes) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getAttributes()attributes(IResolvable attributes) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getAttributes()build()Builds the configured instance.Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getFixedRate()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getHost()httpMethod(String httpMethod) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getHttpMethod()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getPriority()reservoirSize(Number reservoirSize) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getReservoirSize()resourceArn(String resourceArn) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getResourceArn()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getRuleArn()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getRuleName()serviceName(String serviceName) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getServiceName()serviceType(String serviceType) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getServiceType()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getUrlPath()Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
attributes
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder attributes(Map<String, String> attributes) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getAttributes()- Parameters:
attributes- Matches attributes derived from the request. Map Entries: Maximum number of 5 items.Key Length Constraints: Minimum length of 1. Maximum length of 32.
Value Length Constraints: Minimum length of 1. Maximum length of 32.
- Returns:
this
-
attributes
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder attributes(IResolvable attributes) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getAttributes()- Parameters:
attributes- Matches attributes derived from the request. Map Entries: Maximum number of 5 items.Key Length Constraints: Minimum length of 1. Maximum length of 32.
Value Length Constraints: Minimum length of 1. Maximum length of 32.
- Returns:
this
-
fixedRate
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder fixedRate(Number fixedRate) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getFixedRate()- Parameters:
fixedRate- The percentage of matching requests to instrument, after the reservoir is exhausted.- Returns:
this
-
host
Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getHost()- Parameters:
host- Matches the hostname from a request URL.- Returns:
this
-
httpMethod
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder httpMethod(String httpMethod) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getHttpMethod()- Parameters:
httpMethod- Matches the HTTP method of a request.- Returns:
this
-
priority
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder priority(Number priority) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getPriority()- Parameters:
priority- The priority of the sampling rule.- Returns:
this
-
reservoirSize
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder reservoirSize(Number reservoirSize) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getReservoirSize()- Parameters:
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.- Returns:
this
-
resourceArn
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder resourceArn(String resourceArn) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getResourceArn()- Parameters:
resourceArn- Matches the ARN of the AWS resource on which the service runs.- Returns:
this
-
ruleArn
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder ruleArn(String ruleArn) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getRuleArn()- Parameters:
ruleArn- The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.Specifying a sampling rule by name is recommended, as specifying by ARN will be deprecated in future.
- Returns:
this
-
ruleName
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder ruleName(String ruleName) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getRuleName()- Parameters:
ruleName- The name of the sampling rule. Specify a rule by either name or ARN, but not both.- Returns:
this
-
serviceName
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder serviceName(String serviceName) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getServiceName()- Parameters:
serviceName- Matches thenamethat the service uses to identify itself in segments.- Returns:
this
-
serviceType
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder serviceType(String serviceType) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getServiceType()- Parameters:
serviceType- Matches theoriginthat the service uses to identify its type in segments.- Returns:
this
-
urlPath
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder urlPath(String urlPath) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getUrlPath()- Parameters:
urlPath- Matches the path from a request URL.- Returns:
this
-
version
@Stability(Stable) public CfnSamplingRulePropsMixin.SamplingRuleProperty.Builder version(Number version) Sets the value ofCfnSamplingRulePropsMixin.SamplingRuleProperty.getVersion()- Parameters:
version- The version of the sampling rule.Versioncan only be set when creating a new sampling rule.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSamplingRulePropsMixin.SamplingRuleProperty>- Returns:
- a new instance of
CfnSamplingRulePropsMixin.SamplingRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-