AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateAutoScalingGroupInput

import "github.com/aws/aws-sdk-go/service/autoscaling"

type CreateAutoScalingGroupInput struct { AutoScalingGroupName *string `min:"1" type:"string" required:"true"` AvailabilityZones []*string `min:"1" type:"list"` DefaultCooldown *int64 `type:"integer"` DesiredCapacity *int64 `type:"integer"` HealthCheckGracePeriod *int64 `type:"integer"` HealthCheckType *string `min:"1" type:"string"` InstanceId *string `min:"1" type:"string"` LaunchConfigurationName *string `min:"1" type:"string"` LaunchTemplate *LaunchTemplateSpecification `type:"structure"` LifecycleHookSpecificationList []*LifecycleHookSpecification `type:"list"` LoadBalancerNames []*string `type:"list"` MaxSize *int64 `type:"integer" required:"true"` MinSize *int64 `type:"integer" required:"true"` MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` NewInstancesProtectedFromScaleIn *bool `type:"boolean"` PlacementGroup *string `min:"1" type:"string"` ServiceLinkedRoleARN *string `min:"1" type:"string"` Tags []*Tag `type:"list"` TargetGroupARNs []*string `type:"list"` TerminationPolicies []*string `type:"list"` VPCZoneIdentifier *string `min:"1" type:"string"` }

AutoScalingGroupName

Type: *string

The name of the Auto Scaling group. This name must be unique within the scope of your AWS account.

AutoScalingGroupName is a required field

AvailabilityZones

Type: []*string

One or more Availability Zones for the group. This parameter is optional if you specify one or more subnets.

DefaultCooldown

Type: *int64

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. The default is 300.

For more information, see Scaling Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the Amazon EC2 Auto Scaling User Guide.

DesiredCapacity

Type: *int64

The number of EC2 instances that should be running in the group. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.

HealthCheckGracePeriod

Type: *int64

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service. During this time, any health check failures for the instance are ignored. The default is 0.

This parameter is required if you are adding an ELB health check.

For more information, see Health Checks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the Amazon EC2 Auto Scaling User Guide.

HealthCheckType

Type: *string

The service to use for the health checks. The valid values are EC2 and ELB.

By default, health checks use Amazon EC2 instance status checks to determine the health of an instance. For more information, see Health Checks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the Amazon EC2 Auto Scaling User Guide.

InstanceId

Type: *string

The ID of the instance used to create a launch configuration for the group. This parameter, a launch configuration, a launch template, or a mixed instances policy must be specified.

When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a new launch configuration and associates it with the group. This launch configuration derives its attributes from the specified instance, except for the block device mapping.

For more information, see Create an Auto Scaling Group Using an EC2 Instance (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) in the Amazon EC2 Auto Scaling User Guide.

LaunchConfigurationName

Type: *string

The name of the launch configuration. This parameter, a launch template, a mixed instances policy, or an EC2 instance must be specified.

LaunchTemplate

Describes a launch template and the launch template version.

The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see Creating a Launch Template for an Auto Scaling group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) in the Amazon EC2 Auto Scaling User Guide.

LifecycleHookSpecificationList

Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you want to perform an action whenever it launches instances or whenever it terminates instances.

For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in the Amazon EC2 Auto Scaling User Guide.

LoadBalancerNames

Type: []*string

One or more Classic Load Balancers. To specify an Application Load Balancer or a Network Load Balancer, use TargetGroupARNs instead.

For more information, see Using a Load Balancer With an Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) in the Amazon EC2 Auto Scaling User Guide.

MaxSize

Type: *int64

The maximum size of the group.

MaxSize is a required field

MinSize

Type: *int64

The minimum size of the group.

MinSize is a required field

MixedInstancesPolicy

Describes a mixed instances policy for an Auto Scaling group. With mixed instances, your Auto Scaling group can provision a combination of On-Demand Instances and Spot Instances across multiple instance types. For more information, see Using Multiple Instance Types and Purchase Options (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html#asg-purchase-options) in the Amazon EC2 Auto Scaling User Guide.

When you create your Auto Scaling group, you can specify a launch configuration or template as a parameter for the top-level object, or you can specify a mixed instances policy, but not both at the same time.

NewInstancesProtectedFromScaleIn

Type: *bool

Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.

For more information about preventing instances from terminating on scale in, see Instance Protection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the Amazon EC2 Auto Scaling User Guide.

PlacementGroup

Type: *string

The name of the placement group into which to launch your instances, if any. For more information, see Placement Groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the Amazon EC2 User Guide for Linux Instances.

ServiceLinkedRoleARN

Type: *string

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, which it creates if it does not exist.

Tags

Describes a tag for an Auto Scaling group.

TargetGroupARNs

Type: []*string

The Amazon Resource Names (ARN) of the target groups.

TerminationPolicies

Type: []*string

One or more termination policies used to select the instance to terminate. These policies are executed in the order that they are listed.

For more information, see Controlling Which Instances Auto Scaling Terminates During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) in the Amazon EC2 Auto Scaling User Guide.

VPCZoneIdentifier

Type: *string

A comma-separated list of subnet identifiers for your virtual private cloud (VPC).

If you specify subnets and Availability Zones with this call, ensure that the subnets' Availability Zones match the Availability Zones specified.

For more information, see Launching Auto Scaling Instances in a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) in the Amazon EC2 Auto Scaling User Guide.

Method

GoString

func (s CreateAutoScalingGroupInput) GoString() string

GoString returns the string representation

SetAutoScalingGroupName

func (s *CreateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *CreateAutoScalingGroupInput

SetAutoScalingGroupName sets the AutoScalingGroupName field's value.

SetAvailabilityZones

func (s *CreateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *CreateAutoScalingGroupInput

SetAvailabilityZones sets the AvailabilityZones field's value.

SetDefaultCooldown

func (s *CreateAutoScalingGroupInput) SetDefaultCooldown(v int64) *CreateAutoScalingGroupInput

SetDefaultCooldown sets the DefaultCooldown field's value.

SetDesiredCapacity

func (s *CreateAutoScalingGroupInput) SetDesiredCapacity(v int64) *CreateAutoScalingGroupInput

SetDesiredCapacity sets the DesiredCapacity field's value.

SetHealthCheckGracePeriod

func (s *CreateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *CreateAutoScalingGroupInput

SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.

SetHealthCheckType

func (s *CreateAutoScalingGroupInput) SetHealthCheckType(v string) *CreateAutoScalingGroupInput

SetHealthCheckType sets the HealthCheckType field's value.

SetInstanceId

func (s *CreateAutoScalingGroupInput) SetInstanceId(v string) *CreateAutoScalingGroupInput

SetInstanceId sets the InstanceId field's value.

SetLaunchConfigurationName

func (s *CreateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *CreateAutoScalingGroupInput

SetLaunchConfigurationName sets the LaunchConfigurationName field's value.

SetLaunchTemplate

func (s *CreateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *CreateAutoScalingGroupInput

SetLaunchTemplate sets the LaunchTemplate field's value.

SetLifecycleHookSpecificationList

func (s *CreateAutoScalingGroupInput) SetLifecycleHookSpecificationList(v []*LifecycleHookSpecification) *CreateAutoScalingGroupInput

SetLifecycleHookSpecificationList sets the LifecycleHookSpecificationList field's value.

SetLoadBalancerNames

func (s *CreateAutoScalingGroupInput) SetLoadBalancerNames(v []*string) *CreateAutoScalingGroupInput

SetLoadBalancerNames sets the LoadBalancerNames field's value.

SetMaxSize

func (s *CreateAutoScalingGroupInput) SetMaxSize(v int64) *CreateAutoScalingGroupInput

SetMaxSize sets the MaxSize field's value.

SetMinSize

func (s *CreateAutoScalingGroupInput) SetMinSize(v int64) *CreateAutoScalingGroupInput

SetMinSize sets the MinSize field's value.

SetMixedInstancesPolicy

func (s *CreateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *CreateAutoScalingGroupInput

SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.

SetNewInstancesProtectedFromScaleIn

func (s *CreateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *CreateAutoScalingGroupInput

SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.

SetPlacementGroup

func (s *CreateAutoScalingGroupInput) SetPlacementGroup(v string) *CreateAutoScalingGroupInput

SetPlacementGroup sets the PlacementGroup field's value.

SetServiceLinkedRoleARN

func (s *CreateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *CreateAutoScalingGroupInput

SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.

SetTags

func (s *CreateAutoScalingGroupInput) SetTags(v []*Tag) *CreateAutoScalingGroupInput

SetTags sets the Tags field's value.

SetTargetGroupARNs

func (s *CreateAutoScalingGroupInput) SetTargetGroupARNs(v []*string) *CreateAutoScalingGroupInput

SetTargetGroupARNs sets the TargetGroupARNs field's value.

SetTerminationPolicies

func (s *CreateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *CreateAutoScalingGroupInput

SetTerminationPolicies sets the TerminationPolicies field's value.

SetVPCZoneIdentifier

func (s *CreateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *CreateAutoScalingGroupInput

SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.

String

func (s CreateAutoScalingGroupInput) String() string

String returns the string representation

Validate

func (s *CreateAutoScalingGroupInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: