AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateLogGroupRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/logs/CloudWatchLogsRequest.h>
10#include <aws/logs/CloudWatchLogs_EXPORTS.h>
11#include <aws/logs/model/LogGroupClass.h>
12
13#include <utility>
14
15namespace Aws {
16namespace CloudWatchLogs {
17namespace Model {
18
22 public:
23 AWS_CLOUDWATCHLOGS_API CreateLogGroupRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateLogGroup"; }
30
31 AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override;
32
33 AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
34
36
39 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
40 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
41 template <typename LogGroupNameT = Aws::String>
42 void SetLogGroupName(LogGroupNameT&& value) {
43 m_logGroupNameHasBeenSet = true;
44 m_logGroupName = std::forward<LogGroupNameT>(value);
45 }
46 template <typename LogGroupNameT = Aws::String>
47 CreateLogGroupRequest& WithLogGroupName(LogGroupNameT&& value) {
48 SetLogGroupName(std::forward<LogGroupNameT>(value));
49 return *this;
50 }
52
54
60 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
61 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
62 template <typename KmsKeyIdT = Aws::String>
63 void SetKmsKeyId(KmsKeyIdT&& value) {
64 m_kmsKeyIdHasBeenSet = true;
65 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
66 }
67 template <typename KmsKeyIdT = Aws::String>
68 CreateLogGroupRequest& WithKmsKeyId(KmsKeyIdT&& value) {
69 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
70 return *this;
71 }
73
75
88 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
89 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
90 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
91 void SetTags(TagsT&& value) {
92 m_tagsHasBeenSet = true;
93 m_tags = std::forward<TagsT>(value);
94 }
95 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
97 SetTags(std::forward<TagsT>(value));
98 return *this;
99 }
100 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
101 CreateLogGroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
102 m_tagsHasBeenSet = true;
103 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
104 return *this;
105 }
107
109
125 inline LogGroupClass GetLogGroupClass() const { return m_logGroupClass; }
126 inline bool LogGroupClassHasBeenSet() const { return m_logGroupClassHasBeenSet; }
127 inline void SetLogGroupClass(LogGroupClass value) {
128 m_logGroupClassHasBeenSet = true;
129 m_logGroupClass = value;
130 }
132 SetLogGroupClass(value);
133 return *this;
134 }
136
138
144 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
145 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
146 inline void SetDeletionProtectionEnabled(bool value) {
147 m_deletionProtectionEnabledHasBeenSet = true;
148 m_deletionProtectionEnabled = value;
149 }
152 return *this;
153 }
155 private:
156 Aws::String m_logGroupName;
157
158 Aws::String m_kmsKeyId;
159
161
162 LogGroupClass m_logGroupClass{LogGroupClass::NOT_SET};
163
164 bool m_deletionProtectionEnabled{false};
165 bool m_logGroupNameHasBeenSet = false;
166 bool m_kmsKeyIdHasBeenSet = false;
167 bool m_tagsHasBeenSet = false;
168 bool m_logGroupClassHasBeenSet = false;
169 bool m_deletionProtectionEnabledHasBeenSet = false;
170};
171
172} // namespace Model
173} // namespace CloudWatchLogs
174} // namespace Aws
CreateLogGroupRequest & WithLogGroupClass(LogGroupClass value)
AWS_CLOUDWATCHLOGS_API CreateLogGroupRequest()=default
CreateLogGroupRequest & WithLogGroupName(LogGroupNameT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateLogGroupRequest & WithKmsKeyId(KmsKeyIdT &&value)
CreateLogGroupRequest & WithDeletionProtectionEnabled(bool value)
virtual const char * GetServiceRequestName() const override
CreateLogGroupRequest & WithTags(TagsT &&value)
AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override
AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateLogGroupRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String