Skip to content

incident_io_client.api.incident_statuses_v1.incident_statuses_v1_update

asyncio async

asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody
) -> Optional[IncidentStatusesV1UpdateResponseBody]

Update Incident Statuses V1

Update an existing incident status

Parameters:

Name Type Description Default
id str
required
body IncidentStatusesV1UpdateRequestBody

Example: {'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[IncidentStatusesV1UpdateResponseBody]

IncidentStatusesV1UpdateResponseBody

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_update.py
async def asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody,
) -> Optional[IncidentStatusesV1UpdateResponseBody]:
    """Update Incident Statuses V1

     Update an existing incident status

    Args:
        id (str):
        body (IncidentStatusesV1UpdateRequestBody):  Example: {'description': "Impact has been
            **fully mitigated**, and we're ready to learn from this incident.", 'name': 'Closed'}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        IncidentStatusesV1UpdateResponseBody
    """

    return (
        await asyncio_detailed(
            id=id,
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody
) -> Response[IncidentStatusesV1UpdateResponseBody]

Update Incident Statuses V1

Update an existing incident status

Parameters:

Name Type Description Default
id str
required
body IncidentStatusesV1UpdateRequestBody

Example: {'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[IncidentStatusesV1UpdateResponseBody]

Response[IncidentStatusesV1UpdateResponseBody]

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_update.py
async def asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody,
) -> Response[IncidentStatusesV1UpdateResponseBody]:
    """Update Incident Statuses V1

     Update an existing incident status

    Args:
        id (str):
        body (IncidentStatusesV1UpdateRequestBody):  Example: {'description': "Impact has been
            **fully mitigated**, and we're ready to learn from this incident.", 'name': 'Closed'}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[IncidentStatusesV1UpdateResponseBody]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

sync

sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody
) -> Optional[IncidentStatusesV1UpdateResponseBody]

Update Incident Statuses V1

Update an existing incident status

Parameters:

Name Type Description Default
id str
required
body IncidentStatusesV1UpdateRequestBody

Example: {'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[IncidentStatusesV1UpdateResponseBody]

IncidentStatusesV1UpdateResponseBody

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_update.py
def sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody,
) -> Optional[IncidentStatusesV1UpdateResponseBody]:
    """Update Incident Statuses V1

     Update an existing incident status

    Args:
        id (str):
        body (IncidentStatusesV1UpdateRequestBody):  Example: {'description': "Impact has been
            **fully mitigated**, and we're ready to learn from this incident.", 'name': 'Closed'}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        IncidentStatusesV1UpdateResponseBody
    """

    return sync_detailed(
        id=id,
        client=client,
        body=body,
    ).parsed

sync_detailed

sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody
) -> Response[IncidentStatusesV1UpdateResponseBody]

Update Incident Statuses V1

Update an existing incident status

Parameters:

Name Type Description Default
id str
required
body IncidentStatusesV1UpdateRequestBody

Example: {'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[IncidentStatusesV1UpdateResponseBody]

Response[IncidentStatusesV1UpdateResponseBody]

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_update.py
def sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1UpdateRequestBody,
) -> Response[IncidentStatusesV1UpdateResponseBody]:
    """Update Incident Statuses V1

     Update an existing incident status

    Args:
        id (str):
        body (IncidentStatusesV1UpdateRequestBody):  Example: {'description': "Impact has been
            **fully mitigated**, and we're ready to learn from this incident.", 'name': 'Closed'}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[IncidentStatusesV1UpdateResponseBody]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)