Users - List By Lab
获取实验室的所有用户。
返回实验室的所有用户的列表。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users?api-version=2023-06-07
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users?api-version=2023-06-07&$filter={$filter}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
lab
|
path | True |
string minLength: 1maxLength: 100 |
唯一标识包含实验室计划的实验室的名称。 在资源 URI 中使用。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
|
$filter
|
query |
string |
要应用于作的筛选器。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求成功;响应包含给定实验室的所有用户。 |
|
| Other Status Codes |
默认错误响应。 |
示例
listUser
示例请求
GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users?api-version=2023-06-07
示例响应
{
"nextLink": null,
"value": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser",
"name": "default",
"type": "Microsoft.LabServices/User",
"systemData": {
"createdBy": "identity123",
"createdByType": "User",
"createdAt": "2020-05-01T10:00:00Z",
"lastModifiedBy": "identity123",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-06-01T09:12:28Z"
},
"properties": {
"provisioningState": "Succeeded",
"displayName": "Test User",
"email": "testuser@contoso.com",
"registrationState": "Registered",
"invitationState": "Sent",
"totalUsage": "PT10H",
"additionalUsageQuota": "PT10H"
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Invitation |
实验室用户邀请状态。 |
|
Paged |
分页的用户列表。 |
|
Provisioning |
用户资源的当前预配状态。 |
|
Registration |
用户实验室注册状态。 |
|
Resource |
有关此资源上最新作失败的错误详细信息 |
|
system |
与创建和上次修改资源相关的元数据。 |
| User |
可在实验室中注册和使用虚拟机的实验室的用户。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
InvitationState
实验室用户邀请状态。
| 值 | 说明 |
|---|---|
| NotSent |
尚未发送邀请。 |
| Sending |
当前发送邀请。 |
| Sent |
已成功发送邀请。 |
| Failed |
发送邀请时出错。 |
PagedUsers
分页的用户列表。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
用于获取图像结果的下一页的链接。 |
| value |
User[] |
用户结果的数组页。 |
ProvisioningState
用户资源的当前预配状态。
| 值 | 说明 |
|---|---|
| Creating |
正在创建资源。 |
| Updating |
正在向资源应用新的属性值。 |
| Deleting |
正在删除资源。 |
| Succeeded |
创建或更新作后,资源处于正常状态。 |
| Failed |
对资源的上一次作失败,导致资源处于不正常状态。 |
| Locked |
资源已锁定,当前阻止更改。 这可能是由于维护或计划的作造成的。 锁定作完成后,状态将恢复为成功。 |
RegistrationState
用户实验室注册状态。
| 值 | 说明 |
|---|---|
| NotRegistered |
用户已注册到实验室。 |
| Registered |
用户尚未注册到实验室。 |
ResourceOperationError
有关此资源上最新作失败的错误详细信息
| 名称 | 类型 | 说明 |
|---|---|---|
| action |
string |
失败的作作 |
| code |
string |
对应于作失败类型的代码 |
| message |
string |
作失败消息 |
| timestamp |
string (date-time) |
发生错误的日期/时间 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
User
可在实验室中注册和使用虚拟机的实验室的用户。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
资源的名称 |
| properties.additionalUsageQuota |
string (duration) |
除了实验室使用配额之外,用户获取的使用配额时间量。 |
| properties.displayName |
string |
用户的显示名称,例如用户的全名。 |
| properties.email |
string minLength: 6maxLength: 254 |
用户的电子邮件地址。 |
| properties.invitationSent |
string (date-time) |
发送给用户的邀请消息的日期和时间。 |
| properties.invitationState |
用户的邀请消息的状态。 |
|
| properties.provisioningState |
用户资源的当前预配状态。 |
|
| properties.registrationState |
实验室中用户注册的状态。 |
|
| properties.resourceOperationError |
上次在实验室计划中完成的作的错误详细信息。 |
|
| properties.totalUsage |
string (duration) |
用户在此实验室中使用其虚拟机的时间。 |
| systemData |
与创建和上次修改用户资源相关的元数据。 |
|
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |