public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonRoute53Config config = new AmazonRoute53Config(); config.RegionEndpoint = region; ConfigureClient(config); AmazonRoute53Client client = new AmazonRoute53Client(creds, config); ListHostedZonesResponse resp = new ListHostedZonesResponse(); do { ListHostedZonesRequest req = new ListHostedZonesRequest { Marker = resp.NextMarker , MaxItems = maxItems.ToString() }; resp = client.ListHostedZones(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.HostedZones) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextMarker)); }
public static ListHostedZonesResponse GetHostedZones(IAmazonRoute53 r53Client) { var request = new ListHostedZonesRequest { MaxItems = "100" }; var response = r53Client.ListHostedZones(request); return(response); }
public static void ListZones() { var listHostedZonesRequest = new ListHostedZonesRequest(); var listHostedZonesResponse = c.ListHostedZonesAsync(listHostedZonesRequest).Result; foreach (var z in listHostedZonesResponse.HostedZones) { Console.WriteLine($"{z.Name}"); } }
private async Task <ListHostedZonesResponse> listAwsHostedZonesAsync() { logger.LogInformation($"Getting List of hosted zones..."); ListHostedZonesRequest request = new ListHostedZonesRequest { }; ListHostedZonesResponse zone = await TheRoute53Client().ListHostedZonesAsync(request); return(zone); }
/// <summary> /// Retrieve a list of your hosted zones. /// </summary> /// <param name="settings">The <see cref="Route53Settings"/> required to connect to Route53.</param> /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> public async Task <IList <HostedZone> > GetHostedZones(Route53Settings settings, CancellationToken cancellationToken = default(CancellationToken)) { ListHostedZonesRequest request = new ListHostedZonesRequest(); AmazonRoute53Client client = this.GetClient(settings); ListHostedZonesResponse response = await client.ListHostedZonesAsync(request); if (response.HttpStatusCode == HttpStatusCode.OK) { _Log.Verbose("Listing hosted zones"); return(response.HostedZones); } else { _Log.Error("Could not list hosted zones"); return(null); } }
public virtual Task <ListHostedZonesResponse> ListHostedZonesAsync(ListHostedZonesRequest request, CancellationToken cancellationToken = default(CancellationToken)) { throw new NotImplementedException(); }