/// <summary>
 /// Creates or updates a Search service in the given resource group. If the
 /// Search service already exists, all properties will be updated with the
 /// given values.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Search service to create or update. Search service
 /// names must only contain lowercase letters, digits or dashes, cannot use
 /// dash as the first two or last one characters, cannot contain consecutive
 /// dashes, and must be between 2 and 60 characters in length. Search service
 /// names must be globally unique since they are part of the service URI
 /// (https://&lt;name&gt;.search.windows.net). You cannot change the service
 /// name after the service is created.
 /// </param>
 /// <param name='service'>
 /// The definition of the Search service to create or update.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SearchServiceInner> BeginCreateOrUpdateAsync(this IServicesOperations operations, string resourceGroupName, string searchServiceName, SearchServiceInner service, SearchManagementRequestOptionsInner searchManagementRequestOptions = default(SearchManagementRequestOptionsInner), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, searchServiceName, service, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Create a new Service or update an exiting Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='resource'>
 /// Parameters for the create or update operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceResource> BeginCreateOrUpdateAsync(this IServicesOperations operations, string resourceGroupName, string serviceName, ServiceResource resource = default(ServiceResource), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, resource, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create or update DMS Instance
 /// </summary>
 /// <remarks>
 /// The services resource is the top-level resource that represents the
 /// Database Migration Service. The PUT method creates a new service or updates
 /// an existing one. When a service is updated, existing child resources (i.e.
 /// tasks) are unaffected. Services currently support a single kind, "vm",
 /// which refers to a VM-based service, although other kinds may be added in
 /// the future. This method can change the kind, SKU, and network of the
 /// service, but if tasks are currently running (i.e. the service is busy),
 /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
 /// reply when successful with 200 OK or 201 Created. Long-running operations
 /// use the provisioningState property.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Information about the service
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DataMigrationService> BeginCreateOrUpdateAsync(this IServicesOperations operations, DataMigrationService parameters, string groupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(parameters, groupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }