/AWS1/IF_ASC=>CREATEAUTOSCALINGGROUP()¶
About CreateAutoScalingGroup¶
We strongly recommend using a launch template when calling this operation to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.
Creates an Auto Scaling group with the specified name and attributes.
If you exceed your maximum limit of Auto Scaling groups, the call fails. To query this limit, call the DescribeAccountLimits API. For information about updating this limit, see Quotas for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
If you're new to Amazon EC2 Auto Scaling, see the introductory tutorials in Get started with Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Every Auto Scaling group has three size properties (DesiredCapacity,
MaxSize, and MinSize). Usually, you set these sizes based
on a specific number of instances. However, if you configure a mixed instances policy
that defines weights for the instance types, you must specify these sizes with the same
units that you use for weighting instances.
Method Signature¶
METHODS /AWS1/IF_ASC~CREATEAUTOSCALINGGROUP
IMPORTING
!IV_AUTOSCALINGGROUPNAME TYPE /AWS1/ASCXMLSTRINGMAXLEN255 OPTIONAL
!IV_LAUNCHCONFIGURATIONNAME TYPE /AWS1/ASCXMLSTRINGMAXLEN255 OPTIONAL
!IO_LAUNCHTEMPLATE TYPE REF TO /AWS1/CL_ASCLAUNCHTEMPLATESPEC OPTIONAL
!IO_MIXEDINSTANCESPOLICY TYPE REF TO /AWS1/CL_ASCMIXEDINSTSPOLICY OPTIONAL
!IV_INSTANCEID TYPE /AWS1/ASCXMLSTRINGMAXLEN19 OPTIONAL
!IV_MINSIZE TYPE /AWS1/ASCAUTOSCGROUPMINSIZE OPTIONAL
!IV_MAXSIZE TYPE /AWS1/ASCAUTOSCGROUPMAXSIZE OPTIONAL
!IV_DESIREDCAPACITY TYPE /AWS1/ASCAUTOSCGROUPDESIREDCAP OPTIONAL
!IV_DEFAULTCOOLDOWN TYPE /AWS1/ASCCOOLDOWN OPTIONAL
!IT_AVAILABILITYZONES TYPE /AWS1/CL_ASCAZS_W=>TT_AVAILABILITYZONES OPTIONAL
!IT_LOADBALANCERNAMES TYPE /AWS1/CL_ASCLOADBALANCERNAME00=>TT_LOADBALANCERNAMES OPTIONAL
!IT_TARGETGROUPARNS TYPE /AWS1/CL_ASCTARGETGROUPARNS_W=>TT_TARGETGROUPARNS OPTIONAL
!IV_HEALTHCHECKTYPE TYPE /AWS1/ASCXMLSTRINGMAXLEN32 OPTIONAL
!IV_HEALTHCHECKGRACEPERIOD TYPE /AWS1/ASCHEALTHCHECKGRACEPER OPTIONAL
!IV_PLACEMENTGROUP TYPE /AWS1/ASCXMLSTRINGMAXLEN255 OPTIONAL
!IV_VPCZONEIDENTIFIER TYPE /AWS1/ASCXMLSTRINGMAXLEN5000 OPTIONAL
!IT_TERMINATIONPOLICIES TYPE /AWS1/CL_ASCTERMINATIONPOL_W=>TT_TERMINATIONPOLICIES OPTIONAL
!IV_NEWINSTSPROTECTEDFRMSCA00 TYPE /AWS1/ASCINSTANCEPROTECTED OPTIONAL
!IV_CAPACITYREBALANCE TYPE /AWS1/ASCCAPREBALANCEENABLED OPTIONAL
!IT_LIFECYCLEHOOKSPECLIST TYPE /AWS1/CL_ASCLIFECYCLEHOOKSPEC=>TT_LIFECYCLEHOOKSPECIFICATIONS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_ASCTAG=>TT_TAGS OPTIONAL
!IV_SERVICELINKEDROLEARN TYPE /AWS1/ASCRESOURCENAME OPTIONAL
!IV_MAXINSTANCELIFETIME TYPE /AWS1/ASCMAXINSTANCELIFETIME OPTIONAL
!IV_CONTEXT TYPE /AWS1/ASCCONTEXT OPTIONAL
!IV_DESIREDCAPACITYTYPE TYPE /AWS1/ASCXMLSTRINGMAXLEN255 OPTIONAL
!IV_DEFAULTINSTANCEWARMUP TYPE /AWS1/ASCDEFAULTINSTANCEWARMUP OPTIONAL
!IT_TRAFFICSOURCES TYPE /AWS1/CL_ASCTRAFFICSOURCEID=>TT_TRAFFICSOURCES OPTIONAL
!IO_INSTANCEMAINTENANCEPOLICY TYPE REF TO /AWS1/CL_ASCINSTMAINTENANCEPLY OPTIONAL
!IO_AZDISTRIBUTION TYPE REF TO /AWS1/CL_ASCAZDISTRIBUTION OPTIONAL
!IO_AZIMPAIRMENTPOLICY TYPE REF TO /AWS1/CL_ASCAZIMPAIRMENTPOLICY OPTIONAL
!IV_SKIPZONALSHIFTVALIDATION TYPE /AWS1/ASCSKIPZONALSHIFTVALID00 OPTIONAL
!IO_CAPACITYRESERVATIONSPEC TYPE REF TO /AWS1/CL_ASCCAPACITYRSVPEC OPTIONAL
!IO_INSTANCELIFECYCLEPOLICY TYPE REF TO /AWS1/CL_ASCINSTANCELCPOLICY OPTIONAL
RAISING
/AWS1/CX_ASCALREADYEXISTSFAULT
/AWS1/CX_ASCLIMITEXCEEDEDFAULT
/AWS1/CX_ASCRESRCCONTIONFAULT
/AWS1/CX_ASCSVCLNKROLEFAILURE
/AWS1/CX_ASCCLIENTEXC
/AWS1/CX_ASCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_autoscalinggroupname TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255¶
The name of the Auto Scaling group. This name must be unique per Region per account.
The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.
You cannot use a colon (:) in the name.
iv_minsize TYPE /AWS1/ASCAUTOSCGROUPMINSIZE /AWS1/ASCAUTOSCGROUPMINSIZE¶
The minimum size of the group.
iv_maxsize TYPE /AWS1/ASCAUTOSCGROUPMAXSIZE /AWS1/ASCAUTOSCGROUPMAXSIZE¶
The maximum size of the group.
With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
MaxSizeto meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go aboveMaxSizeby more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).
Optional arguments:¶
iv_launchconfigurationname TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255¶
The name of the launch configuration to use to launch instances.
Conditional: You must specify either a launch template (
LaunchTemplateorMixedInstancesPolicy) or a launch configuration (LaunchConfigurationNameorInstanceId).
io_launchtemplate TYPE REF TO /AWS1/CL_ASCLAUNCHTEMPLATESPEC /AWS1/CL_ASCLAUNCHTEMPLATESPEC¶
Information used to specify the launch template and version to use to launch instances.
Conditional: You must specify either a launch template (
LaunchTemplateorMixedInstancesPolicy) or a launch configuration (LaunchConfigurationNameorInstanceId).The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
io_mixedinstancespolicy TYPE REF TO /AWS1/CL_ASCMIXEDINSTSPOLICY /AWS1/CL_ASCMIXEDINSTSPOLICY¶
The mixed instances policy. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide.
iv_instanceid TYPE /AWS1/ASCXMLSTRINGMAXLEN19 /AWS1/ASCXMLSTRINGMAXLEN19¶
The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 DescribeInstances API operation. For more information, see Create an Auto Scaling group using parameters from an existing instance in the Amazon EC2 Auto Scaling User Guide.
iv_desiredcapacity TYPE /AWS1/ASCAUTOSCGROUPDESIREDCAP /AWS1/ASCAUTOSCGROUPDESIREDCAP¶
The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure auto scaling. 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.
iv_defaultcooldown TYPE /AWS1/ASCCOOLDOWN /AWS1/ASCCOOLDOWN¶
Only needed if you use simple scaling policies.
The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Default:
300seconds
it_availabilityzones TYPE /AWS1/CL_ASCAZS_W=>TT_AVAILABILITYZONES TT_AVAILABILITYZONES¶
A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the
VPCZoneIdentifierproperty, or for attaching a network interface when an existing network interface ID is specified in a launch template.
it_loadbalancernames TYPE /AWS1/CL_ASCLOADBALANCERNAME00=>TT_LOADBALANCERNAMES TT_LOADBALANCERNAMES¶
A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the
TargetGroupARNsproperty instead.
it_targetgrouparns TYPE /AWS1/CL_ASCTARGETGROUPARNS_W=>TT_TARGETGROUPARNS TT_TARGETGROUPARNS¶
The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
iv_healthchecktype TYPE /AWS1/ASCXMLSTRINGMAXLEN32 /AWS1/ASCXMLSTRINGMAXLEN32¶
A comma-separated value string of one or more health check types.
The valid values are
EC2,EBS,ELB, andVPC_LATTICE.EC2is the default health check and cannot be disabled. For more information, see Health checks for instances in an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Only specify
EC2if you must clear a value that was previously set.
iv_healthcheckgraceperiod TYPE /AWS1/ASCHEALTHCHECKGRACEPER /AWS1/ASCHEALTHCHECKGRACEPER¶
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 and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the
InServicestate. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Default:
0seconds
iv_placementgroup TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255¶
The name of the placement group into which to launch your instances. For more information, see Placement groups in the Amazon EC2 User Guide.
A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
iv_vpczoneidentifier TYPE /AWS1/ASCXMLSTRINGMAXLEN5000 /AWS1/ASCXMLSTRINGMAXLEN5000¶
A comma-separated list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If you specify
VPCZoneIdentifierwithAvailabilityZones, the subnets that you specify must reside in those Availability Zones.
it_terminationpolicies TYPE /AWS1/CL_ASCTERMINATIONPOL_W=>TT_TERMINATIONPOLICIES TT_TERMINATIONPOLICIES¶
A policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see Configure termination policies for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Valid values:
Default|AllocationStrategy|ClosestToNextInstanceHour|NewestInstance|OldestInstance|OldestLaunchConfiguration|OldestLaunchTemplate|arn:aws:lambda:region:account-id:function:my-function:my-alias
iv_newinstsprotectedfrmsca00 TYPE /AWS1/ASCINSTANCEPROTECTED /AWS1/ASCINSTANCEPROTECTED¶
Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
iv_capacityrebalance TYPE /AWS1/ASCCAPREBALANCEENABLED /AWS1/ASCCAPREBALANCEENABLED¶
Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the in the Amazon EC2 Auto Scaling User Guide.
it_lifecyclehookspeclist TYPE /AWS1/CL_ASCLIFECYCLEHOOKSPEC=>TT_LIFECYCLEHOOKSPECIFICATIONS TT_LIFECYCLEHOOKSPECIFICATIONS¶
One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
it_tags TYPE /AWS1/CL_ASCTAG=>TT_TAGS TT_TAGS¶
One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.
iv_servicelinkedrolearn TYPE /AWS1/ASCRESOURCENAME /AWS1/ASCRESOURCENAME¶
The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named
AWSServiceRoleForAutoScaling, which it creates if it does not exist. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide.
iv_maxinstancelifetime TYPE /AWS1/ASCMAXINSTANCELIFETIME /AWS1/ASCMAXINSTANCELIFETIME¶
The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replace Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
iv_context TYPE /AWS1/ASCCONTEXT /AWS1/ASCCONTEXT¶
Reserved.
iv_desiredcapacitytype TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255¶
The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
DesiredCapacityTypefor attribute-based instance type selection only. For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.By default, Amazon EC2 Auto Scaling specifies
units, which translates into number of instances.Valid values:
units|vcpu|memory-mib
iv_defaultinstancewarmup TYPE /AWS1/ASCDEFAULTINSTANCEWARMUP /AWS1/ASCDEFAULTINSTANCEWARMUP¶
The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the
InServicestate.During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the property but specify
-1for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of0or other nominal value.Default: None
it_trafficsources TYPE /AWS1/CL_ASCTRAFFICSOURCEID=>TT_TRAFFICSOURCES TT_TRAFFICSOURCES¶
The list of traffic sources to attach to this Auto Scaling group. You can use any of the following as traffic sources for an Auto Scaling group: Classic Load Balancer, Application Load Balancer, Gateway Load Balancer, Network Load Balancer, and VPC Lattice.
io_instancemaintenancepolicy TYPE REF TO /AWS1/CL_ASCINSTMAINTENANCEPLY /AWS1/CL_ASCINSTMAINTENANCEPLY¶
An instance maintenance policy. For more information, see Set instance maintenance policy in the Amazon EC2 Auto Scaling User Guide.
io_azdistribution TYPE REF TO /AWS1/CL_ASCAZDISTRIBUTION /AWS1/CL_ASCAZDISTRIBUTION¶
The instance capacity distribution across Availability Zones.
io_azimpairmentpolicy TYPE REF TO /AWS1/CL_ASCAZIMPAIRMENTPOLICY /AWS1/CL_ASCAZIMPAIRMENTPOLICY¶
The policy for Availability Zone impairment.
iv_skipzonalshiftvalidation TYPE /AWS1/ASCSKIPZONALSHIFTVALID00 /AWS1/ASCSKIPZONALSHIFTVALID00¶
If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify
true. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.
io_capacityreservationspec TYPE REF TO /AWS1/CL_ASCCAPACITYRSVPEC /AWS1/CL_ASCCAPACITYRSVPEC¶
The capacity reservation specification for the Auto Scaling group.
io_instancelifecyclepolicy TYPE REF TO /AWS1/CL_ASCINSTANCELCPOLICY /AWS1/CL_ASCINSTANCELCPOLICY¶
The instance lifecycle policy for the Auto Scaling group. This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a
Retainedstate for manual intervention instead of automatic termination.Instances in a Retained state will continue to incur standard EC2 charges until terminated.
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
lo_client->createautoscalinggroup(
io_azdistribution = new /aws1/cl_ascazdistribution( |string| )
io_azimpairmentpolicy = new /aws1/cl_ascazimpairmentpolicy(
iv_impairedzonehealthcheck00 = |string|
iv_zonalshiftenabled = ABAP_TRUE
)
io_capacityreservationspec = new /aws1/cl_asccapacityrsvpec(
io_capacityreservationtarget = new /aws1/cl_asccapreservationtgt(
it_capacityreservationids = VALUE /aws1/cl_asccapreservationid00=>tt_capacityreservationids(
( new /aws1/cl_asccapreservationid00( |string| ) )
)
it_capreservationresrcgrarns = VALUE /aws1/cl_asccapreservationre00=>tt_capreservationresrcgrparns(
( new /aws1/cl_asccapreservationre00( |string| ) )
)
)
iv_capreservationpreference = |string|
)
io_instancelifecyclepolicy = new /aws1/cl_ascinstancelcpolicy( new /aws1/cl_ascretentiontriggers( |string| ) )
io_instancemaintenancepolicy = new /aws1/cl_ascinstmaintenanceply(
iv_maxhealthypercentage = 123
iv_minhealthypercentage = 123
)
io_launchtemplate = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplateid = |string|
iv_launchtemplatename = |string|
iv_version = |string|
)
io_mixedinstancespolicy = new /aws1/cl_ascmixedinstspolicy(
io_instancesdistribution = new /aws1/cl_ascinstsdistribution(
iv_ondemandallocstrategy = |string|
iv_ondemandbasecapacity = 123
iv_ondempercentageabovebas00 = 123
iv_spotallocationstrategy = |string|
iv_spotinstancepools = 123
iv_spotmaxprice = |string|
)
io_launchtemplate = new /aws1/cl_asclaunchtemplate(
io_launchtemplatespec = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplateid = |string|
iv_launchtemplatename = |string|
iv_version = |string|
)
it_overrides = VALUE /aws1/cl_asclaunchtmploverri00=>tt_overrides(
(
new /aws1/cl_asclaunchtmploverri00(
io_instancerequirements = new /aws1/cl_ascinstrequirements(
io_acceleratorcount = new /aws1/cl_ascacceleratorcntreq(
iv_max = 123
iv_min = 123
)
io_acceleratortotalmemorymib = new /aws1/cl_ascacceleratortotal00(
iv_max = 123
iv_min = 123
)
io_baselineebsbandwidthmbps = new /aws1/cl_ascbaselineebsbandw00(
iv_max = 123
iv_min = 123
)
io_baselineperformancefact00 = new /aws1/cl_ascbaselineperforma00(
io_cpu = new /aws1/cl_asccpuperformancefa00(
it_references = VALUE /aws1/cl_ascperformancefacto00=>tt_performancefactorreferenc00(
( new /aws1/cl_ascperformancefacto00( |string| ) )
)
)
)
io_memorygibpervcpu = new /aws1/cl_ascmemorygibpervcpu00(
iv_max = '0.1'
iv_min = '0.1'
)
io_memorymib = new /aws1/cl_ascmemorymibrequest(
iv_max = 123
iv_min = 123
)
io_networkbandwidthgbps = new /aws1/cl_ascnetworkbandwidth00(
iv_max = '0.1'
iv_min = '0.1'
)
io_networkinterfacecount = new /aws1/cl_ascnetworkinterface00(
iv_max = 123
iv_min = 123
)
io_totallocalstoragegb = new /aws1/cl_asctotallocalstrggb00(
iv_max = '0.1'
iv_min = '0.1'
)
io_vcpucount = new /aws1/cl_ascvcpucountrequest(
iv_max = 123
iv_min = 123
)
it_acceleratormanufacturers = VALUE /aws1/cl_ascacceleratormanuf00=>tt_acceleratormanufacturers(
( new /aws1/cl_ascacceleratormanuf00( |string| ) )
)
it_acceleratornames = VALUE /aws1/cl_ascacceleratornames_w=>tt_acceleratornames(
( new /aws1/cl_ascacceleratornames_w( |string| ) )
)
it_acceleratortypes = VALUE /aws1/cl_ascacceleratortypes_w=>tt_acceleratortypes(
( new /aws1/cl_ascacceleratortypes_w( |string| ) )
)
it_allowedinstancetypes = VALUE /aws1/cl_ascallowedinsttypes_w=>tt_allowedinstancetypes(
( new /aws1/cl_ascallowedinsttypes_w( |string| ) )
)
it_cpumanufacturers = VALUE /aws1/cl_asccpumanufacturers_w=>tt_cpumanufacturers(
( new /aws1/cl_asccpumanufacturers_w( |string| ) )
)
it_excludedinstancetypes = VALUE /aws1/cl_ascexcludedinsttype00=>tt_excludedinstancetypes(
( new /aws1/cl_ascexcludedinsttype00( |string| ) )
)
it_instancegenerations = VALUE /aws1/cl_ascinstgenerations_w=>tt_instancegenerations(
( new /aws1/cl_ascinstgenerations_w( |string| ) )
)
it_localstoragetypes = VALUE /aws1/cl_asclocalstrgtypes_w=>tt_localstoragetypes(
( new /aws1/cl_asclocalstrgtypes_w( |string| ) )
)
iv_baremetal = |string|
iv_burstableperformance = |string|
iv_localstorage = |string|
iv_maxspotpriceaspercentag00 = 123
iv_ondemmaxpricepercentage00 = 123
iv_requirehibernatesupport = ABAP_TRUE
iv_spotmaxpricepercentageo00 = 123
)
io_launchtemplatespec = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplateid = |string|
iv_launchtemplatename = |string|
iv_version = |string|
)
iv_imageid = |string|
iv_instancetype = |string|
iv_weightedcapacity = |string|
)
)
)
)
)
it_availabilityzones = VALUE /aws1/cl_ascazs_w=>tt_availabilityzones(
( new /aws1/cl_ascazs_w( |string| ) )
)
it_lifecyclehookspeclist = VALUE /aws1/cl_asclifecyclehookspec=>tt_lifecyclehookspecifications(
(
new /aws1/cl_asclifecyclehookspec(
iv_defaultresult = |string|
iv_heartbeattimeout = 123
iv_lifecyclehookname = |string|
iv_lifecycletransition = |string|
iv_notificationmetadata = |string|
iv_notificationtargetarn = |string|
iv_rolearn = |string|
)
)
)
it_loadbalancernames = VALUE /aws1/cl_ascloadbalancername00=>tt_loadbalancernames(
( new /aws1/cl_ascloadbalancername00( |string| ) )
)
it_tags = VALUE /aws1/cl_asctag=>tt_tags(
(
new /aws1/cl_asctag(
iv_key = |string|
iv_propagateatlaunch = ABAP_TRUE
iv_resourceid = |string|
iv_resourcetype = |string|
iv_value = |string|
)
)
)
it_targetgrouparns = VALUE /aws1/cl_asctargetgrouparns_w=>tt_targetgrouparns(
( new /aws1/cl_asctargetgrouparns_w( |string| ) )
)
it_terminationpolicies = VALUE /aws1/cl_ascterminationpol_w=>tt_terminationpolicies(
( new /aws1/cl_ascterminationpol_w( |string| ) )
)
it_trafficsources = VALUE /aws1/cl_asctrafficsourceid=>tt_trafficsources(
(
new /aws1/cl_asctrafficsourceid(
iv_identifier = |string|
iv_type = |string|
)
)
)
iv_autoscalinggroupname = |string|
iv_capacityrebalance = ABAP_TRUE
iv_context = |string|
iv_defaultcooldown = 123
iv_defaultinstancewarmup = 123
iv_desiredcapacity = 123
iv_desiredcapacitytype = |string|
iv_healthcheckgraceperiod = 123
iv_healthchecktype = |string|
iv_instanceid = |string|
iv_launchconfigurationname = |string|
iv_maxinstancelifetime = 123
iv_maxsize = 123
iv_minsize = 123
iv_newinstsprotectedfrmsca00 = ABAP_TRUE
iv_placementgroup = |string|
iv_servicelinkedrolearn = |string|
iv_skipzonalshiftvalidation = ABAP_TRUE
iv_vpczoneidentifier = |string|
).
To create an Auto Scaling group with an attached target group¶
This example creates an Auto Scaling group and attaches the specified target group.
lo_client->createautoscalinggroup(
io_launchtemplate = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplatename = |my-template-for-auto-scaling|
iv_version = |$Default|
)
it_targetgrouparns = VALUE /aws1/cl_asctargetgrouparns_w=>tt_targetgrouparns(
( new /aws1/cl_asctargetgrouparns_w( |arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067| ) )
)
iv_autoscalinggroupname = |my-auto-scaling-group|
iv_healthcheckgraceperiod = 300
iv_healthchecktype = |ELB|
iv_maxsize = 3
iv_minsize = 1
iv_vpczoneidentifier = |subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE|
).
To create an Auto Scaling group with a mixed instances policy¶
This example creates an Auto Scaling group with a mixed instances policy. It specifies the c5.large, c5a.large, and c6g.large instance types and defines a different launch template for the c6g.large instance type.
lo_client->createautoscalinggroup(
io_mixedinstancespolicy = new /aws1/cl_ascmixedinstspolicy(
io_instancesdistribution = new /aws1/cl_ascinstsdistribution(
iv_ondemandbasecapacity = 1
iv_ondempercentageabovebas00 = 50
iv_spotallocationstrategy = |price-capacity-optimized|
)
io_launchtemplate = new /aws1/cl_asclaunchtemplate(
io_launchtemplatespec = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplatename = |my-launch-template-for-x86|
iv_version = |$Default|
)
it_overrides = VALUE /aws1/cl_asclaunchtmploverri00=>tt_overrides(
(
new /aws1/cl_asclaunchtmploverri00(
io_launchtemplatespec = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplatename = |my-launch-template-for-arm|
iv_version = |$Default|
)
iv_instancetype = |c6g.large|
)
)
( new /aws1/cl_asclaunchtmploverri00( iv_instancetype = |c5.large| ) )
( new /aws1/cl_asclaunchtmploverri00( iv_instancetype = |c5a.large| ) )
)
)
)
iv_autoscalinggroupname = |my-asg|
iv_desiredcapacity = 3
iv_maxsize = 5
iv_minsize = 1
iv_vpczoneidentifier = |subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE|
).
To create an Auto Scaling group using attribute-based instance type selection¶
This example creates an Auto Scaling group using attribute-based instance type selection. It requires the instance types to have a minimum of four vCPUs and a maximum of eight vCPUs, a minimum of 16,384 MiB of memory, and an Intel manufactured CPU.
lo_client->createautoscalinggroup(
io_mixedinstancespolicy = new /aws1/cl_ascmixedinstspolicy(
io_instancesdistribution = new /aws1/cl_ascinstsdistribution(
iv_ondempercentageabovebas00 = 50
iv_spotallocationstrategy = |price-capacity-optimized|
)
io_launchtemplate = new /aws1/cl_asclaunchtemplate(
io_launchtemplatespec = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplatename = |my-template-for-auto-scaling|
iv_version = |$Default|
)
it_overrides = VALUE /aws1/cl_asclaunchtmploverri00=>tt_overrides(
(
new /aws1/cl_asclaunchtmploverri00(
io_instancerequirements = new /aws1/cl_ascinstrequirements(
io_memorymib = new /aws1/cl_ascmemorymibrequest( iv_min = 16384 )
io_vcpucount = new /aws1/cl_ascvcpucountrequest(
iv_max = 8
iv_min = 4
)
it_cpumanufacturers = VALUE /aws1/cl_asccpumanufacturers_w=>tt_cpumanufacturers(
( new /aws1/cl_asccpumanufacturers_w( |intel| ) )
)
)
)
)
)
)
)
iv_autoscalinggroupname = |my-asg|
iv_desiredcapacity = 4
iv_desiredcapacitytype = |units|
iv_maxsize = 100
iv_minsize = 0
iv_vpczoneidentifier = |subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE|
).
To create an Auto Scaling group¶
This example creates an Auto Scaling group.
lo_client->createautoscalinggroup(
io_launchtemplate = new /aws1/cl_asclaunchtemplatespec(
iv_launchtemplatename = |my-template-for-auto-scaling|
iv_version = |$Default|
)
iv_autoscalinggroupname = |my-auto-scaling-group|
iv_defaultinstancewarmup = 120
iv_maxinstancelifetime = 2592000
iv_maxsize = 3
iv_minsize = 1
iv_vpczoneidentifier = |subnet-057fa0918fEXAMPLE|
).