你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.ContainerRegistry registries/taskRuns 2019-06-01-preview

Bicep 资源定义

可以使用目标操作部署注册表/taskRuns 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/taskRuns 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ContainerRegistry/registries/taskRuns@2019-06-01-preview' = {
  parent: resourceSymbolicName
  identity: {
    principalId: 'string'
    tenantId: 'string'
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {
        clientId: 'string'
        principalId: 'string'
      }
    }
  }
  location: 'string'
  name: 'string'
  properties: {
    forceUpdateTag: 'string'
    runRequest: {
      agentPoolName: 'string'
      isArchiveEnabled: bool
      logTemplate: 'string'
      type: 'string'
      // For remaining properties, see RunRequest objects
    }
  }
}

RunRequest 对象

设置 类型 属性以指定对象的类型。

对于 DockerBuildRequest,请使用:

{
  agentConfiguration: {
    cpu: int
  }
  arguments: [
    {
      isSecret: bool
      name: 'string'
      value: 'string'
    }
  ]
  credentials: {
    customRegistries: {
      {customized property}: {
        identity: 'string'
        password: {
          type: 'string'
          value: 'string'
        }
        userName: {
          type: 'string'
          value: 'string'
        }
      }
    }
    sourceRegistry: {
      loginMode: 'string'
    }
  }
  dockerFilePath: 'string'
  imageNames: [
    'string'
  ]
  isPushEnabled: bool
  noCache: bool
  platform: {
    architecture: 'string'
    os: 'string'
    variant: 'string'
  }
  sourceLocation: 'string'
  target: 'string'
  timeout: int
  type: 'DockerBuildRequest'
}

对于 EncodedTaskRunRequest,请使用:

{
  agentConfiguration: {
    cpu: int
  }
  credentials: {
    customRegistries: {
      {customized property}: {
        identity: 'string'
        password: {
          type: 'string'
          value: 'string'
        }
        userName: {
          type: 'string'
          value: 'string'
        }
      }
    }
    sourceRegistry: {
      loginMode: 'string'
    }
  }
  encodedTaskContent: 'string'
  encodedValuesContent: 'string'
  platform: {
    architecture: 'string'
    os: 'string'
    variant: 'string'
  }
  sourceLocation: 'string'
  timeout: int
  type: 'EncodedTaskRunRequest'
  values: [
    {
      isSecret: bool
      name: 'string'
      value: 'string'
    }
  ]
}

对于 FileTaskRunRequest,请使用:

{
  agentConfiguration: {
    cpu: int
  }
  credentials: {
    customRegistries: {
      {customized property}: {
        identity: 'string'
        password: {
          type: 'string'
          value: 'string'
        }
        userName: {
          type: 'string'
          value: 'string'
        }
      }
    }
    sourceRegistry: {
      loginMode: 'string'
    }
  }
  platform: {
    architecture: 'string'
    os: 'string'
    variant: 'string'
  }
  sourceLocation: 'string'
  taskFilePath: 'string'
  timeout: int
  type: 'FileTaskRunRequest'
  values: [
    {
      isSecret: bool
      name: 'string'
      value: 'string'
    }
  ]
  valuesFilePath: 'string'
}

对于 taskRunRequest,请使用:

{
  overrideTaskStepProperties: {
    arguments: [
      {
        isSecret: bool
        name: 'string'
        value: 'string'
      }
    ]
    contextPath: 'string'
    file: 'string'
    target: 'string'
    updateTriggerToken: 'string'
    values: [
      {
        isSecret: bool
        name: 'string'
        value: 'string'
      }
    ]
  }
  taskId: 'string'
  type: 'TaskRunRequest'
}

属性值

AgentProperties

名字 描述 价值
中央处理器 在运行所需的内核数方面,CPU 配置。 int

论点

名字 描述 价值
isSecret 用于指示参数是否表示机密并想要从生成日志中删除的标志。 bool
名字 参数的名称。 string (必需)
价值 参数的值。 string (必需)

凭据

名字 描述 价值
customRegistries 描述用于访问其他自定义注册表的凭据参数。 密钥
字典项的 该项的值将是用于访问注册表的注册表凭据。
CredentialsCustomRegistries
sourceRegistry 描述用于访问源注册表的凭据参数。 SourceRegistryCredentials

CredentialsCustomRegistries

名字 描述 价值

CustomRegistryCredentials

名字 描述 价值
身份 指示分配给自定义凭据的托管标识。 如果用户分配的标识
此值是客户端 ID。 如果系统分配的标识,该值将 system。 在
系统分配的标识的情况下,客户端 ID 将由运行程序确定。 这
标识可用于对密钥保管库进行身份验证以检索凭据,也可能是唯一的
用于访问注册表的身份验证源。
字符串
密码 用于登录到自定义注册表的密码。 密码是机密
对象,允许通过多种方式为其提供值。
SecretObject
userName 用于登录到自定义注册表的用户名。 SecretObject

DockerBuildRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
参数 执行运行时要使用的重写参数的集合。 参数[]
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
dockerFilePath 相对于源位置的 Docker 文件路径。 string (必需)
imageNames 完全限定的映像名称,包括存储库和标记。 string[]
isPushEnabled 此属性的值指示是否应将生成的映像推送到注册表。 bool
noCache 此属性的值指示是否启用映像缓存。 bool
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
目标 docker 生成的目标生成阶段的名称。 字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “DockerBuildRequest”(必需)

EncodedTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
encodedTaskContent 模板/定义文件内容的 Base64 编码值。 string (必需)
encodedValuesContent 参数/值文件内容的 Base64 编码值。 字符串
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “EncodedTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]

FileTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
taskFilePath 相对于源的模板/定义文件路径。 string (必需)
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “FileTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]
valuesFilePath 相对于源的值/参数文件路径。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/taskRuns

名字 描述 价值
身份 资源的标识。 IdentityProperties
位置 资源的位置 字符串
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
父母 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源
类型资源的符号名称:注册表
性能 与任务运行关联的属性,即请求和运行结果 TaskRunProperties

OverrideTaskStepProperties

名字 描述 价值
参数 获取或设置在何时使用的替代参数的集合
执行生成步骤。
参数[]
contextPath 必须对其运行进行排队的源上下文。 字符串
文件 要对其运行进行排队的文件。 字符串
目标 docker 生成的目标生成阶段的名称。 字符串
updateTriggerToken Base64 编码的更新触发器令牌,该令牌将与基础映像触发器 Webhook 一起附加。 字符串
运行任务时可以传递的可重写值的集合。 SetValue[]

PlatformProperties

名字 描述 价值
建筑 OS 体系结构。 '386'
“amd64”
“arm”
“arm64”
“x86”
操作系统 运行所需的操作系统类型。 “Linux”
“Windows”(必需)
变体 CPU 的变体。 “v6”
“v7”
“v8”

RunRequest

名字 描述 价值
agentPoolName 运行的专用代理池。 字符串
isArchiveEnabled 指示是否为运行启用了存档的值。 bool
logTemplate 描述运行日志项目的存储库和标记信息的模板。 字符串
类型 对于 DockerBuildRequest类型,设置为“DockerBuildRequest”。 对于 type EncodedTaskRunRequest,设置为“EncodedTaskRunRequest”。 对于 fileTaskRunRequest类型,设置为“FileTaskRunRequest”。 对于 TaskRunRequest类型,设置为“TaskRunRequest”。 “DockerBuildRequest”
“EncodedTaskRunRequest”
“FileTaskRunRequest”
“TaskRunRequest”(必需)

SecretObject

名字 描述 价值
类型 机密对象的类型,该对象确定机密对象的值必须如何
解释。
“Opaque”
“Vaultsecret”
价值 机密的值。 将确定此值的格式
基于机密对象的类型。 如果类型为 Opaque,则该值将为
按原样使用,无需进行任何修改。
字符串

