1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. apig
  6. getSources
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi

    This data source provides Apig Source available to the user. What is Source

    NOTE: Available since v1.292.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = alicloud.apig.getSources({
        gatewayId: "gw-cq7l5s5lhtgi6q***",
    });
    export const firstSourceId = _default.then(_default => _default.sources?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.apig.get_sources(gateway_id="gw-cq7l5s5lhtgi6q***")
    pulumi.export("firstSourceId", default.sources[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := apig.GetSources(ctx, &apig.GetSourcesArgs{
    			GatewayId: pulumi.StringRef("gw-cq7l5s5lhtgi6q***"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstSourceId", _default.Sources[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Apig.GetSources.Invoke(new()
        {
            GatewayId = "gw-cq7l5s5lhtgi6q***",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstSourceId"] = @default.Apply(@default => @default.Apply(getSourcesResult => getSourcesResult.Sources[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.apig.ApigFunctions;
    import com.pulumi.alicloud.apig.inputs.GetSourcesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = ApigFunctions.getSources(GetSourcesArgs.builder()
                .gatewayId("gw-cq7l5s5lhtgi6q***")
                .build());
    
            ctx.export("firstSourceId", default_.sources()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: alicloud:apig:getSources
          arguments:
            gatewayId: gw-cq7l5s5lhtgi6q***
    outputs:
      firstSourceId: ${default.sources[0].id}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_apig_getsources" "default" {
      gateway_id = "gw-cq7l5s5lhtgi6q***"
    }
    
    output "firstSourceId" {
      value = data.alicloud_apig_getsources.default.sources[0].id
    }
    

    Using getSources

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSources(args: GetSourcesArgs, opts?: InvokeOptions): Promise<GetSourcesResult>
    function getSourcesOutput(args: GetSourcesOutputArgs, opts?: InvokeOutputOptions): Output<GetSourcesResult>
    def get_sources(enable_details: Optional[bool] = None,
                    gateway_id: Optional[str] = None,
                    ids: Optional[Sequence[str]] = None,
                    name_regex: Optional[str] = None,
                    output_file: Optional[str] = None,
                    resource_group_id: Optional[str] = None,
                    type: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSourcesResult
    def get_sources_output(enable_details: pulumi.Input[Optional[bool]] = None,
                    gateway_id: pulumi.Input[Optional[str]] = None,
                    ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                    name_regex: pulumi.Input[Optional[str]] = None,
                    output_file: pulumi.Input[Optional[str]] = None,
                    resource_group_id: pulumi.Input[Optional[str]] = None,
                    type: pulumi.Input[Optional[str]] = None,
                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetSourcesResult]
    func GetSources(ctx *Context, args *GetSourcesArgs, opts ...InvokeOption) (*GetSourcesResult, error)
    func GetSourcesOutput(ctx *Context, args *GetSourcesOutputArgs, opts ...InvokeOption) GetSourcesResultOutput

    > Note: This function is named GetSources in the Go SDK.

    public static class GetSources 
    {
        public static Task<GetSourcesResult> InvokeAsync(GetSourcesArgs args, InvokeOptions? opts = null)
        public static Output<GetSourcesResult> Invoke(GetSourcesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSourcesResult> Invoke(GetSourcesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSourcesResult> getSources(GetSourcesArgs args, InvokeOptions options)
    public static Output<GetSourcesResult> getSources(GetSourcesArgs args, InvokeOptions options)
    public static Output<GetSourcesResult> getSources(GetSourcesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: alicloud:apig/getSources:getSources
      arguments:
        # arguments dictionary
    data "alicloud_apig_get_sources" "name" {
        # arguments
    }

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    GatewayId string
    The ID of the gateway instance.
    Ids List<string>
    A list of Source IDs.
    NameRegex string
    A regex string to filter results by Source name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group.
    Type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    GatewayId string
    The ID of the gateway instance.
    Ids []string
    A list of Source IDs.
    NameRegex string
    A regex string to filter results by Source name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group.
    Type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    gateway_id string
    The ID of the gateway instance.
    ids list(string)
    A list of Source IDs.
    name_regex string
    A regex string to filter results by Source name.
    output_file string
    File name where to save data source results (after running pulumi preview).
    resource_group_id string
    The ID of the resource group.
    type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    gatewayId String
    The ID of the gateway instance.
    ids List<String>
    A list of Source IDs.
    nameRegex String
    A regex string to filter results by Source name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group.
    type String
    The type of the source. Valid values: K8S, MSE_NACOS.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    gatewayId string
    The ID of the gateway instance.
    ids string[]
    A list of Source IDs.
    nameRegex string
    A regex string to filter results by Source name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    resourceGroupId string
    The ID of the resource group.
    type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    gateway_id str
    The ID of the gateway instance.
    ids Sequence[str]
    A list of Source IDs.
    name_regex str
    A regex string to filter results by Source name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    resource_group_id str
    The ID of the resource group.
    type str
    The type of the source. Valid values: K8S, MSE_NACOS.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    gatewayId String
    The ID of the gateway instance.
    ids List<String>
    A list of Source IDs.
    nameRegex String
    A regex string to filter results by Source name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group.
    type String
    The type of the source. Valid values: K8S, MSE_NACOS.

    getSources Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Source IDs.
    Names List<string>
    A list of name of Sources.
    Sources List<Pulumi.AliCloud.Apig.Outputs.GetSourcesSource>
    A list of Source Entries. Each element contains the following attributes:
    EnableDetails bool
    GatewayId string
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    NameRegex string
    OutputFile string
    ResourceGroupId string
    The ID of the resource group.
    Type string
    NOTE: This field is only available when enableDetails is true. The type of the source.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Source IDs.
    Names []string
    A list of name of Sources.
    Sources []GetSourcesSource
    A list of Source Entries. Each element contains the following attributes:
    EnableDetails bool
    GatewayId string
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    NameRegex string
    OutputFile string
    ResourceGroupId string
    The ID of the resource group.
    Type string
    NOTE: This field is only available when enableDetails is true. The type of the source.
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    A list of Source IDs.
    names list(string)
    A list of name of Sources.
    sources list(object)
    A list of Source Entries. Each element contains the following attributes:
    enable_details bool
    gateway_id string
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    name_regex string
    output_file string
    resource_group_id string
    The ID of the resource group.
    type string
    NOTE: This field is only available when enableDetails is true. The type of the source.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Source IDs.
    names List<String>
    A list of name of Sources.
    sources List<GetSourcesSource>
    A list of Source Entries. Each element contains the following attributes:
    enableDetails Boolean
    gatewayId String
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    nameRegex String
    outputFile String
    resourceGroupId String
    The ID of the resource group.
    type String
    NOTE: This field is only available when enableDetails is true. The type of the source.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Source IDs.
    names string[]
    A list of name of Sources.
    sources GetSourcesSource[]
    A list of Source Entries. Each element contains the following attributes:
    enableDetails boolean
    gatewayId string
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    nameRegex string
    outputFile string
    resourceGroupId string
    The ID of the resource group.
    type string
    NOTE: This field is only available when enableDetails is true. The type of the source.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Source IDs.
    names Sequence[str]
    A list of name of Sources.
    sources Sequence[GetSourcesSource]
    A list of Source Entries. Each element contains the following attributes:
    enable_details bool
    gateway_id str
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    name_regex str
    output_file str
    resource_group_id str
    The ID of the resource group.
    type str
    NOTE: This field is only available when enableDetails is true. The type of the source.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Source IDs.
    names List<String>
    A list of name of Sources.
    sources List<Property Map>
    A list of Source Entries. Each element contains the following attributes:
    enableDetails Boolean
    gatewayId String
    NOTE: This field is only available when enableDetails is true. The ID of the gateway instance.
    nameRegex String
    outputFile String
    resourceGroupId String
    The ID of the resource group.
    type String
    NOTE: This field is only available when enableDetails is true. The type of the source.

    Supporting Types

    GetSourcesSource

    AssociationReason string
    The reason for the association status.
    AssociationStatus string
    The association status of the source.
    CreateTime int
    The creation timestamp of the source.
    GatewayId string
    The ID of the gateway instance.
    Id string
    The ID of the resource supplied above.
    K8sSourceInfos List<Pulumi.AliCloud.Apig.Inputs.GetSourcesSourceK8sSourceInfo>
    The ACK cluster source information.
    NacosSourceInfos List<Pulumi.AliCloud.Apig.Inputs.GetSourcesSourceNacosSourceInfo>
    The MSE Nacos source information.
    ResourceGroupId string
    The ID of the resource group.
    SourceId string
    The ID of the source.
    SourceName string
    The name of the source.
    Type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    UpdateTime int
    The update timestamp of the source.
    AssociationReason string
    The reason for the association status.
    AssociationStatus string
    The association status of the source.
    CreateTime int
    The creation timestamp of the source.
    GatewayId string
    The ID of the gateway instance.
    Id string
    The ID of the resource supplied above.
    K8sSourceInfos []GetSourcesSourceK8sSourceInfo
    The ACK cluster source information.
    NacosSourceInfos []GetSourcesSourceNacosSourceInfo
    The MSE Nacos source information.
    ResourceGroupId string
    The ID of the resource group.
    SourceId string
    The ID of the source.
    SourceName string
    The name of the source.
    Type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    UpdateTime int
    The update timestamp of the source.
    association_reason string
    The reason for the association status.
    association_status string
    The association status of the source.
    create_time number
    The creation timestamp of the source.
    gateway_id string
    The ID of the gateway instance.
    id string
    The ID of the resource supplied above.
    k8s_source_infos list(object)
    The ACK cluster source information.
    nacos_source_infos list(object)
    The MSE Nacos source information.
    resource_group_id string
    The ID of the resource group.
    source_id string
    The ID of the source.
    source_name string
    The name of the source.
    type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    update_time number
    The update timestamp of the source.
    associationReason String
    The reason for the association status.
    associationStatus String
    The association status of the source.
    createTime Integer
    The creation timestamp of the source.
    gatewayId String
    The ID of the gateway instance.
    id String
    The ID of the resource supplied above.
    k8sSourceInfos List<GetSourcesSourceK8sSourceInfo>
    The ACK cluster source information.
    nacosSourceInfos List<GetSourcesSourceNacosSourceInfo>
    The MSE Nacos source information.
    resourceGroupId String
    The ID of the resource group.
    sourceId String
    The ID of the source.
    sourceName String
    The name of the source.
    type String
    The type of the source. Valid values: K8S, MSE_NACOS.
    updateTime Integer
    The update timestamp of the source.
    associationReason string
    The reason for the association status.
    associationStatus string
    The association status of the source.
    createTime number
    The creation timestamp of the source.
    gatewayId string
    The ID of the gateway instance.
    id string
    The ID of the resource supplied above.
    k8sSourceInfos GetSourcesSourceK8sSourceInfo[]
    The ACK cluster source information.
    nacosSourceInfos GetSourcesSourceNacosSourceInfo[]
    The MSE Nacos source information.
    resourceGroupId string
    The ID of the resource group.
    sourceId string
    The ID of the source.
    sourceName string
    The name of the source.
    type string
    The type of the source. Valid values: K8S, MSE_NACOS.
    updateTime number
    The update timestamp of the source.
    association_reason str
    The reason for the association status.
    association_status str
    The association status of the source.
    create_time int
    The creation timestamp of the source.
    gateway_id str
    The ID of the gateway instance.
    id str
    The ID of the resource supplied above.
    k8s_source_infos Sequence[GetSourcesSourceK8sSourceInfo]
    The ACK cluster source information.
    nacos_source_infos Sequence[GetSourcesSourceNacosSourceInfo]
    The MSE Nacos source information.
    resource_group_id str
    The ID of the resource group.
    source_id str
    The ID of the source.
    source_name str
    The name of the source.
    type str
    The type of the source. Valid values: K8S, MSE_NACOS.
    update_time int
    The update timestamp of the source.
    associationReason String
    The reason for the association status.
    associationStatus String
    The association status of the source.
    createTime Number
    The creation timestamp of the source.
    gatewayId String
    The ID of the gateway instance.
    id String
    The ID of the resource supplied above.
    k8sSourceInfos List<Property Map>
    The ACK cluster source information.
    nacosSourceInfos List<Property Map>
    The MSE Nacos source information.
    resourceGroupId String
    The ID of the resource group.
    sourceId String
    The ID of the source.
    sourceName String
    The name of the source.
    type String
    The type of the source. Valid values: K8S, MSE_NACOS.
    updateTime Number
    The update timestamp of the source.

    GetSourcesSourceK8sSourceInfo

    ClusterId string
    The ID of the Nacos cluster.
    ClusterId string
    The ID of the Nacos cluster.
    cluster_id string
    The ID of the Nacos cluster.
    clusterId String
    The ID of the Nacos cluster.
    clusterId string
    The ID of the Nacos cluster.
    cluster_id str
    The ID of the Nacos cluster.
    clusterId String
    The ID of the Nacos cluster.

    GetSourcesSourceNacosSourceInfo

    Address string
    The access address of the Nacos instance.
    ClusterId string
    The ID of the Nacos cluster.
    InstanceId string
    The ID of the MSE Nacos instance.
    Address string
    The access address of the Nacos instance.
    ClusterId string
    The ID of the Nacos cluster.
    InstanceId string
    The ID of the MSE Nacos instance.
    address string
    The access address of the Nacos instance.
    cluster_id string
    The ID of the Nacos cluster.
    instance_id string
    The ID of the MSE Nacos instance.
    address String
    The access address of the Nacos instance.
    clusterId String
    The ID of the Nacos cluster.
    instanceId String
    The ID of the MSE Nacos instance.
    address string
    The access address of the Nacos instance.
    clusterId string
    The ID of the Nacos cluster.
    instanceId string
    The ID of the MSE Nacos instance.
    address str
    The access address of the Nacos instance.
    cluster_id str
    The ID of the Nacos cluster.
    instance_id str
    The ID of the MSE Nacos instance.
    address String
    The access address of the Nacos instance.
    clusterId String
    The ID of the Nacos cluster.
    instanceId String
    The ID of the MSE Nacos instance.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.108.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial