# AmazonCopyEc2InstanceParameters Object

## Description

Parameters for the Amazon Copy EC2 Instance action.

## Properties

### availabilityZone

Availability zone in which the new EC2 instance will be launched.

Type: `string`

Valid Values:

* `null` or empty
* `same`
* A valid availability zone for the specified region

Required: No

### copyMethod

Indicates whether the EC2 instance is copied or moved.

Type: `string`

Valid Values:

* `copy`
* `move`

Required: Yes

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### iamInstanceProfileOverride

An IAM instance profile to assign to the new EC2 instance.

Type: `string`

Required: No

### instanceIdentificationMethod

Method in which the EC2 instance will be selected.

Type: `string`

Valid Values:

* `by-instance-id`

Required: Yes

### instanceId

ID of the EC2 instance to be copied. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: `string`

Required: Conditional

### instanceTypeOverride

The instance type for the new EC2 instance.

Type: `string`

Required: No

### isDeleteAmi

Indicates whether the intermediate AMI image should be deleted.

Type: `boolean`

Required: No

Default: `false`

### isStopInstance

Indicates whether the original EC2 instance is left stopped after the copy process completes. Only used when `copyMethod` is `copy`.

Type: `boolean`

Required: No

Default: `false`

### isTransferElasticIp

Indicates whether the Elastic IP address is moved from the original EC2 instance to the new EC2 instance. Only used when `copyMethod` is `copy`.

Type: `boolean`

Required: No

Default: `false`

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### securityGroupOverride

The ID of a security group to assign to the new EC2 instance. By default, the same security groups assigned to the original EC2 instance are assigned to the new EC2 instance. Required when `targetCredentialId` is specified.

Type: `string`

Required: Conditional

### subnetIdOverride

The ID of a VPC subnet to assign to the new EC2 instance. By default, the same subnet the original EC2 instance is using will be used for the new EC2 instance. Required when `targetCredentialId` is specified.

Type: `string`

Required: Conditional

### targetCredentialId

Indicates the ID of the target AWS credentials with which to launch the new EC2 instance.

Type: `string`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],

    "instanceIdentificationMethod": "by-instance-id",
    "instanceId": "i-00000001",
    
    "copyMethod": "copy",
	"isStopInstance": false,
	"isTransferElasticIp": false,
	
	"availabilityZone": "same",
		
	"isDeleteAmi": true
}
```
