Skip to content

incident_io_client.api.incident_roles_v2.incident_roles_v2_update

asyncio async

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

Update Incident Roles V2

Update an existing incident role

Parameters:

Name Type Description Default
id str
required
body IncidentRolesV2UpdateRequestBody

Example: {'description': 'The person currently coordinating the incident', 'instructions': 'Take point on the incident; Make sure people are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

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[IncidentRolesV2UpdateResponseBody]

IncidentRolesV2UpdateResponseBody

Source code in incident_io_client/api/incident_roles_v2/incident_roles_v2_update.py
async def asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentRolesV2UpdateRequestBody,
) -> Optional[IncidentRolesV2UpdateResponseBody]:
    """Update Incident Roles V2

     Update an existing incident role

    Args:
        id (str):
        body (IncidentRolesV2UpdateRequestBody):  Example: {'description': 'The person currently
            coordinating the incident', 'instructions': 'Take point on the incident; Make sure people
            are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

    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:
        IncidentRolesV2UpdateResponseBody
    """

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

asyncio_detailed async

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

Update Incident Roles V2

Update an existing incident role

Parameters:

Name Type Description Default
id str
required
body IncidentRolesV2UpdateRequestBody

Example: {'description': 'The person currently coordinating the incident', 'instructions': 'Take point on the incident; Make sure people are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

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[IncidentRolesV2UpdateResponseBody]

Response[IncidentRolesV2UpdateResponseBody]

Source code in incident_io_client/api/incident_roles_v2/incident_roles_v2_update.py
async def asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentRolesV2UpdateRequestBody,
) -> Response[IncidentRolesV2UpdateResponseBody]:
    """Update Incident Roles V2

     Update an existing incident role

    Args:
        id (str):
        body (IncidentRolesV2UpdateRequestBody):  Example: {'description': 'The person currently
            coordinating the incident', 'instructions': 'Take point on the incident; Make sure people
            are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

    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[IncidentRolesV2UpdateResponseBody]
    """

    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: IncidentRolesV2UpdateRequestBody
) -> Optional[IncidentRolesV2UpdateResponseBody]

Update Incident Roles V2

Update an existing incident role

Parameters:

Name Type Description Default
id str
required
body IncidentRolesV2UpdateRequestBody

Example: {'description': 'The person currently coordinating the incident', 'instructions': 'Take point on the incident; Make sure people are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

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[IncidentRolesV2UpdateResponseBody]

IncidentRolesV2UpdateResponseBody

Source code in incident_io_client/api/incident_roles_v2/incident_roles_v2_update.py
def sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentRolesV2UpdateRequestBody,
) -> Optional[IncidentRolesV2UpdateResponseBody]:
    """Update Incident Roles V2

     Update an existing incident role

    Args:
        id (str):
        body (IncidentRolesV2UpdateRequestBody):  Example: {'description': 'The person currently
            coordinating the incident', 'instructions': 'Take point on the incident; Make sure people
            are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

    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:
        IncidentRolesV2UpdateResponseBody
    """

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

sync_detailed

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

Update Incident Roles V2

Update an existing incident role

Parameters:

Name Type Description Default
id str
required
body IncidentRolesV2UpdateRequestBody

Example: {'description': 'The person currently coordinating the incident', 'instructions': 'Take point on the incident; Make sure people are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

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[IncidentRolesV2UpdateResponseBody]

Response[IncidentRolesV2UpdateResponseBody]

Source code in incident_io_client/api/incident_roles_v2/incident_roles_v2_update.py
def sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentRolesV2UpdateRequestBody,
) -> Response[IncidentRolesV2UpdateResponseBody]:
    """Update Incident Roles V2

     Update an existing incident role

    Args:
        id (str):
        body (IncidentRolesV2UpdateRequestBody):  Example: {'description': 'The person currently
            coordinating the incident', 'instructions': 'Take point on the incident; Make sure people
            are clear on responsibilities', 'name': 'Incident Lead', 'shortform': 'lead'}.

    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[IncidentRolesV2UpdateResponseBody]
    """

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

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

    return _build_response(client=client, response=response)