Skip to content

incident_io_client.api.catalog_v2.catalog_v2_update_type

asyncio async

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

UpdateType Catalog V2

Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeRequestBody

Example: {'annotations': {'incident.io/catalog- importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster', 'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

CatalogV2UpdateTypeResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type.py
async def asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeRequestBody,
) -> Optional[CatalogV2UpdateTypeResponseBody]:
    """UpdateType Catalog V2

     Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        id (str):
        body (CatalogV2UpdateTypeRequestBody):  Example: {'annotations': {'incident.io/catalog-
            importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes
            clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster',
            'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

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

asyncio_detailed async

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

UpdateType Catalog V2

Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeRequestBody

Example: {'annotations': {'incident.io/catalog- importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster', 'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

Response[CatalogV2UpdateTypeResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type.py
async def asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeRequestBody,
) -> Response[CatalogV2UpdateTypeResponseBody]:
    """UpdateType Catalog V2

     Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        id (str):
        body (CatalogV2UpdateTypeRequestBody):  Example: {'annotations': {'incident.io/catalog-
            importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes
            clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster',
            'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

    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: CatalogV2UpdateTypeRequestBody
) -> Optional[CatalogV2UpdateTypeResponseBody]

UpdateType Catalog V2

Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeRequestBody

Example: {'annotations': {'incident.io/catalog- importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster', 'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

CatalogV2UpdateTypeResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type.py
def sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeRequestBody,
) -> Optional[CatalogV2UpdateTypeResponseBody]:
    """UpdateType Catalog V2

     Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        id (str):
        body (CatalogV2UpdateTypeRequestBody):  Example: {'annotations': {'incident.io/catalog-
            importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes
            clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster',
            'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

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

sync_detailed

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

UpdateType Catalog V2

Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeRequestBody

Example: {'annotations': {'incident.io/catalog- importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster', 'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

Response[CatalogV2UpdateTypeResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type.py
def sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeRequestBody,
) -> Response[CatalogV2UpdateTypeResponseBody]:
    """UpdateType Catalog V2

     Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        id (str):
        body (CatalogV2UpdateTypeRequestBody):  Example: {'annotations': {'incident.io/catalog-
            importer/id': 'id-of-config'}, 'color': 'yellow', 'description': 'Represents Kubernetes
            clusters that we run inside of GKE.', 'icon': 'bolt', 'name': 'Kubernetes Cluster',
            'ranked': True, 'source_repo_url': 'https://github.com/my-company/incident-io-catalog'}.

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

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

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

    return _build_response(client=client, response=response)