最近更新时间:2024.03.14 17:40:33
首次发布时间:2024.01.22 15:56:41
获取集群
调用GetCluster,查询该账号下 E-MapReduce(EMR)集群详情。
已使用账号登录火山引擎。
请求方式:POST
请求地址:https://open.volcengineapi.com/?Version=2023-08-15&Action=GetCluster
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetCluster | 要执行的操作,取值:GetCluster |
Version | String | 是 | 2023-08-15 | API的版本,取值:2023-08-15 |
ClusterId | String | 否 | emr-xxx | 集群ID |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Tags | Array of Tag | [ | 标签列表 |
RegionId | String | cn-beijing | 地域ID |
ProjectName | String | default | 项目名称 |
ClusterId | String | emr-xxx | 集群ID |
ClusterName | String | OpenApiHadoop3.7.0-xxx | 集群名称 |
ClusterType | String | Hadoop | 集群类型 |
ReleaseVersion | String | 3.7.0 | 集群版本 |
SecurityGroupId | String | sg-xxx | 集群全局安全组ID |
VpcId | String | vpc-xxx | 集群vpcId |
NodeAttribute | NodeAttribute | { | 集群全局的节点信息 |
ClusterDomainNames | Array of String | [ | 集群dns域名后缀 |
AccountId | Long | 2100xxx | 账号ID |
CreatorId | Long | 6xxx | 创建者ID |
CreatorName | String | xxx | 创建者名称 |
Autorenew | Boolean | false | 是否自动续费 |
AutorenewPeriod | Integer | 1 | 自动续费周期 |
AutorenewPeriodUnit | String | Week, //按周 | 自动续费周期单位 |
ClusterState | String | PENDING_FOR_PAYMENT, | 集群状态 |
ChargeType | String | PRE,POST | 付费类型 |
DeployMode | String | NORMAL, | 集群部署模式 |
SecurityMode | String | NORMAL, | 安全模式 |
CreateTime | Long | 1703437906000 | 集群创建时间 |
ReadyTime | Long | 1703437906000 | 集群创建完成时间 |
ExpireTime | Long | 1703437906000 | 集群过期时间 |
TerminateTime | Long | 1703437906000 | 集群终止时间 |
StateChangeReason | StateChangeReason | xxx | 状态变更原因 |
{ "ClusterId":"emr-xxx" }
{ "ResponseMetadata": { "RequestId": "20231205194333E4CF0C48565Cxxx", "Action": "GetCluster", "Version": "2023-08-15", "Service": "emr", "Region": "cn-beijing", "Error": null, "Deprecated": false }, "Result": { "RegionId": "cn-beijing", "ProjectName": "default", "ClusterId": "emr-xxx", "ClusterName": "OpenApiHadoop3.7.0-xxx", "ClusterType": "Hadoop", "ReleaseVersion": "3.7.0", "SecurityGroupId": "sg-xxx", "VpcId": "vpc-xxx", "NodeAttribute": { "ZoneId": "cn-beijing-b", "EcsIamRole": "VEECSforEMRRole", "LoginUserName": null }, "ClusterDomainNames": [ "emr-xxx.offline-cn-beijing.emr-volces.com", "offline-cn-beijing.emr-volces.com" ], "AccountId": 210xxx, "CreatorId": 64xxx, "CreatorName": null, "Autorenew": false, "AutorenewPeriod": 1, "AutorenewPeriodUnit": null, "ClusterState": "RUNNING", "ChargeType": "POST", "DeployMode": "HIGH_AVAILABLE", "SecurityMode": "SIMPLE", "CreateTime": 1701764286214, "ReadyTime": 1701770482932, "ExpireTime": null, "TerminateTime": null, "Tags": null, "StateChangeReason": null } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidClusterId | cluster id {clusterId} not found | 集群不存在 |
400 | InvalidRequest | Access Denied {clusterId} | 对该集群没有权限 |