Package com.pulumi.aws.xray
Class SamplingRule
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.xray.SamplingRule
-
public class SamplingRule extends com.pulumi.resources.CustomResourceCreates and manages an AWS XRay Sampling Rule. ## Example Usage
## Import ### Identity Schema #### Required * `ruleName` (String) Sampling rule name. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import XRay Sampling Rules using `ruleName`. For example: ```sh $ pulumi import aws:xray/samplingRule:SamplingRule example example-rule ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.xray.SamplingRule; import com.pulumi.aws.xray.SamplingRuleArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new SamplingRule("example", SamplingRuleArgs.builder() .ruleName("example") .priority(9999) .version(1) .reservoirSize(1) .fixedRate(0.05) .urlPath("*") .host("*") .httpMethod("*") .serviceType("*") .serviceName("*") .resourceArn("*") .attributes(Map.of("Hello", "Tris")) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description SamplingRule(java.lang.String name)SamplingRule(java.lang.String name, SamplingRuleArgs args)SamplingRule(java.lang.String name, SamplingRuleArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>attributes()com.pulumi.core.Output<java.lang.Double>fixedRate()static SamplingRuleget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SamplingRuleState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>host()com.pulumi.core.Output<java.lang.String>httpMethod()com.pulumi.core.Output<java.lang.Integer>priority()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.Integer>reservoirSize()com.pulumi.core.Output<java.lang.String>resourceArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>ruleName()com.pulumi.core.Output<java.lang.String>serviceName()com.pulumi.core.Output<java.lang.String>serviceType()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>urlPath()com.pulumi.core.Output<java.lang.Integer>version()
-
-
-
Constructor Detail
-
SamplingRule
public SamplingRule(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
SamplingRule
public SamplingRule(java.lang.String name, SamplingRuleArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
SamplingRule
public SamplingRule(java.lang.String name, SamplingRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the sampling rule.
-
attributes
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> attributes()
- Returns:
- Matches attributes derived from the request.
-
fixedRate
public com.pulumi.core.Output<java.lang.Double> fixedRate()
- Returns:
- Percentage of matching requests to instrument, after the reservoir is exhausted.
-
host
public com.pulumi.core.Output<java.lang.String> host()
- Returns:
- Matches the hostname from a request URL.
-
httpMethod
public com.pulumi.core.Output<java.lang.String> httpMethod()
- Returns:
- Matches the HTTP method of a request.
-
priority
public com.pulumi.core.Output<java.lang.Integer> priority()
- Returns:
- Priority of the sampling rule.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
reservoirSize
public com.pulumi.core.Output<java.lang.Integer> reservoirSize()
- Returns:
- 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.
-
resourceArn
public com.pulumi.core.Output<java.lang.String> resourceArn()
- Returns:
- Matches the ARN of the AWS resource on which the service runs.
-
ruleName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ruleName()
- Returns:
- Name of the sampling rule.
-
serviceName
public com.pulumi.core.Output<java.lang.String> serviceName()
- Returns:
- Matches the `name` that the service uses to identify itself in segments.
-
serviceType
public com.pulumi.core.Output<java.lang.String> serviceType()
- Returns:
- Matches the `origin` that the service uses to identify its type in segments.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
urlPath
public com.pulumi.core.Output<java.lang.String> urlPath()
- Returns:
- Matches the path from a request URL.
-
version
public com.pulumi.core.Output<java.lang.Integer> version()
- Returns:
- Version of the sampling rule format (`1` )
-
get
public static SamplingRule get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SamplingRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-