Example #1
0
 /// <summary>
 /// Create or update a Traffic Manager endpoint.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.TrafficManager.IEndpointOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group containing the Traffic
 /// Manager endpoint to be created or updated.
 /// </param>
 /// <param name='profileName'>
 /// Required. The name of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='endpointType'>
 /// Required. The type of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='endpointName'>
 /// Required. The name of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The Traffic Manager endpoint parameters supplied to the
 /// CreateOrUpdate operation.
 /// </param>
 /// <returns>
 /// The response to a Traffic Manager endpoint 'CreateOrUpdate'
 /// operation.
 /// </returns>
 public static EndpointCreateOrUpdateResponse CreateOrUpdate(this IEndpointOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, EndpointCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IEndpointOperations)s).CreateOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the TrafficManagerManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public TrafficManagerManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._endpoints  = new EndpointOperations(this);
     this._profiles   = new ProfileOperations(this);
     this._apiVersion = "2015-04-28-preview";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the TrafficManagerManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public TrafficManagerManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._endpoints           = new EndpointOperations(this);
     this._geographicHierarchy = new GeographicHierarchyOperations(this);
     this._profiles            = new ProfileOperations(this);
     this._apiVersion          = "2017-03-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Example #4
0
 /// <summary>
 /// Create or update a Traffic Manager endpoint.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.TrafficManager.IEndpointOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group containing the Traffic
 /// Manager endpoint to be created or updated.
 /// </param>
 /// <param name='profileName'>
 /// Required. The name of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='endpointType'>
 /// Required. The type of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='endpointName'>
 /// Required. The name of the Traffic Manager endpoint to be created or
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The Traffic Manager endpoint parameters supplied to the
 /// Update operation.
 /// </param>
 /// <returns>
 /// The response to a Traffic Manager endpoint 'CreateOrUpdate'
 /// operation.
 /// </returns>
 public static Task <EndpointUpdateResponse> UpdateAsync(this IEndpointOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, EndpointUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, CancellationToken.None));
 }
Example #5
0
 /// <summary>
 /// Gets a Traffic Manager endpoint.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.TrafficManager.IEndpointOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group containing the Traffic
 /// Manager endpoint.
 /// </param>
 /// <param name='profileName'>
 /// Required. The name of the Traffic Manager endpoint.
 /// </param>
 /// <param name='endpointType'>
 /// Required. The type of the Traffic Manager endpoint.
 /// </param>
 /// <param name='endpointName'>
 /// Required. The name of the Traffic Manager endpoint.
 /// </param>
 /// <returns>
 /// The response to a Traffic Manager endpoint 'Get' operation.
 /// </returns>
 public static Task <EndpointGetResponse> GetAsync(this IEndpointOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
 {
     return(operations.GetAsync(resourceGroupName, profileName, endpointType, endpointName, CancellationToken.None));
 }