Skip to content

update_related_items

update_related_items(
    incident_record_arn: Arn,
    related_items_update: RelatedItemsUpdate,
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateRelatedItemsOutput

Add or remove related items from the related items tab of an incident record.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    A token that ensures that a client calls the operation only once with the specified details.

  • incident_record_arn (Arn) –

    The Amazon Resource Name (ARN) of the incident record that contains the related items that you update.

  • related_items_update (RelatedItemsUpdate) –

    Details about the item that you are add to, or delete from, an incident.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/ssm_incidents.py
def update_related_items(
    self,
    incident_record_arn: "capo_ssm_incidents.types.arn.Arn",
    related_items_update: "capo_ssm_incidents.types.related_items_update.RelatedItemsUpdate",
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    client_token: Optional[
        "capo_ssm_incidents.types.client_token.ClientToken"
    ] = None,
) -> (
    "capo_ssm_incidents.types.update_related_items_output.UpdateRelatedItemsOutput"
):
    """<p>Add or remove related items from the related items tab of an incident record.</p>

    Args:
        client_token: <p>A token that ensures that a client calls the operation only once with the specified details.</p>
        incident_record_arn: <p>The Amazon Resource Name (ARN) of the incident record that contains the related items that you update.</p>
        related_items_update: <p>Details about the item that you are add to, or delete from, an incident.</p>

    Raises:
        capo_ssm_incidents.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_incidents.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource causes an inconsistent state.</p>
        capo_ssm_incidents.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_ssm_incidents.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which doesn't exist. </p>
        capo_ssm_incidents.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_incidents.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_incidents.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_incidents.types.update_related_items_input.UpdateRelatedItemsInput]",
    ) -> OperationResponse[
        "capo_ssm_incidents.types.update_related_items_output.UpdateRelatedItemsOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.update_related_items

        output, http_response = (
            capo_ssm_incidents._operations.ssm_incidents.update_related_items.update_related_items(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRelatedItems")
    )
    input_: capo_ssm_incidents.types.update_related_items_input.UpdateRelatedItemsInput = {
        "incident_record_arn": incident_record_arn,
        "related_items_update": related_items_update,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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