private Amazon.ElasticLoadBalancing.Model.AddTagsResponse CallAWSServiceOperation(IAmazonElasticLoadBalancing client, Amazon.ElasticLoadBalancing.Model.AddTagsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing", "AddTags"); try { #if DESKTOP return(client.AddTags(request)); #elif CORECLR return(client.AddTagsAsync(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; } }
public void ElasticLoadBalancingAddTags() { #region elb-add-tags-1 var response = client.AddTags(new AddTagsRequest { LoadBalancerNames = new List <string> { "my-load-balancer" }, Tags = new List <Tag> { new Tag { Key = "project", Value = "lima" }, new Tag { Key = "department", Value = "digital-media" } } }); #endregion }