Share via


Pipeline Permissions - Update Pipeline Permisions For Resources

複数のリソースの定義の一覧を承認または承認できないようにする Batch API。

PATCH https://dev.azure.com/{organization}/{project}/_apis/pipelines/pipelinepermissions?api-version=7.1-preview.1

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前です。

project
path True

string

プロジェクト ID またはプロジェクト名

api-version
query True

string

使う API のバージョン。 このバージョンの API を使用するには、これを '7.1-preview.1' に設定する必要があります。

要求本文

名前 説明
body

ResourcePipelinePermissions[]

応答

名前 説明
200 OK

ResourcePipelinePermissions[]

成功した操作

セキュリティ

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.pipelineresources_manage 保護されたリソースを使用する保護されたリソースまたはパイプラインの要求 (エージェント プール、環境、キュー、リポジトリ、セキュリティで保護されたファイル、サービス接続、変数グループ) を管理する機能を付与します。

Sample Request

PATCH https://dev.azure.com/{organization}/{project}/_apis/pipelines/pipelinepermissions?api-version=7.1-preview.1

[
  {
    "resource": {
      "type": "queue",
      "id": "1",
      "name": "Default"
    },
    "pipelines": [
      {
        "id": 16,
        "authorized": true
      }
    ]
  },
  {
    "resource": {
      "type": "environment",
      "id": "1",
      "name": "SampleEnv"
    },
    "pipelines": [
      {
        "id": 16,
        "authorized": true
      }
    ]
  }
]

Sample Response

request-Context: appId=cid-v1:a892bfef-0287-4640-9f5e-cffc90fbcf94
access-Control-Expose-Headers: Request-Context
{
  "count": 2,
  "value": [
    {
      "resource": {
        "type": "queue",
        "id": "1"
      },
      "pipelines": [
        {
          "id": 6,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-01-02T08:59:48.77Z"
        },
        {
          "id": 15,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-11-19T08:14:49.26Z"
        },
        {
          "id": 16,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-11-20T15:10:54.187Z"
        }
      ]
    },
    {
      "resource": {
        "type": "environment",
        "id": "1"
      },
      "pipelines": [
        {
          "id": 6,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-04-20T09:31:06.023Z"
        },
        {
          "id": 11,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-07-21T14:07:21.353Z"
        },
        {
          "id": 15,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-11-19T08:14:47.323Z"
        },
        {
          "id": 16,
          "authorized": true,
          "authorizedBy": {
            "displayName": "User Name",
            "id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
            "uniqueName": "uniqueName",
            "descriptor": "Descriptor"
          },
          "authorizedOn": "2020-11-20T15:33:01.793Z"
        }
      ]
    }
  ]
}

定義

名前 説明
IdentityRef
Permission
PipelinePermission
ReferenceLinks

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

Resource
ResourcePipelinePermissions

IdentityRef

名前 説明
_links

ReferenceLinks

このフィールドには、グラフの件名に関する 0 個以上の興味深いリンクが含まれています。 これらのリンクを呼び出して、このグラフの件名に関する追加のリレーションシップまたは詳細情報を取得できます。

descriptor

string

記述子は、システムの実行中にグラフの件名を参照する主な方法です。 このフィールドは、アカウントと組織の両方で同じグラフの件名を一意に識別します。

directoryAlias

string

非推奨 - IdentityRef "_links" ディクショナリの "self" エントリで参照されている Graph ユーザーに対してクエリを実行することで取得できます

displayName

string

これは、グラフの件名の一意でない表示名です。 このフィールドを変更するには、ソース プロバイダーでその値を変更する必要があります。

id

string

imageUrl

string

非推奨 - IdentityRef "_links" 辞書の "アバター" エントリで使用できます

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 は、このグラフの件名のソース リソースへの完全なルートです。

Permission

名前 説明
authorized

boolean

authorizedBy

IdentityRef

authorizedOn

string

PipelinePermission

名前 説明
authorized

boolean

authorizedBy

IdentityRef

authorizedOn

string

id

integer

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

名前 説明
links

object

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

Resource

名前 説明
id

string

リソースの ID。

name

string

リソースの名前。

type

string

リソースの種類。

ResourcePipelinePermissions

名前 説明
allPipelines

Permission

pipelines

PipelinePermission[]

resource

Resource