amazonka-xray-2.0: Amazon X-Ray SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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
ToJSON CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.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

AWSRequest CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type AWSResponse CreateSamplingRule #

Generic CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type Rep CreateSamplingRule :: Type -> Type #

Read CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Show CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

NFData CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Methods

rnf :: CreateSamplingRule -> () #

Eq CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Hashable CreateSamplingRule Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

type AWSResponse 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" "amazonka-xray-2.0-EVMSPoflqtHB9ZqvEIOE4Q" '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)))

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.

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
Generic CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Associated Types

type Rep CreateSamplingRuleResponse :: Type -> Type #

Read CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Show CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

NFData CreateSamplingRuleResponse Source # 
Instance details

Defined in Amazonka.XRay.CreateSamplingRule

Eq 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" "amazonka-xray-2.0-EVMSPoflqtHB9ZqvEIOE4Q" '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.

CreateSamplingRuleResponse, createSamplingRuleResponse_httpStatus - The response's http status code.

Response Lenses