Beispiel #1
0
        public List <DnsRecordSet> ListRecordSets(string zoneName, string resourceGroupName, string endsWith)
        {
            RecordSetListParameters recordListParameters = new RecordSetListParameters
            {
                Filter = endsWith == null ? null : string.Format("endswith(Name,'{0}')", endsWith)
            };

            RecordSetListResponse listResponse = this.DnsManagementClient.RecordSets.ListAll(resourceGroupName, zoneName, recordListParameters);

            return(listResponse
                   .RecordSets
                   .Select(recordSetInResponse => GetPowerShellRecordSet(zoneName, resourceGroupName, recordSetInResponse))
                   .ToList());
        }
Beispiel #2
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 #3
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 RecordSetListResponse ListAll(this IRecordSetOperations operations, string resourceGroupName, string zoneName, RecordSetListParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecordSetOperations)s).ListAllAsync(resourceGroupName, zoneName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }