Skip to content

delete_group

delete_group(
    group_identifier: GroupIdentifier,
    *,
    config_overrides: Optional[syntheticsClientConfig] = None,
) -> DeleteGroupResponse

Deletes a group. The group doesn't need to be empty to be deleted. If there are canaries in the group, they are not deleted when you delete the group.

Groups are a global resource that appear in all Regions, but the request to delete a group must be made from its home Region. You can find the home Region of a group within its ARN.

Parameters:

  • group_identifier (GroupIdentifier) –

    Specifies which group to delete. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

Raises:

Source code in docs_src/capo_synthetics/_services/synthetics.py
def delete_group(
    self,
    group_identifier: "capo_synthetics.types.group_identifier.GroupIdentifier",
    *,
    config_overrides: Optional[syntheticsClientConfig] = None,
) -> "capo_synthetics.types.delete_group_response.DeleteGroupResponse":
    """<p>Deletes a group. The group doesn't need to be empty to be deleted. If there are canaries in the group, they are not deleted when you delete the group. </p> <p>Groups are a global resource that appear in all Regions, but the request to delete a group must be made from its home Region. You can find the home Region of a group within its ARN.</p>

    Args:
        group_identifier: <p>Specifies which group to delete. You can specify the group name, the ARN, or the group ID as the <code>GroupIdentifier</code>.</p>

    Raises:
        capo_synthetics.errors.conflict_exception.ConflictException: <p>A conflicting operation is already in progress.</p>
        capo_synthetics.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred.</p>
        capo_synthetics.errors.resource_not_found_exception.ResourceNotFoundException: <p>One of the specified resources was not found.</p>
        capo_synthetics.errors.validation_exception.ValidationException: <p>A parameter could not be validated.</p>
        capo_synthetics.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_synthetics.types.delete_group_request.DeleteGroupRequest]",
    ) -> OperationResponse[
        "capo_synthetics.types.delete_group_response.DeleteGroupResponse"
    ]:
        import capo_synthetics._operations.synthetics.delete_group

        output, http_response = (
            capo_synthetics._operations.synthetics.delete_group.delete_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteGroup")
    )
    input_: capo_synthetics.types.delete_group_request.DeleteGroupRequest = {
        "group_identifier": group_identifier
    }

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