/// <summary> /// Creates or updates a Service Fabric service resource. /// </summary> /// <remarks> /// Create or update a Service Fabric service resource with the specified name. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='clusterName'> /// The name of the cluster resource. /// </param> /// <param name='applicationName'> /// The name of the application resource. /// </param> /// <param name='serviceName'> /// The name of the service resource in the format of /// {applicationName}~{serviceName}. /// </param> /// <param name='parameters'> /// The service resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServiceResource> CreateAsync(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName, ServiceResource parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a Service. /// </summary> /// <remarks> /// Create a Service with the specified payload. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The Azure Subscription ID. /// </param> /// <param name='resourceGroup'> /// The Name of the resource group in which the workspace is located. /// </param> /// <param name='workspace'> /// The name of the workspace. /// </param> /// <param name='request'> /// The payload that is used to create the Service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CreateAsync(this IServicesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, CreateServiceRequest request, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); }