aws_sdk_resourcegroups/client/
create_group.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateGroup`](crate::operation::create_group::builders::CreateGroupFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_name):<br>required: **true**<br><p>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 <code>AWS</code>, <code>aws</code>, 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.</p><br>
7    ///   - [`description(impl Into<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_description):<br>required: **false**<br><p>The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.</p><br>
8    ///   - [`resource_query(ResourceQuery)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::resource_query) / [`set_resource_query(Option<ResourceQuery>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_resource_query):<br>required: **false**<br><p>The resource query that determines which Amazon Web Services resources are members of this group. For more information about resource queries, see <a href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create a tag-based group in Resource Groups</a>.</p><note>  <p>A resource group can contain either a <code>ResourceQuery</code> or a <code>Configuration</code>, but not both.</p> </note><br>
9    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_tags):<br>required: **false**<br><p>The tags to add to the group. A tag is key-value pair string.</p><br>
10    ///   - [`configuration(GroupConfigurationItem)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::configuration) / [`set_configuration(Option<Vec::<GroupConfigurationItem>>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_configuration):<br>required: **false**<br><p>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 <code>GroupConfigurationItem</code> elements. For details about the syntax of service configurations, see <a href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service configurations for Resource Groups</a>.</p><note>  <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p> </note><br>
11    ///   - [`criticality(i32)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::criticality) / [`set_criticality(Option<i32>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_criticality):<br>required: **false**<br><p>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.</p><br>
12    ///   - [`owner(impl Into<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::owner) / [`set_owner(Option<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_owner):<br>required: **false**<br><p>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.</p><br>
13    ///   - [`display_name(impl Into<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::display_name) / [`set_display_name(Option<String>)`](crate::operation::create_group::builders::CreateGroupFluentBuilder::set_display_name):<br>required: **false**<br><p>The name of the application group, which you can change at any time.</p><br>
14    /// - On success, responds with [`CreateGroupOutput`](crate::operation::create_group::CreateGroupOutput) with field(s):
15    ///   - [`group(Option<Group>)`](crate::operation::create_group::CreateGroupOutput::group): <p>The description of the resource group.</p>
16    ///   - [`resource_query(Option<ResourceQuery>)`](crate::operation::create_group::CreateGroupOutput::resource_query): <p>The resource query associated with the group. For more information about resource queries, see <a href="https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag">Create a tag-based group in Resource Groups</a>.</p>
17    ///   - [`tags(Option<HashMap::<String, String>>)`](crate::operation::create_group::CreateGroupOutput::tags): <p>The tags associated with the group.</p>
18    ///   - [`group_configuration(Option<GroupConfiguration>)`](crate::operation::create_group::CreateGroupOutput::group_configuration): <p>The service configuration associated with the resource group. For details about the syntax of a service configuration, see <a href="https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html">Service configurations for Resource Groups</a>.</p>
19    /// - On failure, responds with [`SdkError<CreateGroupError>`](crate::operation::create_group::CreateGroupError)
20    pub fn create_group(&self) -> crate::operation::create_group::builders::CreateGroupFluentBuilder {
21        crate::operation::create_group::builders::CreateGroupFluentBuilder::new(self.handle.clone())
22    }
23}