# AmazonCreateAmiImagesParameters Object

## Description

Parameters for the Amazon Create AMI Images action.

## Properties

### credentialIds

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

Type: Array of `string`

Required: Yes

### consistencyMethod

Method used to ensure the AMI image is consistent.

Type: `string`

Valid Values:

* `none`
* `reboot-instance`

Required: Yes

### customImageNameTag

Custom `Name` tag value to apply to the new AMI image. Required when `setImageNameTagMethod` is `custom`.

Type: `string`

Required: Conditional

### customSnapshotNameTag

Custom `Name` tag value to apply to the new EBS snapshots. Required when `setSnapshotNameTagMethod` is `custom`.

Type: `string`

Required: Conditional

### description

Description for the new AMI image.

Type: `string`

Required: No

### imageName

Name for the new AMI image.

Type: `string`

Required: No

### instanceIds

List of EC2 instance IDs that will have AMI images created.

Type: Array of `string`

Required: No

### instanceNameComparison

*Deprecated*

Comparison to use when identifying EC2 instances by `Name` tag. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: [InstanceNameComparison](/data-types/instancenamecomparison-object-1.md) object.

Required: Conditional

### instanceIdentificationMethod

*Deprecated*

Method of identifying the EC2 instances.

Type: `string`

Valid Values:

* `all-instances`
* `by-instance-id`
* `by-instance-name-tag`
* `by-resource-tag`

Required: Yes

### regionNames

Regions to use with the action. Omit or specify `null` to include "all regions".

Type: Array of `string`

Required: No

### resourceTagComparison

*Deprecated*

Comparison to use when identifying instances by resource tag. Required when `instanceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1.md) object.

Required: Conditional

### resourceTagComparisons

List of resource tag comparisons to use when matching EC2 instances.

Type: List of [ResourceTagComparison](/data-types/resourcetagcomparison-object-1.md) objects.

Required: No

### setImageNameTagMethod

Method to use when setting the `Name` tag of the new AMI image.

Type: `string`

Valid Values:

* `none`
* `same-as-image-name`
* `custom`

Required: No

Default: `none`

### setSnapshotNameTagMethod

Method to use when setting the `Name` tag of the new EBS snapshots.

Type: `string`

Valid Values:

* `none`
* `same-as-image-name`
* `same-as-image-name-tag`
* `custom`

Required: No

Default: `none`

### tags

Resource tags to apply to the new AMI image and EBS snapshots.

Type: Array of [AmiImageTag](/data-types/amiimagetag-object.md) objects

Required: No

### targetCredentialId

Credential ID of the AWS credentials to copy the the resulting AMI images. Eg. `cred-12345678`. When setting this field, also set the `targetRegionName` field.

Type: `string`

Required: No

### targetKmsKeyIdOverride

KMS key to use when copying the AMI images. When setting this field, also set the `targetRegionName` field.

Type: `string`

Required: No

### targetRegionName

Name of a secondary region to copy the resulting AMI images. Must be a valid region. Eg. `us-east-1`

Type: `string`

Required: No

### volumeChanges

Changes to make to the volumes for the AMI image.

Type: [AmiImageVolumeChanges](/data-types/amiimagevolumechanges-object.md) object

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1",
        "us-east-2"
    ],
    
    "resourceTagComparisons": [
        {
            "tagName": "create-amis",
            "compareType": "equals",
            "tagValue": "daily-0300"
        }
    ],

    "imageName": "$(INSTANCEID)-$(DATE)",
    "description": "Created from $(INSTANCEID)",
    "consistencyMethod": "reboot-instance",

    "setImageNameTagMethod": "same-as-image-name",
    "setSnapshotNameTagMethod": "same-as-image-name",

    "tags": [
        {
            "key": "skeddly:instance-id",
            "value": "$(INSTANCEID)",
            "addToImage": true,
            "addToSnapshots": true
        },
        {
            "key": "skeddly:source-image-id",
            "value": "$(IMAGEID)",
            "addToImage": true,
            "addToSnapshots": true
        }
    ],

    "targetRegionName": "ca-central-1"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skeddly.com/data-types/actionparameters-object/amazoncreateamiimagesparameters-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
