Example #1
0
 /// <summary>
 /// Creates or updates a service topology.
 /// </summary>
 /// <remarks>
 /// Synchronously creates a new service topology or updates an existing service
 /// topology.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='serviceTopologyInfo'>
 /// Source topology object defines the resource.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serviceTopologyName'>
 /// The name of the service topology .
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceTopologyResource> CreateOrUpdateAsync(this IServiceTopologiesOperations operations, ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(serviceTopologyInfo, resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Lists the service topologies in the resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <ServiceTopologyResource> > ListAsync(this IServiceTopologiesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Gets the service topology.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serviceTopologyName'>
 /// The name of the service topology .
 /// </param>
 public static ServiceTopologyResource Get(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName)
 {
     return(operations.GetAsync(resourceGroupName, serviceTopologyName).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Creates or updates a service topology.
 /// </summary>
 /// <remarks>
 /// Synchronously creates a new service topology or updates an existing service
 /// topology.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='serviceTopologyInfo'>
 /// Source topology object defines the resource.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serviceTopologyName'>
 /// The name of the service topology .
 /// </param>
 public static ServiceTopologyResource CreateOrUpdate(this IServiceTopologiesOperations operations, ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName)
 {
     return(operations.CreateOrUpdateAsync(serviceTopologyInfo, resourceGroupName, serviceTopologyName).GetAwaiter().GetResult());
 }
Example #5
0
 /// <summary>
 /// Deletes the service topology.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serviceTopologyName'>
 /// The name of the service topology .
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #6
0
 /// <summary>
 /// Deletes the service topology.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serviceTopologyName'>
 /// The name of the service topology .
 /// </param>
 public static void Delete(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName)
 {
     operations.DeleteAsync(resourceGroupName, serviceTopologyName).GetAwaiter().GetResult();
 }