Beispiel #1
0
 /// <summary>
 /// Creates a RecordSet within a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CreateOrUpdate operation.
 /// </param>
 /// <returns>
 /// The response to a RecordSet CreateOrUpdate operation.
 /// </returns>
 public static RecordSetCreateOrUpdateResponse CreateOrUpdate(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, RecordSetCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecordSetOperations)s).CreateOrUpdateAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #2
0
 /// <summary>
 /// Lists RecordSets in a DNS zone. Depending on the previous call, it
 /// will list all types or by type.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// The response to a RecordSet List operation.
 /// </returns>
 public static RecordSetListResponse ListNext(this IRecordSetOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecordSetOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #3
0
 /// <summary>
 /// Removes a RecordSet from a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <param name='ifMatch'>
 /// Optional. Defines the If-Match condition. The delete operation will
 /// be performed only if the ETag of the zone on the server matches
 /// this value.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Optional. Defines the If-None-Match condition. The delete operation
 /// will be performed only if the ETag of the zone on the server does
 /// not match this value.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Delete(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, string ifMatch, string ifNoneMatch)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecordSetOperations)s).DeleteAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch, ifNoneMatch);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the DnsManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public DnsManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._recordSets = new RecordSetOperations(this);
     this._zones      = new ZoneOperations(this);
     this._apiVersion = "2016-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Beispiel #5
0
 /// <summary>
 /// Creates a RecordSet within a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CreateOrUpdate operation.
 /// </param>
 /// <returns>
 /// The response to a RecordSet CreateOrUpdate operation.
 /// </returns>
 public static Task <RecordSetCreateOrUpdateResponse> CreateOrUpdateAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, RecordSetCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, CancellationToken.None));
 }
Beispiel #6
0
 /// <summary>
 /// Lists RecordSets in a DNS zone. Depending on the previous call, it
 /// will list all types or by type.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// The response to a RecordSet List operation.
 /// </returns>
 public static Task <RecordSetListResponse> ListNextAsync(this IRecordSetOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
Beispiel #7
0
 /// <summary>
 /// Lists all RecordSets in a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group that contains the zone.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone from which to enumerate RecordSets.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns the default
 /// number of zones.
 /// </param>
 /// <returns>
 /// The response to a RecordSet List operation.
 /// </returns>
 public static Task <RecordSetListResponse> ListAllAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, RecordSetListParameters parameters)
 {
     return(operations.ListAllAsync(resourceGroupName, zoneName, parameters, CancellationToken.None));
 }
Beispiel #8
0
 /// <summary>
 /// Gets a RecordSet.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <returns>
 /// The response to a RecordSet Get operation.
 /// </returns>
 public static Task <RecordSetGetResponse> GetAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType)
 {
     return(operations.GetAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, CancellationToken.None));
 }
Beispiel #9
0
 /// <summary>
 /// Creates a RecordSet within a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CreateOrUpdate operation.
 /// </param>
 /// <param name='ifMatch'>
 /// Optional. The etag of Zone.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Optional. Defines the If-None-Match condition. Set to '*' to force
 /// Create-If-Not-Exist. Other values will be ignored.
 /// </param>
 /// <returns>
 /// The response to a RecordSet Update operation.
 /// </returns>
 public static Task <RecordSetUpdateResponse> UpdateAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, RecordSetUpdateParameters parameters, string ifMatch, string ifNoneMatch)
 {
     return(operations.UpdateAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch, ifNoneMatch, CancellationToken.None));
 }
Beispiel #10
0
 /// <summary>
 /// Removes a RecordSet from a DNS zone.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Dns.IRecordSetOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='zoneName'>
 /// Required. The name of the zone without a terminating dot.
 /// </param>
 /// <param name='relativeRecordSetName'>
 /// Required. The name of the RecordSet, relative to the name of the
 /// zone.
 /// </param>
 /// <param name='recordType'>
 /// Required. The type of DNS record.
 /// </param>
 /// <param name='ifMatch'>
 /// Optional. Defines the If-Match condition. The delete operation will
 /// be performed only if the ETag of the zone on the server matches
 /// this value.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Optional. Defines the If-None-Match condition. The delete operation
 /// will be performed only if the ETag of the zone on the server does
 /// not match this value.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, string ifMatch, string ifNoneMatch)
 {
     return(operations.DeleteAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch, ifNoneMatch, CancellationToken.None));
 }