1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/resource-groups/ResourceGroups_EXPORTS.h> 8 #include <aws/resource-groups/ResourceGroupsRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/resource-groups/model/ResourceQuery.h> 11 #include <aws/core/utils/memory/stl/AWSMap.h> 12 #include <aws/core/utils/memory/stl/AWSVector.h> 13 #include <aws/resource-groups/model/GroupConfigurationItem.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace ResourceGroups 19 { 20 namespace Model 21 { 22 23 /** 24 */ 25 class AWS_RESOURCEGROUPS_API CreateGroupRequest : public ResourceGroupsRequest 26 { 27 public: 28 CreateGroupRequest(); 29 30 // Service request name is the Operation name which will send this request out, 31 // each operation should has unique request name, so that we can get operation's name from this request. 32 // Note: this is not true for response, multiple operations may have the same response name, 33 // so we can not get operation's name from response. GetServiceRequestName()34 inline virtual const char* GetServiceRequestName() const override { return "CreateGroup"; } 35 36 Aws::String SerializePayload() const override; 37 38 39 /** 40 * <p>The name of the group, which is the identifier of the group in other 41 * operations. You can't change the name of a resource group after you create it. A 42 * resource group name can consist of letters, numbers, hyphens, periods, and 43 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 44 * these are reserved. A resource group name must be unique within each AWS Region 45 * in your AWS account.</p> 46 */ GetName()47 inline const Aws::String& GetName() const{ return m_name; } 48 49 /** 50 * <p>The name of the group, which is the identifier of the group in other 51 * operations. You can't change the name of a resource group after you create it. A 52 * resource group name can consist of letters, numbers, hyphens, periods, and 53 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 54 * these are reserved. A resource group name must be unique within each AWS Region 55 * in your AWS account.</p> 56 */ NameHasBeenSet()57 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } 58 59 /** 60 * <p>The name of the group, which is the identifier of the group in other 61 * operations. You can't change the name of a resource group after you create it. A 62 * resource group name can consist of letters, numbers, hyphens, periods, and 63 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 64 * these are reserved. A resource group name must be unique within each AWS Region 65 * in your AWS account.</p> 66 */ SetName(const Aws::String & value)67 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } 68 69 /** 70 * <p>The name of the group, which is the identifier of the group in other 71 * operations. You can't change the name of a resource group after you create it. A 72 * resource group name can consist of letters, numbers, hyphens, periods, and 73 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 74 * these are reserved. A resource group name must be unique within each AWS Region 75 * in your AWS account.</p> 76 */ SetName(Aws::String && value)77 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } 78 79 /** 80 * <p>The name of the group, which is the identifier of the group in other 81 * operations. You can't change the name of a resource group after you create it. A 82 * resource group name can consist of letters, numbers, hyphens, periods, and 83 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 84 * these are reserved. A resource group name must be unique within each AWS Region 85 * in your AWS account.</p> 86 */ SetName(const char * value)87 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } 88 89 /** 90 * <p>The name of the group, which is the identifier of the group in other 91 * operations. You can't change the name of a resource group after you create it. A 92 * resource group name can consist of letters, numbers, hyphens, periods, and 93 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 94 * these are reserved. A resource group name must be unique within each AWS Region 95 * in your AWS account.</p> 96 */ WithName(const Aws::String & value)97 inline CreateGroupRequest& WithName(const Aws::String& value) { SetName(value); return *this;} 98 99 /** 100 * <p>The name of the group, which is the identifier of the group in other 101 * operations. You can't change the name of a resource group after you create it. A 102 * resource group name can consist of letters, numbers, hyphens, periods, and 103 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 104 * these are reserved. A resource group name must be unique within each AWS Region 105 * in your AWS account.</p> 106 */ WithName(Aws::String && value)107 inline CreateGroupRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} 108 109 /** 110 * <p>The name of the group, which is the identifier of the group in other 111 * operations. You can't change the name of a resource group after you create it. A 112 * resource group name can consist of letters, numbers, hyphens, periods, and 113 * underscores. The name cannot start with <code>AWS</code> or <code>aws</code>; 114 * these are reserved. A resource group name must be unique within each AWS Region 115 * in your AWS account.</p> 116 */ WithName(const char * value)117 inline CreateGroupRequest& WithName(const char* value) { SetName(value); return *this;} 118 119 120 /** 121 * <p>The description of the resource group. Descriptions can consist of letters, 122 * numbers, hyphens, underscores, periods, and spaces.</p> 123 */ GetDescription()124 inline const Aws::String& GetDescription() const{ return m_description; } 125 126 /** 127 * <p>The description of the resource group. Descriptions can consist of letters, 128 * numbers, hyphens, underscores, periods, and spaces.</p> 129 */ DescriptionHasBeenSet()130 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } 131 132 /** 133 * <p>The description of the resource group. Descriptions can consist of letters, 134 * numbers, hyphens, underscores, periods, and spaces.</p> 135 */ SetDescription(const Aws::String & value)136 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } 137 138 /** 139 * <p>The description of the resource group. Descriptions can consist of letters, 140 * numbers, hyphens, underscores, periods, and spaces.</p> 141 */ SetDescription(Aws::String && value)142 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } 143 144 /** 145 * <p>The description of the resource group. Descriptions can consist of letters, 146 * numbers, hyphens, underscores, periods, and spaces.</p> 147 */ SetDescription(const char * value)148 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } 149 150 /** 151 * <p>The description of the resource group. Descriptions can consist of letters, 152 * numbers, hyphens, underscores, periods, and spaces.</p> 153 */ WithDescription(const Aws::String & value)154 inline CreateGroupRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} 155 156 /** 157 * <p>The description of the resource group. Descriptions can consist of letters, 158 * numbers, hyphens, underscores, periods, and spaces.</p> 159 */ WithDescription(Aws::String && value)160 inline CreateGroupRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} 161 162 /** 163 * <p>The description of the resource group. Descriptions can consist of letters, 164 * numbers, hyphens, underscores, periods, and spaces.</p> 165 */ WithDescription(const char * value)166 inline CreateGroupRequest& WithDescription(const char* value) { SetDescription(value); return *this;} 167 168 169 /** 170 * <p>The resource query that determines which AWS resources are members of this 171 * group. For more information about resource queries, see <a 172 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 173 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 174 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 175 * not both.</p> 176 */ GetResourceQuery()177 inline const ResourceQuery& GetResourceQuery() const{ return m_resourceQuery; } 178 179 /** 180 * <p>The resource query that determines which AWS resources are members of this 181 * group. For more information about resource queries, see <a 182 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 183 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 184 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 185 * not both.</p> 186 */ ResourceQueryHasBeenSet()187 inline bool ResourceQueryHasBeenSet() const { return m_resourceQueryHasBeenSet; } 188 189 /** 190 * <p>The resource query that determines which AWS resources are members of this 191 * group. For more information about resource queries, see <a 192 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 193 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 194 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 195 * not both.</p> 196 */ SetResourceQuery(const ResourceQuery & value)197 inline void SetResourceQuery(const ResourceQuery& value) { m_resourceQueryHasBeenSet = true; m_resourceQuery = value; } 198 199 /** 200 * <p>The resource query that determines which AWS resources are members of this 201 * group. For more information about resource queries, see <a 202 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 203 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 204 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 205 * not both.</p> 206 */ SetResourceQuery(ResourceQuery && value)207 inline void SetResourceQuery(ResourceQuery&& value) { m_resourceQueryHasBeenSet = true; m_resourceQuery = std::move(value); } 208 209 /** 210 * <p>The resource query that determines which AWS resources are members of this 211 * group. For more information about resource queries, see <a 212 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 213 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 214 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 215 * not both.</p> 216 */ WithResourceQuery(const ResourceQuery & value)217 inline CreateGroupRequest& WithResourceQuery(const ResourceQuery& value) { SetResourceQuery(value); return *this;} 218 219 /** 220 * <p>The resource query that determines which AWS resources are members of this 221 * group. For more information about resource queries, see <a 222 * href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create 223 * a tag-based group in Resource Groups</a>. </p> <p>A resource group can 224 * contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but 225 * not both.</p> 226 */ WithResourceQuery(ResourceQuery && value)227 inline CreateGroupRequest& WithResourceQuery(ResourceQuery&& value) { SetResourceQuery(std::move(value)); return *this;} 228 229 230 /** 231 * <p>The tags to add to the group. A tag is key-value pair string.</p> 232 */ GetTags()233 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 234 235 /** 236 * <p>The tags to add to the group. A tag is key-value pair string.</p> 237 */ TagsHasBeenSet()238 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 239 240 /** 241 * <p>The tags to add to the group. A tag is key-value pair string.</p> 242 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)243 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 244 245 /** 246 * <p>The tags to add to the group. A tag is key-value pair string.</p> 247 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)248 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 249 250 /** 251 * <p>The tags to add to the group. A tag is key-value pair string.</p> 252 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)253 inline CreateGroupRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 254 255 /** 256 * <p>The tags to add to the group. A tag is key-value pair string.</p> 257 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)258 inline CreateGroupRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 259 260 /** 261 * <p>The tags to add to the group. A tag is key-value pair string.</p> 262 */ AddTags(const Aws::String & key,const Aws::String & value)263 inline CreateGroupRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 264 265 /** 266 * <p>The tags to add to the group. A tag is key-value pair string.</p> 267 */ AddTags(Aws::String && key,const Aws::String & value)268 inline CreateGroupRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 269 270 /** 271 * <p>The tags to add to the group. A tag is key-value pair string.</p> 272 */ AddTags(const Aws::String & key,Aws::String && value)273 inline CreateGroupRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 274 275 /** 276 * <p>The tags to add to the group. A tag is key-value pair string.</p> 277 */ AddTags(Aws::String && key,Aws::String && value)278 inline CreateGroupRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 279 280 /** 281 * <p>The tags to add to the group. A tag is key-value pair string.</p> 282 */ AddTags(const char * key,Aws::String && value)283 inline CreateGroupRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 284 285 /** 286 * <p>The tags to add to the group. A tag is key-value pair string.</p> 287 */ AddTags(Aws::String && key,const char * value)288 inline CreateGroupRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 289 290 /** 291 * <p>The tags to add to the group. A tag is key-value pair string.</p> 292 */ AddTags(const char * key,const char * value)293 inline CreateGroupRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 294 295 296 /** 297 * <p>A configuration associates the resource group with an AWS service and 298 * specifies how the service can interact with the resources in the group. A 299 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 300 * about the syntax of service configurations, see <a 301 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 302 * configurations for resource groups</a>.</p> <p>A resource group can 303 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 304 * not both.</p> 305 */ GetConfiguration()306 inline const Aws::Vector<GroupConfigurationItem>& GetConfiguration() const{ return m_configuration; } 307 308 /** 309 * <p>A configuration associates the resource group with an AWS service and 310 * specifies how the service can interact with the resources in the group. A 311 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 312 * about the syntax of service configurations, see <a 313 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 314 * configurations for resource groups</a>.</p> <p>A resource group can 315 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 316 * not both.</p> 317 */ ConfigurationHasBeenSet()318 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; } 319 320 /** 321 * <p>A configuration associates the resource group with an AWS service and 322 * specifies how the service can interact with the resources in the group. A 323 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 324 * about the syntax of service configurations, see <a 325 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 326 * configurations for resource groups</a>.</p> <p>A resource group can 327 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 328 * not both.</p> 329 */ SetConfiguration(const Aws::Vector<GroupConfigurationItem> & value)330 inline void SetConfiguration(const Aws::Vector<GroupConfigurationItem>& value) { m_configurationHasBeenSet = true; m_configuration = value; } 331 332 /** 333 * <p>A configuration associates the resource group with an AWS service and 334 * specifies how the service can interact with the resources in the group. A 335 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 336 * about the syntax of service configurations, see <a 337 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 338 * configurations for resource groups</a>.</p> <p>A resource group can 339 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 340 * not both.</p> 341 */ SetConfiguration(Aws::Vector<GroupConfigurationItem> && value)342 inline void SetConfiguration(Aws::Vector<GroupConfigurationItem>&& value) { m_configurationHasBeenSet = true; m_configuration = std::move(value); } 343 344 /** 345 * <p>A configuration associates the resource group with an AWS service and 346 * specifies how the service can interact with the resources in the group. A 347 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 348 * about the syntax of service configurations, see <a 349 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 350 * configurations for resource groups</a>.</p> <p>A resource group can 351 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 352 * not both.</p> 353 */ WithConfiguration(const Aws::Vector<GroupConfigurationItem> & value)354 inline CreateGroupRequest& WithConfiguration(const Aws::Vector<GroupConfigurationItem>& value) { SetConfiguration(value); return *this;} 355 356 /** 357 * <p>A configuration associates the resource group with an AWS service and 358 * specifies how the service can interact with the resources in the group. A 359 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 360 * about the syntax of service configurations, see <a 361 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 362 * configurations for resource groups</a>.</p> <p>A resource group can 363 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 364 * not both.</p> 365 */ WithConfiguration(Aws::Vector<GroupConfigurationItem> && value)366 inline CreateGroupRequest& WithConfiguration(Aws::Vector<GroupConfigurationItem>&& value) { SetConfiguration(std::move(value)); return *this;} 367 368 /** 369 * <p>A configuration associates the resource group with an AWS service and 370 * specifies how the service can interact with the resources in the group. A 371 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 372 * about the syntax of service configurations, see <a 373 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 374 * configurations for resource groups</a>.</p> <p>A resource group can 375 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 376 * not both.</p> 377 */ AddConfiguration(const GroupConfigurationItem & value)378 inline CreateGroupRequest& AddConfiguration(const GroupConfigurationItem& value) { m_configurationHasBeenSet = true; m_configuration.push_back(value); return *this; } 379 380 /** 381 * <p>A configuration associates the resource group with an AWS service and 382 * specifies how the service can interact with the resources in the group. A 383 * configuration is an array of <a>GroupConfigurationItem</a> elements. For details 384 * about the syntax of service configurations, see <a 385 * href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service 386 * configurations for resource groups</a>.</p> <p>A resource group can 387 * contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but 388 * not both.</p> 389 */ AddConfiguration(GroupConfigurationItem && value)390 inline CreateGroupRequest& AddConfiguration(GroupConfigurationItem&& value) { m_configurationHasBeenSet = true; m_configuration.push_back(std::move(value)); return *this; } 391 392 private: 393 394 Aws::String m_name; 395 bool m_nameHasBeenSet; 396 397 Aws::String m_description; 398 bool m_descriptionHasBeenSet; 399 400 ResourceQuery m_resourceQuery; 401 bool m_resourceQueryHasBeenSet; 402 403 Aws::Map<Aws::String, Aws::String> m_tags; 404 bool m_tagsHasBeenSet; 405 406 Aws::Vector<GroupConfigurationItem> m_configuration; 407 bool m_configurationHasBeenSet; 408 }; 409 410 } // namespace Model 411 } // namespace ResourceGroups 412 } // namespace Aws 413