{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ec2-image-builder/json-schema/amazon-ec2-image-builder-start-resource-state-update-request-schema.json",
  "title": "StartResourceStateUpdateRequest",
  "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/StartResourceStateUpdateRequest",
  "type": "object",
  "properties": {
    "resourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the image build version to update. The image must be in one of these terminal states: AVAILABLE, DEPRECATED, DISABLED, FAILED, or CANCELLED. Images with FAILED or CANCELLED status can transition only to DELETED."
    },
    "state": {
      "$ref": "#/$defs/ResourceState"
    },
    "executionRole": {
      "type": "string",
      "description": "The name or Amazon Resource Name (ARN) of the IAM role that's used to update image state. You must provide this property together with includeResources. Neither is valid without the other."
    },
    "includeResources": {
      "$ref": "#/$defs/ResourceStateUpdateIncludeResources"
    },
    "exclusionRules": {
      "$ref": "#/$defs/ResourceStateUpdateExclusionRules"
    },
    "updateAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp that indicates when resources are updated by a lifecycle action. This property is valid only when the target status is DEPRECATED, and the value must be a future time. If you don't specify a value, Image Builder begins the state update right away. For a scheduled deprecation, included AMIs get their EC2 deprecation time set immediately, and Image Builder schedules the image resource to transition to DEPRECATED at that time."
    },
    "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": [
    "resourceArn",
    "state",
    "clientToken"
  ],
  "$defs": {
    "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"
      ]
    },
    "ResourceState": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "AVAILABLE",
            "DELETED",
            "DEPRECATED",
            "DISABLED"
          ],
          "description": "The status to which you want to move the image resource. Set the status to AVAILABLE to restore an image that's currently deprecated or disabled."
        }
      }
    },
    "ResourceStateUpdateExclusionRules": {
      "type": "object",
      "properties": {
        "amis": {
          "$ref": "#/$defs/LifecyclePolicyDetailExclusionRulesAmis"
        }
      }
    },
    "ResourceStateUpdateIncludeResources": {
      "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."
        }
      }
    }
  }
}