共用方式為


Definitions - Create

建立發行定義

POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1

URI 參數

名稱 位於 必要 類型 Description
organization
path True

string

Azure DevOps 組織的名稱。

project
path True

string

項目識別碼或項目名稱

api-version
query True

string

要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。

要求本文

名稱 類型 Description
_links

ReferenceLinks

取得發行定義相關資源、API和檢視的連結。

artifacts

Artifact[]

取得或設定成品清單。

comment

string

取得或設定批注。

createdBy

IdentityRef

取得或設定建立的身分識別。

createdOn

string (date-time)

取得建立日期。

description

string

取得或設定描述。

environments

ReleaseDefinitionEnvironment[]

取得或設定環境清單。

id

integer (int32)

取得發行定義的唯一標識碼。

isDeleted

boolean

是否刪除發行定義。

lastRelease

ReleaseReference

取得上一個版本的參考。

modifiedBy

IdentityRef

取得或設定已修改的身分識別。

modifiedOn

string (date-time)

取得修改日期。

name

string

取得或設定發行定義的名稱。

path

string

取得或設定發行定義的路徑。

projectReference

ProjectReference

取得或設定項目參考。

properties

PropertiesCollection

取得或設定屬性。

releaseNameFormat

string

取得或設定版本名稱格式。

revision

integer (int32)

取得修訂編號。

source

ReleaseDefinitionSource

取得或設定發行定義的來源。

tags

string[]

取得或設定標記清單。

triggers

ReleaseTriggerBase[]

取得或設定觸發程式清單。

url

string

取得 REST API URL 以存取發行定義。

variableGroups

integer[] (int32)

取得或設定變數群組的清單。

variables

<string,  ConfigurationVariableValue>

取得或設定變數的字典。

回應

名稱 類型 Description
200 OK

ReleaseDefinition

成功作業

安全性

oauth2

類型: oauth2
Flow: accessCode
授權 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

範圍

名稱 Description
vso.release_execute 授與讀取和更新發行成品的能力,包括資料夾、版本、發行定義和發行環境,以及將新版本排入佇列的能力。

範例

Create release definition

範例要求

POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1

{
  "source": "undefined",
  "revision": 1,
  "description": null,
  "createdBy": null,
  "createdOn": "0001-01-01T00:00:00",
  "modifiedBy": null,
  "modifiedOn": "0001-01-01T00:00:00",
  "isDeleted": false,
  "variables": {},
  "variableGroups": [],
  "environments": [
    {
      "id": 0,
      "name": "PROD",
      "variables": {},
      "variableGroups": [],
      "preDeployApprovals": {
        "approvals": [
          {
            "rank": 1,
            "isAutomated": false,
            "isNotificationOn": false,
            "approver": {
              "displayName": null,
              "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97"
            },
            "id": 0
          }
        ]
      },
      "postDeployApprovals": {
        "approvals": [
          {
            "rank": 1,
            "isAutomated": true,
            "isNotificationOn": false,
            "id": 0
          }
        ]
      },
      "deployPhases": [
        {
          "deploymentInput": {
            "parallelExecution": {
              "parallelExecutionType": "none"
            },
            "skipArtifactsDownload": false,
            "artifactsDownloadInput": {},
            "queueId": 15,
            "demands": [],
            "enableAccessToken": false,
            "timeoutInMinutes": 0,
            "jobCancelTimeoutInMinutes": 1,
            "condition": "succeeded()",
            "overrideInputs": {}
          },
          "rank": 1,
          "phaseType": "agentBasedDeployment",
          "name": "Run on agent",
          "workflowTasks": []
        }
      ],
      "environmentOptions": {
        "emailNotificationType": "OnlyOnFailure",
        "emailRecipients": "release.environment.owner;release.creator",
        "skipArtifactsDownload": false,
        "timeoutInMinutes": 0,
        "enableAccessToken": false,
        "publishDeploymentStatus": false,
        "badgeEnabled": false,
        "autoLinkWorkItems": false,
        "pullRequestDeploymentEnabled": false
      },
      "demands": [],
      "conditions": [],
      "executionPolicy": {
        "concurrencyCount": 0,
        "queueDepthCount": 0
      },
      "schedules": [],
      "retentionPolicy": {
        "daysToKeep": 30,
        "releasesToKeep": 3,
        "retainBuild": true
      },
      "properties": {},
      "preDeploymentGates": {
        "id": 0,
        "gatesOptions": null,
        "gates": []
      },
      "postDeploymentGates": {
        "id": 0,
        "gatesOptions": null,
        "gates": []
      },
      "environmentTriggers": []
    }
  ],
  "artifacts": [],
  "triggers": [],
  "releaseNameFormat": null,
  "tags": [],
  "properties": {},
  "id": 0,
  "name": "Fabrikam-web",
  "projectReference": null,
  "_links": {}
}

範例回覆

{
  "source": "restApi",
  "revision": 1,
  "description": null,
  "createdBy": {
    "displayName": "Chuck Reinhart",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
      }
    },
    "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "uniqueName": "fabfiber@outlook.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "descriptor": "aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
  },
  "createdOn": "2018-12-11T04:56:42.237Z",
  "modifiedBy": {
    "displayName": "Chuck Reinhart",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
      }
    },
    "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "uniqueName": "fabfiber@outlook.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97",
    "descriptor": "aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
  },
  "modifiedOn": "2018-12-11T04:56:42.237Z",
  "isDeleted": false,
  "variables": {},
  "variableGroups": [],
  "environments": [
    {
      "id": 42,
      "name": "PROD",
      "rank": 1,
      "owner": {
        "displayName": "Chuck Reinhart",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
          }
        },
        "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
        "uniqueName": "fabfiber@outlook.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97",
        "descriptor": "aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
      },
      "variables": {},
      "variableGroups": [],
      "preDeployApprovals": {
        "approvals": [
          {
            "rank": 1,
            "isAutomated": false,
            "isNotificationOn": false,
            "approver": {
              "displayName": "Chuck Reinhart",
              "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
              "_links": {
                "avatar": {
                  "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
                }
              },
              "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
              "uniqueName": "fabfiber@outlook.com",
              "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97",
              "descriptor": "aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
            },
            "id": 124
          }
        ],
        "approvalOptions": {
          "requiredApproverCount": 0,
          "releaseCreatorCanBeApprover": true,
          "autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
          "enforceIdentityRevalidation": false,
          "timeoutInMinutes": 0,
          "executionOrder": "beforeGates"
        }
      },
      "deployStep": {
        "id": 125
      },
      "postDeployApprovals": {
        "approvals": [
          {
            "rank": 1,
            "isAutomated": true,
            "isNotificationOn": false,
            "id": 126
          }
        ]
      },
      "deployPhases": [
        {
          "deploymentInput": {
            "parallelExecution": {
              "parallelExecutionType": "none"
            },
            "skipArtifactsDownload": false,
            "artifactsDownloadInput": {
              "downloadInputs": []
            },
            "queueId": 15,
            "demands": [],
            "enableAccessToken": false,
            "timeoutInMinutes": 0,
            "jobCancelTimeoutInMinutes": 1,
            "condition": "succeeded()",
            "overrideInputs": {}
          },
          "rank": 1,
          "phaseType": "agentBasedDeployment",
          "name": "Run on agent",
          "refName": null,
          "workflowTasks": []
        }
      ],
      "environmentOptions": {
        "emailNotificationType": "OnlyOnFailure",
        "emailRecipients": "release.environment.owner;release.creator",
        "skipArtifactsDownload": false,
        "timeoutInMinutes": 0,
        "enableAccessToken": false,
        "publishDeploymentStatus": false,
        "badgeEnabled": false,
        "autoLinkWorkItems": false,
        "pullRequestDeploymentEnabled": false
      },
      "demands": [],
      "conditions": [],
      "executionPolicy": {
        "concurrencyCount": 0,
        "queueDepthCount": 0
      },
      "schedules": [],
      "currentRelease": {
        "id": 0,
        "url": "https://vsrm.dev.azure.com/fabrikam/42fa3371-9e49-4858-8f49-9d4f2d0b32e8/_apis/Release/releases/0",
        "_links": {}
      },
      "retentionPolicy": {
        "daysToKeep": 30,
        "releasesToKeep": 3,
        "retainBuild": true
      },
      "properties": {},
      "preDeploymentGates": {
        "id": 0,
        "gatesOptions": null,
        "gates": []
      },
      "postDeploymentGates": {
        "id": 0,
        "gatesOptions": null,
        "gates": []
      },
      "environmentTriggers": [],
      "badgeUrl": "https://vsrm.dev.azure.com/fabrikam/_apis/public/Release/badge/42fa3371-9e49-4858-8f49-9d4f2d0b32e8/42/42"
    }
  ],
  "artifacts": [],
  "triggers": [],
  "releaseNameFormat": "",
  "tags": [],
  "properties": {},
  "id": 42,
  "name": "Fabrikam-web",
  "path": "\\",
  "projectReference": null,
  "url": "https://vsrm.dev.azure.com/fabrikam/42fa3371-9e49-4858-8f49-9d4f2d0b32e8/_apis/Release/definitions/42",
  "_links": {
    "self": {
      "href": "https://vsrm.dev.azure.com/fabrikam/42fa3371-9e49-4858-8f49-9d4f2d0b32e8/_apis/Release/definitions/42"
    },
    "web": {
      "href": "https://dev.azure.com/fabrikam/42fa3371-9e49-4858-8f49-9d4f2d0b32e8/_release?definitionId=42"
    }
  }
}

定義

名稱 Description
ApprovalExecutionOrder

核准執行順序。

ApprovalOptions
Artifact
ArtifactSourceReference
AuthorizationHeader
Condition
ConditionType

取得或設定條件類型。

ConfigurationVariableValue
DataSourceBindingBase

表示服務端點要求的數據源系結。

Demand
DeployPhase
DeployPhaseTypes

指出部署階段類型。

EnvironmentExecutionPolicy

定義發行管理端佇列環境佇列的原則。 只有在滿足所述的原則時,我們才會傳送至環境執行器 [建立預先部署和其他步驟]。

EnvironmentOptions
EnvironmentRetentionPolicy
EnvironmentTrigger
EnvironmentTriggerType

取得或設定觸發程序類型。

IdentityRef
ProcessParameters
ProjectReference
PropertiesCollection

類別會將屬性包表示為索引鍵/值組的集合。 接受 TypeCode != TypeCode.Object 以外的所有基本類型值(任何具有 DBNull的類型)。 Byte[]、Int32、Double、DateType 和 String 類型的值會保留其類型,其他基本類型會重新調整為 String。 Byte[] 預期為base64編碼字串。

ReferenceLinks

表示 REST 參考連結集合的類別。

ReleaseDefinition
ReleaseDefinitionApprovals
ReleaseDefinitionApprovalStep
ReleaseDefinitionDeployStep
ReleaseDefinitionEnvironment
ReleaseDefinitionGate
ReleaseDefinitionGatesOptions
ReleaseDefinitionGatesStep
ReleaseDefinitionShallowReference
ReleaseDefinitionSource

取得或設定發行定義的來源。

ReleaseReason

取得發行的原因。

ReleaseReference
ReleaseSchedule
ReleaseShallowReference
ReleaseTriggerBase
ReleaseTriggerType

發行觸發程式的類型。

ScheduleDays

要發行的星期幾。

TaskInputDefinitionBase
TaskInputValidation
TaskSourceDefinitionBase
WorkflowTask

ApprovalExecutionOrder

核准執行順序。

Description
afterGatesAlways

執行網關之後,一律會顯示核准。

afterSuccessfulGates

成功執行閘道之後顯示的核准。

beforeGates

門前顯示的核准。

ApprovalOptions

名稱 類型 Description
autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped

boolean

指定如果相同核准者已核准上一個階段,是否可以略過核准。

enforceIdentityRevalidation

boolean

指定在完成核准之前,是否重新驗證核准者的身分識別。

executionOrder

ApprovalExecutionOrder

核准執行順序。

releaseCreatorCanBeApprover

boolean

指定要求發行或部署的使用者是否應允許核准者。

requiredApproverCount

integer (int32)

向前移動發行所需的核准數目。 '0' 表示所有必要的核准。

timeoutInMinutes

integer (int32)

核准逾時。 核准預設逾時為 30 天。 允許的逾時上限為 365 天。 '0' 表示預設逾時,即 30 天。

Artifact

名稱 類型 Description
alias

string

取得或設定別名。

definitionReference

<string,  ArtifactSourceReference>

取得或設定定義參考。 例如 {“project”:{“id”:“fed755ea-49c5-4399-acea-fd5b5aa90a6c”,“name”:“myProject”},“definition”:{“id”:“1”,“name”:“mybuildDefinition”},“connection”:{“id”:“1”,“name”:“myConnection”}}。

isPrimary

boolean

指出成品是否為主要成品。

isRetained

boolean

指出成品是否由發行保留。

type

string

取得或設定類型。 其值可以是 'Build'、'Jenkins'、'GitHub'、'Nuget'、'Team Build (external)'、'ExternalTFSBuild'、'Git'、'TFVC'、'ExternalTfsXamlBuild'。

ArtifactSourceReference

名稱 類型 Description
id

string

成品來源的標識碼。

name

string

成品來源的名稱。

AuthorizationHeader

名稱 類型 Description
name

string

value

string

Condition

名稱 類型 Description
conditionType

ConditionType

取得或設定條件類型。

name

string

取得或設定條件的名稱。 例如 『ReleaseStarted』。

value

string

取得或設定條件的值。

ConditionType

取得或設定條件類型。

Description
artifact

條件類型為成品。

environmentState

條件類型是環境狀態。

event

條件類型為事件。

undefined

條件類型未定義。

ConfigurationVariableValue

名稱 類型 Description
allowOverride

boolean

取得和設定是否可以在部署時間覆寫變數。

isSecret

boolean

取得或設定為變數為秘密或非秘密。

value

string

取得和設定組態變數的值。

DataSourceBindingBase

表示服務端點要求的數據源系結。

名稱 類型 Description
callbackContextTemplate

string

此數據源支援的分頁格式(ContinuationToken/SkipTop)。

callbackRequiredTemplate

string

後續需要呼叫?

dataSourceName

string

取得或設定數據源的名稱。

endpointId

string

取得或設定端點標識碼。

endpointUrl

string

取得或設定服務端點的 URL。

headers

AuthorizationHeader[]

取得或設定授權標頭。

initialContextTemplate

string

定義查詢參數的初始值

parameters

object

取得或設定數據源的參數。

requestContent

string

取得或設定 HTTP 要求本文

requestVerb

string

取得或設定 HTTP 要求動詞命令

resultSelector

string

取得或設定結果選取器。

resultTemplate

string

取得或設定結果範本。

target

string

取得或設定數據源的目標。

Demand

名稱 類型 Description
name

string

取得和設定需求的名稱。

value

string

取得和設定需求的值。

DeployPhase

名稱 類型 Description
name

string

取得和設定部署階段的名稱。

phaseType

DeployPhaseTypes

指出部署階段類型。

rank

integer (int32)

取得和設定部署階段的排名。

refName

string

取得和設定部署階段的參考名稱。

workflowTasks

WorkflowTask[]

取得和設定部署階段的工作流程工作。

DeployPhaseTypes

指出部署階段類型。

Description
agentBasedDeployment

階段類型,其中包含代理程式上執行的工作。

deploymentGates

階段類型,其中包含做為閘道的工作,以供部署繼續進行。

machineGroupBasedDeployment

階段類型,其中包含部署群組機器上執行的工作。

runOnServer

階段類型,其中包含伺服器執行的工作。

undefined

未定義階段類型。 請勿使用此 。

EnvironmentExecutionPolicy

定義發行管理端佇列環境佇列的原則。 只有在滿足所述的原則時,我們才會傳送至環境執行器 [建立預先部署和其他步驟]。

名稱 類型 Description
concurrencyCount

integer (int32)

此原則決定環境執行器會有多少環境。

queueDepthCount

integer (int32)

EnvironmentQueue 數據表中的佇列深度,此數據表會保留環境專案,直到環境執行器是免費的 [根據原則],讓另一個環境執行。

EnvironmentOptions

名稱 類型 Description
autoLinkWorkItems

boolean

取得和設定為自動連結工作專案。

badgeEnabled

boolean

取得和設定為啟用徽章或未啟用徽章。

publishDeploymentStatus

boolean

取得和設定為發佈部署狀態。

pullRequestDeploymentEnabled

boolean

取得和設定為啟用或未啟用.pull 要求部署。

EnvironmentRetentionPolicy

名稱 類型 Description
daysToKeep

integer (int32)

取得並設定要保留環境的天數。

releasesToKeep

integer (int32)

取得和設定要保留的版本數目。

retainBuild

boolean

取得和設定為要保留或未保留的組建。

EnvironmentTrigger

名稱 類型 Description
definitionEnvironmentId