SetValue

名字 描述 价值
isSecret 用于指示值是否表示机密的标志。 bool
名字 可重写值的名称。 string (必需)
价值 可重写的值。 string (必需)

SourceRegistryCredentials

名字 描述 价值
loginMode 确定源注册表登录范围的身份验证模式。 源注册表的凭据
将使用给定的范围生成。 这些凭据将用于登录
运行过程中的源注册表。
“Default”
“None”

TaskRunProperties

名字 描述 价值
forceUpdateTag 即使运行请求配置未更改,如何强制重新运行运行 字符串
runRequest 运行的请求(参数) RunRequest

TaskRunRequest

名字 描述 价值
overrideTaskStepProperties 运行任务时可以传递的可重写参数集。 OverrideTaskStepProperties
taskId 必须对其运行进行排队的任务的资源 ID。 string (必需)
类型 运行请求的类型。 “TaskRunRequest”(必需)

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串

ARM 模板资源定义

可以使用目标操作部署注册表/taskRuns 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/taskRuns 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ContainerRegistry/registries/taskRuns",
  "apiVersion": "2019-06-01-preview",
  "name": "string",
  "identity": {
    "principalId": "string",
    "tenantId": "string",
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
        "clientId": "string",
        "principalId": "string"
      }
    }
  },
  "location": "string",
  "properties": {
    "forceUpdateTag": "string",
    "runRequest": {
      "agentPoolName": "string",
      "isArchiveEnabled": "bool",
      "logTemplate": "string",
      "type": "string"
      // For remaining properties, see RunRequest objects
    }
  }
}

RunRequest 对象

设置 类型 属性以指定对象的类型。

对于 DockerBuildRequest,请使用:

{
  "agentConfiguration": {
    "cpu": "int"
  },
  "arguments": [
    {
      "isSecret": "bool",
      "name": "string",
      "value": "string"
    }
  ],
  "credentials": {
    "customRegistries": {
      "{customized property}": {
        "identity": "string",
        "password": {
          "type": "string",
          "value": "string"
        },
        "userName": {
          "type": "string",
          "value": "string"
        }
      }
    },
    "sourceRegistry": {
      "loginMode": "string"
    }
  },
  "dockerFilePath": "string",
  "imageNames": [ "string" ],
  "isPushEnabled": "bool",
  "noCache": "bool",
  "platform": {
    "architecture": "string",
    "os": "string",
    "variant": "string"
  },
  "sourceLocation": "string",
  "target": "string",
  "timeout": "int",
  "type": "DockerBuildRequest"
}

对于 EncodedTaskRunRequest,请使用:

{
  "agentConfiguration": {
    "cpu": "int"
  },
  "credentials": {
    "customRegistries": {
      "{customized property}": {
        "identity": "string",
        "password": {
          "type": "string",
          "value": "string"
        },
        "userName": {
          "type": "string",
          "value": "string"
        }
      }
    },
    "sourceRegistry": {
      "loginMode": "string"
    }
  },
  "encodedTaskContent": "string",
  "encodedValuesContent": "string",
  "platform": {
    "architecture": "string",
    "os": "string",
    "variant": "string"
  },
  "sourceLocation": "string",
  "timeout": "int",
  "type": "EncodedTaskRunRequest",
  "values": [
    {
      "isSecret": "bool",
      "name": "string",
      "value": "string"
    }
  ]
}

对于 FileTaskRunRequest,请使用:

{
  "agentConfiguration": {
    "cpu": "int"
  },
  "credentials": {
    "customRegistries": {
      "{customized property}": {
        "identity": "string",
        "password": {
          "type": "string",
          "value": "string"
        },
        "userName": {
          "type": "string",
          "value": "string"
        }
      }
    },
    "sourceRegistry": {
      "loginMode": "string"
    }
  },
  "platform": {
    "architecture": "string",
    "os": "string",
    "variant": "string"
  },
  "sourceLocation": "string",
  "taskFilePath": "string",
  "timeout": "int",
  "type": "FileTaskRunRequest",
  "values": [
    {
      "isSecret": "bool",
      "name": "string",
      "value": "string"
    }
  ],
  "valuesFilePath": "string"
}

对于 taskRunRequest,请使用:

{
  "overrideTaskStepProperties": {
    "arguments": [
      {
        "isSecret": "bool",
        "name": "string",
        "value": "string"
      }
    ],
    "contextPath": "string",
    "file": "string",
    "target": "string",
    "updateTriggerToken": "string",
    "values": [
      {
        "isSecret": "bool",
        "name": "string",
        "value": "string"
      }
    ]
  },
  "taskId": "string",
  "type": "TaskRunRequest"
}

属性值

AgentProperties

名字 描述 价值
中央处理器 在运行所需的内核数方面,CPU 配置。 int

论点

名字 描述 价值
isSecret 用于指示参数是否表示机密并想要从生成日志中删除的标志。 bool
名字 参数的名称。 string (必需)
价值 参数的值。 string (必需)

凭据

名字 描述 价值
customRegistries 描述用于访问其他自定义注册表的凭据参数。 密钥
字典项的 该项的值将是用于访问注册表的注册表凭据。
CredentialsCustomRegistries
sourceRegistry 描述用于访问源注册表的凭据参数。 SourceRegistryCredentials

CredentialsCustomRegistries

名字 描述 价值

CustomRegistryCredentials

名字 描述 价值
身份 指示分配给自定义凭据的托管标识。 如果用户分配的标识
此值是客户端 ID。 如果系统分配的标识,该值将 system。 在
系统分配的标识的情况下,客户端 ID 将由运行程序确定。 这
标识可用于对密钥保管库进行身份验证以检索凭据,也可能是唯一的
用于访问注册表的身份验证源。
字符串
密码 用于登录到自定义注册表的密码。 密码是机密
对象,允许通过多种方式为其提供值。
SecretObject
userName 用于登录到自定义注册表的用户名。 SecretObject

DockerBuildRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
参数 执行运行时要使用的重写参数的集合。 参数[]
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
dockerFilePath 相对于源位置的 Docker 文件路径。 string (必需)
imageNames 完全限定的映像名称,包括存储库和标记。 string[]
isPushEnabled 此属性的值指示是否应将生成的映像推送到注册表。 bool
noCache 此属性的值指示是否启用映像缓存。 bool
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
目标 docker 生成的目标生成阶段的名称。 字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “DockerBuildRequest”(必需)

EncodedTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
encodedTaskContent 模板/定义文件内容的 Base64 编码值。 string (必需)
encodedValuesContent 参数/值文件内容的 Base64 编码值。 字符串
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “EncodedTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]

FileTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
taskFilePath 相对于源的模板/定义文件路径。 string (必需)
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “FileTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]
valuesFilePath 相对于源的值/参数文件路径。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/taskRuns

名字 描述 价值
apiVersion API 版本 '2019-06-01-preview'
身份 资源的标识。 IdentityProperties
位置 资源的位置 字符串
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
性能 与任务运行关联的属性,即请求和运行结果 TaskRunProperties
类型 资源类型 “Microsoft.ContainerRegistry/registries/taskRuns”

OverrideTaskStepProperties

名字 描述 价值
参数 获取或设置在何时使用的替代参数的集合
执行生成步骤。
参数[]
contextPath 必须对其运行进行排队的源上下文。 字符串
文件 要对其运行进行排队的文件。 字符串
目标 docker 生成的目标生成阶段的名称。 字符串
updateTriggerToken Base64 编码的更新触发器令牌,该令牌将与基础映像触发器 Webhook 一起附加。 字符串
运行任务时可以传递的可重写值的集合。 SetValue[]

