IntegrationsAwsActions
Stop EC2 instances
Stop up to 50 EC2 instances without force, hibernate, or skip-OS-shutdown flags. Unsafe with one SDK attempt. Requires ec2:StopInstances.
ec2.instances.stop · AWS · v1
Details
Scopes
ec2:StopInstances
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
instance_ids | array<string> | Yes | minItems 1; maxItems 50 |
instance_ids[] | string | Yes | minLength 10; maxLength 32; pattern ^i-[0-9a-fA-F]{8,17}$ |
region | string | No | enum us-east-1 | us-east-2 | us-west-1 | us-west-2 | af-south-1 | ap-east-1 | ap-east-2 | ap-south-1 | ap-south-2 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-southeast-4 | ap-southeast-5 | ap-southeast-6 | ap-southeast-7 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | ca-central-1 | ca-west-1 | eu-central-1 | eu-central-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-north-1 | eu-south-1 | eu-south-2 | il-central-1 | me-central-1 | me-south-1 | mx-central-1 | sa-east-1 |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
instances | array<object> | Yes | maxItems 50 |
instances[] | object | Yes | additionalProperties false |
instances[].resource_id | string | Yes | minLength 10; maxLength 32; pattern ^i-[0-9a-fA-F]{8,17}$ |
instances[].previous_state | string | No | minLength 1; maxLength 64 |
instances[].current_state | string | Yes | minLength 1; maxLength 64 |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"instance_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 10,
"maxLength": 32,
"pattern": "^i-[0-9a-fA-F]{8,17}$"
},
"minItems": 1,
"maxItems": 50
},
"region": {
"type": "string",
"enum": [
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"af-south-1",
"ap-east-1",
"ap-east-2",
"ap-south-1",
"ap-south-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-southeast-4",
"ap-southeast-5",
"ap-southeast-6",
"ap-southeast-7",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ca-central-1",
"ca-west-1",
"eu-central-1",
"eu-central-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
"eu-south-1",
"eu-south-2",
"il-central-1",
"me-central-1",
"me-south-1",
"mx-central-1",
"sa-east-1"
]
}
},
"required": [
"instance_ids"
]
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"instances": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"resource_id": {
"type": "string",
"minLength": 10,
"maxLength": 32,
"pattern": "^i-[0-9a-fA-F]{8,17}$"
},
"previous_state": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"current_state": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"resource_id",
"current_state"
]
},
"maxItems": 50
}
},
"required": [
"instances"
]
}