次の方法で共有


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 パラメーター

名前 / 必須 説明
deploymentGroupId
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

DeploymentTargetExpands

返されるオブジェクトにこれらの追加の詳細を含めます。

$top
query

integer

int32

返すデプロイ ターゲットの最大数。 既定値は 1000 です

agentJobResult
query

TaskAgentJobResultFilter

この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。

agentStatus
query

TaskAgentStatusFilter

この状態のデプロイ ターゲットのみを取得します。

continuationToken
query

string

この continuationToken より大きい名前を持つデプロイ ターゲットを辞書式で取得します。

enabled
query

boolean

有効または無効になっているデプロイ ターゲットのみを取得します。 既定値は 'null' で、すべてのターゲットを返します。

name
query

string

返すデプロイ ターゲットの名前パターン。

partialNameMatch
query

boolean

true に設定すると、 名前 がパターンとして扱われます。 それ以外の場合は、絶対一致として扱います。 既定値は falseです。

tags
query

string

array (string)

これらのコンマ区切りのタグの一覧をすべて含むデプロイ ターゲットのみを取得します。

応答

名前 説明
200 OK

DeploymentMachine[]

正常な操作

セキュリティ

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
Get deployment targets filtered by agent status
Get deployment targets having given tags
Get deployment targets in pages
Get deployment targets including their last job requests
List all deployment targets in a deployment group

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
DeploymentMachine

デプロイ ターゲット。

DeploymentTargetExpands

返されるオブジェクトにこれらの追加の詳細を含めます。

IdentityRef
JObject
JToken
PackageVersion
PropertiesCollection

クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の TypeCode != TypeCode.Object型) の DBNull 値が受け入れられます。 Byte[]、Int32、Double、DateType、String 型の値は型を保持し、他のプリミティブは String として再チューニングされます。 Byte[] は base64 でエンコードされた文字列として必要です。

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

TaskAgent
TaskAgentAuthorization

OAuth 2.0 認証フローを使用してエージェントを承認するために必要なデータを提供します。

TaskAgentCloudRequest
TaskAgentDelaySource
TaskAgentJobRequest
TaskAgentJobResultFilter

この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。

TaskAgentPoolReference
TaskAgentPoolType

プールの種類を取得または設定します

TaskAgentPublicKey

RSA 非対称キーの公開キー部分を表します。

TaskAgentReference
TaskAgentStatus

エージェントの現在の接続状態を取得します。

TaskAgentStatusFilter

この状態のデプロイ ターゲットのみを取得します。

TaskAgentUpdate
TaskAgentUpdateReason
TaskAgentUpdateReasonType
TaskOrchestrationOwner
TaskResult

Demand

名前 説明
name

string

value

string

DeploymentMachine

デプロイ ターゲット。

名前 説明
agent

TaskAgent

デプロイ エージェント。

id

integer

デプロイ ターゲット識別子。

tags

string[]

デプロイ ターゲットのタグ。

DeploymentTargetExpands

返されるオブジェクトにこれらの追加の詳細を含めます。

名前 説明
assignedRequest

string

デプロイ エージェントに割り当てられたジョブ要求を含めます。

capabilities

string

デプロイ エージェントの機能を含めます。

lastCompletedRequest

string

デプロイ エージェントの最後に完了したジョブ要求を含めます。

none

string

追加のプロパティはありません。

IdentityRef

名前 説明
_links

ReferenceLinks

このフィールドには、グラフの件名に関する 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

JToken

type

string

JToken

名前 説明
first

JToken

hasValues

boolean

item

JToken

last

JToken

next

JToken

parent

string

path

string

previous

JToken

root

JToken

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[]

コレクション内の値のセット。

REST 参照リンクのコレクションを表す クラス。

名前 説明
links

object

リンクの読み取り時ビュー。 参照リンクは読み取り専用であるため、参照リンクは読み取り専用として公開する必要があります。

TaskAgent

名前 説明
_links

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

accessPoint

string

エージェントのアクセス ポイントを取得します。

assignedAgentCloudRequest

TaskAgentCloudRequest

このエージェントに現在関連付けられているエージェント クラウド要求を取得します

assignedRequest

TaskAgentJobRequest

このエージェントに現在割り当てられている要求を取得します。

authorization

TaskAgentAuthorization

このエージェントの承認情報を取得または設定します。

createdOn

string

このエージェントが作成された日付を取得します。

enabled

boolean

このエージェントをジョブの実行に対して有効にするかどうかを示す値を取得または設定します。

id

integer

エージェントの識別子を取得します。

lastCompletedRequest

TaskAgentJobRequest

このエージェントによって最後に完了した要求を取得します。

maxParallelism

integer

このホストで許可される最大ジョブ並列処理を取得または設定します。

name

string

エージェントの名前を取得します。

oSDescription

string

エージェントの OS を取得します。

pendingUpdate

TaskAgentUpdate

このエージェントの保留中の更新プログラムを取得します。

properties

PropertiesCollection

クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の TypeCode != TypeCode.Object型) の DBNull 値が受け入れられます。 Byte[]、Int32、Double、DateType、String 型の値は型を保持し、他のプリミティブは String として再チューニングされます。 Byte[] は base64 でエンコードされた文字列として必要です。

provisioningState

string

このエージェントの現在のプロビジョニング状態を取得または設定します

status

TaskAgentStatus

エージェントの現在の接続状態を取得します。

statusChangedOn

string

最後の接続状態の変更が発生した日付を取得します。

systemCapabilities

object

userCapabilities

object

version

string

エージェントのバージョンを取得します。

TaskAgentAuthorization

OAuth 2.0 認証フローを使用してエージェントを承認するために必要なデータを提供します。

名前 説明
authorizationUrl

string

構成されたトークン サービスからアクセス トークンを取得するために使用するエンドポイントを取得または設定します。

clientId

string

このエージェントのクライアント識別子を取得または設定します。

publicKey

TaskAgentPublicKey

このエージェントの ID を確認するために使用する公開キーを取得または設定します。

TaskAgentCloudRequest

名前 説明
agent

TaskAgentReference

agentCloudId

integer

agentConnectedTime

string

agentData

JObject

agentSpecification

JObject

pool

TaskAgentPoolReference

provisionRequestTime

string

provisionedTime

string

releaseRequestTime

string

requestId

string

TaskAgentDelaySource

名前 説明
delays

string[]

taskAgent

TaskAgentReference

TaskAgentJobRequest

名前 説明
agentDelays

TaskAgentDelaySource[]

agentSpecification

JObject

assignTime

string

data

object

definition

TaskOrchestrationOwner

demands

Demand[]

expectedDuration

string

finishTime

string

hostId

string

jobId

string

jobName

string

lockedUntil

string

matchedAgents

TaskAgentReference[]

orchestrationId

string

owner

TaskOrchestrationOwner

planGroup

string

planId

string

planType

string

poolId

integer

queueId

integer

queueTime

string

receiveTime

string

requestId

integer

reservedAgent

TaskAgentReference

result

TaskResult

scopeId

string

serviceOwner

string

TaskAgentJobResultFilter

この最後のジョブ結果を持つデプロイ ターゲットのみを取得します。

名前 説明
all

string

すべてのデプロイ ターゲット。

failed

string

最後のジョブが失敗したデプロイ ターゲット (破棄取り消し失敗スキップ) のみ。

neverDeployed

string

ジョブを実行しなかったデプロイ ターゲットのみ。

passed

string

最後のジョブが成功したデプロイ ターゲット (成功問題で成功) のみ。

TaskAgentPoolReference

名前 説明
id

integer

isHosted

boolean

このプールがサービスによって管理されているかどうかを示す値を取得または設定します。

name

string

poolType

TaskAgentPoolType

プールの種類を取得または設定します

scope

string

size

integer

プールの現在のサイズを取得します。

TaskAgentPoolType

プールの種類を取得または設定します

名前 説明
automation

string

deployment

string

TaskAgentPublicKey

RSA 非対称キーの公開キー部分を表します。

名前 説明
exponent

string[]

公開キーの指数を取得または設定します。

modulus

string[]

公開キーの剰余を取得または設定します。

TaskAgentReference

名前 説明
_links

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

accessPoint

string

エージェントのアクセス ポイントを取得します。

enabled

boolean

このエージェントをジョブの実行に対して有効にするかどうかを示す値を取得または設定します。

id

integer

エージェントの識別子を取得します。

name

string

エージェントの名前を取得します。

oSDescription

string

エージェントの OS を取得します。

provisioningState

string

このエージェントの現在のプロビジョニング状態を取得または設定します

status

TaskAgentStatus

エージェントの現在の接続状態を取得します。

version

string

エージェントのバージョンを取得します。

TaskAgentStatus

エージェントの現在の接続状態を取得します。

名前 説明
offline

string

online

string

TaskAgentStatusFilter

この状態のデプロイ ターゲットのみを取得します。

名前 説明
all

string

すべてのデプロイ ターゲット。

offline

string

オフラインのデプロイ ターゲットのみ。

online

string

オンラインのデプロイ ターゲットのみ。

TaskAgentUpdate

名前 説明
currentState

string

このエージェント更新プログラムの現在の状態

reason

TaskAgentUpdateReason

このエージェントの更新の理由

requestTime

string

このエージェントの更新が要求された日付を取得します。

requestedBy

IdentityRef

エージェントの更新を要求する ID

sourceVersion

PackageVersion

エージェント更新プログラムのソース エージェント バージョンを取得または設定します

targetVersion

PackageVersion

エージェント更新プログラムのターゲット エージェント バージョンを取得または設定します

TaskAgentUpdateReason

名前 説明
code

TaskAgentUpdateReasonType

TaskAgentUpdateReasonType

名前 説明
manual

string

minAgentVersionRequired

string

TaskOrchestrationOwner

名前 説明
_links

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

id

integer

name

string

TaskResult

名前 説明
abandoned

string

canceled

string

failed

string

skipped

string

succeeded

string

succeededWithIssues

string