PlatformProperties

名字 描述 价值
建筑 OS 体系结构。 '386'
“amd64”
“arm”
“arm64”
“x86”
操作系统 运行所需的操作系统类型。 “Linux”
“Windows”(必需)
变体 CPU 的变体。 “v6”
“v7”
“v8”

RunRequest

名字 描述 价值
agentPoolName 运行的专用代理池。 字符串
isArchiveEnabled 指示是否为运行启用了存档的值。 bool
logTemplate 描述运行日志项目的存储库和标记信息的模板。 字符串
类型 对于 DockerBuildRequest类型,设置为“DockerBuildRequest”。 对于 type EncodedTaskRunRequest,设置为“EncodedTaskRunRequest”。 对于 fileTaskRunRequest类型,设置为“FileTaskRunRequest”。 对于 TaskRunRequest类型,设置为“TaskRunRequest”。 “DockerBuildRequest”
“EncodedTaskRunRequest”
“FileTaskRunRequest”
“TaskRunRequest”(必需)

SecretObject

名字 描述 价值
类型 机密对象的类型,该对象确定机密对象的值必须如何
解释。
“Opaque”
“Vaultsecret”
价值 机密的值。 将确定此值的格式
基于机密对象的类型。 如果类型为 Opaque,则该值将为
按原样使用,无需进行任何修改。
字符串

SetValue

名字 描述 价值
isSecret 用于指示值是否表示机密的标志。 bool
名字 可重写值的名称。 string (必需)
价值 可重写的值。 string (必需)

SourceRegistryCredentials

名字 描述 价值
loginMode 确定源注册表登录范围的身份验证模式。 源注册表的凭据
将使用给定的范围生成。 这些凭据将用于登录
运行过程中的源注册表。
“Default”
“None”

TaskRunProperties

名字 描述 价值
forceUpdateTag 即使运行请求配置未更改,如何强制重新运行运行 字符串
runRequest 运行的请求(参数) RunRequest

TaskRunRequest

名字 描述 价值
overrideTaskStepProperties 运行任务时可以传递的可重写参数集。 OverrideTaskStepProperties
taskId 必须对其运行进行排队的任务的资源 ID。 string (必需)
类型 运行请求的类型。 “TaskRunRequest”(必需)

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串

用法示例

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署注册表/taskRuns 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/taskRuns 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ContainerRegistry/registries/taskRuns@2019-06-01-preview"
  name = "string"
  identity = {
    principalId = "string"
    tenantId = "string"
    type = "string"
    userAssignedIdentities = {
      {customized property} = {
        clientId = "string"
        principalId = "string"
      }
    }
  }
  location = "string"
  body = jsonencode({
    properties = {
      forceUpdateTag = "string"
      runRequest = {
        agentPoolName = "string"
        isArchiveEnabled = bool
        logTemplate = "string"
        type = "string"
        // For remaining properties, see RunRequest objects
      }
    }
  })
}

RunRequest 对象

设置 类型 属性以指定对象的类型。

对于 DockerBuildRequest,请使用:

{
  agentConfiguration = {
    cpu = int
  }
  arguments = [
    {
      isSecret = bool
      name = "string"
      value = "string"
    }
  ]
  credentials = {
    customRegistries = {
      {customized property} = {
        identity = "string"
        password = {
          type = "string"
          value = "string"
        }
        userName = {
          type = "string"
          value = "string"
        }
      }
    }
    sourceRegistry = {
      loginMode = "string"
    }
  }
  dockerFilePath = "string"
  imageNames = [
    "string"
  ]
  isPushEnabled = bool
  noCache = bool
  platform = {
    architecture = "string"
    os = "string"
    variant = "string"
  }
  sourceLocation = "string"
  target = "string"
  timeout = int
  type = "DockerBuildRequest"
}

对于 EncodedTaskRunRequest,请使用:

{
  agentConfiguration = {
    cpu = int
  }
  credentials = {
    customRegistries = {
      {customized property} = {
        identity = "string"
        password = {
          type = "string"
          value = "string"
        }
        userName = {
          type = "string"
          value = "string"
        }
      }
    }
    sourceRegistry = {
      loginMode = "string"
    }
  }
  encodedTaskContent = "string"
  encodedValuesContent = "string"
  platform = {
    architecture = "string"
    os = "string"
    variant = "string"
  }
  sourceLocation = "string"
  timeout = int
  type = "EncodedTaskRunRequest"
  values = [
    {
      isSecret = bool
      name = "string"
      value = "string"
    }
  ]
}

对于 FileTaskRunRequest,请使用:

{
  agentConfiguration = {
    cpu = int
  }
  credentials = {
    customRegistries = {
      {customized property} = {
        identity = "string"
        password = {
          type = "string"
          value = "string"
        }
        userName = {
          type = "string"
          value = "string"
        }
      }
    }
    sourceRegistry = {
      loginMode = "string"
    }
  }
  platform = {
    architecture = "string"
    os = "string"
    variant = "string"
  }
  sourceLocation = "string"
  taskFilePath = "string"
  timeout = int
  type = "FileTaskRunRequest"
  values = [
    {
      isSecret = bool
      name = "string"
      value = "string"
    }
  ]
  valuesFilePath = "string"
}

对于 taskRunRequest,请使用:

{
  overrideTaskStepProperties = {
    arguments = [
      {
        isSecret = bool
        name = "string"
        value = "string"
      }
    ]
    contextPath = "string"
    file = "string"
    target = "string"
    updateTriggerToken = "string"
    values = [
      {
        isSecret = bool
        name = "string"
        value = "string"
      }
    ]
  }
  taskId = "string"
  type = "TaskRunRequest"
}

属性值

AgentProperties

名字 描述 价值
中央处理器 在运行所需的内核数方面,CPU 配置。 int

论点

名字 描述 价值
isSecret 用于指示参数是否表示机密并想要从生成日志中删除的标志。 bool
名字 参数的名称。 string (必需)
价值 参数的值。 string (必需)

凭据

名字 描述 价值
customRegistries 描述用于访问其他自定义注册表的凭据参数。 密钥
字典项的 该项的值将是用于访问注册表的注册表凭据。
CredentialsCustomRegistries
sourceRegistry 描述用于访问源注册表的凭据参数。 SourceRegistryCredentials

CredentialsCustomRegistries

名字 描述 价值

CustomRegistryCredentials

名字 描述 价值
身份 指示分配给自定义凭据的托管标识。 如果用户分配的标识
此值是客户端 ID。 如果系统分配的标识,该值将 system。 在
系统分配的标识的情况下,客户端 ID 将由运行程序确定。 这
标识可用于对密钥保管库进行身份验证以检索凭据,也可能是唯一的
用于访问注册表的身份验证源。
字符串
密码 用于登录到自定义注册表的密码。 密码是机密
对象,允许通过多种方式为其提供值。
SecretObject
userName 用于登录到自定义注册表的用户名。 SecretObject

DockerBuildRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
参数 执行运行时要使用的重写参数的集合。 参数[]
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
dockerFilePath 相对于源位置的 Docker 文件路径。 string (必需)
imageNames 完全限定的映像名称,包括存储库和标记。 string[]
isPushEnabled 此属性的值指示是否应将生成的映像推送到注册表。 bool
noCache 此属性的值指示是否启用映像缓存。 bool
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
目标 docker 生成的目标生成阶段的名称。 字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “DockerBuildRequest”(必需)

EncodedTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
encodedTaskContent 模板/定义文件内容的 Base64 编码值。 string (必需)
encodedValuesContent 参数/值文件内容的 Base64 编码值。 字符串
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “EncodedTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]

FileTaskRunRequest

