ALIYUN::EMR::ClusterServiceConfigs类型用于创建或修改集群指定服务的配置信息。
语法
{
  "Type": "ALIYUN::EMR::ClusterServiceConfigs",
  "Properties": {
    "ClusterId": String,
    "ServiceConfigs": List
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
|---|---|---|---|---|---|
| ClusterId | String | 是 | 否 | 集群ID。 | 无 | 
| ServiceConfigs | List | 是 | 是 | 服务器配置。 | 更多信息,请参见ServiceConfigs属性。 | 
ServiceConfigs语法
"ServiceConfigs": [
  {
    "Comment": String,
    "GatewayClusterIdList": List,
    "ServiceName": String,
    "CustomConfigParams": String,
    "RefreshHostConfig": Boolean,
    "HostInstanceId": String,
    "ConfigType": String,
    "ConfigParams": String,
    "GroupId": String
  }
]ServiceConfigs属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
|---|---|---|---|---|---|
| Comment | String | 否 | 是 | 备注信息。 | 无 | 
| GatewayClusterIdList | List | 否 | 否 | Gateway集群ID列表。 | 多个Gateway集群ID之间用半角逗号(,)间隔。 | 
| ServiceName | String | 是 | 否 | 服务名称。 | 无 | 
| CustomConfigParams | String | 否 | 是 | 自定义配置项的内容。 | 无 | 
| RefreshHostConfig | Boolean | 否 | 否 | 创建或修改完成后,是否立刻执行configure命令。 | 取值: 
 | 
| HostInstanceId | String | 否 | 是 | 主机实例ID,通常是ECS实例的ID。 | 无 | 
| ConfigType | String | 否 | 否 | 配置项类型。 | 无 | 
| ConfigParams | String | 是 | 是 | 服务器配置的具体内容。 | 内容为JSON格式的字符串。 | 
| GroupId | String | 否 | 是 | 主机组ID。 | 无 | 
返回值
Fn::GetAtt
ClusterId:集群ID。
示例
JSON格式
                  
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": "The ID of the cluster."
    },
    "ServiceConfigs": {
      "Type": "Json",
      "Description": "Server configs"
    }
  },
  "Resources": {
    "EMRClusterServiceConfigs": {
      "Type": "ALIYUN::EMR::ClusterServiceConfigs",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "ServiceConfigs": {
          "Ref": "ServiceConfigs"
        }
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "EMRClusterServiceConfigs",
          "ClusterId"
        ]
      }
    }
  }
}YAML格式
                  
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Description: The ID of the cluster.
    Type: String
  ServiceConfigs:
    Description: Server configs
    Type: Json
Resources:
  EMRClusterServiceConfigs:
    Properties:
      ClusterId:
        Ref: ClusterId
      ServiceConfigs:
        Ref: ServiceConfigs
    Type: ALIYUN::EMR::ClusterServiceConfigs
Outputs:
  ClusterId:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
      - EMRClusterServiceConfigs
      - ClusterId