Поделиться через


HealthModelRelationshipCollection.CreateOrUpdateAsync Method

Definition

Create a Relationship

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/relationships/{relationshipName}
  • Operation Id: Relationship_CreateOrUpdate
  • Default Api Version: 2025-05-01-preview
  • Resource: HealthModelRelationshipResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CloudHealth.HealthModelRelationshipResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string relationshipName, Azure.ResourceManager.CloudHealth.HealthModelRelationshipData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CloudHealth.HealthModelRelationshipData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CloudHealth.HealthModelRelationshipResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CloudHealth.HealthModelRelationshipData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CloudHealth.HealthModelRelationshipResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, relationshipName As String, data As HealthModelRelationshipData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of HealthModelRelationshipResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

relationshipName
String

Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.

data
HealthModelRelationshipData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

relationshipName is an empty string, and was expected to be non-empty.

relationshipName or data is null.

Applies to