名字 描述 价值
agentConfiguration 运行代理的计算机配置。 AgentProperties
凭据 描述调用此运行时将使用的一组凭据的属性。 凭据
平台 运行必须针对的平台属性。 PlatformProperties (必需)
sourceLocation 源上下文的 URL(绝对或相对)。 它可以是 tar 或 git 存储库的 URL。
如果是相对 URL,则应从调用 listBuildSourceUploadUrl API 获取相对路径。
字符串
taskFilePath 相对于源的模板/定义文件路径。 string (必需)
超时 运行超时(以秒为单位)。 int

约束:
最小值 = 300
最大值 = 28800
类型 运行请求的类型。 “FileTaskRunRequest”(必需)
运行任务时可以传递的可重写值的集合。 SetValue[]
valuesFilePath 相对于源的值/参数文件路径。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/taskRuns

名字 描述 价值
身份 资源的标识。 IdentityProperties
位置 资源的位置 字符串
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:注册表
性能 与任务运行关联的属性,即请求和运行结果 TaskRunProperties
类型 资源类型 “Microsoft.ContainerRegistry/registries/taskRuns@2019-06-01-preview”

OverrideTaskStepProperties

名字 描述 价值
参数 获取或设置在何时使用的替代参数的集合
执行生成步骤。
参数[]
contextPath 必须对其运行进行排队的源上下文。 字符串
文件 要对其运行进行排队的文件。 字符串
目标 docker 生成的目标生成阶段的名称。 字符串
updateTriggerToken Base64 编码的更新触发器令牌,该令牌将与基础映像触发器 Webhook 一起附加。 字符串
运行任务时可以传递的可重写值的集合。 SetValue[]

PlatformProperties

名字 描述 价值
建筑 OS 体系结构。 '386'
“amd64”
“arm”
“arm64”
“x86”
操作系统 运行所需的操作系统类型。 “Linux”
“Windows”(必需)
变体 CPU 的变体。 “v6”
“v7”
“v8”

RunRequest

名字 描述 价值
agentPoolName 运行的专用代理池。 字符串
isArchiveEnabled 指示是否为运行启用了存档的值。 bool
logTemplate 描述运行日志项目的存储库和标记信息的模板。 字符串
类型 对于 DockerBuildRequest类型,设置为“DockerBuildRequest”。 对于 type EncodedTaskRunRequest,设置为“EncodedTaskRunRequest”。 对于 fileTaskRunRequest类型,设置为“FileTaskRunRequest”。 对于 TaskRunRequest类型,设置为“TaskRunRequest”。 “DockerBuildRequest”
“EncodedTaskRunRequest”
“FileTaskRunRequest”
“TaskRunRequest”(必需)

SecretObject

名字 描述 价值
类型 机密对象的类型,该对象确定机密对象的值必须如何
解释。
“Opaque”
“Vaultsecret”
价值 机密的值。 将确定此值的格式
基于机密对象的类型。 如果类型为 Opaque,则该值将为
按原样使用,无需进行任何修改。
字符串

SetValue

名字 描述 价值
isSecret 用于指示值是否表示机密的标志。 bool
名字 可重写值的名称。 string (必需)
价值 可重写的值。 string (必需)

SourceRegistryCredentials

名字 描述 价值
loginMode 确定源注册表登录范围的身份验证模式。 源注册表的凭据
将使用给定的范围生成。 这些凭据将用于登录
运行过程中的源注册表。
“Default”
“None”

TaskRunProperties

名字 描述 价值
forceUpdateTag 即使运行请求配置未更改,如何强制重新运行运行 字符串
runRequest 运行的请求(参数) RunRequest

TaskRunRequest

名字 描述 价值
overrideTaskStepProperties 运行任务时可以传递的可重写参数集。 OverrideTaskStepProperties
taskId 必须对其运行进行排队的任务的资源 ID。 string (必需)
类型 运行请求的类型。 “TaskRunRequest”(必需)

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串