共用方式為


Group - List By Service

列出服務實例內定義的群組集合。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups?api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2022-08-01

URI 參數

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

string

資源群組的名稱。 名稱不區分大小寫。

serviceName
path True

string

API 管理 服務的名稱。

Regex 模式: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

$filter
query

string

|欄位 |使用量 |支持的運算子 |支援的函式 |
|-------------|-------------|-------------|-------------|
|name |filter |ge, le, eq, ne, gt, lt |substringof, contains, startswith, endswith |
|displayName |filter |ge, le, eq, ne, gt, lt |substringof, contains, startswith, endswith |
|description |filter |ge, le, eq, ne, gt, lt |substringof, contains, startswith, endswith |
|externalId |filter |eq | |

$skip
query

integer

int32

要略過的記錄數目。

$top
query

integer

int32

要傳回的記錄數目。

回應

名稱 類型 Description
200 OK

GroupCollection

列出群組實體的集合。

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

ApiManagementListGroups

範例要求

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups?api-version=2022-08-01

範例回覆

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020001",
      "type": "Microsoft.ApiManagement/service/groups",
      "name": "5600b59375ff190048020001",
      "properties": {
        "displayName": "Administrators",
        "description": "Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.",
        "builtIn": true,
        "type": "system"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9",
      "type": "Microsoft.ApiManagement/service/groups",
      "name": "59306a29e4bbd510dc24e5f9",
      "properties": {
        "displayName": "AwesomeGroup (samiraad.onmicrosoft.com)",
        "description": "awesome group of people",
        "builtIn": false,
        "type": "external",
        "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020002",
      "type": "Microsoft.ApiManagement/service/groups",
      "name": "5600b59375ff190048020002",
      "properties": {
        "displayName": "Developers",
        "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.",
        "builtIn": true,
        "type": "system"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020003",
      "type": "Microsoft.ApiManagement/service/groups",
      "name": "5600b59375ff190048020003",
      "properties": {
        "displayName": "Guests",
        "description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.",
        "builtIn": true,
        "type": "system"
      }
    }
  ],
  "count": 4,
  "nextLink": ""
}

定義

名稱 Description
ErrorFieldContract

錯誤欄位合約。

ErrorResponse

錯誤回應。

GroupCollection

分頁群組清單表示法。

GroupContract

合約詳細數據。

GroupType

群組類型。

ErrorFieldContract

錯誤欄位合約。

名稱 類型 Description
code

string

屬性層級錯誤碼。

message

string

人類可讀取的屬性層級錯誤表示法。

target

string

屬性名稱。

ErrorResponse

錯誤回應。

名稱 類型 Description
error.code

string

服務定義的錯誤碼。 此代碼會作為回應中指定之 HTTP 錯誤碼的子狀態。

error.details

ErrorFieldContract[]

在驗證錯誤時,要求中傳送的無效欄位清單。

error.message

string

人類可閱讀的錯誤表示法。

GroupCollection

分頁群組清單表示法。

名稱 類型 Description
count

integer

所有頁面的總記錄計數數目。

nextLink

string

如果有的話,下一頁連結。

value

GroupContract[]

頁面值。

GroupContract

合約詳細數據。

名稱 類型 Description
id

string

資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.builtIn

boolean

如果群組是系統管理員、開發人員或來賓 (系統管理員、開發人員或來賓) 的三個系統群組之一,則為 true;否則為 false。

properties.description

string

群組描述。 可包含 HTML 格式標記。

properties.displayName

string

群組名稱。

properties.externalId

string

對於外部群組,此屬性包含來自外部識別提供者之群組的標識碼,例如針對 Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>,否則值為 null。

properties.type

GroupType

群組類型。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

GroupType

群組類型。

名稱 類型 Description
custom

string

external

string

system

string