3.4.1 Delete a virtual server
Function
This service template can delete instances from an Amazon EC2 environment. In addition, the template can delete all network interfaces connected to the instance.
The required server is shown as follows:
- AWS control server (execution-target server)
This is a server on which AWS Tools for Windows PowerShell (hereinafter referred to as "AWS Tools") is installed. This product can forward plugins to the server to be executed.
- Instance
This is a regular virtual server in an Amazon EC2 environment.
General processing is as follows:
(1) Deletes an instance that was set to the instance ID (the aws.instanceId property)
(2) Deletes all network interfaces connected to the instance.
Notes on property settings are described as follows:
(1) To delete an instance, wait for seconds specified in the aws.checkInstanceDeletionInterval property that indicates an interval for checking the completion of deleting the instance, and then repeat the number of times specified in the aws.checkInstanceDeletionCount property that indicates how many times the completion of deleting the instance is checked. If necessary, modify the property values to adjust your system environment.
Prerequisites
For the most recent information about the prerequisite product in the system, prerequisite products on the execution-target server for the service templates, supported OSs for the prerequisite products on the execution-target server for the service templates, and prerequisite products on the execution-target system for the service templates, see the Release Notes.
Prerequisite product in the system:
JP1/Automatic Operation 12-00 or later
Prerequisite products on the execution-target server for the service template:
- AWS Tools for Windows PowerShell
- Microsoft .Net Framework 3.5 or later
Supported OSs for the prerequisite products on the execution-target server for the service template:
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
Note: A Server Core installation environment is out of scope.
Prerequisite products in the execution-target system for the service template:
(1) Prerequisite OSs for an instance
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
- Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
- Red Hat Enterprise Linux Server 7 (64-bit x86_64)
- Red Hat Enterprise Linux Server 8 (64-bit x86_64)
Conditions for using the prerequisite products in the execution-target system for the service template:
(1) Conditions for this product
- To execute this service, the execution-target server must have been set as the agentless connection destination. If you use a local server as the execution-target server, you need to specify a loopback address that can be resolved by "localhost".
Cautions
(1) An instance will be deleted even if a user logs in to the instance.
(2) The deleted instance will be displayed on the console for a certain duration, and its status can be obtained. However, the instance can no longer be started.
(3) If deleting an instance abnormally ends with the return value of 1 (/awsDeleteVM step), network interfaces that could not be deleted will remain.
Execution privilege
(1) The policy must be set to allow an IAM user to log in to AWS to perform the following actions:
- Deleting instances and obtaining instance statuses
- Deleting network interfaces and obtaining interface statuses.
Version
02.00.01
Tags
Delete VM,AWS
Property list
The following shows the list of the property groups set in the property:
Property group |
Description |
Initial display |
---|---|---|
Virtual system environment information |
Specify the AWS information. |
Y |
Instance information |
Specify the information about the instance to be deleted. |
Y |
Execute option |
This property checks the instance status when deleting instances. If necessary, modify the property. |
N |
The following shows the list of the properties to be displayed in the "Service Definition" window:
- (Legend)
-
R: The property must be specified.
O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
aws.targetHost |
Host name of the AWS control server |
Specify the host name or IP address of the AWS control server. IPv6 address is not supported. |
Input |
Disabled |
R |
Virtual system environment information |
aws.accessKeyId |
Access key ID |
Specify the access key ID for connecting to AWS. |
Input |
Disabled |
R |
Virtual system environment information |
aws.secretAccessKey |
Secret access key |
Specify the secret access key for connecting to AWS. |
Input |
Disabled |
R |
Virtual system environment information |
aws.region |
Region |
Specify an AWS region that is a connection destination. |
Input |
Disabled |
R |
Virtual system environment information |
aws.checkInstanceDeletionCount |
Instance status (deleted) check count |
Specify the number of times to check for instance deletion. The maximum waiting time is determined by combining this count and the instance status (deleted) check interval. This property is also used to check the completion of deleting network interfaces. |
Input |
Disabled |
R |
Execute option |
aws.checkInstanceDeletionInterval |
Instance status (deleted) check interval |
Specifies an interval in seconds to check if an instance is deleted. This property is also used to check the completion of deleting network interfaces. |
Input |
Disabled |
R |
Execute option |
The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
aws.instanceId |
Instance ID |
Specify the ID of the instance. |
Input |
Disabled |
R |
Instance information |
The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:
Property key |
Characters that can be input |
---|---|
aws.targetHost |
No more than 256 single-byte alphanumeric characters, periods (.), or hyphens (-). |
aws.accessKeyId |
No more than 64 single-byte alphanumeric characters or single-byte symbols (excluding the following symbols: <, >, |, ", ', ;, and &). |
aws.secretAccessKey |
No more than 128 single-byte alphanumeric characters or single-byte symbols (excluding the following symbols: <, >, |, ", ', ;, and &). |
aws.region |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
aws.checkInstanceDeletionCount |
An integer from 1 to 2,147,483,647. |
aws.checkInstanceDeletionInterval |
An integer from 1 to 60. |
The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Characters that can be input |
---|---|
aws.instanceId |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
Flow specification details
The following table shows the detailed specification of the flow:
Hierarchy |
Display name |
Plug-in |
||
---|---|---|---|---|
Plug-in name |
Description |
Error recovery method |
||
1 |
awsDeleteVM |
awsDeleteVM |
Deletes an instance from an Amazon EC2 environment. |
After removing the cause of the error, run the service again. If an error with the return value of 1 occurs, the service does not need to be run again. However, the remaining network interfaces might need to be deleted as required. |