调用CreateClusterV2,创建一个Databricks 数据洞察集群。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateClusterV2

系统规定参数。取值:CreateClusterV2

Name String bi_spark

集群的名字。长度限制为 1-64 个字符,只允许包含中文、字母、数字、-、_。

RegionId String cn-hangzhou

地域ID。目前支持华东 1、华东 2、华南 1、华北 2、华北 3、美西、新加坡、德国。

ZoneId String cn-hangzhou-b

可用区ID。

华东 1(杭州)支持:cn-hangzhou-b、cn-hangzhou-e、cn-hangzhou-f、cn-hangzhou-g、cn-hangzhou-h、cn-hangzhou-i。

华东 2(上海)支持:cn-shanghai-a、cn-shanghai-b、cn-shanghai-c、cn-shanghai-d、cn-shanghai-e、cn-shanghai-f、cn-shanghai-g。

华北 2(北京)支持:cn-beijing-a、cn-beijing-b、cn-beijing-c、cn-beijing-d、cn-beijing-e、cn-beijing-f、cn-beijing-g

华南 1(深圳)支持:cn-shenzhen-a、cn-shenzhen-b、cn-shenzhen-c、cn-shenzhen-d。

华北 5(呼和浩特)支持:cn-huhehaote-a、cn-huhehaote-b。

美国(弗吉尼亚)支持:us-east-1a、us-east-1b。

LogPath String oss//bucketname/path

ath

OSS日志路径。

SecurityGroupId String sg-bp1id7ajv83kmqwq****

安全组 ID。可以在ECS中创建一个然后使用。需要确认的是,如果使用已有的安全组,会被增加上默认安全组策略:入只开放22端口,出开放所有端口。

IsOpenPublicIp Boolean true

是否开启公网IP。如果开启,默认会带有8MB的带宽

SecurityGroupName String ddi-sg

需要新建的安全组名称。如果不指定安全组ID,那么将使用这个名字创建一个新的安全组。当集群创建完成以后,可以在集群详情中看到创建的安全组ID。这个安全组将会带有默认的安全组策略:入只开放22端口,出开放所有端口

ChargeType String PostPaid

付费类型:

PostPaid:按量付费。

PrePaid:包年包月。

Period Integer 30

包年包月时间(包月数有:1、2、3、4、5、6、7、8、9、12、24、36)。ChargeType=PrePaid 时,必填。

Auto Boolean false

包年包月集群是否自动续费

AutoPayOrder Boolean true

是否自动付费。

VpcId String vpc-bp1l4urd87xlh7i4b****

VPC ID,NetType=vpc时必填。

VSwitchId String vsw-bp10tvjyc77psy0z5****

交换机ID,NetType=vpc时必填。

NetType String vpc

网络类型。

UserDefinedEmrEcsRole String AliyunDDIAccessingOSSRole

用于免AK访问OSS的Role

EmrVer String DDI-v1.0

Databricks 数据洞察版本号

ClusterType String 标准型

集群类型。

EnableHighAvailability Boolean true

是否开启高可用集群。如果开启高可用,需要两台Master节点。

UseLocalMetaDb Boolean true

是否使用本地Hive元数据库。

EnableSsh Boolean true

是否开启SSH。

InstanceGeneration String ecs-3

ECS实例分代。

MasterPwd String pwd

Master节点SSH访问密码。需要满足ECS的密码规则:8-30个字符,且同时包含任意三项(大、小写字母、数字和特殊符号)。

KeyPairName String test_pair

密钥对。

MetaStoreType String local

统一元数据类型。

MetaStoreConf String rds-xxx.com

统一元数据的配置信息。

ClickHouseConf String 0

保留字段。

ExtraAttributes String []

附加属性

DepositType String HALF_MANAGED

托管类型。

MachineType String ECS

机器类型。

UseCustomHiveMetaDB Boolean false

保留字段,无需填写。

InitCustomHiveMetaDB Boolean false

保留字段,无需填写。

Configurations String 0

保留字段,无需填写。

EnableEas Boolean false

是否高安全集群。

RelatedClusterId String C-D7958B72E59B****

当前集群是gateway时,其关联的主集群ID。

WhiteListType String IP

白名单类型。取值:

IP:IP白名单分组。

SecurityGroup:安全组。

默认为:IP。

AuthorizeContent String 0

保留字段,无需填写。

ResourceGroupId String rg-bp67acfmxazb4p****

实例和节点ECS实例所在的企业资源组ID。

ClientToken String []

客户端令牌。

UserInfo.N.Password String pwd

Knox用户的密码。

UserInfo.N.UserId String 123456789

Knox用户的用户RAM ID。

UserInfo.N.UserName String username

Knox用户的用户名。

HostComponentInfo.N.ComponentNameList.N String

组件列表

HostComponentInfo.N.HostName String ddi-header-1

主机名。

HostComponentInfo.N.ServiceName String SPARK

服务名。

ServiceInfo.N.ServiceName String SPARK

服务名。

ServiceInfo.N.ServiceVersion String 2.3.3-1.0.2

服务内部版本。

PromotionInfo.N.ProductCode String []

促销信息,产品代码。

PromotionInfo.N.PromotionOptionCode String []

促销信息,促销选项代码。

PromotionInfo.N.PromotionOptionNo String []

促销信息 促销编号

HostGroup.N.AutoRenew Boolean false

机器组机器是否自动续费。

HostGroup.N.ChargeType String PostPaid

机器组机器付费类型。

HostGroup.N.ClusterId String 0

保留字段,无需填写。

HostGroup.N.Comment String 0

保留字段,无需填写。

HostGroup.N.CreateType String 0

保留字段,无需填写。

HostGroup.N.DiskCapacity Integer 80

机器组的数据盘容量。

HostGroup.N.DiskCount Integer 4

机器组的数据盘数量。

HostGroup.N.DiskType String CLOUD_ESSD

机器组的数据盘类型。

HostGroup.N.GpuDriver String cuda9

GPU驱动。

HostGroup.N.HostGroupId String 0

保留字段,无需填写。

HostGroup.N.HostGroupName String 主实例组

主实例组

HostGroup.N.HostGroupType String MASTER

机器组类型,枚举值:

MASTER

Worker

HostGroup.N.InstanceType String ecs.g5.2xlargeg

机器组型号

HostGroup.N.NodeCount Integer 2

机器组节点数。

HostGroup.N.Period Integer 36

包年包月时间(包月数有1、2、3、4、5、6、7、8、9、12、24、36)。HostGroup.n.ChargeType=PrePaid时,必填。

HostGroup.N.SysDiskCapacity Integer 80

机器组的系统盘容量。

HostGroup.N.SysDiskType String CLOUD_SSD

机器组的系统盘类型。

HostGroup.N.VSwitchId String vsw-bp10tvjyc77psy0z5****

虚拟交换机ID。

BootstrapAction.N.Arg String --a=b

引导操作参数。

BootstrapAction.N.Name String name

引导操作名字。

BootstrapAction.N.Path String oss://bucket/path

引导操作脚本路径。

Config.N.ConfigKey String fs.trash.interval

自定义配置项的Key。

Config.N.ConfigValue String 60

自定义配置项的值。

Config.N.Encrypt String 0

保留字段,无需填写。

Config.N.FileName String spark-site

自定义配置项所属文件名。

Config.N.Replace String 0

保留字段,无需填写。

Config.N.ServiceName String SPARK

自定义配置项服务名(大写)。

Tag.N.Key String TestKey

DDI实例和节点ECS实例的标签键

Tag.N.Value String TestValue

DDI实例和节点ECS实例的标签值。N的取值范围:1~20。一旦传入该值,可以为空字符串。标签值的取值范围:1~128,不能以acs:开头,不能包含http://或者https://。

返回数据

名称 类型 示例值 描述
ClusterId String C-D7958B72E59B****

集群ID。

CoreOrderId String 0

Core节点订单ID。

EmrOrderId String 0

Databricks 数据洞察订单ID。

MasterOrderId String 0

Master节点订单ID。

RequestId String BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=CreateClusterV2
&BootstrapAction.1.1ame=name
&BootstrapAction.1.Path=oss://bucket/path
&ClusterType=标准型
&Config.1.ConfigKey=fs.trash.interval
&Config.1.ConfigValue=60
&Config.1.FileName=spark-site
&Config.1.ServiceName=SPARK
&EmrVer=DDI-v1.0
&HostGroup.1.DiskCapacity=80
&HostGroup.1.DiskCount=4
&HostGroup.1.DiskType=CLOUD_ESSD
&HostGroup.1.HostGroupName=主实例组
&HostGroup.1.HostGroupType=MASTER
&HostGroup.1.InstanceType=ecs.g5.2xlargeg
&HostGroup.1.1odeCount=2
&HostGroup.1.SysDiskCapacity=80
&HostGroup.1.SysDiskType=CLOUD_SSD
&Name=bi_spark
&RegionId=cn-hangzhou
&UserInfo.1.Password=pwd
&UserInfo.1.UserId=123456789
&UserInfo.1.UserName=username
&ZoneId=cn-hangzhou-b
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<MasterOrderId>0</MasterOrderId>
<CoreOrderId>0</CoreOrderId>
<RequestId>BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22</RequestId>
<ClusterId>C-D7958B72E59B****</ClusterId>
<EmrOrderId>0</EmrOrderId>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "MasterOrderId" : 0,
  "CoreOrderId" : 0,
  "RequestId" : "BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22",
  "ClusterId" : "C-D7958B72E59B****",
  "EmrOrderId" : 0
}

错误码

HttpCode 错误码 错误信息 描述
400 ECSInfo.DiskSize.TooSmall The disk size must be greater than or equal to 80 GB. 磁盘容量太小,加大磁盘容量
400 ECSInfo.ECSOrder.IndexMissing The order information is invalid. 订购信息有误,提工单
400 ECSInfo.ECSOrder.MasterIndexMissing The order information is invalid. 订购信息有误,提工单
400 InternalError The request processing has failed due to some unknown error. 内部错误,请提工单
400 ECSInfo.ECSOrder.SlaveOrderMissing The order information is invalid. 订购信息有误,提工单
400 RAM.Permission.NotAllow You are not authorized to perform the operation. 没有权限执行此操作,请联系主账号授权
400 ECSInfo.ECSOrder.NodeCount.TooSmall You must increase the number of nodes. 节点数过少,加大节点数量
400 SecurityGroup.IsEmpty You must specify the security group name. 安全组名称不能为空
400 User.Account.Abnormal The user account is out of service. 用户账号已经停止服务
400 Master.Pwd.Cannot.Blank You must specify Master password. Master节点的密码不能为空,填写Master的密码
400 LogPath.Cannot.Blank You must specify the log path. 日志路径不能为空,请填写正确的参数
400 HighAvailability.Master.NodeCount.Not.Match The HighAvailability parameter does not match the master node count. 高可用参数与master数量不匹配,HA集群需要master节点个数为2
400 InvalidParameter.Period The specified period is invalid. 包年包月类型的period参数不合规范
400 Balance.Not.Enough Your account does not have enough balance. 账号没有足够的余额,账户至少有100元人民币余额
400 VSwitch.NotBelongTo.Zone The specified VSwitch does not belong to the specified zone. 指定交换机不属于该可用区
400 InsufficientBalance Your account does not have enough balance. 账号没有足够的余额,账号至少有100元余额
400 DB.Fail A database access error occurred. 数据库访问错误,请重试或者提工单
400 ECSInfo.ECSOrder.INVALID The order creation parameter is invalid. 创建订单参数错误
400 Ecs.InstanceType.NotSupported The ECS instance type %s is not supported in DDI. 实例规格不支持,选择其它实例规格
400 DiskType.Invalid The disk type %s is invalid. 磁盘类型不支持,更换磁盘类型
400 Unsupported.DiskType The ECS instance type %s does not support the disk type %s. 磁盘类型不支持
400 Unsupported.ZoneId The zone %s is not supported. DDI不支持该可用区,切换可用区
400 ECSInfo.DiskSize.TooBig The maximum size of the disk is exceeded. 磁盘容量超过磁盘限制,减少磁盘容量
400 ECSInfo.DiskCount.ExceedLimit The maximum number of disks is exceeded. 磁盘块数超过限制,减少磁盘块数
400 ECSInfo.NodeType.Unsupported The specified node type is not supported. 指定节点类型不支持,切换节点类型
400 Must.Specify.MasterNode You must specify Master node information. 请指定Master节点信息
400 Only.Support.One.Master Only one master node is supported in a DDI cluster. 在DDI集群中只支持一个主节点
400 Have.Orders.Wait.For.Pay A payable order already exists. 有另外的待付款订单
400 InvalidDataDiskSize.ValueNotSupported The specified data disk size is invalid. 指定的磁盘容量不在合法范围内,请填写正确的参数
400 Cluster.WaitForPay.OverLimit Too many clusters are waiting for payment. 等待付款的集群过多,支付或者取消当前未支付的订单
400 User.OtherUserResource.NotAllow You are not authorized to operate other users resource. 不能操作其它用户的资源
400 Forbidden You are not authorized to perform the operation. 没有权限操作指定资源,联系主账号授权

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

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