public void ElasticLoadBalancingCreateLoadBalancerPolicy() { #region elb-create-load-balancer-policy-1 var response = client.CreateLoadBalancerPolicy(new CreateLoadBalancerPolicyRequest { LoadBalancerName = "my-load-balancer", PolicyAttributes = new List <PolicyAttribute> { new PolicyAttribute { AttributeName = "ProxyProtocol", AttributeValue = "true" } }, PolicyName = "my-ProxyProtocol-policy", PolicyTypeName = "ProxyProtocolPolicyType" }); #endregion }
private Amazon.ElasticLoadBalancing.Model.CreateLoadBalancerPolicyResponse CallAWSServiceOperation(IAmazonElasticLoadBalancing client, Amazon.ElasticLoadBalancing.Model.CreateLoadBalancerPolicyRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing", "CreateLoadBalancerPolicy"); try { #if DESKTOP return(client.CreateLoadBalancerPolicy(request)); #elif CORECLR return(client.CreateLoadBalancerPolicyAsync(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; } }