- 最新动态
- 产品介绍
- 快速入门
- 用户指南
- 质押指南
-
开发指南
-
以太坊Ethereum节点引擎
- 以太坊Ethereum介绍
- JSON-RPC API请求示例
- 应用程序开发介绍
- 智能合约开发介绍
-
以太坊API列表
- 专享版
-
共享版
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- net_version
- net_listening
- 波场Tron节点引擎
-
Polygon PoS
- Polygon PoS介绍
- HTTP请求示例
- WebSocket请求示例
-
Polygon PoS API列表
- 专享版
-
共享版
-
Ethereum JSON-RPC API
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getTransactionReceiptsByBlock
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_getRootHash
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- Polygon JSON-RPC API
-
Ethereum JSON-RPC API
-
Arbitrum
- Arbitrum介绍
- HTTP请求示例
- WebSocket请求示例
-
Arbitrum API列表
-
共享版
-
Ethereum JSON-RPC API
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_syncing
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
-
Ethereum JSON-RPC API
-
共享版
-
BNB Smart Chain
- BNB Smart Chain介绍
- HTTP请求示例
- WebSocket请求示例
-
BNB Smart Chain API列表
- 专享版
-
共享版
- eth_blocknumber
- eth_getBlockByNumber
- eth_hashrate
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_syncing
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_mining
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- txpool_status
- net_listening
- net_version
- 批量请求
-
以太坊Ethereum节点引擎
- API参考
- 常见问题
- 通用参考
展开导读
链接复制成功!
NES自定义策略
如果系统预置的NES权限,不满足您的授权要求,可以创建自定义策略。
目前支持以下两种方式创建自定义策略:
- 可视化视图创建自定义策略:无需了解策略语法,按可视化视图导航栏选择云服务、操作、资源、条件等策略内容,可自动生成策略。
- JSON视图创建自定义策略:可以在选择策略模板后,根据具体需求编辑策略内容;也可以直接在编辑框内编写JSON格式的策略内容。
具体创建步骤请参见:创建自定义策略。本章为您介绍常用的NES自定义策略样例。
- 在控制台页面, 在服务列表选择“统一身份认证 IAM”,进入统一身份认证服务页面。
- 在左侧导航栏中,选择“权限管理 > 权限”,单击“创建自定义策略”。
- 在创建自定义策略页面中,填写策略名称、策略配置方式、策略内容、策略描述等,并单击“确定”。
- 策略名称:自定义策略名称。例如:NES部分权限。
- 策略配置方式:例如选择“JSON视图”。
- 策略内容:根据模板输入策略内容。
例如:创建节点、查询单个节点和获取节点监控信息,请复制以下内容。
{ "Version": "1.1", "Statement": [ { "Action": [ "bcs:nesNode:create", "bcs:nesNode:get", "bcs:nesNode:getMetric" ], "Effect": "Allow" } ] }
表1 策略内容参数说明 参数
含义
值
Version
策略的版本
固定为“1.1”,不可修改。
Statement
Effect
定义Action中所包含的具体操作是否允许执行。
- Allow:允许执行。
- Deny:不允许执行。
Action
定义对NES的具体操作。
格式为:服务名:资源类型:操作,不支持自定义,NES支持的细粒度请参考表2,将对应内容填入Action中,表示为IAM用户授予对应的操作权限。
表2 细粒度权限对照表 授权项
权限说明
bcs:nes:getSummary
获取总览信息
bcs:nes:listNetwork
获取网络类型
bcs:nes:listNetworkFlavor
获取可用规格
bcs:nesNode:listFlavor
获取节点扩缩容可用规格
bcs:nesNode:list
获取指定网络的所有节点
bcs:nesNode:create
创建节点
bcs:nesNode:get
查询单个节点
bcs:nesNode:delete
删除节点
bcs:nesNode:update
更新节点
bcs:nesNode:getMetric
获取节点监控信息
bcs:nesNode:getStatistic
获取节点某段时间的API调用信息
bcs:nesNode:getStatus
获取质押节点某段时间的状态信息
bcs:nesNode:downloadCert
下载证书
bcs:nesAPIKey:create
创建凭据
bcs:nesAPIKey:list
获取指定用户的所有凭据
bcs:nesAPIKey:delete
删除凭据
bcs:nesAPIKey:update
更新凭据
bcs:nesNode:validateRelays
校验relays地址
bcs:nesNode:updateRelays
更新relays地址