/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace CloudWatchLogs { namespace Model { /** */ class CreateLogGroupRequest : public CloudWatchLogsRequest { public: AWS_CLOUDWATCHLOGS_API CreateLogGroupRequest(); // 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 "CreateLogGroup"; } AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override; AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the log group.

*/ inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } /** *

The name of the log group.

*/ inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; } /** *

The name of the log group.

*/ inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** *

The name of the log group.

*/ inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); } /** *

The name of the log group.

*/ inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } /** *

The name of the log group.

*/ inline CreateLogGroupRequest& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} /** *

The name of the log group.

*/ inline CreateLogGroupRequest& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;} /** *

The name of the log group.

*/ inline CreateLogGroupRequest& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline CreateLogGroupRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline CreateLogGroupRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log * data. For more information, see Amazon * Resource Names.

*/ inline CreateLogGroupRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

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

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The key-value pairs to use for the tags.

You can grant users access to * certain log groups while preventing them from accessing other log groups. To do * so, tag your groups and use IAM policies that refer to those tags. To assign * tags when you create a log group, you must have either the * logs:TagResource or logs:TagLogGroup permission. For * more information about tagging, see Tagging * Amazon Web Services resources. For more information about using tags to * control access, see Controlling * access to Amazon Web Services resources using tags.

*/ inline CreateLogGroupRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_logGroupName; bool m_logGroupNameHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws