你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Role Assignment Schedules - List For Scope

获取资源范围的角色分配计划。

GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules?api-version=2020-10-01
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules?$filter={$filter}&api-version=2020-10-01

URI 参数

名称 必需 类型 说明
scope
path True

string

角色分配计划的范围。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

$filter
query

string

要应用于作的筛选器。 使用 $filter=atScope() 返回范围或以上的所有角色分配计划。 使用 $filter=principalId eq {id} 返回指定主体范围上方或以下的所有角色分配计划。 使用 $filter=assignedTo('{userId}') 返回当前用户的所有角色分配计划。 使用 $filter=asTarget() 返回为当前用户创建的所有角色分配计划。

响应

名称 类型 说明
200 OK

RoleAssignmentScheduleListResult

确定 - 返回角色分配计划的数组。

Other Status Codes

CloudError

描述作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

GetRoleAssignmentSchedulesByScope

示例请求

GET https://management.azure.com/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignmentSchedules?$filter=assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')&api-version=2020-10-01

示例响应

{
  "value": [
    {
      "properties": {
        "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413",
        "assignmentType": "Assigned",
        "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
        "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608",
        "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea",
        "principalType": "User",
        "status": "Provisioned",
        "roleAssignmentScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045",
        "startDateTime": "2020-09-09T21:35:27.91Z",
        "endDateTime": "2020-09-10T05:35:17.91Z",
        "memberType": "Direct",
        "createdOn": "2020-09-09T21:35:27.91Z",
        "updatedOn": "2020-09-09T21:35:27.91Z",
        "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'",
        "conditionVersion": "1.0",
        "expandedProperties": {
          "scope": {
            "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
            "displayName": "Pay-As-You-Go",
            "type": "subscription"
          },
          "roleDefinition": {
            "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608",
            "displayName": "Contributor",
            "type": "BuiltInRole"
          },
          "principal": {
            "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea",
            "displayName": "User Account",
            "email": "user@my-tenant.com",
            "type": "User"
          }
        }
      },
      "name": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6",
      "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6",
      "type": "Microsoft.Authorization/RoleAssignmentSchedules"
    }
  ]
}

定义

名称 说明
AssignmentType

角色分配计划的分配类型

CloudError

服务的错误响应。

CloudErrorBody

服务的错误响应。

ExpandedProperties
MemberType

角色分配计划的成员身份类型

Principal

主体的详细信息

principalType

分配的主体 ID 的主体类型。

RoleAssignmentSchedule

角色分配计划

RoleAssignmentScheduleListResult

角色分配计划列表作结果。

RoleDefinition

角色定义的详细信息

Scope

资源范围的详细信息

Status

角色分配计划的状态。

AssignmentType

角色分配计划的分配类型

说明
Activated
Assigned

CloudError

服务的错误响应。

名称 类型 说明
error

CloudErrorBody

服务的错误响应。

CloudErrorBody

服务的错误响应。

名称 类型 说明
code

string

错误的标识符。 代码是固定的,旨在以编程方式使用。

message

string

描述错误的消息,旨在适合在用户界面中显示。

ExpandedProperties

名称 类型 说明
principal

Principal

主体的详细信息

roleDefinition

RoleDefinition

角色定义的详细信息

scope

Scope

资源范围的详细信息

MemberType

角色分配计划的成员身份类型

说明
Direct
Group
Inherited

Principal

主体的详细信息

名称 类型 说明
displayName

string

主体的显示名称

email

string

主体的电子邮件 ID

id

string

主体的 ID

type

string

主体的类型

principalType

分配的主体 ID 的主体类型。

说明
Device
ForeignGroup
Group
ServicePrincipal
User

RoleAssignmentSchedule

角色分配计划

名称 类型 说明
id

string

角色分配计划 ID。

name

string

角色分配计划名称。

properties.assignmentType

AssignmentType

角色分配计划的分配类型

properties.condition

string

角色分配的条件。 这会限制可分配给的资源。例如:@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”

properties.conditionVersion

string

条件的版本。 当前接受的值为“2.0”

properties.createdOn

string (date-time)

创建角色分配计划时的 DateTime

properties.endDateTime

string (date-time)

角色分配计划时的结束日期/时间

properties.expandedProperties

ExpandedProperties

主体、范围和角色定义的其他属性

properties.linkedRoleEligibilityScheduleId

string

用于激活此 roleAssignmentSchedule 的 roleEligibilitySchedule 的 ID

properties.memberType

MemberType

角色分配计划的成员身份类型

properties.principalId

string

主体 ID。

properties.principalType

principalType

分配的主体 ID 的主体类型。

properties.roleAssignmentScheduleRequestId

string

用于创建此 roleAssignmentScheduleRequest 的 id

properties.roleDefinitionId

string

角色定义 ID。

properties.scope

string

角色分配计划范围。

properties.startDateTime

string (date-time)

角色分配计划时的开始日期

properties.status

Status

角色分配计划的状态。

properties.updatedOn

string (date-time)

修改角色分配计划时的 DateTime

type

string

角色分配计划类型。

RoleAssignmentScheduleListResult

角色分配计划列表作结果。

名称 类型 说明
nextLink

string

用于获取下一组结果的 URL。

value

RoleAssignmentSchedule[]

角色分配计划列表。

RoleDefinition

角色定义的详细信息

名称 类型 说明
displayName

string

角色定义的显示名称

id

string

角色定义的 ID

type

string

角色定义的类型

Scope

资源范围的详细信息

名称 类型 说明
displayName

string

资源的显示名称

id

string

资源的范围 ID

type

string

资源的类型

Status

角色分配计划的状态。

说明
Accepted
AdminApproved
AdminDenied
Canceled
Denied
Failed
FailedAsResourceIsLocked
Granted
Invalid
PendingAdminDecision
PendingApproval
PendingApprovalProvisioning
PendingEvaluation
PendingExternalProvisioning
PendingProvisioning
PendingRevocation
PendingScheduleCreation
Provisioned
ProvisioningStarted
Revoked
ScheduleCreated
TimedOut