文档

CreateApiTemplate - 创建API模板

更新时间:

创建一个预定义的API模板,该模板包含了API的基本结构、请求方式、URL路径、请求参数和响应格式等信息。

调试

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

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。

cn-hangzhou
TemplateNamestring

集群模板名字。

DATALAKE模板
ApiNamestring

接口名。

CreateCluster
Contentstring

接口参数 Request 内容。

content
ResourceGroupIdstring

资源组 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\"}

返回参数

名称类型描述示例值
object

返回数据

TemplateIdstring

模板 ID(建议使用参数 TemplateId)。

at-41b4c6a0fc63****
RequestIdstring

请求 ID。

DD6B1B2A-5837-5237-ABE4-FF0C8944****
Successstring

模板 ID(待废弃)。

at-41b4c6a0fc63****

示例

正常返回示例

JSON格式

{
  "TemplateId": "at-41b4c6a0fc63****",
  "RequestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
  "Success": "at-41b4c6a0fc63****"
}

错误码

HTTP status code错误码错误信息描述
400ConflictParametersParameters that must not be used together. %s多个参数间存在冲突。
400IncompleteSignatureThe request signature is invalid.API请求签名不合法。
400InvalidActionThe action %s requested is invalid.不合法的Action。
400InvalidParameterThe specified parameter %s is not valid.参数错误。
400InvalidParameterValueThe input parameter %s is invalid or out of range.参数值超出范围。
400MissingActionThe action %s requested is missing.缺少Action参数
400MissingParameterThe input parameter %s that is mandatory for processing this request is not supplied.参数缺失。
400NotAuthorizedYou do not have permission to perform this action. %s没有权限。
400ThrottlingExceptionThe request was denied due to request throttling. %s限流。
404ResourceNotFoundThe resource not found by %s.请求的资源未找到。
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.内部错误。
503ServiceFailureThe request has failed due to a temporary failure of %s service.依赖的阿里云其他服务不可用。
503ServiceUnavailableThe request has failed due to a temporary failure of the server.请求超时或者服务不可用。

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

  • 本页导读
文档反馈