ALIYUN::EMR::ClusterServiceConfigs is used to create or modify the configurations of a specified service in a cluster.

Syntax

{
  "Type": "ALIYUN::EMR::ClusterServiceConfigs",
  "Properties": {
    "ClusterId": String,
    "ServiceConfigs": List
  }
}

Properties

Property Type Required Editable Description Constraint
ClusterId String Yes No The ID of the cluster. None
ServiceConfigs List Yes Yes The configurations of the server. For more information, see ServiceConfigs properties.

ServiceConfigs syntax

"ServiceConfigs": [
  {
    "Comment": String,
    "GatewayClusterIdList": List,
    "ServiceName": String,
    "CustomConfigParams": String,
    "RefreshHostConfig": Boolean,
    "HostInstanceId": String,
    "ConfigType": String,
    "ConfigParams": String,
    "GroupId": String
  }
]

ServiceConfigs properties

Property Type Required Editable Description Constraint
Comment String No Yes The description of the service. None
GatewayClusterIdList List No No The list of gateway cluster IDs. Separate multiple gateway cluster IDs with commas (,).
ServiceName String Yes No The name of the service. None
CustomConfigParams String No Yes The custom configurations. None
RefreshHostConfig Boolean No No Specifies whether to run the configure command immediately after the configurations are created or modified. Valid values:
  • true
  • false
HostInstanceId String No Yes The ID of the host instance. In most cases, this parameter is set to the ID of an Elastic Compute Service (ECS) instance. None
ConfigType String No No The type of the configurations. None
ConfigParams String Yes Yes The specified content of the configurations. The parameter value is a JSON string.
GroupId String No Yes The ID of the host group. None

Response parameters

Fn::GetAtt

ClusterId: the ID of the cluster.

Examples

JSON format

{
  "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 format

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