create_group
¶
create_group(
name: CreateGroupName,
*,
config_overrides: Optional[ResourceGroupsClientConfig] = None,
description: Optional[Description] = None,
resource_query: Optional[ResourceQuery] = None,
tags: Optional[Tags] = None,
configuration: Optional[GroupConfigurationList] = None,
criticality: Optional[Criticality] = None,
owner: Optional[Owner] = None,
display_name: Optional[DisplayName] = None,
) -> CreateGroupOutput
Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide. For more information about service-linked groups and service configurations, see Service configurations for Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:CreateGroup
Parameters:
-
name(CreateGroupName) –The name of the group, which is the identifier of the group in other operations. You can't change the name of a resource group after you create it. A resource group name can consist of letters, numbers, hyphens, periods, and underscores. The name cannot start with
AWS,aws, or any other possible capitalization; these are reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services account. -
description(Optional[Description], default:None) –The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.
-
resource_query(Optional[ResourceQuery], default:None) –The resource query that determines which Amazon Web Services resources are members of this group. For more information about resource queries, see Create a tag-based group in Resource Groups.
A resource group can contain either a
ResourceQueryor aConfiguration, but not both. -
tags(Optional[Tags], default:None) –The tags to add to the group. A tag is key-value pair string.
-
configuration(Optional[GroupConfigurationList], default:None) –A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements. For details about the syntax of service configurations, see Service configurations for Resource Groups.
A resource group can contain either a
Configurationor aResourceQuery, but not both. -
criticality(Optional[Criticality], default:None) –The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.
-
owner(Optional[Owner], default:None) –A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.
-
display_name(Optional[DisplayName], default:None) –The name of the application group, which you can change at any time.
Raises:
-
BadRequestException–The request includes one or more parameters that violate validation rules.
-
ForbiddenException–The caller isn't authorized to make the request. Check permissions.
-
InternalServerErrorException–An internal error occurred while processing the request. Try again later.
-
MethodNotAllowedException–The request uses an HTTP method that isn't allowed for the specified resource.
-
TooManyRequestsException–You've exceeded throttling limits by making too many requests in a period of time.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_resource_groups/_services/resource_groups.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |