5.2.17 Obtain status of virtual server
Function
This plugin can obtain instance statuses in an Amazon EC2 environment.
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.
The scripts in this plugin execute the following AWS Tools commandlets:
- Get-EC2Instance -Instance instance-ID (the value of the AWS.instanceId property)
Based on the execution results of the above commandlets, obtain the value of the Instances.State.Name.Value property, and then save the value to the instance status (the AWS.instanceState property).
The values to be stored in this property are listed as follows:
Value Meaning
pending Being processed to start
running Running
shutting-down Being processed to shut down
stopped Stopped
stopping Being processed to stop
terminated Terminated
For details about the AWS Tools commandlets, refer to "AWS Tools for Windows PowerShell Cmdlet Reference" in the AWS document.
Use situation
Use this plugin to obtain instance statuses in an Amazon EC2 environment.
Prerequisites
For the most recent information about the prerequisite product in the system, prerequisite products on the execution-target server, supported OSs for the prerequisite products on the execution-target server, and prerequisite products on the execution-target system, see the Release Notes.
Prerequisite product in the system:
JP1/Automatic Operation 11-00 or later
Prerequisite products on the execution-target server:
- AWS Tools for Windows PowerShell
- Microsoft .Net Framework 3.5 or later
Supported OSs for the prerequisite products on the execution-target server:
- 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:
(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)
Cautions
(1) Do not specify character strings that include a double quotation mark (") or a single quotation mark (') for the properties of this plugin.
(2) For additional remarks, refer to "AWS Tools for Windows PowerShell Cmdlet Reference" in the AWS document.
Execution privilege
(1) The policy must be set to allow an IAM user to log in to AWS to perform the following action:
- Obtaining instance statuses
Version
02.00.00
Plug-in tags
Gather VM information,AWS
Plug-in name displayed in the task log
awsGetVMState
Return code
0: Normal
23: Error (invalid environment) The environment requirements have not been met.
27: Error (Check with the task log regarding the error details.) Unidentified error
41: Error (error detected in the component) Property not entered (An error was detected in the component script.)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
AWS.accessKeyId |
Access key ID |
Specify the access key ID for connecting to AWS. |
-- |
Input |
R |
AWS.secretAccessKey |
Secret access key |
Specify the secret access key for connecting to AWS. |
-- |
Input |
R |
AWS.region |
Region |
Specify an AWS region that is a connection destination. |
-- |
Input |
R |
AWS.instanceId |
Instance ID |
Specify the ID of the instance. |
-- |
Input |
R |
AWS.instanceState |
Instance status |
Stores the instance status. |
-- |
Output |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |