Class SamplingRule
Creates and manages an AWS XRay Sampling Rule.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Xray.SamplingRule("example", new Aws.Xray.SamplingRuleArgs
{
Attributes =
{
{ "Hello", "Tris" },
},
FixedRate = 0.05,
Host = "*",
HttpMethod = "*",
Priority = 10000,
ReservoirSize = 1,
ResourceArn = "*",
RuleName = "example",
ServiceName = "*",
ServiceType = "*",
UrlPath = "*",
Version = 1,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Xray
Assembly: Pulumi.Aws.dll
Syntax
public class SamplingRule : CustomResource
Constructors
View SourceSamplingRule(String, SamplingRuleArgs, CustomResourceOptions)
Create a SamplingRule resource with the given unique name, arguments, and options.
Declaration
public SamplingRule(string name, SamplingRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SamplingRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The ARN of the sampling rule.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Attributes
Matches attributes derived from the request.
Declaration
public Output<ImmutableDictionary<string, string>> Attributes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
FixedRate
The percentage of matching requests to instrument, after the reservoir is exhausted.
Declaration
public Output<double> FixedRate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Double> |
Host
Matches the hostname from a request URL.
Declaration
public Output<string> Host { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HttpMethod
Matches the HTTP method of a request.
Declaration
public Output<string> HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Priority
The priority of the sampling rule.
Declaration
public Output<int> Priority { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
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.
Declaration
public Output<int> ReservoirSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ResourceArn
Matches the ARN of the AWS resource on which the service runs.
Declaration
public Output<string> ResourceArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RuleName
The name of the sampling rule.
Declaration
public Output<string> RuleName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceName
Matches the name that the service uses to identify itself in segments.
Declaration
public Output<string> ServiceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceType
Matches the origin that the service uses to identify its type in segments.
Declaration
public Output<string> ServiceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UrlPath
Matches the path from a request URL.
Declaration
public Output<string> UrlPath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Version
The version of the sampling rule format (1 )
Declaration
public Output<int> Version { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Methods
View SourceGet(String, Input<String>, SamplingRuleState, CustomResourceOptions)
Get an existing SamplingRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SamplingRule Get(string name, Input<string> id, SamplingRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SamplingRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SamplingRule |