public void AutoScalingCreateAutoScalingGroup()
        {
            #region autoscaling-create-auto-scaling-group-1

            var response = client.CreateAutoScalingGroup(new CreateAutoScalingGroupRequest
            {
                AutoScalingGroupName    = "my-auto-scaling-group",
                LaunchConfigurationName = "my-launch-config",
                MaxSize           = 3,
                MinSize           = 1,
                VPCZoneIdentifier = "subnet-4176792c"
            });


            #endregion
        }
        public void AutoScalingCreateAutoScalingGroup()
        {
            #region autoscaling-create-auto-scaling-group-1

            var response = client.CreateAutoScalingGroup(new CreateAutoScalingGroupRequest
            {
                AutoScalingGroupName = "my-auto-scaling-group",
                LaunchTemplate       = new LaunchTemplateSpecification {
                    LaunchTemplateId = "lt-0a20c965061f64abc",
                    Version          = "$Latest"
                },
                MaxInstanceLifetime = 2592000,
                MaxSize             = 3,
                MinSize             = 1,
                VPCZoneIdentifier   = "subnet-057fa0918fEXAMPLE"
            });


            #endregion
        }
Exemplo n.º 3
0
 private Amazon.AutoScaling.Model.CreateAutoScalingGroupResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.CreateAutoScalingGroupRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "CreateAutoScalingGroup");
     try
     {
         #if DESKTOP
         return(client.CreateAutoScalingGroup(request));
         #elif CORECLR
         return(client.CreateAutoScalingGroupAsync(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;
     }
 }