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

Workspaces - Get

获取一个工作空间资源。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}?api-version=2026-08-01-preview

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

workspaceName
path True

string

minLength: 1
pattern: ^[^<>%&:?#/\\]+$

表示工作区资源名称的字符串。

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

Workspace

Azure作已成功完成。

Other Status Codes

ErrorResponse

未预期的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流程。

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

作用域

名称 说明
user_impersonation 冒充您的用户账户

示例

Get a Workspace in a resource group.

示例请求

GET https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace?api-version=2026-08-01-preview

示例响应

{
  "name": "exampleWorkspace",
  "type": "Microsoft.Chaos/workspaces",
  "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity": {}
    },
    "tenantId": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6"
  },
  "tags": {
    "environment": "production",
    "department": "engineering",
    "project": "chaos-testing"
  },
  "location": "westus2",
  "properties": {
    "provisioningState": "Updating",
    "scopes": [
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup"
    ]
  },
  "systemData": {
    "createdAt": "2021-07-01T00:00:00.0Z",
    "createdBy": "User",
    "createdByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976",
    "lastModifiedAt": "2021-07-01T00:00:00.0Z",
    "lastModifiedBy": "User",
    "lastModifiedByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976"
  }
}

定义

名称 说明
createdByType

创建该资源的身份类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详情

ErrorResponse

错误响应

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

ProvisioningState

给定 Azure 混沌资源的当前预配状态。

systemData

与创建和上次修改资源相关的元数据。

UserAssignedIdentity

用户分配的标识属性

Workspace

代表工作空间资源的模型。

createdByType

创建该资源的身份类型。

说明
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

附加信息。

type

string

其他信息类型。

ErrorDetail

错误详情

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误的附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详情。

message

string

错误消息。

target

string

错误的目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

名称 类型 说明
principalId

string (uuid)

系统分配标识的服务主体 ID。 此属性仅针对系统分配的标识提供。

tenantId

string (uuid)

系统分配标识的租户 ID。 此属性仅针对系统分配的标识提供。

type

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned 标识
与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

说明
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

ProvisioningState

给定 Azure 混沌资源的当前预配状态。

说明
Succeeded

已创建资源。

Failed

资源创建失败。

Canceled

资源创建已取消。

Creating

初始创建正在进行中。

Updating

正在进行更新。

Deleting

正在删除。

Running

行动正在进行。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建该资源的身份。

createdByType

createdByType

创建该资源的身份类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。

UserAssignedIdentity

用户分配的标识属性

名称 类型 说明
clientId

string (uuid)

分配的标识的客户端 ID。

principalId

string (uuid)

已分配标识的主体 ID。

Workspace

代表工作空间资源的模型。

名称 类型 说明
id

string (arm-id)

该资源的完全限定资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

identity

ManagedServiceIdentity

分配给此资源的托管服务标识。

location

string

资源所在的地理位置

name

string

资源的名称

properties.communicationEndpoint

string

用于连接和通信工作区以实现故障注入编排的通信端点。

properties.provisioningState

ProvisioningState

给定工作区资源的最新配置状态。

properties.scopes

string[] (arm-id)

子场景将用于工作区级别的资源范围。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”