文档

GetResourceType - 查询资源类型的详情

更新时间:

用户通过此接口查询指定的资源元数据详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/v1/providers/{provider}/products/{product}/resourceTypes/*

请求参数

名称类型必填描述示例值
x-acs-accept-languagestring

选择返回产品的语言。

zh_CH:中文 (默认)

en_US:英文。

zh_CH
requestPathstring

请求路径。格式为: /api/v1/providers/{provider}/products/{product}/resourceTypes/{resourceType}

请求路径中变量说明:

provider: 云厂商,目前只支持 Aliyun。

product: 产品 Code。

resourceType: 资源类型。

示例如下:

Redis DBInstance: /api/v1/providers/Aliyun/products/Redis/resourceTypes/DBInstance

Redis Account: /api/v1/providers/Aliyun/products/Redis/resourceTypes/DBInstance/Account

/api/v1/providers/Aliyun/products/Redis/resourceTypes/DBInstance

返回参数

名称类型描述示例值
object

返回结构。

requestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
resourceTypeobject

资源类型。

productstring

产品 Code。

ECS
resourceTypestring

资源类型。

Instance
infoobject

资源类型基础信息。

titlestring

资源类型名称。

Instance
descriptionstring

资源类型描述。

An ECS instance is equivalent to a virtual machine, including the most basic computing components such as CPU, memory, operating system, network, and disk. You can easily customize and change the configuration of the instance. You have full control over the virtual machine.
chargeTypestring

付费形式

paid(付费) free(免费)

paid
deliveryScopestring

交付级别

center(中心化部署级别)

region(地域部署级别)

zone(可用区部署级别)

region
propertiesobject

资源属性定义,key 是属性名,value 为属性详细信息。

primaryIdentifierstring

资源 ID。

/properties/InstanceId
requiredarray

资源创建必填参数集合。

string

资源创建必填参数。

RegionId
publicPropertiesarray

公共的属性集合,为资源基本属性。非操作私有参数。

string

公共属性。

/properties/Description
readOnlyPropertiesarray

只读参数集合,只在 list 或者 get 操作中返回,创建及变更时不作为入参。

string

只读参数。

/properties/CreateTime
filterPropertiesarray

list 操作时可以作为 filter 参数的属性集合。

string

filter 参数。

/properties/ResourceGroupId
updateTypePropertiesarray

可以修改的属性集合。

string

可改属性。

/properties/InstanceName
sensitiveInfoPropertiesarray

敏感属性集合,例如密码等。

string

敏感属性。

/properties/VncPassword
createOnlyPropertiesarray

创建操作私有参数集合。资源查询操作中不会返回的属性,但是创建操作中需要传入的参数。

string

创建操作私有参数。

/properties/AutoRenew
updateOnlyPropertiesarray

更新操作私有参数集合。资源查询操作中不会返回的属性,但是更新操作中需要传入的参数。

string

更新操作私有参数。

/properties/DryRun
getOnlyPropertiesarray

查询操作私有参数集合。资源查询操作中不会返回的属性,但是查询操作中需要传入的参数。

string

查询操作私有参数。

/properties/DryRun
listOnlyPropertiesarray

列举操作私有参数集合。资源查询操作中不会返回的属性,但是列举操作中需要传入的参数。

string

列举操作私有参数。

/properties/DryRun
deleteOnlyPropertiesarray

删除操作私有参数集合。资源查询操作中不会返回的属性,但是删除操作中需要传入的参数。

string

删除操作私有参数。

/properties/ForceDelete
getResponsePropertiesarray

查询返回的属性集合。

string

查询返回的属性。

/properties/NetworkInterfaces/items/properties/IpvSets
listResponsePropertiesarray

列举返回的属性集合。

string

列举返回的属性。

/properties/InstanceId
handlersobject

支持的资源操作信息(包括 RAM 权限)。

createobject

创建操作关联信息。

permissionsarray

所需 RAM 权限信息集合。

string

RAM 权限。

ecs:CreateInstance
updateobject

更新操作关联信息。

permissionsarray

所需 RAM 权限信息集合。

string

RAM 权限。

ecs:ModifyInstanceNetworkSpec
getobject

查询操作关联信息。

permissionsarray

所需 RAM 权限信息集合。

string

RAM 权限。

ecs:DescribeInstanceAttachmentAttributes
listobject

列举操作关联信息。

permissionsarray

所需 RAM 权限信息集合。

string

RAM 权限。

ecs:DescribeInstances
deleteobject

删除操作关联信息。

permissionsarray

所需 RAM 权限信息集合。

string

RAM 权限。

ecs:DeleteInstance

示例

正常返回示例

JSON格式

{
  "requestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "resourceType": {
    "product": "ECS",
    "resourceType": "Instance",
    "info": {
      "title": "Instance",
      "description": "An ECS instance is equivalent to a virtual machine, including the most basic computing components such as CPU, memory, operating system, network, and disk. You can easily customize and change the configuration of the instance. You have full control over the virtual machine.",
      "chargeType": "paid",
      "deliveryScope": "region"
    },
    "properties": {
      "test": "test",
      "test2": 1
    },
    "primaryIdentifier": "/properties/InstanceId\n",
    "required": [
      "RegionId"
    ],
    "publicProperties": [
      "\t\n/properties/Description"
    ],
    "readOnlyProperties": [
      "/properties/CreateTime"
    ],
    "filterProperties": [
      "\t\n/properties/ResourceGroupId"
    ],
    "updateTypeProperties": [
      "/properties/InstanceName"
    ],
    "sensitiveInfoProperties": [
      "/properties/VncPassword"
    ],
    "createOnlyProperties": [
      "/properties/AutoRenew"
    ],
    "updateOnlyProperties": [
      "/properties/DryRun"
    ],
    "getOnlyProperties": [
      "/properties/DryRun"
    ],
    "listOnlyProperties": [
      "/properties/DryRun"
    ],
    "deleteOnlyProperties": [
      "/properties/ForceDelete"
    ],
    "getResponseProperties": [
      "/properties/NetworkInterfaces/items/properties/IpvSets"
    ],
    "listResponseProperties": [
      "/properties/InstanceId"
    ],
    "handlers": {
      "create": {
        "permissions": [
          "ecs:CreateInstance"
        ]
      },
      "update": {
        "permissions": [
          "ecs:ModifyInstanceNetworkSpec"
        ]
      },
      "get": {
        "permissions": [
          "ecs:DescribeInstanceAttachmentAttributes"
        ]
      },
      "list": {
        "permissions": [
          "ecs:DescribeInstances"
        ]
      },
      "delete": {
        "permissions": [
          "ecs:DeleteInstance"
        ]
      }
    }
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