public void ElasticLoadBalancingV2SetSubnets() { #region elbv2-set-subnets-1 var response = client.SetSubnets(new SetSubnetsRequest { LoadBalancerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188", Subnets = new List <string> { "subnet-8360a9e7", "subnet-b7d581c0" } }); List <AvailabilityZone> availabilityZones = response.AvailabilityZones; #endregion }
private Amazon.ElasticLoadBalancingV2.Model.SetSubnetsResponse CallAWSServiceOperation(IAmazonElasticLoadBalancingV2 client, Amazon.ElasticLoadBalancingV2.Model.SetSubnetsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing V2", "SetSubnets"); try { #if DESKTOP return(client.SetSubnets(request)); #elif CORECLR return(client.SetSubnetsAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }