{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "o11y PrivateLink Endpoint Service",
  "Parameters": {
    "AutoAcceptEnabled": {
      "Type": "Boolean",
      "Default": true,
      "AllowedValues": [true, false]
    },
    "ServiceResourceType": {
      "Type": "String",
      "Default": "nlb"
    },
    "Resources": {
      "Type": "Json"
    },
    "Name":{
      "Type": "String"
    }
  },
  "Resources": {
    "PrivateLinkEndpointService": {
      "Type": "ALIYUN::PrivateLink::VpcEndpointService",
      "Properties": {
        "ServiceDescription": {"Ref": "Name"},
        "AutoAcceptEnabled": {"Ref": "AutoAcceptEnabled"},
        "ServiceResourceType": {"Ref": "ServiceResourceType"},
        "Resource": {"Ref": "Resources"},
        "Tags": [
          {
            "Key": "Name",
            "Value": {"Ref": "Name"}
          }
        ]
      }
    }
  },
  "Outputs": {
    "EndpointServiceId": {
      "Value": {"Fn::GetAtt": ["PrivateLinkEndpointService", "ServiceId"]}
    },
    "EndpointServiceName": {
      "Value": {"Fn::GetAtt": ["PrivateLinkEndpointService", "ServiceName"]}
    }
  }
}