AzuredigitaltwinsClient
Attributes
Classes
ListModelsResponse
dataclass
ListModelsResponse(*, value: Optional[List[Dict[str, Any]]] = None, continuation_token: Optional[str] = None, next_link: Optional[str] = None)
Response for List Models
GetModelByIdResponse
dataclass
GetModelByIdResponse(*, id: Optional[str] = None, upload_time: Optional[str] = None, decommissioned: Optional[bool] = None, model: Optional[Dict[str, Any]] = None)
Response for Get Model By Id
Attributes
id
class-attribute
instance-attribute
The id of the model as specified in the model definition.
upload_time
class-attribute
instance-attribute
upload_time: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'uploadTime'})
The time the model was uploaded to the service.
decommissioned
class-attribute
instance-attribute
Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.
UpdateModelInput
dataclass
TwinResult
dataclass
AddTwinInput
dataclass
UpdateTwinInput
dataclass
GetComponentResult
dataclass
UpdateComponentInput
dataclass
TwinRelationship
dataclass
TwinRelationship(*, source_id: Optional[str] = None, relationship_id: Optional[str] = None, target_id: Optional[str] = None, relationship_name: Optional[str] = None, etag: Optional[str] = None, additional_properties: Optional[str] = None)
Response for Get Relationship by Id
Attributes
source_id
class-attribute
instance-attribute
source_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$sourceId'})
Source Id.
relationship_id
class-attribute
instance-attribute
relationship_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$relationshipId'})
Relationship Id.
target_id
class-attribute
instance-attribute
target_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$targetId'})
Target Id.
relationship_name
class-attribute
instance-attribute
relationship_name: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$relationshipName'})
Relationship Name.
etag
class-attribute
instance-attribute
E Tag Link.
AddRelationshipInput
dataclass
UpdateRelationshipInput
dataclass
ListIncomingRelationshipsResponse
dataclass
ListIncomingRelationshipsResponse(value: List[IncomingRelationship | Mapping[str, Any]], *, continuation_token: Optional[str] = None, next_link: Optional[str] = None)
Response for List Incoming Relationships
Attributes
value
instance-attribute
The collection of Incoming relationships.
SendTelemetryInput
dataclass
SendComponentTelemetryInput
dataclass
ListRelationshipsResponse
dataclass
ListRelationshipsResponse(value: List[TwinRelationship | Mapping[str, Any]], *, continuation_token: Optional[str] = None, next_link: Optional[str] = None)
Response for List Relationships
Attributes
value
instance-attribute
The collection of twin relationships.
QueryTwinsInput
dataclass
Query API
Attributes
query
class-attribute
instance-attribute
Query the Twins.
QueryResult
dataclass
Response for Query API
Attributes
value
class-attribute
instance-attribute
Results From the Twin.
IncomingRelationship
dataclass
IncomingRelationship(*, source_id: Optional[str] = None, relationship_id: Optional[str] = None, relationship_name: Optional[str] = None, relationship_link: Optional[str] = None)
Definition: IncomingRelationship
Attributes
source_id
class-attribute
instance-attribute
source_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$sourceId'})
Source Id.
relationship_id
class-attribute
instance-attribute
relationship_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': '$relationshipId'})
Relationship Id.
AzuredigitaltwinsClient
AzuredigitaltwinsClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)
Bases: ConnectorClientBase
Typed client for azuredigitaltwins connector.
Initialize a AzuredigitaltwinsClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
credential
|
AsyncTokenCredential | AzureKeyCredential
|
Caller-owned Azure Core credential. |
required |
max_retry_attempts
|
int
|
The maximum number of request attempts. |
3
|
timeout
|
float
|
The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines. |
30.0
|
use_exponential_backoff
|
bool
|
Whether retries use exponential backoff. |
True
|
initial_retry_delay_seconds
|
float
|
The initial retry delay in seconds. |
0.5
|
maximum_retry_delay_seconds
|
float
|
The maximum retry delay in seconds. |
120.0
|
retry_jitter_factor
|
float
|
The jitter fraction applied to retry delays. |
0.1
|
retry_unsafe_http_methods
|
bool
|
Whether unsafe HTTP methods may be retried. |
False
|
transport
|
Optional[AsyncHttpTransport]
|
Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle. |
None
|
**kwargs
|
Any
|
Optional Azure Core pipeline policy settings. |
{}
|
Methods:
add_models
async
add_models(input: AddModelsInput, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Add Model
Uploads one or more models. When any error occurs, no models are uploaded.
Swagger operation ID: AddModels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AddModelsInput
|
The request body. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_models
list_models(*, dependencies_for: Optional[str] = None, include_model_definition: Optional[str] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]
List Models
Retrieves model metadata and, optionally, model definitions.
Returns an Azure Core async pager that follows the connector continuation URL.
Swagger operation ID: ListModels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dependencies_for
|
Optional[str]
|
The set of the models which will have their dependencies retrieved. If omitted, all models are retrieved. |
None
|
include_model_definition
|
Optional[str]
|
When true the model definition will be returned as part of the result. |
None
|
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncItemPaged[dict[str, Any]]
|
AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector
results. Consume it with |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
delete_model
async
delete_model(modelid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Delete Model
Deletes a model. A model can only be deleted if no other models reference it.
Swagger operation ID: DeleteModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modelid
|
str
|
The id of the Model. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_model_by_id
async
get_model_by_id(modelid: str, *, include_model_definition: Optional[str] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get Model By Id
Retrieves model metadata and, optionally, the model definition.
Swagger operation ID: GetModelById.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modelid
|
str
|
The id of the Model. The id is unique within the service and case sensitive. |
required |
include_model_definition
|
Optional[str]
|
When true the model definition will be returned as part of the result. |
None
|
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
update_model
async
update_model(input: UpdateModelInput | Mapping[str, Any], modelid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Update Model's Property
Updates the metadata for a model.
Swagger operation ID: UpdateModel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateModelInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
modelid
|
str
|
The id of the Model. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_twin_by_id
async
get_twin_by_id(twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get Twin by Id
Retrieves a digital twin and its data.
Swagger operation ID: GetTwinById.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
delete_twin
async
delete_twin(twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Delete Twin
Deletes a digital twin. All relationships referencing the digital twin must already be deleted.
Swagger operation ID: DeleteTwin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
add_twin
async
add_twin(input: AddTwinInput | Mapping[str, Any], twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Add Twin
Adds or replaces a digital twin.
Swagger operation ID: AddTwin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AddTwinInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
update_twin
async
update_twin(input: UpdateTwinInput | Mapping[str, Any], twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Update Twin
Updates properties on a twin.
Swagger operation ID: UpdateTwin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateTwinInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_component
async
get_component(twinid: str, component_path: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get Component
Retrieves a component from a digital twin.
Swagger operation ID: GetComponent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
component_path
|
str
|
The name of the DTDL component. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
update_component
async
update_component(input: UpdateComponentInput | Mapping[str, Any], twinid: str, component_path: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Update Component
Updates integer properties on a component of a twin.
Swagger operation ID: UpdateComponent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateComponentInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
component_path
|
str
|
The name of the DTDL component. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_relationship_by_id
async
get_relationship_by_id(twinid: str, relationship_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get Relationship by Id
Retrieves a relationship between two digital twins.
Swagger operation ID: GetRelationshipById.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
relationship_id
|
str
|
The id of the relationship. The id is unique within the digital twin and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
delete_relationship
async
delete_relationship(twinid: str, relationship_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Delete Relationship
Deletes a relationship between two digital twins.
Swagger operation ID: DeleteRelationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
relationship_id
|
str
|
The id of the relationship. The id is unique within the digital twin and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
add_relationship
async
add_relationship(input: AddRelationshipInput | Mapping[str, Any], twinid: str, relationship_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Add Relationship
Adds a relationship between two digital twins.
Swagger operation ID: AddRelationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AddRelationshipInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
relationship_id
|
str
|
The id of the relationship. The id is unique within the digital twin and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
update_relationship
async
update_relationship(input: UpdateRelationshipInput | Mapping[str, Any], twinid: str, relationship_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Update Relationship
Updates integer properties on a relationship between two digital twins.
Swagger operation ID: UpdateRelationship.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateRelationshipInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
relationship_id
|
str
|
The id of the relationship. The id is unique within the digital twin and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_incoming_relationships
list_incoming_relationships(twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]
List Incoming Relationships
Retrieves all incoming relationships for a digital twin.
Returns an Azure Core async pager that follows the connector continuation URL.
Swagger operation ID: ListIncomingRelationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncItemPaged[dict[str, Any]]
|
AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector
results. Consume it with |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
send_telemetry
async
send_telemetry(input: SendTelemetryInput | Mapping[str, Any], twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Send Telemetry
Sends telemetry on behalf of a digital twin.
Swagger operation ID: SendTelemetry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
SendTelemetryInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
send_component_telemetry
async
send_component_telemetry(input: SendComponentTelemetryInput | Mapping[str, Any], twinid: str, component_path: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Send Component Telemetry
Sends telemetry on behalf of a component in a digital twin.
Swagger operation ID: SendComponentTelemetry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
SendComponentTelemetryInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
component_path
|
str
|
The name of the DTDL component. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_relationships
list_relationships(twinid: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]
List Relationships
Retrieves all outgoing relationships from a digital twin.
Returns an Azure Core async pager that follows the connector continuation URL.
Swagger operation ID: ListRelationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
twinid
|
str
|
The id of the digital twin. The id is unique within the service and case sensitive. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncItemPaged[dict[str, Any]]
|
AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector
results. Consume it with |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
query_twins
async
query_twins(input: QueryTwinsInput | Mapping[str, Any], *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Query API
Executes a query that allows traversing relationships and filtering by property values.
Swagger operation ID: QueryTwins.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
QueryTwinsInput | Mapping[str, Any]
|
The request body. Mapping keys use serialized Swagger wire names. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |