./knowledge-base/lambda/layers/common/python/botocore/data/autoscaling/2011-01-01/examples-1.json
{
"version": "1.0",
"examples": {
"AttachInstances": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"InstanceIds": [
"i-93633f9b"
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example attaches the specified instance to the specified Auto Scaling group.",
"id": "autoscaling-attach-instances-1",
"title": "To attach an instance to an Auto Scaling group"
}
],
"AttachLoadBalancerTargetGroups": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"TargetGroupARNs": [
"arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example attaches the specified target group to the specified Auto Scaling group.",
"id": "autoscaling-attach-load-balancer-target-groups-1",
"title": "To attach a target group to an Auto Scaling group"
}
],
"AttachLoadBalancers": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"LoadBalancerNames": [
"my-load-balancer"
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example attaches the specified load balancer to the specified Auto Scaling group.",
"id": "autoscaling-attach-load-balancers-1",
"title": "To attach a load balancer to an Auto Scaling group"
}
],
"AttachTrafficSources": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"TrafficSources": [
{
"Identifier": "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"
}
]
},
"output": {
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example attaches the specified target group to the specified Auto Scaling group.",
"id": "to-attach-a-target-group-to-an-auto-scaling-group-1680036570089",
"title": "To attach a target group to an Auto Scaling group"
}
],
"CancelInstanceRefresh": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group"
},
"output": {
"InstanceRefreshId": "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example cancels an instance refresh operation in progress.",
"id": "to-cancel-an-instance-refresh-1592960979817",
"title": "To cancel an instance refresh"
}
],
"CompleteLifecycleAction": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"LifecycleActionResult": "CONTINUE",
"LifecycleActionToken": "bcd2f1b8-9a78-44d3-8a7a-4dd07d7cf635",
"LifecycleHookName": "my-lifecycle-hook"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example notifies Auto Scaling that the specified lifecycle action is complete so that it can finish launching or terminating the instance.",
"id": "autoscaling-complete-lifecycle-action-1",
"title": "To complete the lifecycle action"
}
],
"CreateAutoScalingGroup": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"DefaultInstanceWarmup": 120,
"LaunchTemplate": {
"LaunchTemplateName": "my-template-for-auto-scaling",
"Version": "$Default"
},
"MaxInstanceLifetime": 2592000,
"MaxSize": 3,
"MinSize": 1,
"VPCZoneIdentifier": "subnet-057fa0918fEXAMPLE"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example creates an Auto Scaling group.",
"id": "autoscaling-create-auto-scaling-group-1",
"title": "To create an Auto Scaling group"
},
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"HealthCheckGracePeriod": 300,
"HealthCheckType": "ELB",
"LaunchTemplate": {
"LaunchTemplateName": "my-template-for-auto-scaling",
"Version": "$Default"
},
"MaxSize": 3,
"MinSize": 1,
"TargetGroupARNs": [
"arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"
],
"VPCZoneIdentifier": "subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example creates an Auto Scaling group and attaches the specified target group.",
"id": "autoscaling-create-auto-scaling-group-2",
"title": "To create an Auto Scaling group with an attached target group"
},
{
"input": {
"AutoScalingGroupName": "my-asg",
"DesiredCapacity": 3,
"MaxSize": 5,
"MinSize": 1,
"MixedInstancesPolicy": {
"InstancesDistribution": {
"OnDemandBaseCapacity": 1,
"OnDemandPercentageAboveBaseCapacity": 50,
"SpotAllocationStrategy": "price-capacity-optimized"
},
"LaunchTemplate": {
"LaunchTemplateSpecification": {
"LaunchTemplateName": "my-launch-template-for-x86",
"Version": "$Default"
},
"Overrides": [
{
"InstanceType": "c6g.large",
"LaunchTemplateSpecification": {
"LaunchTemplateName": "my-launch-template-for-arm",
"Version": "$Default"
}
},
{
"InstanceType": "c5.large"
},
{
"InstanceType": "c5a.large"
}
]
}
},
"VPCZoneIdentifier": "subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "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.",
"id": "autoscaling-create-auto-scaling-group-3",
"title": "To create an Auto Scaling group with a mixed instances policy"
},
{
"input": {
"AutoScalingGroupName": "my-asg",
"DesiredCapacity": 4,
"DesiredCapacityType": "units",
"MaxSize": 100,
"MinSize": 0,
"MixedInstancesPolicy": {
"InstancesDistribution": {
"OnDemandPercentageAboveBaseCapacity": 50,
"SpotAllocationStrategy": "price-capacity-optimized"
},
"LaunchTemplate": {
"LaunchTemplateSpecification": {
"LaunchTemplateName": "my-template-for-auto-scaling",
"Version": "$Default"
},
"Overrides": [
{
"InstanceRequirements": {
"CpuManufacturers": [
"intel"
],
"MemoryMiB": {
"Min": 16384
},
"VCpuCount": {
"Max": 8,
"Min": 4
}
}
}
]
}
},
"VPCZoneIdentifier": "subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "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.",
"id": "autoscaling-create-auto-scaling-group-4",
"title": "To create an Auto Scaling group using attribute-based instance type selection"
}
],
"CreateLaunchConfiguration": [
{
"input": {
"IamInstanceProfile": "my-iam-role",
"ImageId": "ami-12345678",
"InstanceType": "m3.medium",
"LaunchConfigurationName": "my-launch-config",
"SecurityGroups": [
"sg-eb2af88e"
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example creates a launch configuration.",
"id": "autoscaling-create-launch-configuration-1",
"title": "To create a launch configuration"
}
],
"CreateOrUpdateTags": [
{
"input": {
"Tags": [
{
"Key": "Role",
"PropagateAtLaunch": true,
"ResourceId": "my-auto-scaling-group",
"ResourceType": "auto-scaling-group",
"Value": "WebServer"
},
{
"Key": "Dept",
"PropagateAtLaunch": true,
"ResourceId": "my-auto-scaling-group",
"ResourceType": "auto-scaling-group",
"Value": "Research"
}
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example adds two tags to the specified Auto Scaling group.",
"id": "autoscaling-create-or-update-tags-1",
"title": "To create or update tags for an Auto Scaling group"
}
],
"DeleteAutoScalingGroup": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified Auto Scaling group.",
"id": "autoscaling-delete-auto-scaling-group-1",
"title": "To delete an Auto Scaling group"
},
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"ForceDelete": true
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified Auto Scaling group and all its instances.",
"id": "autoscaling-delete-auto-scaling-group-2",
"title": "To delete an Auto Scaling group and all its instances"
}
],
"DeleteLaunchConfiguration": [
{
"input": {
"LaunchConfigurationName": "my-launch-config"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified launch configuration.",
"id": "autoscaling-delete-launch-configuration-1",
"title": "To delete a launch configuration"
}
],
"DeleteLifecycleHook": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"LifecycleHookName": "my-lifecycle-hook"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified lifecycle hook.",
"id": "autoscaling-delete-lifecycle-hook-1",
"title": "To delete a lifecycle hook"
}
],
"DeleteNotificationConfiguration": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"TopicARN": "arn:aws:sns:us-west-2:123456789012:my-sns-topic"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified notification from the specified Auto Scaling group.",
"id": "autoscaling-delete-notification-configuration-1",
"title": "To delete an Auto Scaling notification"
}
],
"DeletePolicy": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"PolicyName": "my-step-scale-out-policy"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified Auto Scaling policy.",
"id": "autoscaling-delete-policy-1",
"title": "To delete an Auto Scaling policy"
}
],
"DeleteScheduledAction": [
{
"input": {
"AutoScalingGroupName": "my-auto-scaling-group",
"ScheduledActionName": "my-scheduled-action"
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified scheduled action from the specified Auto Scaling group.",
"id": "autoscaling-delete-scheduled-action-1",
"title": "To delete a scheduled action from an Auto Scaling group"
}
],
"DeleteTags": [
{
"input": {
"Tags": [
{
"Key": "Dept",
"ResourceId": "my-auto-scaling-group",
"ResourceType": "auto-scaling-group",
"Value": "Research"
}
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example deletes the specified tag from the specified Auto Scaling group.",
"id": "autoscaling-delete-tags-1",
"title": "To delete a tag from an Auto Scaling group"
}
],
"DescribeAccountLimits": [
{
"output": {
"MaxNumberOfAutoScalingGroups": 20,
"MaxNumberOfLaunchConfigurations": 100,
"NumberOfAutoScalingGroups": 3,
"NumberOfLaunchConfigurations": 5
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example describes the Amazon EC2 Auto Scaling service quotas for your account.",
"id": "autoscaling-describe-account-limits-1",
"title": "To describe your Auto Scaling account limits"
}
],
"DescribeAdjustmentTypes": [
{
"output": {
"AdjustmentTypes": [
{
"AdjustmentType": "ChangeInCapacity"
},
{
"AdjustmentType": "ExactCapcity"
},
{
"AdjustmentType": "PercentChangeInCapacity"
}
]
},
"comments": {
"input": {
},
"output": {
}
},
"description": "This example describes the available adjustment types.",
"id": "autoscaling-describe-adjustment-types-1",
"title": "To describe the Amazon EC2 Auto Scaling adjustment types"
}