All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::APIG::Service

更新時間:Jun 19, 2025

DATASOURCE::APIG::Service is used to query the information about a service.

Syntax

{
  "Type": "DATASOURCE::APIG::Service",
  "Properties": {
    "ServiceId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ServiceId

String

Yes

Yes

The ID of the service.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • GroupName: the name of the service group.

  • Addresses: details of the addresses, such as IP addresses or domain names.

  • ResourceGroupId: the ID of the resource group.

  • ServiceName: the name of the service.

  • SourceType: the type of the service source.

  • Qualifier: the function qualified name.

  • GatewayId: the ID of the Cloud-native API Gateway instance.

  • Namespace: the namespace.

  • AiServiceConfig: the AI service configurations.

  • ServiceId: the unique service ID.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ServiceId:
    Type: String
    Description:
      en: The ID of the service.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::APIG::Service
    Properties:
      ServiceId:
        Ref: ServiceId
Outputs:
  GroupName:
    Description: The service group name.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GroupName
  Addresses:
    Description: A list of domain names or fixed addresses.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Addresses
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  ServiceName:
    Description: The name of the Service, need to fill in manually when sourceType is VIP/DNS/AI.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceName
  SourceType:
    Description: The type of the service source, optional value is K8S/MSE_NACOS/FC3/SAE_K8S_SERVICE/VIP/DNS/AI.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SourceType
  Qualifier:
    Description: The function version or alias.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Qualifier
  GatewayId:
    Description: The ID of the Cloud Native API Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GatewayId
  Namespace:
    Description: The namespace of the service:.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Namespace
  AiServiceConfig:
    Description: AI service configuration when sourceType equals AI.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AiServiceConfig
  ServiceId:
    Description: The ID of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ServiceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the service."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::APIG::Service",
      "Properties": {
        "ServiceId": {
          "Ref": "ServiceId"
        }
      }
    }
  },
  "Outputs": {
    "GroupName": {
      "Description": "The service group name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GroupName"
        ]
      }
    },
    "Addresses": {
      "Description": "A list of domain names or fixed addresses.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Addresses"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "ServiceName": {
      "Description": "The name of the Service, need to fill in manually when sourceType is VIP/DNS/AI.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceName"
        ]
      }
    },
    "SourceType": {
      "Description": "The type of the service source, optional value is K8S/MSE_NACOS/FC3/SAE_K8S_SERVICE/VIP/DNS/AI.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SourceType"
        ]
      }
    },
    "Qualifier": {
      "Description": "The function version or alias.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Qualifier"
        ]
      }
    },
    "GatewayId": {
      "Description": "The ID of the Cloud Native API Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GatewayId"
        ]
      }
    },
    "Namespace": {
      "Description": "The namespace of the service:.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Namespace"
        ]
      }
    },
    "AiServiceConfig": {
      "Description": "AI service configuration when sourceType equals AI.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AiServiceConfig"
        ]
      }
    },
    "ServiceId": {
      "Description": "The ID of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceId"
        ]
      }
    }
  }
}