diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs index bd1be4fdb3ec4..b9572004c40a1 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs @@ -126,6 +126,9 @@ protected DigitalTwinsClient() /// The Id of the digital twin. /// The cancellation token. /// The application/json digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// This sample demonstrates getting and deserializing a digital twin into a custom data type. /// @@ -156,6 +159,9 @@ public virtual Task> GetDigitalTwinAsync(string digitalTwinId, /// The Id of the digital twin. /// The cancellation token. /// The application/json digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Response GetDigitalTwin(string digitalTwinId, CancellationToken cancellationToken = default) { return _dtRestClient.GetById(digitalTwinId, cancellationToken); @@ -168,6 +174,9 @@ public virtual Response GetDigitalTwin(string digitalTwinId, Cancellatio /// The application/json digital twin to create. /// The cancellation token. /// The created application/json digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// string customDtId = await GetUniqueTwinIdAsync(SamplesConstants.TemporaryTwinPrefix, DigitalTwinsClient).ConfigureAwait(false); @@ -202,6 +211,9 @@ public virtual Task> CreateDigitalTwinAsync(string digitalTwinI /// The application/json digital twin to create. /// The cancellation token. /// The created application/json digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Response CreateDigitalTwin(string digitalTwinId, string digitalTwin, CancellationToken cancellationToken = default) { return _dtRestClient.Add(digitalTwinId, digitalTwin, cancellationToken); @@ -214,6 +226,9 @@ public virtual Response CreateDigitalTwin(string digitalTwinId, string d /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// To delete a digital twin, any relationships referencing it must be deleted first. /// @@ -234,6 +249,9 @@ public virtual Task DeleteDigitalTwinAsync(string digitalTwinId, Reque /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// To delete a digital twin, any relationships referencing it must be deleted first. /// @@ -248,9 +266,11 @@ public virtual Response DeleteDigitalTwin(string digitalTwinId, RequestOptions r /// The Id of the digital twin to update. /// The application/json-patch+json operations to be performed on the specified digital twin. /// The optional settings for this request. - /// The http response. /// The cancellationToken. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Task> UpdateDigitalTwinAsync(string digitalTwinId, string digitalTwinUpdateOperations, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { return _dtRestClient.UpdateAsync(digitalTwinId, digitalTwinUpdateOperations, requestOptions?.IfMatchEtag, cancellationToken); @@ -262,8 +282,11 @@ public virtual Task> UpdateDigitalTwinAsync(string digitalTwinI /// The Id of the digital twin to update. /// The application/json-patch+json operations to be performed on the specified digital twin. /// The optional settings for this request. + /// The cancellationToken. /// The http response. - /// The cancellationToken. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -279,6 +302,9 @@ public virtual Response UpdateDigitalTwin(string digitalTwinId, string d /// The component being retrieved. /// The cancellation token. /// Json string representation of the component corresponding to the provided componentPath and the HTTP response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// response = await DigitalTwinsClient.GetComponentAsync(basicDtId, SamplesConstants.ComponentPath).ConfigureAwait(false); @@ -298,6 +324,9 @@ public virtual Task> GetComponentAsync(string digitalTwinId, st /// The component being retrieved. /// The cancellation token. /// Json string representation of the component corresponding to the provided componentPath and the HTTP response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -315,6 +344,9 @@ public virtual Response GetComponent(string digitalTwinId, string compon /// The optional settings for this request. /// The cancellation token. /// The HTTP response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// // Update Component1 by replacing the property ComponentProp1 value @@ -342,6 +374,9 @@ public virtual Task> UpdateComponentAsync(string digitalTwinId, /// The optional settings for this request. /// The cancellation token. /// The HTTP response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -357,6 +392,9 @@ public virtual Response UpdateComponent(string digitalTwinId, string com /// The name of a relationship to filter to. If null, all relationships for the digital twin will be returned. /// The cancellation token. /// The pageable list of application/json relationships belonging to the specified digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// AsyncPageable<string> relationships = DigitalTwinsClient.GetRelationshipsAsync(twin.Key); @@ -411,6 +449,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The name of a relationship to filter to. If null, all relationships for the digital twin will be returned. /// The cancellation token. /// The pageable list of application/json relationships belonging to the specified digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -462,6 +503,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The Id of the target digital twin. /// The cancellation token. /// The pageable list of application/json relationships directed towards the specified digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// AsyncPageable<IncomingRelationship> incomingRelationships = DigitalTwinsClient.GetIncomingRelationshipsAsync(twin.Key); @@ -510,6 +554,9 @@ async Task> NextPageFunc(string nextLink, int? pageSi /// The Id of the target digital twin. /// The cancellation token. /// The pageable list of application/json relationships directed towards the specified digital twin and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -557,7 +604,10 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The Id of the relationship to retrieve. /// The cancellation token. /// The application/json relationship corresponding to the provided relationshipId and the http response. - /// This returned application/json string can always be serialized into an instance of or into an extension of that type. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// + /// This returned application/json string can always be serialized into an instance of or into an extension of that type. public virtual Task> GetRelationshipAsync(string digitalTwinId, string relationshipId, CancellationToken cancellationToken = default) { return _dtRestClient.GetRelationshipByIdAsync(digitalTwinId, relationshipId, cancellationToken); @@ -570,7 +620,10 @@ public virtual Task> GetRelationshipAsync(string digitalTwinId, /// The Id of the relationship to retrieve. /// The cancellation token. /// The application/json relationship corresponding to the provided relationshipId and the http response. - /// This returned application/json string can always be serialized into an instance of or into an extension of that type. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// + /// This returned application/json string can always be serialized into an instance of or into an extension of that type. /// /// See the asynchronous version of this method for examples. /// @@ -587,6 +640,9 @@ public virtual Response GetRelationship(string digitalTwinId, string rel /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Task DeleteRelationshipAsync(string digitalTwinId, string relationshipId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { return _dtRestClient.DeleteRelationshipAsync(digitalTwinId, relationshipId, requestOptions?.IfMatchEtag, cancellationToken); @@ -600,6 +656,9 @@ public virtual Task DeleteRelationshipAsync(string digitalTwinId, stri /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -616,9 +675,12 @@ public virtual Response DeleteRelationship(string digitalTwinId, string relation /// The application/json relationship to be created. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// Relationships are a one-way link from a source digital twin to another, as described at creation time of the assigned model of the digital twin. - /// This argument must be the serialization of an instance of or the serialization of an extension of that type. + /// This argument must be the serialization of an instance of or the serialization of an extension of that type. /// /// /// @@ -645,9 +707,12 @@ public virtual Task> CreateRelationshipAsync(string digitalTwin /// The application/json relationship to be created. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// Relationships are a one-way link from a source digital twin to another, as described at creation time of the assigned model of the digital twin. - /// This argument must be the serialization of an instance of or the serialization of an extension of that type. + /// This argument must be the serialization of an instance of or the serialization of an extension of that type. /// /// /// See the asynchronous version of this method for examples. @@ -666,6 +731,9 @@ public virtual Response CreateRelationship(string digitalTwinId, string /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Task UpdateRelationshipAsync(string digitalTwinId, string relationshipId, string relationshipUpdateOperations, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { // TODO how can we make this patch easier to construct? @@ -681,6 +749,9 @@ public virtual Task UpdateRelationshipAsync(string digitalTwinId, stri /// The optional settings for this request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -697,6 +768,9 @@ public virtual Response UpdateRelationship(string digitalTwinId, string relation /// The options to follow when listing the models. For example, the page size hint can be specified. /// The cancellation token. /// A pageable set of application/json models and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// AsyncPageable<ModelData> allModels = DigitalTwinsClient.GetModelsAsync(); @@ -751,6 +825,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The options to follow when listing the models. For example, the page size hint can be specified. /// The cancellation token. /// A pageable set of application/json models and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -797,6 +874,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The Id of the model. /// The cancellation token. /// The application/json model and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// Response<ModelData> sampleModel = await DigitalTwinsClient.GetModelAsync(sampleModelId).ConfigureAwait(false); @@ -814,6 +894,9 @@ public virtual Task> GetModelAsync(string modelId, Cancellat /// The Id of the model. /// The cancellation token. /// The application/json model and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -829,6 +912,9 @@ public virtual Response GetModel(string modelId, CancellationToken ca /// The Id of the model to decommission. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// When a model is decomissioned, new digital twins will no longer be able to be defined by this model. /// However, existing digital twins may continue to use this model. @@ -859,6 +945,9 @@ public virtual Task DecommissionModelAsync(string modelId, Cancellatio /// The Id of the model to decommission. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// When a model is decomissioned, new digital twins will no longer be able to be defined by this model. /// However, existing digital twins may continue to use this model. @@ -878,6 +967,9 @@ public virtual Response DecommissionModel(string modelId, CancellationToken canc /// The set of models to create. Each string corresponds to exactly one model. /// The cancellation token. /// The created models and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// Bulk model creation is useful when several models have references to each other. /// It simplifies creation for the client because otherwise the models would have to be created in a very specific order. @@ -901,6 +993,9 @@ public virtual Task>> CreateModelsAsync(IEnume /// The set of models to create. Each string corresponds to exactly one model. /// The cancellation token. /// The created models and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// Bulk model creation is useful when several models have references to each other. /// It simplifies creation for the client because otherwise the models would have to be created in a very specific order. @@ -920,6 +1015,10 @@ public virtual Response> CreateModels(IEnumerable /// The id for the model. The id is globally unique and case sensitive. /// The cancellation token to use. + /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// A model can only be deleted if no other models reference it. /// Status codes: @@ -952,6 +1051,10 @@ public virtual Task DeleteModelAsync(string modelId, CancellationToken /// /// The id for the model. The id is globally unique and case sensitive. /// The cancellation token to use. + /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// A model can only be deleted if no other models reference it. /// Status codes: @@ -974,6 +1077,9 @@ public virtual Response DeleteModel(string modelId, CancellationToken cancellati /// The query string, in SQL-like syntax. /// The cancellation token. /// The pageable list of query results. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// // This code snippet demonstrates the simplest way to iterate over the digital twin results, where paging @@ -1043,6 +1149,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The query string, in SQL-like syntax. /// The cancellation token. /// The pageable list of query results. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// A basic query for all digital twins: SELECT * FROM digitalTwins. /// @@ -1102,6 +1211,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The options to use when listing the event routes. One can set the maximum number of items to retrieve per request, however the service may return less than requested. /// The cancellation token. /// A pageable set of application/json event routes and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// AsyncPageable<EventRoute> response = DigitalTwinsClient.GetEventRoutesAsync(); @@ -1154,6 +1266,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The options to use when listing the event routes. One can set the maximum number of items to retrieve per request, however the service may return less than requested. /// The cancellation token. /// A pageable set of application/json event routes and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -1200,6 +1315,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The Id of the event route. /// The cancellation token. /// The application/json event routes and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// public virtual Task> GetEventRouteAsync(string eventRouteId, CancellationToken cancellationToken = default) { return _eventRoutesRestClient.GetByIdAsync(eventRouteId, cancellationToken); @@ -1211,6 +1329,9 @@ public virtual Task> GetEventRouteAsync(string eventRouteId /// The Id of the event route. /// The cancellation token. /// The application/json event routes and the http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -1226,6 +1347,9 @@ public virtual Response GetEventRoute(string eventRouteId, Cancellat /// The event route data containing the endpoint and optional filter. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// string eventFilter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'"; @@ -1249,6 +1373,9 @@ public virtual Task CreateEventRouteAsync(string eventRouteId, EventRo /// The event route data containing the endpoint and optional filter. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -1263,6 +1390,9 @@ public virtual Response CreateEventRoute(string eventRouteId, EventRoute eventRo /// The Id of the event route to delete. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// Response response = await DigitalTwinsClient.DeleteEventRouteAsync(_eventRouteId).ConfigureAwait(false); @@ -1279,6 +1409,9 @@ public virtual Task DeleteEventRouteAsync(string eventRouteId, Cancell /// The Id of the event route to delete. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -1297,6 +1430,9 @@ public virtual Response DeleteEventRoute(string eventRouteId, CancellationToken /// The additional information to be used when processing a telemetry request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// // construct your json telemetry payload by hand. @@ -1323,6 +1459,9 @@ public virtual Task PublishTelemetryAsync(string digitalTwinId, string /// The additional information to be used when processing a telemetry request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. /// @@ -1345,6 +1484,9 @@ public virtual Response PublishTelemetry(string digitalTwinId, string payload, T /// The additional information to be used when processing a telemetry request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// /// // construct your json telemetry payload by serializing a dictionary. @@ -1376,6 +1518,9 @@ public virtual Task PublishComponentTelemetryAsync(string digitalTwinI /// The additional information to be used when processing a telemetry request. /// The cancellation token. /// The http response. + /// + /// The exception that captures the errors from the service. Check the and properties for more details. + /// /// /// See the asynchronous version of this method for examples. ///