创建一个预定义的API模板,该模板包含了API的基本结构、请求方式、URL路径、请求参数和响应格式等信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 地域 ID。 | cn-hangzhou |
TemplateName | string | 是 | 集群模板名字。 | DATALAKE模板 |
ApiName | string | 是 | 接口名。 | CreateCluster |
Content | string | 是 | 接口参数 Request 内容。 | content |
ResourceGroupId | string | 否 | 资源组 ID。 | rg-acfmzabjyop**** |
Content 示例:
{\"ApplicationConfigs\":[{\"ApplicationName\":\"HIVE\",\"ConfigFileName\":\"hivemetastore-site.xml\",\"ConfigItemKey\":\"hive.metastore.type\",\"ConfigItemValue\":\"DLF\",\"ConfigScope\":\"CLUSTER\"},{\"ApplicationName\":\"SPARK3\",\"ConfigFileName\":\"hive-site.xml\",\"ConfigItemKey\":\"hive.metastore.type\",\"ConfigItemValue\":\"DLF\",\"ConfigScope\":\"CLUSTER\"},{\"ApplicationName\":\"HIVE\",\"ConfigFileName\":\"hivemetastore-site.xml\",\"ConfigItemKey\":\"dlf.catalog.id\",\"ConfigItemValue\":\"1509789347011222\",\"ConfigScope\":\"CLUSTER\"},{\"ApplicationName\":\"SPARK3\",\"ConfigFileName\":\"hive-site.xml\",\"ConfigItemKey\":\"dlf.catalog.id\",\"ConfigItemValue\":\"1509789347011222\",\"ConfigScope\":\"CLUSTER\"}],\"Applications\":[{\"ApplicationName\":\"HADOOP-COMMON\",\"ApplicationVersion\":\"3.2.1-20230921\"},{\"ApplicationName\":\"HIVE\",\"ApplicationVersion\":\"3.1.3-20230919\"},{\"ApplicationName\":\"SPARK3\",\"ApplicationVersion\":\"3.3.1-hadoop3.2-20231008\"},{\"ApplicationName\":\"TEZ\",\"ApplicationVersion\":\"0.10.2-hadoop3.2-20230823\"},{\"ApplicationName\":\"YARN\",\"ApplicationVersion\":\"3.2.1-20230918\"},{\"ApplicationName\":\"HDFS\",\"ApplicationVersion\":\"3.2.1-20230926\"}],\"BootstrapScripts\":[],\"ClusterType\":\"DATALAKE\",\"DeployMode\":\"NORMAL\",\"ReleaseVersion\":\"EMR-5.15.1\",\"LogCollectStrategy\":\"{\\\"open\\\":[\\\"all\\\"],\\\"close\\\":[\\\"\\\"]}\",\"NodeAttributes\":{\"RamRole\":\"AliyunECSInstanceForEMRRole\",\"SecurityGroupId\":\"sg-hp35r2hc3a3sv8q2****\",\"KeyPairName\":\"shafeng\",\"VpcId\":\"vpc-hp3a4twhhj19bt6vm****\",\"ZoneId\":\"cn-huhehaote-a\",\"DiskEncrypted\":false},\"NodeGroups\":[{\"DataDisks\":[{\"Size\":80,\"Count\":1,\"Category\":\"cloud_essd\",\"PerformanceLevel\":\"PL1\"}],\"WithPublicIp\":false,\"InstanceTypes\":[\"ecs.g6.xlarge\"],\"NodeCount\":1,\"DeploymentSetStrategy\":\"NONE\",\"NodeGroupType\":\"MASTER\",\"AdditionalSecurityGroupIds\":[],\"PaymentType\":\"PayAsYouGo\",\"SecurityGroupIds\":[\"sg-hp35r2hc3a3sv8q2****\"],\"SubscriptionConfig\":{\"AutoRenew\":true,\"AutoRenewDurationUnit\":\"Monthly\",\"AutoRenewDuration\":6,\"PaymentDurationUnit\":\"Monthly\",\"PaymentDuration\":6},\"VSwitchIds\":[\"vsw-hp37mwil2rmhpu0nv****\"],\"SystemDisk\":{\"Size\":80,\"Category\":\"cloud_essd\",\"Count\":1,\"PerformanceLevel\":\"PL1\"},\"AutoRenew\":true,\"NodeGroupName\":\"emr-master\"},{\"DataDisks\":[{\"Size\":80,\"Count\":4,\"Category\":\"cloud_essd\",\"PerformanceLevel\":\"PL1\"}],\"WithPublicIp\":false,\"InstanceTypes\":[\"ecs.c6.xlarge\"],\"NodeCount\":2,\"DeploymentSetStrategy\":\"NONE\",\"NodeGroupType\":\"CORE\",\"AdditionalSecurityGroupIds\":[],\"PaymentType\":\"PayAsYouGo\",\"SecurityGroupIds\":[\"sg-hp35r2hc3a3sv8q2****\"],\"SubscriptionConfig\":{\"AutoRenew\":true,\"AutoRenewDurationUnit\":\"Monthly\",\"AutoRenewDuration\":6,\"PaymentDurationUnit\":\"Monthly\",\"PaymentDuration\":6},\"VSwitchIds\":[\"vsw-hp37mwil2rmhpu0nv****\"],\"SystemDisk\":{\"Size\":80,\"Category\":\"cloud_essd\",\"Count\":1,\"PerformanceLevel\":\"PL1\"},\"AutoRenew\":true,\"NodeGroupName\":\"emr-core\"}],\"RegionId\":\"cn-huhehaote\",\"PaymentType\":\"PayAsYouGo\",\"ResourceGroupId\":\"rg-acfmzabjyop****\",\"SecurityMode\":\"NORMAL\",\"SubscriptionConfig\":{\"AutoRenew\":true,\"AutoRenewDurationUnit\":\"Monthly\",\"AutoRenewDuration\":6,\"PaymentDurationUnit\":\"Monthly\",\"PaymentDuration\":6},\"Tags\":[],\"Action\":\"CreateCluster\"}
返回参数
示例
正常返回示例
JSON
格式
{
"TemplateId": "at-41b4c6a0fc63****",
"RequestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
"Success": "at-41b4c6a0fc63****"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ConflictParameters | Parameters that must not be used together. %s | 多个参数间存在冲突。 |
400 | IncompleteSignature | The request signature is invalid. | API请求签名不合法。 |
400 | InvalidAction | The action %s requested is invalid. | 不合法的Action。 |
400 | InvalidParameter | The specified parameter %s is not valid. | 参数错误。 |
400 | InvalidParameterValue | The input parameter %s is invalid or out of range. | 参数值超出范围。 |
400 | MissingAction | The action %s requested is missing. | 缺少Action参数 |
400 | MissingParameter | The input parameter %s that is mandatory for processing this request is not supplied. | 参数缺失。 |
400 | NotAuthorized | You do not have permission to perform this action. %s | 没有权限。 |
400 | ThrottlingException | The request was denied due to request throttling. %s | 限流。 |
404 | ResourceNotFound | The resource not found by %s. | 请求的资源未找到。 |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误。 |
503 | ServiceFailure | The request has failed due to a temporary failure of %s service. | 依赖的阿里云其他服务不可用。 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 请求超时或者服务不可用。 |
访问错误中心查看更多错误码。