Skip to content

get_component_type

get_component_type(
    workspace_id: Id,
    component_type_id: ComponentTypeId,
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
) -> GetComponentTypeResponse

Retrieves information about a component type.

Parameters:

  • workspace_id (Id) –

    The ID of the workspace that contains the component type.

  • component_type_id (ComponentTypeId) –

    The ID of the component type.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/io_t_twin_maker.py
def get_component_type(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    component_type_id: "capo_iottwinmaker.types.component_type_id.ComponentTypeId",
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
) -> "capo_iottwinmaker.types.get_component_type_response.GetComponentTypeResponse":
    """<p>Retrieves information about a component type.</p>

    Args:
        workspace_id: <p>The ID of the workspace that contains the component type.</p>
        component_type_id: <p>The ID of the component type.</p>

    Raises:
        capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
        capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
        capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iottwinmaker.types.get_component_type_request.GetComponentTypeRequest]",
    ) -> OperationResponse[
        "capo_iottwinmaker.types.get_component_type_response.GetComponentTypeResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.get_component_type

        output, http_response = (
            capo_iottwinmaker._operations.aws_io_t_twin_maker.get_component_type.get_component_type(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetComponentType")
    )
    input_: capo_iottwinmaker.types.get_component_type_request.GetComponentTypeRequest = {
        "workspace_id": workspace_id,
        "component_type_id": component_type_id,
    }

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