public void ApplicationAutoScalingRegisterScalableTarget() { #region to-register-a-new-scalable-target-1470864910380 var response = client.RegisterScalableTarget(new RegisterScalableTargetRequest { MaxCapacity = 10, MinCapacity = 1, ResourceId = "service/default/web-app", ScalableDimension = "ecs:service:DesiredCount", ServiceNamespace = "ecs" }); #endregion }
private Amazon.ApplicationAutoScaling.Model.RegisterScalableTargetResponse CallAWSServiceOperation(IAmazonApplicationAutoScaling client, Amazon.ApplicationAutoScaling.Model.RegisterScalableTargetRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Application Auto Scaling", "RegisterScalableTarget"); try { #if DESKTOP return(client.RegisterScalableTarget(request)); #elif CORECLR return(client.RegisterScalableTargetAsync(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; } }