integer (int32)

此觸發程式適用的定義環境標識碼。

releaseDefinitionId

integer (int32)

此觸發程式適用的 ReleaseDefinition 識別符。

triggerContent

string

取得或設定觸發程序內容。

triggerType

EnvironmentTriggerType

取得或設定觸發程序類型。

EnvironmentTriggerType

取得或設定觸發程序類型。

Description
deploymentGroupRedeploy

環境觸發程式類型是部署群組重新部署。

rollbackRedeploy

環境觸發程式類型為 Rollback。

undefined

未定義環境觸發程序類型。

IdentityRef

名稱 類型 Description
_links

ReferenceLinks

此欄位包含圖表主旨的相關零或更多有趣連結。 您可以叫用這些連結,以取得此圖表主題的其他關聯性或更詳細的資訊。

descriptor

string

描述元是在系統執行時參考圖表主旨的主要方式。 此欄位會唯一識別帳戶和組織之間的相同圖表主題。

directoryAlias

string

已淘汰 - 查詢 IdentityRef “_links” 字典中參考的 Graph 使用者,即可擷取

displayName

string

這是圖形主體的非唯一顯示名稱。 若要變更此欄位,您必須在來源提供者中變更其值。

id

string

imageUrl

string

已淘汰 - 可在 IdentityRef “_links” 字典的 “avatar” 專案中取得

inactive

boolean

已淘汰 - 可藉由查詢 GraphUser “_links” 字典的 “membershipState” 專案中參考的 Graph 成員資格狀態來擷取

isAadIdentity

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

已淘汰 - 未在 ToIdentityRef 的大部分預先存在實作中使用

uniqueName

string

已淘汰 - 請改用 Domain+PrincipalName

url

string

此 URL 是此圖表主體來源資源的完整路由。

ProcessParameters

名稱 類型 Description
dataSourceBindings

DataSourceBindingBase[]

表示服務端點要求的數據源系結。

inputs

TaskInputDefinitionBase[]

sourceDefinitions

TaskSourceDefinitionBase[]

ProjectReference

名稱 類型 Description
id

string (uuid)

取得此欄位的唯一標識碼。

name

string

取得項目的名稱。

PropertiesCollection

類別會將屬性包表示為索引鍵/值組的集合。 接受 TypeCode != TypeCode.Object 以外的所有基本類型值(任何具有 DBNull的類型)。 Byte[]、Int32、Double、DateType 和 String 類型的值會保留其類型,其他基本類型會重新調整為 String。 Byte[] 預期為base64編碼字串。

名稱 類型 Description
count

integer (int32)

集合中的屬性計數。

item

object

keys

string[]

集合中的索引鍵集合。

values

string[]

集合中的值集合。

表示 REST 參考連結集合的類別。

名稱 類型 Description
links

object

連結的只讀檢視。 因為參考連結是只讀的,所以我們只想要將其公開為只讀。

ReleaseDefinition

名稱 類型 Description
_links

ReferenceLinks

取得發行定義相關資源、API和檢視的連結。

artifacts

Artifact[]

取得或設定成品清單。

comment

string

取得或設定批注。

createdBy

IdentityRef

取得或設定建立的身分識別。

createdOn

string (date-time)

取得建立日期。

description

string

取得或設定描述。

environments

ReleaseDefinitionEnvironment[]

取得或設定環境清單。

id

integer (int32)

取得發行定義的唯一標識碼。

isDeleted

boolean

是否刪除發行定義。

lastRelease

ReleaseReference

取得上一個版本的參考。

modifiedBy

IdentityRef

取得或設定已修改的身分識別。

modifiedOn

string (date-time)

取得修改日期。

name

string

取得或設定發行定義的名稱。

path

string

取得或設定發行定義的路徑。

projectReference

ProjectReference

取得或設定項目參考。

properties

PropertiesCollection

取得或設定屬性。

releaseNameFormat

string

取得或設定版本名稱格式。

revision

integer (int32)

取得修訂編號。

source

ReleaseDefinitionSource

取得或設定發行定義的來源。

tags

string[]

取得或設定標記清單。

triggers

ReleaseTriggerBase[]

取得或設定觸發程式清單。

url

string

取得 REST API URL 以存取發行定義。

variableGroups

integer[] (int32)

取得或設定變數群組的清單。

variables

<string,  ConfigurationVariableValue>

取得或設定變數的字典。

ReleaseDefinitionApprovals

名稱 類型 Description
approvalOptions

ApprovalOptions

取得或設定核准選項。

approvals

ReleaseDefinitionApprovalStep[]

取得或設定核准。

ReleaseDefinitionApprovalStep

名稱 類型 Description
approver

IdentityRef

取得和設定核准者。

id

integer (int32)

核准或部署步驟的標識碼。

isAutomated

boolean

指出核准是否自動化。

isNotificationOn

boolean

指出核准通知集。

rank

integer (int32)

取得或設定核准步驟的排名。

ReleaseDefinitionDeployStep

名稱 類型 Description
id

integer (int32)

核准或部署步驟的標識碼。

tasks

WorkflowTask[]

此定義的步驟清單。

ReleaseDefinitionEnvironment

名稱 類型 Description
badgeUrl

string

取得或設定 BadgeUrl。 當發行定義環境中啟用徽章時,將會使用 BadgeUrl。

conditions

Condition[]

取得或設定環境條件。

currentRelease

ReleaseShallowReference

取得或設定目前的版本參考。

demands

Demand[]

取得或設定需求。

deployPhases

DeployPhase[]

取得或設定環境的部署階段。

deployStep

ReleaseDefinitionDeployStep

取得或設定 deploystep。

environmentOptions

EnvironmentOptions

取得或設定環境選項。

environmentTriggers

EnvironmentTrigger[]

取得或設定環境中的觸發程式。

executionPolicy

EnvironmentExecutionPolicy

取得或設定環境執行原則。

id

integer (int32)

取得和設定 ReleaseDefinitionEnvironment 的標識碼。

name

string

取得和設定 ReleaseDefinitionEnvironment 的名稱。

owner

IdentityRef

取得和設定 ReleaseDefinitionEnvironment 的擁有者。

postDeployApprovals

ReleaseDefinitionApprovals

取得或設定部署後核准。

postDeploymentGates

ReleaseDefinitionGatesStep

取得或設定部署后閘道。

preDeployApprovals

ReleaseDefinitionApprovals

取得或設定預先部署核准。

preDeploymentGates

ReleaseDefinitionGatesStep

取得或設定預先部署閘道。

processParameters

ProcessParameters

取得或設定環境進程參數。

properties

PropertiesCollection

取得或設定環境上的屬性。

queueId

integer (int32)

取得或設定佇列標識碼。

rank

integer (int32)

取得和設定 ReleaseDefinitionEnvironment 的排名。

retentionPolicy

EnvironmentRetentionPolicy

取得或設定環境保留原則。

schedules

ReleaseSchedule[]

取得或設定排程

variableGroups

integer[] (int32)

取得或設定變數群組。

variables

<string,  ConfigurationVariableValue>

取得和設定變數。

ReleaseDefinitionGate

名稱 類型 Description
tasks

WorkflowTask[]

取得或設定閘道工作流程。

ReleaseDefinitionGatesOptions

名稱 類型 Description
isEnabled

boolean

取得或設定為啟用或未啟用的閘道。

minimumSuccessDuration

integer (int32)

取得或設定成功閘道評估之後穩定結果的最小持續時間。

samplingInterval

integer (int32)

取得或設定重新評估閘道之間的時間。

stabilizationTime

integer (int32)

取得或設定評估之前的延遲。

timeout

integer (int32)

取得或設定逾時,閘道失敗之後。

ReleaseDefinitionGatesStep

名稱 類型 Description
gates

ReleaseDefinitionGate[]

取得或設定閘道。

gatesOptions

ReleaseDefinitionGatesOptions

取得或設定閘道選項。

id

integer (int32)

ReleaseDefinitionGateStep 的標識符。

ReleaseDefinitionShallowReference

名稱 類型 Description
_links

ReferenceLinks

取得發行定義相關資源、API和檢視的連結。

id

integer (int32)

取得發行定義的唯一標識碼。

name

string

取得或設定發行定義的名稱。

path

string

取得或設定發行定義的路徑。

projectReference

ProjectReference

取得或設定項目參考。

url

string

取得 REST API URL 以存取發行定義。

ReleaseDefinitionSource

取得或設定發行定義的來源。

Description
ibiza

指出從 Ibiza 建立的 ReleaseDefinition。

portalExtensionApi

