示例#1
0
 /// <summary>
 /// Retrieves a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is either no digital twin or relationship with the
 /// provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetRelationshipByIdAsync(this IDigitalTwinsOperations operations, string id, string relationshipId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRelationshipByIdWithHttpMessagesAsync(id, relationshipId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Updates a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='patchDocument'>
 /// An update specification described by JSON Patch. Updates to property values
 /// and $model elements may happen in the same request. Operations are limited
 /// to add, replace and remove.
 /// </param>
 /// <param name='ifMatch'>
 /// Only perform the operation if the entity's etag matches one of the etags
 /// provided or * is provided.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DigitalTwinsUpdateHeaders> UpdateAsync(this IDigitalTwinsOperations operations, string id, IList <object> patchDocument, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(id, patchDocument, ifMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
示例#3
0
 /// <summary>
 /// Retrieves a component from a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is either no digital twin with the provided id or
 /// the component path is invalid.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='componentPath'>
 /// The name of the DTDL component.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetComponentAsync(this IDigitalTwinsOperations operations, string id, string componentPath, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetComponentWithHttpMessagesAsync(id, componentPath, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Retrieves the relationships from a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipName'>
 /// The name of the relationship.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <object> > ListRelationshipsAsync(this IDigitalTwinsOperations operations, string id, string relationshipName = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListRelationshipsWithHttpMessagesAsync(id, relationshipName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// Get DigitalTwinsInstances resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the DigitalTwinsInstance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DigitalTwinsDescription> GetAsync(this IDigitalTwinsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Update metadata of DigitalTwinsInstance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the DigitalTwinsInstance.
 /// </param>
 /// <param name='tags'>
 /// Instance tags
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DigitalTwinsDescription> BeginUpdateAsync(this IDigitalTwinsOperations operations, string resourceGroupName, string resourceName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#7
0
 /// <summary>
 /// Check if a DigitalTwinsInstance name is available.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Location of DigitalTwinsInstance.
 /// </param>
 /// <param name='name'>
 /// Resource name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckNameResult> CheckNameAvailabilityAsync(this IDigitalTwinsOperations operations, string location, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#8
0
 /// <summary>
 /// Get all the DigitalTwinsInstances in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DigitalTwinsDescription> > ListNextAsync(this IDigitalTwinsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#9
0
 /// <summary>
 /// Adds a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin, target digital twin, or
 /// relationship with the provided id.
 /// 409 (Conflict): A relationship with the provided id already exists.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='relationship'>
 /// The data for the relationship.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Only perform the operation if the entity does not already exist. Possible
 /// values include: '*'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> AddRelationshipAsync(this IDigitalTwinsOperations operations, string id, string relationshipId, object relationship = default(object), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddRelationshipWithHttpMessagesAsync(id, relationshipId, relationship, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#10
0
 /// <summary>
 /// Deletes a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is either no digital twin or relationship with the
 /// provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='ifMatch'>
 /// Only perform the operation if the entity's etag matches one of the etags
 /// provided or * is provided.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteRelationshipAsync(this IDigitalTwinsOperations operations, string id, string relationshipId, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteRelationshipWithHttpMessagesAsync(id, relationshipId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#11
0
 /// <summary>
 /// Retrieves a component from a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is either no digital twin with the provided id or
 /// the component path is invalid.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='componentPath'>
 /// The name of the DTDL component.
 /// </param>
 public static object GetComponent(this IDigitalTwinsOperations operations, string id, string componentPath)
 {
     return(operations.GetComponentAsync(id, componentPath).GetAwaiter().GetResult());
 }
示例#12
0
 /// <summary>
 /// Get all the DigitalTwinsInstances in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 public static IPage <DigitalTwinsDescription> ListByResourceGroup(this IDigitalTwinsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
示例#13
0
 /// <summary>
 /// Retrieves all incoming relationship for a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <IncomingRelationship> ListIncomingRelationshipsNext(this IDigitalTwinsOperations operations, string nextPageLink)
 {
     return(operations.ListIncomingRelationshipsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
示例#14
0
 /// <summary>
 /// Updates a component on a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin with the provided id or
 /// the component path is invalid.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='componentPath'>
 /// The name of the DTDL component.
 /// </param>
 /// <param name='patchDocument'>
 /// An update specification described by JSON Patch. Updates to property values
 /// and $model elements may happen in the same request. Operations are limited
 /// to add, replace and remove.
 /// </param>
 /// <param name='ifMatch'>
 /// Only perform the operation if the entity's etag matches one of the etags
 /// provided or * is provided.
 /// </param>
 public static DigitalTwinsUpdateComponentHeaders UpdateComponent(this IDigitalTwinsOperations operations, string id, string componentPath, IList <object> patchDocument = default(IList <object>), string ifMatch = default(string))
 {
     return(operations.UpdateComponentAsync(id, componentPath, patchDocument, ifMatch).GetAwaiter().GetResult());
 }
示例#15
0
 /// <summary>
 /// Deletes a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is either no digital twin or relationship with the
 /// provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='ifMatch'>
 /// Only perform the operation if the entity's etag matches one of the etags
 /// provided or * is provided.
 /// </param>
 public static void DeleteRelationship(this IDigitalTwinsOperations operations, string id, string relationshipId, string ifMatch = default(string))
 {
     operations.DeleteRelationshipAsync(id, relationshipId, ifMatch).GetAwaiter().GetResult();
 }
示例#16
0
 /// <summary>
 /// Retrieves a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 public static object GetById(this IDigitalTwinsOperations operations, string id)
 {
     return(operations.GetByIdAsync(id).GetAwaiter().GetResult());
 }
示例#17
0
 /// <summary>
 /// Adds a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin, target digital twin, or
 /// relationship with the provided id.
 /// 409 (Conflict): A relationship with the provided id already exists.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='relationship'>
 /// The data for the relationship.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Only perform the operation if the entity does not already exist. Possible
 /// values include: '*'
 /// </param>
 public static object AddRelationship(this IDigitalTwinsOperations operations, string id, string relationshipId, object relationship = default(object), string ifNoneMatch = default(string))
 {
     return(operations.AddRelationshipAsync(id, relationshipId, relationship, ifNoneMatch).GetAwaiter().GetResult());
 }
示例#18
0
 /// <summary>
 /// Adds or replaces a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 412 (Precondition Failed): The model is decommissioned or the digital twin
 /// already exists (when using If-None-Match: *).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='twin'>
 /// The digital twin instance being added. If provided, the $dtId property is
 /// ignored.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Only perform the operation if the entity does not already exist. Possible
 /// values include: '*'
 /// </param>
 public static object Add(this IDigitalTwinsOperations operations, string id, object twin, string ifNoneMatch = default(string))
 {
     return(operations.AddAsync(id, twin, ifNoneMatch).GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Updates the properties on a relationship between two digital twins.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin or relationship with the
 /// provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipId'>
 /// The id of the relationship. The id is unique within the digital twin and
 /// case sensitive.
 /// </param>
 /// <param name='patchDocument'>
 /// JSON Patch description of the update to the relationship properties.
 /// </param>
 /// <param name='ifMatch'>
 /// Only perform the operation if the entity's etag matches one of the etags
 /// provided or * is provided.
 /// </param>
 public static DigitalTwinsUpdateRelationshipHeaders UpdateRelationship(this IDigitalTwinsOperations operations, string id, string relationshipId, IList <object> patchDocument = default(IList <object>), string ifMatch = default(string))
 {
     return(operations.UpdateRelationshipAsync(id, relationshipId, patchDocument, ifMatch).GetAwaiter().GetResult());
 }
示例#20
0
 /// <summary>
 /// Get all the DigitalTwinsInstances in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <DigitalTwinsDescription> List(this IDigitalTwinsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
示例#21
0
 /// <summary>
 /// Retrieves the relationships from a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='relationshipName'>
 /// The name of the relationship.
 /// </param>
 public static IPage <object> ListRelationships(this IDigitalTwinsOperations operations, string id, string relationshipName = default(string))
 {
     return(operations.ListRelationshipsAsync(id, relationshipName).GetAwaiter().GetResult());
 }
示例#22
0
 /// <summary>
 /// Check if a DigitalTwinsInstance name is available.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Location of DigitalTwinsInstance.
 /// </param>
 /// <param name='name'>
 /// Resource name.
 /// </param>
 public static CheckNameResult CheckNameAvailability(this IDigitalTwinsOperations operations, string location, string name)
 {
     return(operations.CheckNameAvailabilityAsync(location, name).GetAwaiter().GetResult());
 }
示例#23
0
 /// <summary>
 /// Retrieves all incoming relationship for a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is no digital twin with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 public static IPage <IncomingRelationship> ListIncomingRelationships(this IDigitalTwinsOperations operations, string id)
 {
     return(operations.ListIncomingRelationshipsAsync(id).GetAwaiter().GetResult());
 }
示例#24
0
 /// <summary>
 /// Delete a DigitalTwinsInstance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the DigitalTwinsInstance.
 /// </param>
 public static DigitalTwinsDescription BeginDelete(this IDigitalTwinsOperations operations, string resourceGroupName, string resourceName)
 {
     return(operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult());
 }
示例#25
0
 /// <summary>
 /// Sends telemetry on behalf of a component in a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin with the provided id or
 /// the component path is invalid.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='componentPath'>
 /// The name of the DTDL component.
 /// </param>
 /// <param name='telemetry'>
 /// The telemetry measurements to send from the digital twin's component.
 /// </param>
 /// <param name='dtId'>
 /// A unique message identifier (in the scope of the digital twin id) that is
 /// commonly used for de-duplicating messages.
 /// </param>
 /// <param name='dtTimestamp'>
 /// An RFC 3339 timestamp that identifies the time the telemetry was measured.
 /// </param>
 public static void SendComponentTelemetry(this IDigitalTwinsOperations operations, string id, string componentPath, object telemetry, string dtId, string dtTimestamp = default(string))
 {
     operations.SendComponentTelemetryAsync(id, componentPath, telemetry, dtId, dtTimestamp).GetAwaiter().GetResult();
 }
示例#26
0
 /// <summary>
 /// Get all the DigitalTwinsInstances in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <DigitalTwinsDescription> ListByResourceGroupNext(this IDigitalTwinsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
示例#27
0
 /// <summary>
 /// Sends telemetry on behalf of a component in a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 404 (Not Found): There is either no digital twin with the provided id or
 /// the component path is invalid.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='componentPath'>
 /// The name of the DTDL component.
 /// </param>
 /// <param name='telemetry'>
 /// The telemetry measurements to send from the digital twin's component.
 /// </param>
 /// <param name='dtId'>
 /// A unique message identifier (in the scope of the digital twin id) that is
 /// commonly used for de-duplicating messages.
 /// </param>
 /// <param name='dtTimestamp'>
 /// An RFC 3339 timestamp that identifies the time the telemetry was measured.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SendComponentTelemetryAsync(this IDigitalTwinsOperations operations, string id, string componentPath, object telemetry, string dtId, string dtTimestamp = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.SendComponentTelemetryWithHttpMessagesAsync(id, componentPath, telemetry, dtId, dtTimestamp, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#28
0
 /// <summary>
 /// Create or update the metadata of a DigitalTwinsInstance. The usual pattern
 /// to modify a property is to retrieve the DigitalTwinsInstance and security
 /// metadata, and then combine them with the modified values in a new body to
 /// update the DigitalTwinsInstance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the DigitalTwinsInstance.
 /// </param>
 /// <param name='digitalTwinsCreate'>
 /// The DigitalTwinsInstance and security metadata.
 /// </param>
 public static DigitalTwinsDescription CreateOrUpdate(this IDigitalTwinsOperations operations, string resourceGroupName, string resourceName, DigitalTwinsDescription digitalTwinsCreate)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, resourceName, digitalTwinsCreate).GetAwaiter().GetResult());
 }
示例#29
0
 /// <summary>
 /// Update metadata of DigitalTwinsInstance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the DigitalTwinsInstance.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the DigitalTwinsInstance.
 /// </param>
 /// <param name='tags'>
 /// Instance tags
 /// </param>
 public static DigitalTwinsDescription BeginUpdate(this IDigitalTwinsOperations operations, string resourceGroupName, string resourceName, IDictionary <string, string> tags = default(IDictionary <string, string>))
 {
     return(operations.BeginUpdateAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult());
 }