Skip to content

get_schema_version

get_schema_version(
    type: SchemaVersionType,
    schema_versioned_id: SchemaVersionedId,
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    format: Optional[SchemaVersionFormat] = None,
) -> GetSchemaVersionResponse

Gets a schema version with the provided information.

Parameters:

Raises:

Examples:

GetSchemaVersion happy path for an example schema version.

>>> client.get_schema_version(schema_versioned_id='[email protected]', type='capability')
GetSchemaVersion happy path for an example schema version.
>>> client.get_schema_version(schema_versioned_id='[email protected]', type='capability', format='ZCL')
GetSchemaVersion error path for an example schema version that does not exist.
>>> client.get_schema_version(schema_versioned_id='matter.ColorControl@$latest', type='capability')
Source code in docs_src/capo_iot_managed_integrations/_services/io_t_managed_integrations.py
def get_schema_version(
    self,
    type: "capo_iot_managed_integrations.types.schema_version_type.SchemaVersionType",
    schema_versioned_id: "capo_iot_managed_integrations.types.schema_versioned_id.SchemaVersionedId",
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    format: Optional[
        "capo_iot_managed_integrations.types.schema_version_format.SchemaVersionFormat"
    ] = None,
) -> "capo_iot_managed_integrations.types.get_schema_version_response.GetSchemaVersionResponse":
    """<p>Gets a schema version with the provided information.</p>

    Args:
        type: <p>The type of schema version.</p>
        schema_versioned_id: <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
        format: <p>The format of the schema version.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</p>
        capo_iot_managed_integrations.errors.conflict_exception.ConflictException: <p>There is a conflict with the request.</p>
        capo_iot_managed_integrations.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot_managed_integrations.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot_managed_integrations.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot_managed_integrations.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_managed_integrations.errors.validation_exception.ValidationException: <p>A validation error occurred when performing the API request.</p>
        capo_iot_managed_integrations.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        GetSchemaVersion happy path for an example schema version.

        >>> client.get_schema_version(schema_versioned_id='[email protected]', type='capability')
        GetSchemaVersion happy path for an example schema version.

        >>> client.get_schema_version(schema_versioned_id='[email protected]', type='capability', format='ZCL')
        GetSchemaVersion error path for an example schema version that does not exist.

        >>> client.get_schema_version(schema_versioned_id='matter.ColorControl@$latest', type='capability')
    """

    def _handler(
        req: "OperationRequest[capo_iot_managed_integrations.types.get_schema_version_request.GetSchemaVersionRequest]",
    ) -> OperationResponse[
        "capo_iot_managed_integrations.types.get_schema_version_response.GetSchemaVersionResponse"
    ]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.get_schema_version

        output, http_response = (
            capo_iot_managed_integrations._operations.iot_managed_integrations.get_schema_version.get_schema_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSchemaVersion")
    )
    input_: capo_iot_managed_integrations.types.get_schema_version_request.GetSchemaVersionRequest = {
        "type": type,
        "schema_versioned_id": schema_versioned_id,
    }
    if format is not None:
        input_["format"] = format

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