5.6 其他接口
5.6.3 查询产品规格列表
"soldOut" : false,
"id" : "9f1c5806706d4c1fb0eb72f0a9b18c77", "code" : "cn-north-7c",
"name" : "可用区3", "port" : "443",
"resource_availability" : "true", "default_az" : false,
"remain_time" : 9223372036854776000, "ipv6_enable" : false
} ] }
状态码
状态码 描述
200 查询可用区信息成功。
错误码
请参见错误码。
5.6.3 查询产品规格列表
功能介绍
查询产品规格列表。
调试
您可以在API Explorer中调试该接口。
URI
GET /v2/{engine}/products
表5-63 路径参数
参数 是否必选 参数类型 描述
engine 是 String 消息引擎的类型。
表5-64 Query 参数
参数 是否必选 参数类型 描述
product_id 否 String 产品ID。
请求参数
无
响应参数
状态码: 200
表5-65 响应 Body 参数
参数 参数类型 描述
engine String 分布式消息服务的产品类型。
versions Array of
strings 支持的产品版本类型。
products Array of
ListEnginePro ductsEntity
objects产品规格的详细信息。
表5-66 ListEngineProductsEntity
参数 参数类型 描述
type String 产品类型。当前产品类型有单机和集群。
product_id String 产品ID。
ecs_flavor_id String 底层资源类型。
billing_code String 账单计费类型。
arch_types Array of
strings CPU架构。
参数 参数类型 描述 charging_mod
e Array of
strings 计费模式。
● monthly:包年/包月类型。
● hourly:按需类型。
ios Array of
ListEngineIos Entity objects
支持的磁盘IO类型列表。
support_featu
res Array of
objects 当前规格实例支持的功能特性列表。
properties
ListEnginePro pertiesEntity
object当前规格实例的属性。
表5-67 ListEngineIosEntity
参数 参数类型 描述
io_spec String 磁盘IO编码。
type String 磁盘类型。
available_zon
es Array of
strings 可用区。
unavailable_z
ones Array of
strings 不可用区。
表5-68 ListEnginePropertiesEntity
参数 参数类型 描述
max_partition
_per_broker String 每个Broker的最大分区数。
max_broker String Broker的最大个数。
max_storage_
per_node String 每个节点的最大存储。单位为GB。
max_consume
r_per_broker String 每个Broker的最大消费者数。
min_broker String Broker的最小个数。
max_bandwid
th_per_broker String 每个Broker的最大带宽。
参数 参数类型 描述 min_storage_
per_node String 每个节点的最小存储。单位为GB。
max_tps_per_
broker String 每个Broker的最大TPS。
请求示例
GET https://{endpoint}/v2/rabbitmq/products
响应示例
状态码: 200
查询产品规格列表成功。
{ "engine" : "rabbitmq", "versions" : [ "3.7.17" ], "products" : [ { "type" : "single",
"product_id" : "c6.2u4g.single", "ecs_flavor_id" : "c6.large.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
}, {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] } ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "2000", "max_broker" : "1",
"max_queue_per_broker" : "100", "max_storage_per_node" : "30000", "min_broker" : "1",
"step_length" : "0",
"min_storage_per_node" : "200"
} }, {
"type" : "cluster",
"product_id" : "c6.4u8g.cluster", "ecs_flavor_id" : "c6.xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "3000", "max_broker" : "7",
"max_queue_per_broker" : "200", "max_storage_per_node" : "30000", "min_broker" : "3",
"step_length" : "2",
"min_storage_per_node" : "200"
} }, {
"type" : "single",
"product_id" : "c6.4u8g.single", "ecs_flavor_id" : "c6.xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "3000", "max_broker" : "1",
"max_queue_per_broker" : "200", "max_storage_per_node" : "30000", "min_broker" : "1",
"step_length" : "0",
"min_storage_per_node" : "200"
} }, {
"type" : "single",
"product_id" : "c6.8u16g.single", "ecs_flavor_id" : "c6.2xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "5000", "max_broker" : "1",
"max_queue_per_broker" : "400", "max_storage_per_node" : "30000", "min_broker" : "1",
"step_length" : "0",
"min_storage_per_node" : "200"
}
}, {
"type" : "cluster",
"product_id" : "c6.8u16g.cluster", "ecs_flavor_id" : "c6.2xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "5000", "max_broker" : "7",
"max_queue_per_broker" : "400", "max_storage_per_node" : "30000", "min_broker" : "3",
"step_length" : "2",
"min_storage_per_node" : "200"
} }, {
"type" : "cluster",
"product_id" : "c6.12u24g.cluster", "ecs_flavor_id" : "c6.3xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "6000", "max_broker" : "7",
"max_queue_per_broker" : "600", "max_storage_per_node" : "30000", "min_broker" : "3",
"step_length" : "2",
"min_storage_per_node" : "200"
} }, {
"type" : "cluster",
"product_id" : "c6.16u32g.cluster", "ecs_flavor_id" : "c6.4xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] }, {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
} ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "8000", "max_broker" : "7",
"max_queue_per_broker" : "800", "max_storage_per_node" : "30000", "min_broker" : "3",
"step_length" : "2",
"min_storage_per_node" : "200"
} }, {
"type" : "single",
"product_id" : "c6.16u32g.single", "ecs_flavor_id" : "c6.4xlarge.2", "billing_code" : "dms.platinum.c6", "arch_types" : [ "X86" ],
"charging_mode" : [ "monthly", "hourly" ], "ios" : [ {
"io_spec" : "dms.physical.storage.ultra.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4d", "cn-north-4e", "cn-north-4f" ]
}, {
"io_spec" : "dms.physical.storage.high.v2", "type" : "evs",
"available_zones" : [ "cn-north-4b", "cn-north-4g", "cn-north-4c", "cn-north-4a" ], "unavailable_zones" : [ "cn-north-4f", "cn-north-4d", "cn-north-4e", "cn-north-4f" ] } ],
"support_features" : [ ], "properties" : {
"max_connection_per_broker" : "8000", "max_broker" : "1",
"max_queue_per_broker" : "800", "max_storage_per_node" : "30000", "min_broker" : "1",
"step_length" : "0",
"min_storage_per_node" : "200"
} } ] }
状态码
状态码 描述
200 查询产品规格列表成功。
错误码
请参见错误码。
6 权限策略和授权项
如果您需要对您所拥有的DMS for RabbitMQ实例进行精细的权限管理,您可以使用统 一身份认证服务(Identity and Access Management,简称IAM),如果华为云帐号 已经能满足您的要求,不需要创建独立的IAM用户,您可以跳过本章节,不影响您使 用DMS for RabbitMQ实例的其它功能。
默认情况下,新建的IAM用户没有任何权限,您需要将其加入用户组,并给用户组授 予策略或角色,才能使用户组中的用户获得相应的权限,这一过程称为授权。授权 后,用户就可以基于已有权限对云服务进行操作。
权限根据授权的精细程度,分为角色和策略。角色以服务为粒度,是IAM最初提供的 一种根据用户的工作职能定义权限的粗粒度授权机制。策略以API接口为粒度进行权限 拆分,授权更加精细,可以精确到某个操作、资源和条件,能够满足企业对权限最小 化的安全管控要求。
说明
如果您要允许或是禁止某个接口的操作权限,请使用策略。
帐号具备所有接口的调用权限,如果使用帐号下的IAM用户发起API请求时,该IAM用 户必须具备调用该接口所需的权限,否则,API请求将调用失败。每个接口所需要的权 限,与各个接口所对应的授权项相对应,只有发起请求的用户被授予授权项所对应的 策略,该用户才能成功调用该接口。例如,用户要调用接口来创建RabbitMQ实例,那 么这个IAM用户被授予的策略中必须包含允许“dms:instance:create”的授权项,该接 口才能调用成功。
支持的授权项
策略包含系统策略和自定义策略,如果系统策略不满足授权要求,管理员可以创建自 定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作 与API相对应,授权项列表说明如下:
● 权限:允许或拒绝某项操作。
● 对应API接口:自定义策略实际调用的API接口。
● 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,
可以实现授权项对应的权限功能。
● IAM项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,
包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授 权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生
效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生 效,如果在企业管理中授权,则该自定义策略不生效。关于IAM项目与企业项目 的区别,详情请参见:IAM与企业管理的区别。
DMS for RabbitMQ管理控制操作相关的企业项目细粒度权限授权项,明细如下表所 示。用户调用如下API时,需要获取对应的权限。权限获取请参考统一身份认证服务
dms:instance:get √ √
批量重启或
dms:instance:list √ √
查询插件列
dms:instance:list √ √
开启或关闭
权限 对应API接口 授权项 IAM项目
etAuthInfo √ √
实例规格变
BackgroundTask √ √
查询后台任
BackgroundTask √ √
删除后台任
dms:instance:get √ √
查询项目标 签
GET /v2/
{project_id}/
rabbitmq/tags
dms:instance:get √ √
开启关闭公