指出從 PortalExtension API 建立的 ReleaseDefinition。

restApi

指出使用 REST API 建立的 ReleaseDefinition。

undefined

表示未定義 ReleaseDefinition 來源。

userInterface

指出使用 UI 建立的 ReleaseDefinition。

ReleaseReason

取得發行的原因。

Description
continuousIntegration

表示持續整合所觸發的發行。

manual

指出手動觸發的發行。

none

表示未設定發行觸發的原因。

pullRequest

指出 PullRequest 所觸發的發行。

schedule

指出排程所觸發的發行。

ReleaseReference

名稱 類型 Description
_links

ReferenceLinks

取得存取版本的連結。

artifacts

Artifact[]

取得成品清單。

createdBy

IdentityRef

取得建立發行的身分識別。

createdOn

string (date-time)

取得此版本建立的日期。

description

string

取得描述。

id

integer (int32)

發行的標識碼。

modifiedBy

IdentityRef

取得修改發行的身分識別。

name

string

取得發行的名稱。

reason

ReleaseReason

取得發行的原因。

releaseDefinition

ReleaseDefinitionShallowReference

取得發行定義淺層參考。

ReleaseSchedule

名稱 類型 Description
daysToRelease

ScheduleDays

要發行的星期幾。

jobId

string (uuid)

Team Foundation 作業定義作業標識碼。

scheduleOnlyWithChanges

boolean

旗標,判斷此排程是否應該只有在相關聯的成品已變更或發行定義變更時才會釋放。

startHours

integer (int32)

要開始的當地時區小時。

startMinutes

integer (int32)

要啟動的當地時區分鐘。

timeZoneId

string

發行排程的時區標識符,例如 『UTC』。

ReleaseShallowReference

名稱 類型 Description
_links

ReferenceLinks

取得版本相關資源、API 和檢視的連結。

id

integer (int32)

取得發行的唯一標識碼。

name

string

取得或設定版本的名稱。

url

string

取得 REST API URL 以存取版本。

ReleaseTriggerBase

名稱 類型 Description
triggerType

ReleaseTriggerType

發行觸發程式的類型。

ReleaseTriggerType

發行觸發程式的類型。

Description
artifactSource

成品型發行觸發程式。

containerImage

容器映像型發行觸發程式。

package

套件型發行觸發程式。

pullRequest

提取要求型發行觸發程式。

schedule

排程型發行觸發程式。

sourceRepo

來源存放庫型發行觸發程式。

undefined

未設定發行觸發程序類型。

ScheduleDays

要發行的星期幾。

Description
all

排程在一周中的所有天數。

friday

排定在星期五。

monday

排定在星期一。

none

未設定排程的日期。

saturday

排定在星期六。

sunday

排定在星期日。

thursday

排定在星期四。

tuesday

排定在星期二。

wednesday

排定在星期三。

TaskInputDefinitionBase

名稱 類型 Description
aliases

string[]

defaultValue

string

groupName

string

helpMarkDown

string

label

string

name

string

options

object

properties

object

required

boolean

type

string

validation

TaskInputValidation

visibleRule

string

TaskInputValidation

名稱 類型 Description
expression

string

條件表達式

message

string

說明使用者如何在驗證失敗時更正的訊息

TaskSourceDefinitionBase

名稱 類型 Description
authKey

string

endpoint

string

keySelector

string

selector

string

target

string

WorkflowTask

名稱 類型 Description
alwaysRun

boolean

取得或設定為工作一律執行或未執行。

condition

string

取得或設定工作條件。

continueOnError

boolean

取得或設定當工作在錯誤時繼續執行。

definitionType

string

取得或設定工作定義類型。 範例:- 'Agent'、DeploymentGroup'、'Server' 或 'ServerGate'。

enabled

boolean

取得或設定為已啟用或未啟用的工作。

environment

object

取得或設定工作環境變數。

inputs

object

取得或設定工作輸入。

name

string

取得或設定工作的名稱。

overrideInputs

object

取得或設定工作覆寫輸入。

refName

string

取得或設定工作的參考名稱。

retryCountOnTaskFailure

integer (int32)

取得或設定工作 retryCount。

taskId

string (uuid)

取得或設定工作的識別碼。

timeoutInMinutes

integer (int32)

取得或設定工作逾時。

version

string

取得或設定工作的版本。