TrustedHostSubscriptionCollection.CreateOrUpdate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a host subscription to the guest subscription's list of trusted hosts. A guest subscription can trust multiple host subscriptions; this only establishes trust and does not check the guest in to the host. Guest-to-host association is determined at check-in time, where a subscription can be a guest of at most one host per region.
- Request Path. : /subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/trustedHostSubscriptions/{hostSubscriptionId}.
- Operation Id. : TrustedHostSubscriptions_Create.
- Default Api Version. : 2026-07-31.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string hostSubscriptionId, Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ComputeLimit.TrustedHostSubscriptionResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, hostSubscriptionId As String, data As TrustedHostSubscriptionData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of TrustedHostSubscriptionResource)
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.
- hostSubscriptionId
- String
The name of the TrustedHostSubscription.
Resource create parameters.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
hostSubscriptionId or data is null.
hostSubscriptionId is an empty string, and was expected to be non-empty.