| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- data CreateSamplingRule = CreateSamplingRule' {
- tags :: Maybe [Tag]
- samplingRule :: SamplingRule
- newCreateSamplingRule :: SamplingRule -> CreateSamplingRule
- createSamplingRule_tags :: Lens' CreateSamplingRule (Maybe [Tag])
- createSamplingRule_samplingRule :: Lens' CreateSamplingRule SamplingRule
- data CreateSamplingRuleResponse = CreateSamplingRuleResponse' {}
- newCreateSamplingRuleResponse :: Int -> CreateSamplingRuleResponse
- createSamplingRuleResponse_samplingRuleRecord :: Lens' CreateSamplingRuleResponse (Maybe SamplingRuleRecord)
- createSamplingRuleResponse_httpStatus :: Lens' CreateSamplingRuleResponse Int
Creating a Request
data CreateSamplingRule Source #
See: newCreateSamplingRule smart constructor.
Constructors
| CreateSamplingRule' | |
Fields
| |
Instances
newCreateSamplingRule Source #
Arguments
| :: SamplingRule | |
| -> CreateSamplingRule |
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.
createSamplingRule_samplingRule :: Lens' CreateSamplingRule SamplingRule Source #
The rule definition.
Destructuring the Response
data CreateSamplingRuleResponse Source #
See: newCreateSamplingRuleResponse smart constructor.
Constructors
| CreateSamplingRuleResponse' | |
Fields
| |
Instances
newCreateSamplingRuleResponse Source #
Arguments
| :: Int | |
| -> CreateSamplingRuleResponse |
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
createSamplingRuleResponse_samplingRuleRecord :: Lens' CreateSamplingRuleResponse (Maybe SamplingRuleRecord) Source #
The saved rule definition and metadata.
createSamplingRuleResponse_httpStatus :: Lens' CreateSamplingRuleResponse Int Source #
The response's http status code.