Capability Types - Get
获取给定目标类型和位置的功能类型资源。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}?api-version=2025-01-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
capability
|
path | True |
string pattern: ^[a-zA-Z0-9\-\.]+-\d\.\d$ |
表示功能类型资源名称的字符串。 |
|
location
|
path | True |
string minLength: 1 |
Azure 区域的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
target
|
path | True |
string pattern: ^[a-zA-Z0-9_\-\.]+$ |
表示目标类型资源名称的字符串。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure作已成功完成。 |
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Get a Capability Type for a virtual machine Target resource on westus2 location.
示例请求
GET https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-VirtualMachine/capabilityTypes/Shutdown-1.0?api-version=2025-01-01
示例响应
{
"name": "Shutdown-1.0",
"type": "Microsoft.Chaos/locations/targetTypes/capabilityTypes",
"id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-VirtualMachine/capabilityTypes/Shutdown-1.0",
"properties": {
"description": "Shutdown an Azure Virtual Machine for a defined period of time.",
"displayName": "Shutdown VM",
"kind": "fault",
"parametersSchema": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json",
"publisher": "Microsoft",
"runtimeProperties": {
"kind": "continuous"
},
"targetType": "VirtualMachine",
"urn": "urn:csci:microsoft:virtualMachine:shutdown/1.0",
"azureRbacActions": [
"Microsoft.Compute/virtualMachines/poweroff/action",
"Microsoft.Compute/virtualMachines/start/action",
"Microsoft.Compute/virtualMachines/instanceView/read",
"Microsoft.Compute/virtualMachines/read",
"Microsoft.Compute/locations/operations/read"
],
"requiredAzureRoleDefinitionIds": [
"acdd72a7-3385-48ef-bd42-f606fba81ae0"
]
}
}
定义
| 名称 | 说明 |
|---|---|
|
Capability |
表示功能类型资源的模型。 |
|
Capability |
此功能类型的运行时属性。 |
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
system |
与创建和上次修改资源相关的元数据。 |
CapabilityType
表示功能类型资源的模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties.azureRbacActions |
string[] |
执行功能类型所需的控制平面作。 |
| properties.azureRbacDataActions |
string[] |
执行功能类型所需的数据平面作。 |
| properties.description |
string |
描述的本地化字符串。 |
| properties.displayName |
string |
显示名称的本地化字符串。 |
| properties.kind |
string |
此功能类型的字符串。 |
| properties.parametersSchema |
string maxLength: 2048 |
用于检索功能类型参数的 JSON 架构的 URL。 |
| properties.publisher |
string |
此功能类型扩展的发布服务器的字符串。 |
| properties.requiredAzureRoleDefinitionIds |
string[] |
执行功能类型所需的 Azure 角色定义 ID。 |
| properties.runtimeProperties |
此功能类型的运行时属性。 |
|
| properties.targetType |
string |
此功能类型扩展的目标类型的字符串。 |
| properties.urn |
string maxLength: 2048 |
此功能类型的 URN 字符串。 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
CapabilityTypePropertiesRuntimeProperties
此功能类型的运行时属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| kind |
string |
资源的作类型(连续或离散)的字符串。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |