Skip to content

incident_io_client.api.catalog_v2.catalog_v2_create_type

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody
) -> Optional[CatalogV2CreateTypeResponseBody]

CreateType Catalog V2

Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
body CatalogV2CreateTypeRequestBody

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', 'type_name': 'Custom["BackstageGroup"]'}.

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

CatalogV2CreateTypeResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_type.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody,
) -> Optional[CatalogV2CreateTypeResponseBody]:
    """CreateType Catalog V2

     Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        body (CatalogV2CreateTypeRequestBody):  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',
            'type_name': 'Custom["BackstageGroup"]'}.

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

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

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody
) -> Response[CatalogV2CreateTypeResponseBody]

CreateType Catalog V2

Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
body CatalogV2CreateTypeRequestBody

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', 'type_name': 'Custom["BackstageGroup"]'}.

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

Response[CatalogV2CreateTypeResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_type.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody,
) -> Response[CatalogV2CreateTypeResponseBody]:
    """CreateType Catalog V2

     Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        body (CatalogV2CreateTypeRequestBody):  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',
            'type_name': 'Custom["BackstageGroup"]'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody
) -> Optional[CatalogV2CreateTypeResponseBody]

CreateType Catalog V2

Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
body CatalogV2CreateTypeRequestBody

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', 'type_name': 'Custom["BackstageGroup"]'}.

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

CatalogV2CreateTypeResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_type.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody,
) -> Optional[CatalogV2CreateTypeResponseBody]:
    """CreateType Catalog V2

     Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        body (CatalogV2CreateTypeRequestBody):  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',
            'type_name': 'Custom["BackstageGroup"]'}.

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

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

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody
) -> Response[CatalogV2CreateTypeResponseBody]

CreateType Catalog V2

Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

Parameters:

Name Type Description Default
body CatalogV2CreateTypeRequestBody

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', 'type_name': 'Custom["BackstageGroup"]'}.

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

Response[CatalogV2CreateTypeResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_type.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateTypeRequestBody,
) -> Response[CatalogV2CreateTypeResponseBody]:
    """CreateType Catalog V2

     Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.

    Args:
        body (CatalogV2CreateTypeRequestBody):  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',
            'type_name': 'Custom["BackstageGroup"]'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)