# AmazonDeregisterAmiImagesParameters Object

## Description <a href="#description" id="description"></a>

Parameters for the Amazon Deregister AMI Images action.

## Properties <a href="#properties" id="properties"></a>

### credentialIds <a href="#credentialids" id="credentialids"></a>

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

Type: Array of `string`

Required: Yes

### deleteScheme <a href="#deletescheme" id="deletescheme"></a>

Delete scheme to use to determine the images to delete or preserve.

Type: `string`

Valid Values:

* `none`
* `first-in-first-out`
* `grandfather-father-son`

Required: Yes

### deregisterSharedImages

Indicates whether shared AMI images should be deleted.

Type: `string`

Valid Values:

* `all`
* `deregister-shared-images-only`
* `deregister-non-shared-images-only`

Required: No

Default: `all`

### firstInFirstOutParameters <a href="#firstinfirstoutparameters" id="firstinfirstoutparameters"></a>

Parameters to use when using a first-in-first-out delete scheme. Required when `deleteScheme` is `first-in-first-out`.

Type: [FirstInFirstOutDeleteSchemeParameters](/data-types/firstinfirstoutdeleteschemeparameters-object.md)​ object

Required: Conditional

### grandfatherFatherSonParameters <a href="#grandfatherfathersonparameters" id="grandfatherfathersonparameters"></a>

Parameters to use when using a grandfather-father-son delete scheme. Required when `deleteScheme` is `grandfather-father-son`.

Type: [GrandfatherFatherSonDeleteSchemeParameters](/data-types/grandfatherfathersondeleteschemeparameters-object.md)​ object

Required: Conditional

### groupingMethod <a href="#groupingmethod" id="groupingmethod"></a>

Method in which to group images when deleting.

Type: `string`

Valid Values:

* `none`
* `by-resource-tag`

Required: Yes

### groupingResourceTagName <a href="#groupingresourcetagname" id="groupingresourcetagname"></a>

Name of the resource tag to use to group images. Required when `groupingMethod` is `by-resource-tag`.

Type: `string`

Required: Conditional

### imageDescriptionComparison <a href="#snapshotdescriptioncomparison" id="snapshotdescriptioncomparison"></a>

Comparison to use when matching images by description. Required when `imageIdentificationMethod` is `by-image-description`.

Type: [AmiImageDescriptionComparison](/data-types/amiimagedescriptioncomparison-object.md) object

Required: Conditional

### imageIdentificationMethod <a href="#snapshotidentificationmethod" id="snapshotidentificationmethod"></a>

Method to use to identify images to be deleted.

Type: `string`

Valid Values:

* `all-images`
* `by-image-description`
* `by-image-name`
* `by-image-name-tag`
* `by-resource-tag`

Required: Yes

### imageNameComparison <a href="#volumeidcomparison" id="volumeidcomparison"></a>

Comparison to use when matching images by their name. Required when `imageIdentificationMethod` is `by-image-name`.

Type: [AmiImageNameComparison](/data-types/amiimagenamecomparison-object.md) object

Required: Conditional

### isDeleteFromS3

Indicates whether S3 data associated with the AMI images are to be deleted. Only applies to instance-backed AMI images.

Type: `boolean`

Default: `true`

Required: No

### isDeleteSnapshots

Indicates whether EBS snapshots associated with the AMI images are to be deleted. Only applies to EBS-backed AMI images.

Type: `boolean`

Default: `true`

Required: No

### isTest <a href="#istest" id="istest"></a>

Determines if "Test Mode" is enabled on the action. Images will not be deleted when "Test Mode" is enabled.

Type: `boolean`

Required: No

Default Value: `false`

### nameTagComparison <a href="#snapshotnametagcomparison" id="snapshotnametagcomparison"></a>

Comparison to use when matching image by their `Name` tag. Required when `imageIdentificationMethod` is `by-image-name-tag`.

Type: [NameTagComparison](/data-types/nametagcomparison-object.md) object

Required: Conditional

### regionNames <a href="#regionnames" id="regionnames"></a>

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

Type: Array of `string`

Required: No

### reportFormat <a href="#reportformat" id="reportformat"></a>

Format of the final report. Required when `targetType` is `email`.

Type: `string`

Valid Values:

* `email`
* `email-html-attachment`
* `email-csv-attachment`

Required: Conditional

### resourceTagComparison <a href="#resourcetagcomparison" id="resourcetagcomparison"></a>

Comparison to use when identifying images by resource tag. Required when `imageIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/actionparameters-object/amazonderegisteramiimagesparameters-object.md#resourcetagcomparison) object.

Required: Conditional

### targetEmails <a href="#targetemails" id="targetemails"></a>

The target email addresses to send the final report.

Type: array of `string`

Required: No

### targetType <a href="#targettype" id="targettype"></a>

Indicates whether a report should be generated with the execution results.

Type: `string`

Valid Values:

* `none`
* `email`

Required: No

Default: `none`

## Sample JSON <a href="#sample-json" id="sample-json"></a>

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

    "imageIdentificationMethod": "by-resource-tag",
    "resourceTagComparison": {
        "tagName": "skeddly:retention",
        "compareType": "equals",
        "tagValue": "7"
    },
    "deregisterSharedImages": "all",

    "deleteScheme": "first-in-first-out",
    "firstInFirstOutParameters": {
        "olderThanDays": 30,
        "minimumToKeep": 2
    },

    "groupingMethod": "by-resource-tag",
    "groupingResourceTagName": "skeddly:image-id",
    
    "isDeleteSnapshots": true,
    "isDeleteFromS3": false,

    "targetType": "email",
    "targetEmails": [
        "foo@example.com"
    ],
    "ReportFormat": "email",

    "isTest": false
}
```

​


---

# 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/amazonderegisteramiimagesparameters-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.
