{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-registry/json-schema/azure-container-registry-task-update-parameters-schema.json",
  "title": "TaskUpdateParameters",
  "description": "The parameters for updating a task.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-container-registry-tasks-api-openapi.yml#/components/schemas/TaskUpdateParameters",
  "type": "object",
  "properties": {
    "identity": {
      "$ref": "#/$defs/IdentityProperties",
      "description": "Identity for the resource."
    },
    "properties": {
      "$ref": "#/$defs/TaskPropertiesUpdateParameters",
      "description": "The properties for updating a task.",
      "x-ms-client-flatten": true
    },
    "tags": {
      "description": "The ARM resource tags.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "AgentProperties": {
      "description": "The properties that determine the run agent configuration.",
      "type": "object",
      "properties": {
        "cpu": {
          "format": "int32",
          "description": "The CPU configuration in terms of number of cores required for the run.",
          "type": "integer"
        }
      }
    },
    "AuthInfoUpdateParameters": {
      "description": "The authorization properties for accessing the source code repository.",
      "type": "object",
      "properties": {
        "tokenType": {
          "description": "The type of Auth token.",
          "enum": [
            "PAT",
            "OAuth"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TokenType",
            "modelAsString": true
          }
        },
        "token": {
          "description": "The access token used to access the source control provider.",
          "type": "string"
        },
        "refreshToken": {
          "description": "The refresh token used to refresh the access token.",
          "type": "string"
        },
        "scope": {
          "description": "The scope of the access token.",
          "type": "string"
        },
        "expiresIn": {
          "format": "int32",
          "description": "Time in seconds that the token remains valid",
          "type": "integer"
        }
      }
    },
    "BaseImageTriggerUpdateParameters": {
      "description": "The properties for updating base image dependency trigger.",
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "baseImageTriggerType": {
          "description": "The type of the auto trigger for base image dependency updates.",
          "enum": [
            "All",
            "Runtime"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "BaseImageTriggerType",
            "modelAsString": true
          }
        },
        "status": {
          "description": "The current status of trigger.",
          "default": "Enabled",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TriggerStatus",
            "modelAsString": true
          }
        },
        "name": {
          "description": "The name of the trigger.",
          "type": "string"
        }
      }
    },
    "Credentials": {
      "description": "The parameters that describes a set of credentials that will be used when a run is invoked.",
      "type": "object",
      "properties": {
        "sourceRegistry": {
          "$ref": "#/$defs/SourceRegistryCredentials",
          "description": "Describes the credential parameters for accessing the source registry."
        },
        "customRegistries": {
          "description": "Describes the credential parameters for accessing other custom registries. The key\nfor the dictionary item will be the registry login server (myregistry.azurecr.io) and\nthe value of the item will be the registry credentials for accessing the registry.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/CustomRegistryCredentials"
          }
        }
      }
    },
    "CustomRegistryCredentials": {
      "description": "Describes the credentials that will be used to access a custom registry during a run.",
      "type": "object",
      "properties": {
        "userName": {
          "$ref": "#/$defs/SecretObject",
          "description": "The username for logging into the custom registry."
        },
        "password": {
          "$ref": "#/$defs/SecretObject",
          "description": "The password for logging into the custom registry. The password is a secret \nobject that allows multiple ways of providing the value for it."
        },
        "identity": {
          "description": "Indicates the managed identity assigned to the custom credential. If a user-assigned identity\nthis value is the Client ID. If a system-assigned identity, the value will be `system`. In\nthe case of a system-assigned identity, the Client ID will be determined by the runner. This\nidentity may be used to authenticate to key vault to retrieve credentials or it may be the only \nsource of authentication used for accessing the registry.",
          "type": "string"
        }
      }
    },
    "IdentityProperties": {
      "description": "Managed identity for the resource.",
      "type": "object",
      "properties": {
        "principalId": {
          "description": "The principal ID of resource identity.",
          "type": "string"
        },
        "tenantId": {
          "description": "The tenant ID of resource.",
          "type": "string"
        },
        "type": {
          "description": "The identity type.",
          "enum": [
            "SystemAssigned",
            "UserAssigned",
            "SystemAssigned, UserAssigned",
            "None"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ResourceIdentityType",
            "modelAsString": false
          }
        },
        "userAssignedIdentities": {
          "description": "The list of user identities associated with the resource. The user identity \ndictionary key references will be ARM resource ids in the form: \n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\n    providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/UserIdentityProperties"
          }
        }
      }
    },
    "PlatformUpdateParameters": {
      "description": "The properties for updating the platform configuration.",
      "type": "object",
      "properties": {
        "os": {
          "description": "The operating system type required for the run.",
          "enum": [
            "Windows",
            "Linux"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "OS",
            "modelAsString": true
          }
        },
        "architecture": {
          "description": "The OS architecture.",
          "enum": [
            "amd64",
            "x86",
            "arm"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "Architecture",
            "modelAsString": true
          }
        },
        "variant": {
          "description": "Variant of the CPU.",
          "enum": [
            "v6",
            "v7",
            "v8"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "Variant",
            "modelAsString": true
          }
        }
      }
    },
    "SecretObject": {
      "description": "Describes the properties of a secret object value.",
      "type": "object",
      "properties": {
        "value": {
          "description": "The value of the secret. The format of this value will be determined\nbased on the type of the secret object. If the type is Opaque, the value will be\nused as is without any modification.",
          "type": "string"
        },
        "type": {
          "description": "The type of the secret object which determines how the value of the secret object has to be\ninterpreted.",
          "enum": [
            "Opaque",
            "Vaultsecret"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SecretObjectType",
            "modelAsString": true
          }
        }
      }
    },
    "SourceRegistryCredentials": {
      "description": "Describes the credential parameters for accessing the source registry.",
      "type": "object",
      "properties": {
        "loginMode": {
          "description": "The authentication mode which determines the source registry login scope. The credentials for the source registry\nwill be generated using the given scope. These credentials will be used to login to\nthe source registry during the run.",
          "enum": [
            "None",
            "Default"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SourceRegistryLoginMode",
            "modelAsString": true
          }
        }
      }
    },
    "SourceTriggerUpdateParameters": {
      "description": "The properties for updating a source based trigger.",
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "sourceRepository": {
          "$ref": "#/$defs/SourceUpdateParameters",
          "description": "The properties that describes the source(code) for the task."
        },
        "sourceTriggerEvents": {
          "description": "The source event corresponding to the trigger.",
          "type": "array",
          "items": {
            "enum": [
              "commit",
              "pullrequest"
            ],
            "type": "string",
            "x-ms-enum": {
              "name": "SourceTriggerEvent",
              "modelAsString": true
            }
          }
        },
        "status": {
          "description": "The current status of trigger.",
          "default": "Enabled",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TriggerStatus",
            "modelAsString": true
          }
        },
        "name": {
          "description": "The name of the trigger.",
          "type": "string"
        }
      }
    },
    "SourceUpdateParameters": {
      "description": "The properties for updating the source code repository.",
      "type": "object",
      "properties": {
        "sourceControlType": {
          "description": "The type of source control service.",
          "enum": [
            "Github",
            "VisualStudioTeamService"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SourceControlType",
            "modelAsString": true
          }
        },
        "repositoryUrl": {
          "description": "The full URL to the source code repository",
          "type": "string"
        },
        "branch": {
          "description": "The branch name of the source code.",
          "type": "string"
        },
        "sourceControlAuthProperties": {
          "$ref": "#/$defs/AuthInfoUpdateParameters",
          "description": "The authorization properties for accessing the source code repository and to set up\nwebhooks for notifications."
        }
      }
    },
    "TaskPropertiesUpdateParameters": {
      "description": "The properties for updating a task.",
      "type": "object",
      "properties": {
        "status": {
          "description": "The current status of task.",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TaskStatus",
            "modelAsString": true
          }
        },
        "platform": {
          "$ref": "#/$defs/PlatformUpdateParameters",
          "description": "The platform properties against which the run has to happen."
        },
        "agentConfiguration": {
          "$ref": "#/$defs/AgentProperties",
          "description": "The machine configuration of the run agent."
        },
        "timeout": {
          "format": "int32",
          "description": "Run timeout in seconds.",
          "type": "integer"
        },
        "step": {
          "$ref": "#/$defs/TaskStepUpdateParameters",
          "description": "The properties for updating a task step."
        },
        "trigger": {
          "$ref": "#/$defs/TriggerUpdateParameters",
          "description": "The properties for updating trigger properties."
        },
        "credentials": {
          "$ref": "#/$defs/Credentials",
          "description": "The parameters that describes a set of credentials that will be used when this run is invoked."
        }
      }
    },
    "TaskStepUpdateParameters": {
      "description": "Base properties for updating any task step.",
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of the step.",
          "enum": [
            "Docker",
            "FileTask",
            "EncodedTask"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "StepType",
            "modelAsString": true
          }
        },
        "contextPath": {
          "description": "The URL(absolute or relative) of the source context for the task step.",
          "type": "string"
        },
        "contextAccessToken": {
          "description": "The token (git PAT or SAS token of storage account blob) associated with the context for a step.",
          "type": "string"
        }
      }
    },
    "TimerTriggerUpdateParameters": {
      "description": "The properties for updating a timer trigger.",
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "schedule": {
          "description": "The CRON expression for the task schedule",
          "type": "string"
        },
        "status": {
          "description": "The current status of trigger.",
          "default": "Enabled",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TriggerStatus",
            "modelAsString": true
          }
        },
        "name": {
          "description": "The name of the trigger.",
          "type": "string"
        }
      }
    },
    "TriggerUpdateParameters": {
      "description": "The properties for updating triggers.",
      "type": "object",
      "properties": {
        "timerTriggers": {
          "description": "The collection of timer triggers.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimerTriggerUpdateParameters"
          }
        },
        "sourceTriggers": {
          "description": "The collection of triggers based on source code repository.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SourceTriggerUpdateParameters"
          }
        },
        "baseImageTrigger": {
          "$ref": "#/$defs/BaseImageTriggerUpdateParameters",
          "description": "The trigger based on base image dependencies."
        }
      }
    },
    "UserIdentityProperties": {
      "type": "object",
      "properties": {
        "principalId": {
          "description": "The principal id of user assigned identity.",
          "type": "string"
        },
        "clientId": {
          "description": "The client id of user assigned identity.",
          "type": "string"
        }
      }
    }
  }
}