{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-verified-permissions/json-schema/amazon-verified-permissions-update-policy-input-schema.json",
  "title": "UpdatePolicyInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-verified-permissions-updatepolicy-api-openapi.yml#/components/schemas/UpdatePolicyInput",
  "type": "object",
  "properties": {
    "policyStoreId": {
      "type": "string",
      "description": "Specifies the ID of the policy store that contains the policy that you want to update. To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example: ID: PSEXAMPLEabcdefg111111 Alias name: policy-store-alias/example-policy-store To view aliases, use ListPolicyStoreAliases."
    },
    "policyId": {
      "type": "string",
      "description": "Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies. You can use the policy name in place of the policy ID. When using a name, prefix it with name/. For example: ID: SPEXAMPLEabcdefg111111 Name: name/example-policy"
    },
    "definition": {
      "$ref": "#/$defs/UpdatePolicyDefinition"
    },
    "name": {
      "type": "string",
      "description": "Specifies a name for the policy that is unique among all policies within the policy store. You can use the name in place of the policy ID in API operations that reference the policy. The name must be prefixed with name/. If you don't include the name in an update request, the existing name is unchanged. To remove a name, set it to an empty string (\"\"). If you specify a name that is already associated with another policy in the policy store, you receive a ConflictException error."
    }
  },
  "required": [
    "policyStoreId",
    "policyId"
  ],
  "$defs": {
    "UpdatePolicyDefinition": {
      "type": "object",
      "properties": {
        "static": {
          "$ref": "#/$defs/UpdateStaticPolicyDefinition"
        }
      },
      "description": "Exactly one member is set."
    },
    "UpdateStaticPolicyDefinition": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Specifies the description to be added to or replaced on the static policy."
        },
        "statement": {
          "type": "string",
          "description": "Specifies the Cedar policy language text to be added to or replaced on the static policy. You can change only the following elements from the original content: The action referenced by the policy. Any conditional clauses, such as when or unless clauses. You can't change the following elements: Changing from StaticPolicy to TemplateLinkedPolicy. The effect (permit or forbid) of the policy. The principal referenced by the policy. The resource referenced by the policy."
        }
      },
      "required": [
        "statement"
      ]
    }
  }
}