UpdateLifecyclePolicyRequest

Amazon Web ServicesAutomationContainer ImagesEC2Image BuildingVirtual Machine Images

Properties

Name Type Description
lifecyclePolicyArn string The Amazon Resource Name (ARN) of the lifecycle policy resource.
description string Optional description for the lifecycle policy. Because the update replaces the entire configuration, omitting this property removes any existing description.
status string Indicates whether the lifecycle policy resource is enabled. Defaults to ENABLED when omitted, so updating a disabled policy without setting this property re-enables it.
executionRole string The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
resourceType string The type of image resource that the lifecycle policy applies to. The value must match the policy's existing resource type. You can't change the resource type of an existing lifecycle policy.
policyDetails array The configuration details for a lifecycle policy resource.
resourceSelection object
clientToken string A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response
View JSON Schema on GitHub

JSON Schema

amazon-ec2-image-builder-update-lifecycle-policy-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ec2-image-builder/json-schema/amazon-ec2-image-builder-update-lifecycle-policy-request-schema.json",
  "title": "UpdateLifecyclePolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ec2-image-builder-operations-api-openapi.yml#/components/schemas/UpdateLifecyclePolicyRequest",
  "type": "object",
  "properties": {
    "lifecyclePolicyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the lifecycle policy resource."
    },
    "description": {
      "type": "string",
      "description": "Optional description for the lifecycle policy. Because the update replaces the entire configuration, omitting this property removes any existing description."
    },
    "status": {
      "type": "string",
      "enum": [
        "DISABLED",
        "ENABLED"
      ],
      "description": "Indicates whether the lifecycle policy resource is enabled. Defaults to ENABLED when omitted, so updating a disabled policy without setting this property re-enables it."
    },
    "executionRole": {
      "type": "string",
      "description": "The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions."
    },
    "resourceType": {
      "type": "string",
      "enum": [
        "AMI_IMAGE",
        "CONTAINER_IMAGE"
      ],
      "description": "The type of image resource that the lifecycle policy applies to. The value must match the policy's existing resource type. You can't change the resource type of an existing lifecycle policy."
    },
    "policyDetails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LifecyclePolicyDetail"
      },
      "description": "The configuration details for a lifecycle policy resource."
    },
    "resourceSelection": {
      "$ref": "#/$defs/LifecyclePolicyResourceSelection"
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference."
    }
  },
  "required": [
    "lifecyclePolicyArn",
    "executionRole",
    "resourceType",
    "policyDetails",
    "resourceSelection",
    "clientToken"
  ],
  "$defs": {
    "LifecyclePolicyDetail": {
      "type": "object",
      "properties": {
        "action": {
          "$ref": "#/$defs/LifecyclePolicyDetailAction"
        },
        "filter": {
          "$ref": "#/$defs/LifecyclePolicyDetailFilter"
        },
        "exclusionRules": {
          "$ref": "#/$defs/LifecyclePolicyDetailExclusionRules"
        }
      },
      "required": [
        "action",
        "filter"
      ]
    },
    "LifecyclePolicyDetailAction": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "DELETE",
            "DEPRECATE",
            "DISABLE"
          ],
          "description": "Specifies the lifecycle action to take. DELETE deletes the image resource and, with includeResources, also removes distributed AMIs, snapshots, or container images. DEPRECATE and DISABLE set the corresponding status on the image resource and, if includeResources.amis is set, on its distributed AMIs."
        },
        "includeResources": {
          "$ref": "#/$defs/LifecyclePolicyDetailActionIncludeResources"
        }
      },
      "required": [
        "type"
      ]
    },
    "LifecyclePolicyDetailActionIncludeResources": {
      "type": "object",
      "properties": {
        "amis": {
          "type": "boolean",
          "description": "Specifies whether the lifecycle action should apply to distributed AMIs."
        },
        "snapshots": {
          "type": "boolean",
          "description": "Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs."
        },
        "containers": {
          "type": "boolean",
          "description": "Specifies whether the lifecycle action should apply to distributed containers."
        }
      }
    },
    "LifecyclePolicyDetailExclusionRules": {
      "type": "object",
      "properties": {
        "tagMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Contains a list of tags that Image Builder uses to skip lifecycle actions for Image Builder image resources that have them."
        },
        "amis": {
          "$ref": "#/$defs/LifecyclePolicyDetailExclusionRulesAmis"
        }
      }
    },
    "LifecyclePolicyDetailExclusionRulesAmis": {
      "type": "object",
      "properties": {
        "isPublic": {
          "type": "boolean",
          "description": "Configures whether public AMIs are excluded from the lifecycle action."
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Configures Amazon Web Services Regions that are excluded from the lifecycle action."
        },
        "sharedAccounts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The lifecycle action doesn't apply to AMIs that are shared with any of the specified Amazon Web Services accounts."
        },
        "lastLaunched": {
          "$ref": "#/$defs/LifecyclePolicyDetailExclusionRulesAmisLastLaunched"
        },
        "tagMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Lifecycle actions don't apply to AMIs that have any of these tags. Both the key and the value must match."
        }
      }
    },
    "LifecyclePolicyDetailExclusionRulesAmisLastLaunched": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "description": "The integer number of units for the time period. For example 6 (months)."
        },
        "unit": {
          "type": "string",
          "enum": [
            "DAYS",
            "WEEKS",
            "MONTHS",
            "YEARS"
          ],
          "description": "Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last launch."
        }
      },
      "required": [
        "value",
        "unit"
      ]
    },
    "LifecyclePolicyDetailFilter": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "AGE",
            "COUNT"
          ],
          "description": "Filter resources based on either AGE or COUNT. You can only use the count filter with the DELETE action type."
        },
        "value": {
          "type": "integer",
          "description": "The number of units for the time period or for the count. For example, a value of 6 might refer to six months or six AMIs. For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions."
        },
        "unit": {
          "type": "string",
          "enum": [
            "DAYS",
            "WEEKS",
            "MONTHS",
            "YEARS"
          ],
          "description": "Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules."
        },
        "retainAtLeast": {
          "type": "integer",
          "description": "For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted."
        }
      },
      "required": [
        "type",
        "value"
      ]
    },
    "LifecyclePolicyResourceSelection": {
      "type": "object",
      "properties": {
        "recipes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LifecyclePolicyResourceSelectionRecipe"
          },
          "description": "A list of recipes that are used as selection criteria for the output images that the lifecycle policy applies to."
        },
        "tagMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A list of tags that are used as selection criteria for the Image Builder image resources that the lifecycle policy applies to."
        }
      }
    },
    "LifecyclePolicyResourceSelectionRecipe": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of an Image Builder recipe that the lifecycle policy uses for resource selection."
        },
        "semanticVersion": {
          "type": "string",
          "description": "The version of the Image Builder recipe specified by the name field."
        }
      },
      "required": [
        "name",
        "semanticVersion"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/amazon-ec2-image-builder-update-lifecycle-policy-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.