/// <summary> /// Creates a Stream Analytics Private Endpoint or replaces an already existing /// Private Endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='privateEndpoint'> /// The definition of the private endpoint that will be used to create a new /// cluster or replace the existing one. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='clusterName'> /// The name of the cluster. /// </param> /// <param name='privateEndpointName'> /// The name of the private endpoint. /// </param> /// <param name='ifMatch'> /// The ETag of the resource. Omit this value to always overwrite the current /// record set. Specify the last-seen ETag value to prevent accidentally /// overwriting concurrent changes. /// </param> /// <param name='ifNoneMatch'> /// Set to '*' to allow a new resource to be created, but to prevent updating /// an existing record set. Other values will result in a 412 Pre-condition /// Failed response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PrivateEndpoint> CreateOrUpdateAsync(this IPrivateEndpointsOperations operations, PrivateEndpoint privateEndpoint, string resourceGroupName, string clusterName, string privateEndpointName, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(privateEndpoint, resourceGroupName, clusterName, privateEndpointName, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an private endpoint in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='privateEndpointName'> /// The name of the private endpoint. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update private endpoint operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PrivateEndpoint> CreateOrUpdateAsync(this IPrivateEndpointsOperations operations, string resourceGroupName, string privateEndpointName, PrivateEndpoint parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, privateEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }