Create Amazon Elastic Compute Cloud plugin procedures

6 minute readExtensibilityDeveloper productivity

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

API_AllocateIP

Allocates an Elastic IP address.

Input parameters

Table 1. API_AllocateIP input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Results location

Location to store the results. If not specified, the results are only printed.

API_AssociateIP

Associates an Elastic IP address to an instance.

Input parameters

Table 2. API_AssociateIP input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance ID

Required. The instance to be associated with an IP.

IP

Required. The Elastic public IP address to associate to an instance. For example, 52.71.234.249.

API_AttachVolumes

Attaches a list of volumes to a list of instances.

Input parameters

Table 3. API_AttachVolumes input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Device

Required. The device name that is exposed to the instance.

List of instances

Required. The instances the volumes are attached to.

List of Volumes

Required. The volumes that are attached to the instances.

API_CreateImage

Creates a copy of an EBS instance.

Input parameters

Table 4. API_CreateImage input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance

Required. The instance to duplicate.

New image name

Required. Specifies the name for the newly created image.

New image description

The description for the new image.

No reboot

Required. If not selected (the default setting), Amazon EC2 attempts to cleanly shut down the instance before creating the image and reboots the instance afterward. If selected, Amazon EC2 does not shut down the instance before creating the image and the file system integrity on the created image cannot be guaranteed.

Results location

Required. Location to store the results. If not specified, the results are only printed.

Wait for image?

If selected, it waits for the image to become available.

API_CreateTags

Adds or overwrites one or more tags for the specified Amazon EC2 resource(s).

Input parameters

Table 5. API_CreateTags input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Resources

Required. A space-separated list of resource IDs.

Tags

Required. A comma-separated list of key values. For example, key => value, key2 => value2.

API_DescribeInstances

Describes one or more instances.

Input parameters

Table 6. API_DescribeInstances input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instances

A list of instances or reservations to list.

Results location

Location to store the results. If not specified, the result are only printed and saved to the output parameter.

Output parameters

Table 7. API_DescribeInstances output parameters
Parameter Description

instances

JSON representation of instances.

API_ReleaseIP

Releases an Elastic IP address.

Input parameters

Table 8. API_ReleaseIP input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

IP

Required. The Elastic public IP address to release. For example, 52.71.234.249.

API_RunInstances

Provisions one or more EC2 instances and creates resources for them.

Input parameters

Table 9. API_RunInstances input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

AMI

Required. The Amazon Image ID (AMI) of the image to deploy.

Availability zone

The availability zone you need to launch the instance into.

Name

Name for the instance.

Instance type

Required. The instance type. For more information, refer to Instance types.

Subnet ID

The ID of the subnet to launch the instance(s) into. (For use with VPCs.)

Security group

The name of the security group to use for the instance.

Key name

The name of the keypair to use for the instance.

Initiated shutdown behavior

Used to specify the instance behavior when an OS-level shutdown is performed. Instances can be either terminated or shut down.

IAM profile name

If specified, a new instance is associated with the given IAM profile.

Use private IP?

If selected, a private IP is used when creating the resource.

Private IP

The primary IP address. You must specify a value from the IP address subnet range. If no value is supplied, an IP address from the IP address subnet range is selected. (For use with VPCs.)

Tenancy

Each instance you launch into a VPC has a tenancy attribute. This attribute has the following values:

  • default: Your instance runs on shared hardware.

  • dedicated: Your instance runs on single-tenant hardware.

  • host: Your instance runs on a dedicated host, which is an isolated server with configurations that you can control.

User data

Used to pass extra user data into runInstance.

Number of instances

Specifies the number of instances to start.

Resource pool

Add CloudBees CD/RO resources for each instance created and enter the CloudBees CD/RO pool name for the new resource. If left blank, no resource are created.

Resource port

If you specified a resource pool name in the Resource Pool field, this port is used when creating the resource. If you specified a resource pool name in the Resource Pool field and no value is specified, port 7800 is used by default when creating the resource.

Resource workspace

If you specified a resource pool name in the Resource Pool field, this workspace is used when creating the resource.

Resource zone name

The created resource belongs to the specified zone. By default, the default zone is used.

Ping resource?

If selected, the resource is pinged after the resource creation.

Result property sheet

Property path to store results.

API_StartInstance

Starts one or more instances.

Input parameters

Table 10. API_StartInstance input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance IDs

Required. Instance IDs in a newline-separated list.

Wait for instances?

If selected, the procedure polls the status of one or more instances and finishes when the instance(s) are stopped.

Results location

Location to store the results. If not specified, the results are only printed and saved to the output parameter.

Output parameters

Table 11. API_StartInstance output parameters
Parameter Description

instances

JSON representation of the instances details.

API_StopInstance

Stops one or more instances.

Input parameters

Table 12. API_StopInstance input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance IDs

Required. Instance IDs in a newline-separated list.

Wait for instances?

If selected, the procedure polls the status of one or more instances and finishes when the instance(s) are stopped.

API_TearDownResource

Terminates resources created with this plugin.

Input parameters

Table 13. API_TearDownResource input parameters
Parameter Description

Resource name

Required. Name of resource or resource pool to delete.

API_Terminate

Terminates one or more instances.

Input parameters

Table 14. API_Terminate input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance IDs

Required. If this is an instance ID, the instance is terminated. If this is a reservation ID, all instances in the reservation are terminated. Multiple instance IDs are separated by a semicolon.

Resources

List of resources to be deleted.

Wait for instances?

If selected, the procedure waits until the instances are terminated.

Execute API Request

Executes custom Query API requests to the specified service that supports Query API (except S3).

Input parameters

Table 15. Execute API Request input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Host

Host of the AWS service to use. For example, ec2.amazonaws.com. If a host is not provided, a host is derived from the service name.

Service name

Required. Service name to use. For example, ec2.

API version

Required. API version to use. For example, 2016-11-15.

Action

Required. Action to perform. For example, DescribeInstances. For a list of actions, refer to Actions by service.

Headers

A set of headers in key=value pairs or a JSON map.

Query

Query parameters in key=value pairs or a JSON map.

Path

Path to use. The default is /.

Output parameters

Table 16. Execute API Request output parameters
Parameter Description

result

The returned response of the service in XML format.

Snap Attached Volume

Creates a new snapshot from a volume attached to an instance. Only creates a snapshot from the first volume found.

Input parameters

Table 17. Snap Attached Volume input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Instance

Required. Instance ID of a running EC2 instance.

Results location

Required. Location to store the results. If not specified, the results are only printed.

Volume ID

Required. A semicolon-separated list of volume IDs to snapshot.