set_application_delete_lock #

View this page as Markdown

On this page

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://tzcloud.turnzero.ai/v1/set_application_delete_lock, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_set_application_delete_lock.

OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).

Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

Contract description #

Lock your application against deletion. Give a short reason. The call needs no browser approval. An existing lock keeps its reason and set time.

More about this action #

Pass application, the ID of an application on your account. A token scoped to one application can lock only that application. Give reason as one nonblank line of 1 to 200 characters with no control or Unicode format characters. Leave personal details out of it. Call read_status or list_applications to read the current lock. Applications on synthetic accounts cannot take a lock.

While the application is locked, delete_application refuses with delete_locked. Use lift_application_delete_lock to request removal of the lock and give the account owner the browser approval link. A delete_application request takes a separate approval.

The lock also blocks an account deletion or a development purge that would delete this application. Deploys, setting changes and moves continue. The lock moves with the application.

The call returns HTTP 200 with application, delete_lock, changed and detail. A new lock returns changed: true. If the application is already locked, the call returns the existing lock with changed: false and leaves its reason and set time as they were.

Access and action metadata #

{
  "name": "set_application_delete_lock",
  "resource": "application",
  "tier": "reversible",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "summary": "Lock the application against deletion and record a reason. No browser approval is needed. A repeat returns the existing lock without changing it.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": false,
    "openWorldHint": false,
    "idempotentHint": true
  }
}

MCP catalog entry #

{
  "name": "set_application_delete_lock",
  "title": "Add application deletion lock",
  "tier": "reversible",
  "scenario": "CHI-L0-04",
  "summary": "Lock your application against deletion. Give a short reason. The call needs no browser approval. An existing lock keeps its reason and set time.",
  "owners": [
    "ACB-L0-110"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application","reason"]
Additional properties: false
/properties/application The application ID from list_applications.

Type: string
/properties/reason Give the reason for locking the application in one nonblank line of 1 to 200 characters. Leave out control characters, Unicode format characters such as zero-width characters, and personal details. The reason is visible in application reads and on the lift approval page.

Type: string
Minimum length: 1
Maximum length: 200

response #

JSON pointer Description and constraints
"" (root) The application's deletion lock after this call.

Type: object
Required fields: ["contract_version","application","delete_lock","changed","detail"]
/properties/contract_version Required value: 1
/properties/reference The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call.

Type: string
Pattern: ^[0-9a-f]{10}$
/properties/application The ID of the application whose lock this call sets or returns.

Type: string
/properties/delete_lock The lock set by this call or the existing lock if the application was already locked.

Type: object
Required fields: ["reason","set_at"]
Additional properties: false
/properties/delete_lock/properties/reason The reason given when the lock was set.

Type: string
/properties/delete_lock/properties/set_at When the lock was set, in ISO 8601 format in UTC to the millisecond.

Type: string
/properties/changed True if this call set the lock. False if the existing lock was returned unchanged.

Type: boolean
/properties/detail Whether this call set the lock or returned an existing lock.

Type: string

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application",
      "reason"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "The application ID from `list_applications`."
      },
      "reason": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "description": "Give the reason for locking the application in one nonblank line of 1 to 200 characters. Leave out control characters, Unicode format characters such as zero-width characters, and personal details. The reason is visible in application reads and on the lift approval page."
      }
    },
    "additionalProperties": false
  },
  "response": {
    "type": "object",
    "description": "The application's deletion lock after this call.",
    "required": [
      "contract_version",
      "application",
      "delete_lock",
      "changed",
      "detail"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
      },
      "application": {
        "type": "string",
        "description": "The ID of the application whose lock this call sets or returns."
      },
      "delete_lock": {
        "type": "object",
        "description": "The lock set by this call or the existing lock if the application was already locked.",
        "required": [
          "reason",
          "set_at"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "description": "The reason given when the lock was set."
          },
          "set_at": {
            "type": "string",
            "description": "When the lock was set, in ISO 8601 format in UTC to the millisecond."
          }
        },
        "additionalProperties": false
      },
      "changed": {
        "type": "boolean",
        "description": "True if this call set the lock. False if the existing lock was returned unchanged."
      },
      "detail": {
        "type": "string",
        "description": "Whether this call set the lock or returned an existing lock."
      }
    }
  }
}

Shared contracts #