Targets - List
デプロイ グループ内のデプロイ ターゲットの一覧を取得します。
GET https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
GET https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?tags={tags}&name={name}&partialNameMatch={partialNameMatch}&$expand={$expand}&agentStatus={agentStatus}&agentJobResult={agentJobResult}&continuationToken={continuationToken}&$top={$top}&enabled={enabled}&api-version=5.0-preview.1
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
deployment
|
path | True |
integer int32 |
デプロイ グループの ID。 |
organization
|
path | True |
string |
Azure DevOps 組織の名前です。 |
project
|
path | True |
string |
プロジェクト ID またはプロジェクト名 |
api-version
|
query | True |
string |
使う API のバージョン。 このバージョンの API を使用するには、これを '5.0-preview.1' に設定する必要があります。 |
$expand
|
query |
返されるオブジェクトにこれらの追加の詳細を含めます。 |
||
$top
|
query |
integer int32 |
返すデプロイ ターゲットの最大数。 既定値は 1000 です。 |
|
agent
|
query |
この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。 |
||
agent
|
query |
この状態のデプロイ ターゲットのみを取得します。 |
||
continuation
|
query |
string |
この continuationToken より大きい名前を持つデプロイ ターゲットを辞書式で取得します。 |
|
enabled
|
query |
boolean |
有効または無効になっているデプロイ ターゲットのみを取得します。 既定値は 'null' で、すべてのターゲットを返します。 |
|
name
|
query |
string |
返すデプロイ ターゲットの名前パターン。 |
|
partial
|
query |
boolean |
true に設定すると、 名前 がパターンとして扱われます。 それ以外の場合は、絶対一致として扱います。 既定値は falseです。 |
|
tags
|
query |
string array (string) |
これらのコンマ区切りのタグの一覧をすべて含むデプロイ ターゲットのみを取得します。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
正常な操作 |
セキュリティ
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token 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
Scopes
名前 | 説明 |
---|---|
vso.machinegroup_manage | デプロイ グループとエージェント プールを管理する機能を提供します |
例
Get deployment targets by partial name match
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
{
"count": 1,
"value": [
{
"tags": [
"web"
],
"id": 5,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/5"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=5"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:19:41.053Z",
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "online"
}
}
]
}
Get deployment targets filtered by agent status
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
{
"count": 1,
"value": [
{
"tags": [
"web"
],
"id": 5,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/5"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=5"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:19:41.053Z",
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "online"
}
}
]
}
Get deployment targets having given tags
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
{
"count": 1,
"value": [
{
"tags": [
"db",
"web"
],
"id": 7,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/7"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=7"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:26:48.11Z",
"id": 7,
"name": "demoTarget11",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "offline"
}
}
]
}
Get deployment targets in pages
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
x-MS-ContinuationToken: demoTarget2
{
"count": 2,
"value": [
{
"tags": [
"web"
],
"id": 5,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/5"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=5"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:19:41.053Z",
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "online"
}
},
{
"tags": [
"db",
"web"
],
"id": 7,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/7"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=7"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:26:48.11Z",
"id": 7,
"name": "demoTarget11",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "offline"
}
}
]
}
Get deployment targets including their last job requests
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
{
"count": 1,
"value": [
{
"tags": [
"web"
],
"id": 5,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/5"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=5"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:19:41.053Z",
"lastCompletedRequest": {
"requestId": 1,
"queueTime": "2018-02-19T09:28:48.2633333Z",
"assignTime": "2018-02-19T09:28:48.2633333Z",
"receiveTime": "2018-02-19T09:28:52.2811279Z",
"finishTime": "2018-02-19T09:28:57.7333333Z",
"result": "succeeded",
"serviceOwner": "0000000d-0000-8888-8000-000000000000",
"hostId": "86088ab1-30d8-4526-9663-3406752b8bc6",
"scopeId": "91879ed9-819b-46f3-9e0b-52ed4b20c04c",
"planType": "Deployment",
"planId": "b7245fde-fb04-40f3-b187-78772599f522",
"jobId": "2fd39b55-daaa-499a-ad70-1896ac468a9f",
"demands": [
"DotNetFramework",
"Agent.Version -gtVersion 1.102"
],
"reservedAgent": {
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"enabled": true,
"status": "online"
},
"definition": {
"_links": {
"web": {
"href": "https://dev.azure.com/fabrikam/91879ed9-819b-46f3-9e0b-52ed4b20c04c/_release?definitionId=1"
},
"self": {
"href": "https://https://vsrm.dev.azure.com/fabrikam/91879ed9-819b-46f3-9e0b-52ed4b20c04c/_apis/Release/definitions/1"
}
},
"id": 1,
"name": "New Release Definition"
},
"owner": {
"_links": {
"web": {
"href": "https://dev.azure.com/fabrikam/91879ed9-819b-46f3-9e0b-52ed4b20c04c/_release?releaseId=1&_a=release-summary"
},
"self": {
"href": "https://https://vsrm.dev.azure.com/fabrikam/91879ed9-819b-46f3-9e0b-52ed4b20c04c/_apis/Release/releases/1"
}
},
"id": 1,
"name": "Release-1 / Environment 1"
},
"data": {},
"agentDelays": []
},
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "online"
}
}
]
}
List all deployment targets in a deployment group
Sample Request
GET https://dev.azure.com/fabrikam/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets?api-version=5.0-preview.1
Sample Response
{
"count": 3,
"value": [
{
"tags": [
"web"
],
"id": 5,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/5"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=5"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:19:41.053Z",
"id": 5,
"name": "demoTarget1",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "online"
}
},
{
"tags": [
"db",
"web"
],
"id": 7,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/7"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=7"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:26:48.11Z",
"id": 7,
"name": "demoTarget11",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "offline"
}
},
{
"tags": [
"db"
],
"id": 6,
"agent": {
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/distributedtask/pools/17/agents/6"
},
"web": {
"href": "https://dev.azure.com/fabrikam/_admin/_AgentPool#_a=agents&poolId=17&agentId=6"
}
},
"maxParallelism": 1,
"createdOn": "2018-02-19T09:23:58.267Z",
"id": 6,
"name": "demoTarget2",
"version": "2.127.0",
"osDescription": "Microsoft Windows 10.0.14393 ",
"enabled": true,
"status": "offline"
}
}
]
}
定義
名前 | 説明 |
---|---|
Demand | |
Deployment |
デプロイ ターゲット。 |
Deployment |
返されるオブジェクトにこれらの追加の詳細を含めます。 |
Identity |
|
JObject | |
JToken | |
Package |
|
Properties |
クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の |
Reference |
REST 参照リンクのコレクションを表す クラス。 |
Task |
|
Task |
OAuth 2.0 認証フローを使用してエージェントを承認するために必要なデータを提供します。 |
Task |
|
Task |
|
Task |
|
Task |
この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。 |
Task |
|
Task |
プールの種類を取得または設定します |
Task |
RSA 非対称キーの公開キー部分を表します。 |
Task |
|
Task |
エージェントの現在の接続状態を取得します。 |
Task |
この状態のデプロイ ターゲットのみを取得します。 |
Task |
|
Task |
|
Task |
|
Task |
|
Task |
Demand
名前 | 型 | 説明 |
---|---|---|
name |
string |
|
value |
string |
DeploymentMachine
デプロイ ターゲット。
名前 | 型 | 説明 |
---|---|---|
agent |
デプロイ エージェント。 |
|
id |
integer |
デプロイ ターゲット識別子。 |
tags |
string[] |
デプロイ ターゲットのタグ。 |
DeploymentTargetExpands
返されるオブジェクトにこれらの追加の詳細を含めます。
名前 | 型 | 説明 |
---|---|---|
assignedRequest |
string |
デプロイ エージェントに割り当てられたジョブ要求を含めます。 |
capabilities |
string |
デプロイ エージェントの機能を含めます。 |
lastCompletedRequest |
string |
デプロイ エージェントの最後に完了したジョブ要求を含めます。 |
none |
string |
追加のプロパティはありません。 |
IdentityRef
名前 | 型 | 説明 |
---|---|---|
_links |
このフィールドには、グラフの件名に関する 0 個以上の興味深いリンクが含まれています。 これらのリンクを呼び出して、このグラフの主題に関する追加のリレーションシップや詳細情報を取得できます。 |
|
descriptor |
string |
記述子は、システムの実行中にグラフの件名を参照する主な方法です。 このフィールドは、アカウントと組織の両方で同じグラフの件名を一意に識別します。 |
directoryAlias |
string |
|
displayName |
string |
これは、グラフの件名の一意でない表示名です。 このフィールドを変更するには、ソース プロバイダーでその値を変更する必要があります。 |
id |
string |
|
imageUrl |
string |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
この URL は、このグラフの件名のソース リソースへの完全なルートです。 |
JObject
名前 | 型 | 説明 |
---|---|---|
item | ||
type |
string |
JToken
名前 | 型 | 説明 |
---|---|---|
first | ||
hasValues |
boolean |
|
item | ||
last | ||
next | ||
parent |
string |
|
path |
string |
|
previous | ||
root | ||
type |
string |
PackageVersion
名前 | 型 | 説明 |
---|---|---|
major |
integer |
|
minor |
integer |
|
patch |
integer |
PropertiesCollection
クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の TypeCode != TypeCode.Object
型) の DBNull
値が受け入れられます。 Byte[]、Int32、Double、DateType、String 型の値は型を保持し、他のプリミティブは String として再チューニングされます。 Byte[] は base64 でエンコードされた文字列として必要です。
名前 | 型 | 説明 |
---|---|---|
count |
integer |
コレクション内のプロパティの数。 |
item |
object |
|
keys |
string[] |
コレクション内のキーのセット。 |
values |
string[] |
コレクション内の値のセット。 |
ReferenceLinks
REST 参照リンクのコレクションを表す クラス。
名前 | 型 | 説明 |
---|---|---|
links |
object |
リンクの読み取り時ビュー。 参照リンクは読み取り専用であるため、参照リンクは読み取り専用として公開する必要があります。 |
TaskAgent
名前 | 型 | 説明 |
---|---|---|
_links |
REST 参照リンクのコレクションを表す クラス。 |
|
accessPoint |
string |
エージェントのアクセス ポイントを取得します。 |
assignedAgentCloudRequest |
このエージェントに現在関連付けられているエージェント クラウド要求を取得します |
|
assignedRequest |
このエージェントに現在割り当てられている要求を取得します。 |
|
authorization |
このエージェントの承認情報を取得または設定します。 |
|
createdOn |
string |
このエージェントが作成された日付を取得します。 |
enabled |
boolean |
このエージェントをジョブの実行に対して有効にするかどうかを示す値を取得または設定します。 |
id |
integer |
エージェントの識別子を取得します。 |
lastCompletedRequest |
このエージェントによって最後に完了した要求を取得します。 |
|
maxParallelism |
integer |
このホストで許可される最大ジョブ並列処理を取得または設定します。 |
name |
string |
エージェントの名前を取得します。 |
oSDescription |
string |
エージェントの OS を取得します。 |
pendingUpdate |
このエージェントの保留中の更新プログラムを取得します。 |
|
properties |
クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の |
|
provisioningState |
string |
このエージェントの現在のプロビジョニング状態を取得または設定します |
status |
エージェントの現在の接続状態を取得します。 |
|
statusChangedOn |
string |
最後の接続状態の変更が発生した日付を取得します。 |
systemCapabilities |
object |
|
userCapabilities |
object |
|
version |
string |
エージェントのバージョンを取得します。 |
TaskAgentAuthorization
OAuth 2.0 認証フローを使用してエージェントを承認するために必要なデータを提供します。
名前 | 型 | 説明 |
---|---|---|
authorizationUrl |
string |
構成されたトークン サービスからアクセス トークンを取得するために使用するエンドポイントを取得または設定します。 |
clientId |
string |
このエージェントのクライアント識別子を取得または設定します。 |
publicKey |
このエージェントの ID を確認するために使用する公開キーを取得または設定します。 |
TaskAgentCloudRequest
名前 | 型 | 説明 |
---|---|---|
agent | ||
agentCloudId |
integer |
|
agentConnectedTime |
string |
|
agentData | ||
agentSpecification | ||
pool | ||
provisionRequestTime |
string |
|
provisionedTime |
string |
|
releaseRequestTime |
string |
|
requestId |
string |
TaskAgentDelaySource
名前 | 型 | 説明 |
---|---|---|
delays |
string[] |
|
taskAgent |
TaskAgentJobRequest
名前 | 型 | 説明 |
---|---|---|
agentDelays | ||
agentSpecification | ||
assignTime |
string |
|
data |
object |
|
definition | ||
demands |
Demand[] |
|
expectedDuration |
string |
|
finishTime |
string |
|
hostId |
string |
|
jobId |
string |
|
jobName |
string |
|
lockedUntil |
string |
|
matchedAgents | ||
orchestrationId |
string |
|
owner | ||
planGroup |
string |
|
planId |
string |
|
planType |
string |
|
poolId |
integer |
|
queueId |
integer |
|
queueTime |
string |
|
receiveTime |
string |
|
requestId |
integer |
|
reservedAgent | ||
result | ||
scopeId |
string |
|
serviceOwner |
string |
TaskAgentJobResultFilter
この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。
名前 | 型 | 説明 |
---|---|---|
all |
string |
すべてのデプロイ ターゲット。 |
failed |
string |
最後のジョブが失敗したデプロイ ターゲット (破棄、 取り消し、 失敗、 スキップ) のみ。 |
neverDeployed |
string |
ジョブを実行しなかったデプロイ ターゲットのみ。 |
passed |
string |
最後のジョブが成功したデプロイ ターゲット (成功、 問題で成功) のみ。 |
TaskAgentPoolReference
名前 | 型 | 説明 |
---|---|---|
id |
integer |
|
isHosted |
boolean |
このプールがサービスによって管理されているかどうかを示す値を取得または設定します。 |
name |
string |
|
poolType |
プールの種類を取得または設定します |
|
scope |
string |
|
size |
integer |
プールの現在のサイズを取得します。 |
TaskAgentPoolType
プールの種類を取得または設定します
名前 | 型 | 説明 |
---|---|---|
automation |
string |
|
deployment |
string |
TaskAgentPublicKey
RSA 非対称キーの公開キー部分を表します。
名前 | 型 | 説明 |
---|---|---|
exponent |
string[] |
公開キーの指数を取得または設定します。 |
modulus |
string[] |
公開キーの剰余を取得または設定します。 |
TaskAgentReference
名前 | 型 | 説明 |
---|---|---|
_links |
REST 参照リンクのコレクションを表す クラス。 |
|
accessPoint |
string |
エージェントのアクセス ポイントを取得します。 |
enabled |
boolean |
このエージェントをジョブの実行に対して有効にするかどうかを示す値を取得または設定します。 |
id |
integer |
エージェントの識別子を取得します。 |
name |
string |
エージェントの名前を取得します。 |
oSDescription |
string |
エージェントの OS を取得します。 |
provisioningState |
string |
このエージェントの現在のプロビジョニング状態を取得または設定します |
status |
エージェントの現在の接続状態を取得します。 |
|
version |
string |
エージェントのバージョンを取得します。 |
TaskAgentStatus
エージェントの現在の接続状態を取得します。
名前 | 型 | 説明 |
---|---|---|
offline |
string |
|
online |
string |
TaskAgentStatusFilter
この状態のデプロイ ターゲットのみを取得します。
名前 | 型 | 説明 |
---|---|---|
all |
string |
すべてのデプロイ ターゲット。 |
offline |
string |
オフラインのデプロイ ターゲットのみ。 |
online |
string |
オンラインのデプロイ ターゲットのみ。 |
TaskAgentUpdate
名前 | 型 | 説明 |
---|---|---|
currentState |
string |
このエージェント更新プログラムの現在の状態 |
reason |
このエージェントの更新の理由 |
|
requestTime |
string |
このエージェントの更新が要求された日付を取得します。 |
requestedBy |
エージェントの更新を要求する ID |
|
sourceVersion |
エージェント更新プログラムのソース エージェント バージョンを取得または設定します |
|
targetVersion |
エージェント更新プログラムのターゲット エージェント バージョンを取得または設定します |
TaskAgentUpdateReason
名前 | 型 | 説明 |
---|---|---|
code |
TaskAgentUpdateReasonType
名前 | 型 | 説明 |
---|---|---|
manual |
string |
|
minAgentVersionRequired |
string |
TaskOrchestrationOwner
名前 | 型 | 説明 |
---|---|---|
_links |
REST 参照リンクのコレクションを表す クラス。 |
|
id |
integer |
|
name |
string |
TaskResult
名前 | 型 | 説明 |
---|---|---|
abandoned |
string |
|
canceled |
string |
|
failed |
string |
|
skipped |
string |
|
succeeded |
string |
|
succeededWithIssues |
string |
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示