Role Definitions - List

scope 이상에서 적용할 수 있는 모든 역할 정의를 가져옵니다.

GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions?api-version=2022-04-01
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions?$filter={$filter}&api-version=2022-04-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
scope
path True

string

역할 정의의 scope.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

$filter
query

string

작업에 적용할 필터입니다. atScopeAndBelow 필터를 사용하여 지정된 scope 아래에서도 검색합니다.

응답

Name 형식 Description
200 OK

RoleDefinitionListResult

OK - 역할 정의의 배열을 반환합니다.

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 오류 응답입니다.

사용 권한

이 API를 호출하려면 다음 권한이 있는 역할을 할당받아야 합니다. 자세한 정보는 Azure 기본 제공 역할을 참조하세요.

Microsoft.Authorization/roleDefinitions/read

보안

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

List role definitions for scope

Sample Request

GET https://management.azure.com/scope/providers/Microsoft.Authorization/roleDefinitions?api-version=2022-04-01

Sample Response

{
  "value": [
    {
      "properties": {
        "roleName": "Role name",
        "type": "roletype",
        "description": "Role description",
        "assignableScopes": [
          "/subscriptions/subId"
        ],
        "permissions": [
          {
            "actions": [
              "action"
            ],
            "notActions": [],
            "dataActions": [
              "dataAction"
            ],
            "notDataActions": []
          }
        ]
      },
      "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId",
      "type": "Microsoft.Authorization/roleDefinitions",
      "name": "roleDefinitionId"
    }
  ]
}

정의

Name Description
ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답

Permission

역할 정의 권한.

RoleDefinition

역할 정의.

RoleDefinitionListResult

역할 정의 목록 작업 결과입니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorDetail[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ErrorResponse

오류 응답

Name 형식 Description
error

ErrorDetail

Error 개체.

Permission

역할 정의 권한.

Name 형식 Description
actions

string[]

허용되는 작업입니다.

dataActions

string[]

허용되는 데이터 작업입니다.

notActions

string[]

거부된 작업입니다.

notDataActions

string[]

데이터 작업이 거부되었습니다.

RoleDefinition

역할 정의.

Name 형식 Description
id

string

역할 정의 ID입니다.

name

string

역할 정의 이름입니다.

properties.assignableScopes

string[]

역할 정의 할당 가능한 범위입니다.

properties.createdBy

string

할당을 만든 사용자의 ID

properties.createdOn

string

만든 시간

properties.description

string

역할 정의 설명입니다.

properties.permissions

Permission[]

역할 정의 권한.

properties.roleName

string

역할 이름입니다.

properties.type

string

역할 유형입니다.

properties.updatedBy

string

할당을 업데이트한 사용자의 ID

properties.updatedOn

string

업데이트된 시간

type

string

역할 정의 형식입니다.

RoleDefinitionListResult

역할 정의 목록 작업 결과입니다.

Name 형식 Description
nextLink

string

다음 결과 집합을 가져오는 데 사용할 URL입니다.

value

RoleDefinition[]

역할 정의 목록입니다.