Skip to content

batch_disassociate_resource

batch_disassociate_resource(
    resource_set_identifier: Identifier,
    items: IdentifierList,
    *,
    config_overrides: Optional[FMSClientConfig] = None,
) -> BatchDisassociateResourceResponse

Disassociates resources from a Firewall Manager resource set.

Parameters:

  • resource_set_identifier (Identifier) –

    A unique identifier for the resource set, used in a request to refer to the resource set.

  • items (IdentifierList) –

    The uniform resource identifiers (URI) of resources that should be disassociated from the resource set. The URIs must be Amazon Resource Names (ARNs).

Raises:

  • InternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • InvalidInputException –

    The parameters of the request were invalid.

  • InvalidOperationException –

    The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fms/_services/fms.py
def batch_disassociate_resource(
    self,
    resource_set_identifier: "capo_fms.types.identifier.Identifier",
    items: "capo_fms.types.identifier_list.IdentifierList",
    *,
    config_overrides: Optional[FMSClientConfig] = None,
) -> "capo_fms.types.batch_disassociate_resource_response.BatchDisassociateResourceResponse":
    """<p>Disassociates resources from a Firewall Manager resource set.</p>

    Args:
        resource_set_identifier: <p>A unique identifier for the resource set, used in a request to refer to the resource set.</p>
        items: <p>The uniform resource identifiers (URI) of resources that should be disassociated from the resource set. The URIs must be Amazon Resource Names (ARNs).</p>

    Raises:
        capo_fms.errors.internal_error_exception.InternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_fms.errors.invalid_input_exception.InvalidInputException: <p>The parameters of the request were invalid.</p>
        capo_fms.errors.invalid_operation_exception.InvalidOperationException: <p>The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an <code>AssociateAdminAccount</code> request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.</p>
        capo_fms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_fms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fms.types.batch_disassociate_resource_request.BatchDisassociateResourceRequest]",
    ) -> OperationResponse[
        "capo_fms.types.batch_disassociate_resource_response.BatchDisassociateResourceResponse"
    ]:
        import capo_fms._operations.awsfms_20180101.batch_disassociate_resource

        output, http_response = (
            capo_fms._operations.awsfms_20180101.batch_disassociate_resource.batch_disassociate_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDisassociateResource")
    )
    input_: capo_fms.types.batch_disassociate_resource_request.BatchDisassociateResourceRequest = {
        "resource_set_identifier": resource_set_identifier,
        "items": items,
    }

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