Skip to content

disassociate_ops_item_related_item

disassociate_ops_item_related_item(
    ops_item_id: OpsItemId,
    association_id: OpsItemRelatedItemAssociationId,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> DisassociateOpsItemRelatedItemResponse

Deletes the association between an OpsItem and a related item. For example, this API operation can delete an Incident Manager incident from an OpsItem. Incident Manager is a tool in Amazon Web Services Systems Manager.

Parameters:

  • ops_item_id (OpsItemId) –

    The ID of the OpsItem for which you want to delete an association between the OpsItem and a related item.

  • association_id (OpsItemRelatedItemAssociationId) –

    The ID of the association for which you want to delete an association between the OpsItem and a related item.

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def disassociate_ops_item_related_item(
    self,
    ops_item_id: "capo_ssm.types.ops_item_id.OpsItemId",
    association_id: "capo_ssm.types.ops_item_related_item_association_id.OpsItemRelatedItemAssociationId",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.disassociate_ops_item_related_item_response.DisassociateOpsItemRelatedItemResponse":
    """<p>Deletes the association between an OpsItem and a related item. For example, this API operation can delete an Incident Manager incident from an OpsItem. Incident Manager is a tool in Amazon Web Services Systems Manager.</p>

    Args:
        ops_item_id: <p>The ID of the OpsItem for which you want to delete an association between the OpsItem and a related item.</p>
        association_id: <p>The ID of the association for which you want to delete an association between the OpsItem and a related item.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.ops_item_conflict_exception.OpsItemConflictException: <p>The specified OpsItem is in the process of being deleted.</p>
        capo_ssm.errors.ops_item_invalid_parameter_exception.OpsItemInvalidParameterException: <p>A specified parameter argument isn't valid. Verify the available arguments and try again.</p>
        capo_ssm.errors.ops_item_not_found_exception.OpsItemNotFoundException: <p>The specified OpsItem ID doesn't exist. Verify the ID and try again.</p>
        capo_ssm.errors.ops_item_related_item_association_not_found_exception.OpsItemRelatedItemAssociationNotFoundException: <p>The association wasn't found using the parameters you specified in the call. Verify the information and try again.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.disassociate_ops_item_related_item_request.DisassociateOpsItemRelatedItemRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.disassociate_ops_item_related_item_response.DisassociateOpsItemRelatedItemResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.disassociate_ops_item_related_item

        output, http_response = (
            capo_ssm._operations.amazon_ssm.disassociate_ops_item_related_item.disassociate_ops_item_related_item(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateOpsItemRelatedItem")
    )
    input_: capo_ssm.types.disassociate_ops_item_related_item_request.DisassociateOpsItemRelatedItemRequest = {
        "ops_item_id": ops_item_id,
        "association_id": association_id,
    }

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