Share via


Role Definitions - List

Kapsamda ve üzerinde geçerli olan tüm rol tanımlarını alın.

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 Parametreleri

Name İçinde Gerekli Tür Description
scope
path True

string

Rol tanımının kapsamı.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

$filter
query

string

İşlemde uygulanacak filtre. Verilen kapsamın altında da arama yapmak için atScopeAndBelow filtresini kullanın.

Yanıtlar

Name Tür Description
200 OK

RoleDefinitionListResult

Tamam - Rol tanımlarından oluşan bir dizi döndürür.

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

İzinler

Bu API’yi çağırmak için aşağıdaki izinlere sahip bir rol atanması gerekir. Daha fazla bilgi için bkz. Azure yerleşik rolleri.

Microsoft.Authorization/roleDefinitions/read

Güvenlik

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 kullanıcı hesabınızın kimliğine bürünme

Örnekler

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"
    }
  ]
}

Tanımlar

Name Description
ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

Permission

Rol tanımı izinleri.

RoleDefinition

Rol tanımı.

RoleDefinitionListResult

Rol tanımı listesi işlem sonucu.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

Permission

Rol tanımı izinleri.

Name Tür Description
actions

string[]

İzin verilen eylemler.

dataActions

string[]

İzin Verilen Veri eylemleri.

notActions

string[]

Reddedilen eylemler.

notDataActions

string[]

Reddedilen Veri eylemleri.

RoleDefinition

Rol tanımı.

Name Tür Description
id

string

Rol tanımı kimliği.

name

string

Rol tanımı adı.

properties.assignableScopes

string[]

Rol tanımı atanabilir kapsamlar.

properties.createdBy

string

Atamayı oluşturan kullanıcının kimliği

properties.createdOn

string

Oluşturulduğu zaman

properties.description

string

Rol tanımı açıklaması.

properties.permissions

Permission[]

Rol tanımı izinleri.

properties.roleName

string

Rol adı.

properties.type

string

Rol türü.

properties.updatedBy

string

Atamayı güncelleştiren kullanıcının kimliği

properties.updatedOn

string

Güncelleştirme zamanı

type

string

Rol tanımı türü.

RoleDefinitionListResult

Rol tanımı listesi işlem sonucu.

Name Tür Description
nextLink

string

Sonraki sonuç kümesini almak için kullanılacak URL.

value

RoleDefinition[]

Rol tanımı listesi.