Show / Hide Table of Contents

Class CfnSamplingRule.SamplingRuleProperty

A sampling rule that services use to decide whether to instrument a request.

Inheritance
object
CfnSamplingRule.SamplingRuleProperty
Implements
CfnSamplingRule.ISamplingRuleProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.XRay
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSamplingRule.SamplingRuleProperty : CfnSamplingRule.ISamplingRuleProperty
Syntax (vb)
Public Class CfnSamplingRule.SamplingRuleProperty Implements CfnSamplingRule.ISamplingRuleProperty
Remarks

Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don't match its properties.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.XRay;

             var samplingRuleProperty = new SamplingRuleProperty {
                 FixedRate = 123,
                 Host = "host",
                 HttpMethod = "httpMethod",
                 Priority = 123,
                 ReservoirSize = 123,
                 ResourceArn = "resourceArn",
                 ServiceName = "serviceName",
                 ServiceType = "serviceType",
                 UrlPath = "urlPath",

                 // the properties below are optional
                 Attributes = new Dictionary<string, string> {
                     { "attributesKey", "attributes" }
                 },
                 RuleArn = "ruleArn",
                 RuleName = "ruleName",
                 Version = 123
             };

Synopsis

Constructors

SamplingRuleProperty()

A sampling rule that services use to decide whether to instrument a request.

Properties

Attributes

Matches attributes derived from the request.

FixedRate

The percentage of matching requests to instrument, after the reservoir is exhausted.

Host

Matches the hostname from a request URL.

HttpMethod

Matches the HTTP method of a request.

Priority

The priority of the sampling rule.

ReservoirSize

A fixed number of matching requests to instrument per second, prior to applying the fixed rate.

ResourceArn

Matches the ARN of the AWS resource on which the service runs.

RuleArn

The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

RuleName

The name of the sampling rule.

ServiceName

Matches the name that the service uses to identify itself in segments.

ServiceType

Matches the origin that the service uses to identify its type in segments.

UrlPath

Matches the path from a request URL.

Version

The version of the sampling rule.

Constructors

SamplingRuleProperty()

A sampling rule that services use to decide whether to instrument a request.

public SamplingRuleProperty()
Remarks

Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don't match its properties.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.XRay;

             var samplingRuleProperty = new SamplingRuleProperty {
                 FixedRate = 123,
                 Host = "host",
                 HttpMethod = "httpMethod",
                 Priority = 123,
                 ReservoirSize = 123,
                 ResourceArn = "resourceArn",
                 ServiceName = "serviceName",
                 ServiceType = "serviceType",
                 UrlPath = "urlPath",

                 // the properties below are optional
                 Attributes = new Dictionary<string, string> {
                     { "attributesKey", "attributes" }
                 },
                 RuleArn = "ruleArn",
                 RuleName = "ruleName",
                 Version = 123
             };

Properties

Attributes

Matches attributes derived from the request.

public object? Attributes { get; set; }
Property Value

object

Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-attributes

FixedRate

The percentage of matching requests to instrument, after the reservoir is exhausted.

public double FixedRate { get; set; }
Property Value

double

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-fixedrate

Host

Matches the hostname from a request URL.

public string Host { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-host

HttpMethod

Matches the HTTP method of a request.

public string HttpMethod { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-httpmethod

Priority

The priority of the sampling rule.

public double Priority { get; set; }
Property Value

double

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-priority

ReservoirSize

A fixed number of matching requests to instrument per second, prior to applying the fixed rate.

public double ReservoirSize { get; set; }
Property Value

double

Remarks

The reservoir is not used directly by services, but applies to all services using the rule collectively.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-reservoirsize

ResourceArn

Matches the ARN of the AWS resource on which the service runs.

public string ResourceArn { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-resourcearn

RuleArn

The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

public string? RuleArn { get; set; }
Property Value

string

Remarks
Specifying a sampling rule by name is recommended, as specifying by ARN will be deprecated in future.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-rulearn

RuleName

The name of the sampling rule.

public string? RuleName { get; set; }
Property Value

string

Remarks

Specify a rule by either name or ARN, but not both.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-rulename

ServiceName

Matches the name that the service uses to identify itself in segments.

public string ServiceName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-servicename

ServiceType

Matches the origin that the service uses to identify its type in segments.

public string ServiceType { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-servicetype

UrlPath

Matches the path from a request URL.

public string UrlPath { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-urlpath

Version

The version of the sampling rule.

public double? Version { get; set; }
Property Value

double?

Remarks

Version can only be set when creating a new sampling rule.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-samplingrule-samplingrule.html#cfn-xray-samplingrule-samplingrule-version

Implements

CfnSamplingRule.ISamplingRuleProperty
Back to top Generated by DocFX