Skip to content

update_group

update_group(
    *,
    config_overrides: Optional[ResourceGroupsClientConfig] = None,
    group_name: Optional[GroupName] = None,
    group: Optional[GroupStringV2] = None,
    description: Optional[Description] = None,
    criticality: Optional[Criticality] = None,
    owner: Optional[Owner] = None,
    display_name: Optional[DisplayName] = None,
) -> UpdateGroupOutput

Updates the description for an existing group. You cannot update the name of a resource group.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:UpdateGroup

Parameters:

  • group_name (Optional[GroupName], default: None ) –

    Don't use this parameter. Use Group instead.

  • group (Optional[GroupStringV2], default: None ) –

    The name or the ARN of the resource group to update.

  • description (Optional[Description], default: None ) –

    The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.

  • 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:

Source code in docs_src/capo_resource_groups/_services/resource_groups.py
def update_group(
    self,
    *,
    config_overrides: Optional[ResourceGroupsClientConfig] = None,
    group_name: Optional["capo_resource_groups.types.group_name.GroupName"] = None,
    group: Optional[
        "capo_resource_groups.types.group_string_v2.GroupStringV2"
    ] = None,
    description: Optional[
        "capo_resource_groups.types.description.Description"
    ] = None,
    criticality: Optional[
        "capo_resource_groups.types.criticality.Criticality"
    ] = None,
    owner: Optional["capo_resource_groups.types.owner.Owner"] = None,
    display_name: Optional[
        "capo_resource_groups.types.display_name.DisplayName"
    ] = None,
) -> "capo_resource_groups.types.update_group_output.UpdateGroupOutput":
    """<p>Updates the description for an existing group. You cannot update the name of a resource group.</p> <p> <b>Minimum permissions</b> </p> <p>To run this command, you must have the following permissions:</p> <ul> <li> <p> <code>resource-groups:UpdateGroup</code> </p> </li> </ul>

    Args:
        group_name: <p>Don't use this parameter. Use <code>Group</code> instead.</p>
        group: <p>The name or the ARN of the resource group to update.</p>
        description: <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
        criticality: <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>
        owner: <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>
        display_name: <p>The name of the application group, which you can change at any time. </p>

    Raises:
        capo_resource_groups.errors.bad_request_exception.BadRequestException: <p>The request includes one or more parameters that violate validation rules.</p>
        capo_resource_groups.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request. Check permissions.</p>
        capo_resource_groups.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal error occurred while processing the request. Try again later.</p>
        capo_resource_groups.errors.method_not_allowed_exception.MethodNotAllowedException: <p>The request uses an HTTP method that isn't allowed for the specified resource.</p>
        capo_resource_groups.errors.not_found_exception.NotFoundException: <p>One or more of the specified resources don't exist.</p>
        capo_resource_groups.errors.too_many_requests_exception.TooManyRequestsException: <p>You've exceeded throttling limits by making too many requests in a period of time.</p>
        capo_resource_groups.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_resource_groups.types.update_group_input.UpdateGroupInput]",
    ) -> OperationResponse[
        "capo_resource_groups.types.update_group_output.UpdateGroupOutput"
    ]:
        import capo_resource_groups._operations.ardi.update_group

        output, http_response = (
            capo_resource_groups._operations.ardi.update_group.update_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateGroup")
    )
    input_: capo_resource_groups.types.update_group_input.UpdateGroupInput = {}
    if group_name is not None:
        input_["group_name"] = group_name
    if group is not None:
        input_["group"] = group
    if description is not None:
        input_["description"] = description
    if criticality is not None:
        input_["criticality"] = criticality
    if owner is not None:
        input_["owner"] = owner
    if display_name is not None:
        input_["display_name"] = display_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output