libZSservicesZSamazonka-xrayZSamazonka-xray
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.XRay.CreateSamplingRule

Description

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.

Synopsis

Creating a Request

data CreateSamplingRule Source #

See: newCreateSamplingRule smart constructor.

Constructors

CreateSamplingRule' 

Fields

  • tags :: Maybe [Tag]

    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.
  • samplingRule :: SamplingRule

    The rule definition.

Instances

Instances details
Eq CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Read CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Show CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Generic CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type Rep CreateSamplingRule :: Type -> Type #

NFData CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Methods

rnf :: CreateSamplingRule -> () #

Hashable CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

ToJSON CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

AWSRequest CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type AWSResponse CreateSamplingRule #

ToHeaders CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

ToPath CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

ToQuery CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

type Rep CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

type Rep CreateSamplingRule = D1 ('MetaData "CreateSamplingRule" "Amazonka.XRay.CreateSamplingRule" "libZSservicesZSamazonka-xrayZSamazonka-xray" 'False) (C1 ('MetaCons "CreateSamplingRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "samplingRule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SamplingRule)))
type AWSResponse CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

newCreateSamplingRule Source #

Create a value of CreateSamplingRule with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:tags:CreateSamplingRule', createSamplingRule_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.

$sel:samplingRule:CreateSamplingRule', createSamplingRule_samplingRule - The rule definition.

Request Lenses

createSamplingRule_tags :: Lens' CreateSamplingRule (Maybe [Tag]) Source #

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.

Destructuring the Response

data CreateSamplingRuleResponse Source #

See: newCreateSamplingRuleResponse smart constructor.

Constructors

CreateSamplingRuleResponse' 

Fields

Instances

Instances details
Eq CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Read CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Show CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Generic CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type Rep CreateSamplingRuleResponse :: Type -> Type #

NFData CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

type Rep CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

type Rep CreateSamplingRuleResponse = D1 ('MetaData "CreateSamplingRuleResponse" "Amazonka.XRay.CreateSamplingRule" "libZSservicesZSamazonka-xrayZSamazonka-xray" 'False) (C1 ('MetaCons "CreateSamplingRuleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "samplingRuleRecord") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SamplingRuleRecord)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateSamplingRuleResponse Source #

Create a value of CreateSamplingRuleResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:samplingRuleRecord:CreateSamplingRuleResponse', createSamplingRuleResponse_samplingRuleRecord - The saved rule definition and metadata.

$sel:httpStatus:CreateSamplingRuleResponse', createSamplingRuleResponse_httpStatus - The response's http status code.

Response Lenses