/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace XRay { namespace Model { /** */ class CreateSamplingRuleRequest : public XRayRequest { public: AWS_XRAY_API CreateSamplingRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateSamplingRule"; } AWS_XRAY_API Aws::String SerializePayload() const override; /** *

The rule definition.

*/ inline const SamplingRule& GetSamplingRule() const{ return m_samplingRule; } /** *

The rule definition.

*/ inline bool SamplingRuleHasBeenSet() const { return m_samplingRuleHasBeenSet; } /** *

The rule definition.

*/ inline void SetSamplingRule(const SamplingRule& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = value; } /** *

The rule definition.

*/ inline void SetSamplingRule(SamplingRule&& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = std::move(value); } /** *

The rule definition.

*/ inline CreateSamplingRuleRequest& WithSamplingRule(const SamplingRule& value) { SetSamplingRule(value); return *this;} /** *

The rule definition.

*/ inline CreateSamplingRuleRequest& WithSamplingRule(SamplingRule&& value) { SetSamplingRule(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::Vector& GetTags() const{ return m_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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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.

*/ inline CreateSamplingRuleRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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.

*/ inline CreateSamplingRuleRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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.

*/ inline CreateSamplingRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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.

*/ inline CreateSamplingRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: SamplingRule m_samplingRule; bool m_samplingRuleHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace XRay } // namespace Aws