/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace SNS { namespace Model { /** *

Input for CreateTopic action.

See Also:

AWS * API Reference

*/ class AWS_SNS_API CreateTopicRequest : public SNSRequest { public: CreateTopicRequest(); // 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 "CreateTopic"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline CreateTopicRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline CreateTopicRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the topic you want to create.

Constraints: Topic names * must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long.

*/ inline CreateTopicRequest& WithName(const char* value) { SetName(value); return *this;} /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A map of attributes with their corresponding values.

The following * lists the names, descriptions, and values of the special request parameters that * the CreateTopic action uses:

  • * DeliveryPolicy – The policy that defines how Amazon SNS retries * failed deliveries to HTTP/S endpoints.

  • * DisplayName – The display name to use for a topic with SMS * subscriptions.

  • Policy – The policy that defines * who can access your topic. By default, only the topic owner can publish or * subscribe to the topic.

The following attribute applies only * to server-side-encryption:

*
  • KmsMasterKeyId - The ID of an AWS-managed customer * master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key * Terms. For more examples, see KeyId * in the AWS Key Management Service API Reference.

*/ inline CreateTopicRequest& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

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

The list of tags to add to a new topic.

To be able to tag a * topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions.

*/ inline CreateTopicRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet; Aws::Map m_attributes; bool m_attributesHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace SNS } // namespace Aws