1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. apig
  6. Source
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

    Provides a APIG Source resource.

    Service source of a cloud-native API gateway, such as an ACK cluster or an MSE Nacos instance.

    For information about APIG Source and how to use it, see What is Source.

    NOTE: Available since v1.292.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    // The ID of an existing ACK cluster used as the gateway service source
    const clusterId = config.require("clusterId");
    const _default = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.0.0.0/8",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        vpcId: _default.id,
        zoneId: "cn-hangzhou-i",
        cidrBlock: "10.0.0.0/24",
    });
    const defaultGateway = new alicloud.apig.Gateway("default", {
        gatewayName: name,
        spec: "apigw.small.x1",
        gatewayEdition: "Professional",
        gatewayType: "API",
        paymentType: "PayAsYouGo",
        vpc: {
            vpcId: _default.id,
        },
        vswitch: {
            vswitchId: defaultSwitch.id,
        },
        networkAccessConfig: {
            type: "Internet",
        },
        zoneConfig: {
            selectOption: "Auto",
        },
        logConfig: {
            sls: {
                enable: false,
            },
        },
    });
    const defaultSource = new alicloud.apig.Source("default", {
        type: "K8S",
        gatewayId: defaultGateway.id,
        k8sSourceInfo: {
            clusterId: clusterId,
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    # The ID of an existing ACK cluster used as the gateway service source
    cluster_id = config.require("clusterId")
    default = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.0.0.0/8")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        vpc_id=default.id,
        zone_id="cn-hangzhou-i",
        cidr_block="10.0.0.0/24")
    default_gateway = alicloud.apig.Gateway("default",
        gateway_name=name,
        spec="apigw.small.x1",
        gateway_edition="Professional",
        gateway_type="API",
        payment_type="PayAsYouGo",
        vpc={
            "vpc_id": default.id,
        },
        vswitch={
            "vswitch_id": default_switch.id,
        },
        network_access_config={
            "type": "Internet",
        },
        zone_config={
            "select_option": "Auto",
        },
        log_config={
            "sls": {
                "enable": False,
            },
        })
    default_source = alicloud.apig.Source("default",
        type="K8S",
        gateway_id=default_gateway.id,
        k8s_source_info={
            "cluster_id": cluster_id,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apig"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		// The ID of an existing ACK cluster used as the gateway service source
    		clusterId := cfg.Require("clusterId")
    		_default, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.0.0.0/8"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			VpcId:       _default.ID().ToIDOutput().ToStringOutput(),
    			ZoneId:      pulumi.String("cn-hangzhou-i"),
    			CidrBlock:   pulumi.String("10.0.0.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultGateway, err := apig.NewGateway(ctx, "default", &apig.GatewayArgs{
    			GatewayName:    pulumi.String(name),
    			Spec:           pulumi.String("apigw.small.x1"),
    			GatewayEdition: pulumi.String("Professional"),
    			GatewayType:    pulumi.String("API"),
    			PaymentType:    pulumi.String("PayAsYouGo"),
    			Vpc: &apig.GatewayVpcArgs{
    				VpcId: _default.ID().ToIDOutput().ToStringOutput(),
    			},
    			Vswitch: &apig.GatewayVswitchArgs{
    				VswitchId: defaultSwitch.ID().ToIDOutput().ToStringOutput(),
    			},
    			NetworkAccessConfig: &apig.GatewayNetworkAccessConfigArgs{
    				Type: pulumi.String("Internet"),
    			},
    			ZoneConfig: &apig.GatewayZoneConfigArgs{
    				SelectOption: pulumi.String("Auto"),
    			},
    			LogConfig: &apig.GatewayLogConfigArgs{
    				Sls: &apig.GatewayLogConfigSlsArgs{
    					Enable: pulumi.Bool(false),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apig.NewSource(ctx, "default", &apig.SourceArgs{
    			Type:      pulumi.String("K8S"),
    			GatewayId: defaultGateway.ID().ToIDOutput().ToStringOutput(),
    			K8sSourceInfo: &apig.SourceK8sSourceInfoArgs{
    				ClusterId: pulumi.String(clusterId),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        // The ID of an existing ACK cluster used as the gateway service source
        var clusterId = config.Require("clusterId");
        var @default = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.0.0.0/8",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            VpcId = @default.Id,
            ZoneId = "cn-hangzhou-i",
            CidrBlock = "10.0.0.0/24",
        });
    
        var defaultGateway = new AliCloud.Apig.Gateway("default", new()
        {
            GatewayName = name,
            Spec = "apigw.small.x1",
            GatewayEdition = "Professional",
            GatewayType = "API",
            PaymentType = "PayAsYouGo",
            Vpc = new AliCloud.Apig.Inputs.GatewayVpcArgs
            {
                VpcId = @default.Id,
            },
            Vswitch = new AliCloud.Apig.Inputs.GatewayVswitchArgs
            {
                VswitchId = defaultSwitch.Id,
            },
            NetworkAccessConfig = new AliCloud.Apig.Inputs.GatewayNetworkAccessConfigArgs
            {
                Type = "Internet",
            },
            ZoneConfig = new AliCloud.Apig.Inputs.GatewayZoneConfigArgs
            {
                SelectOption = "Auto",
            },
            LogConfig = new AliCloud.Apig.Inputs.GatewayLogConfigArgs
            {
                Sls = new AliCloud.Apig.Inputs.GatewayLogConfigSlsArgs
                {
                    Enable = false,
                },
            },
        });
    
        var defaultSource = new AliCloud.Apig.Source("default", new()
        {
            Type = "K8S",
            GatewayId = defaultGateway.Id,
            K8sSourceInfo = new AliCloud.Apig.Inputs.SourceK8sSourceInfoArgs
            {
                ClusterId = clusterId,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.apig.Gateway;
    import com.pulumi.alicloud.apig.GatewayArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayVpcArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayVswitchArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayNetworkAccessConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayZoneConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayLogConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayLogConfigSlsArgs;
    import com.pulumi.alicloud.apig.Source;
    import com.pulumi.alicloud.apig.SourceArgs;
    import com.pulumi.alicloud.apig.inputs.SourceK8sSourceInfoArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var clusterId = config.require("clusterId");
            var default_ = new Network("default", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.0.0.0/8")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .vpcId(default_.id())
                .zoneId("cn-hangzhou-i")
                .cidrBlock("10.0.0.0/24")
                .build());
    
            var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()
                .gatewayName(name)
                .spec("apigw.small.x1")
                .gatewayEdition("Professional")
                .gatewayType("API")
                .paymentType("PayAsYouGo")
                .vpc(GatewayVpcArgs.builder()
                    .vpcId(default_.id())
                    .build())
                .vswitch(GatewayVswitchArgs.builder()
                    .vswitchId(defaultSwitch.id())
                    .build())
                .networkAccessConfig(GatewayNetworkAccessConfigArgs.builder()
                    .type("Internet")
                    .build())
                .zoneConfig(GatewayZoneConfigArgs.builder()
                    .selectOption("Auto")
                    .build())
                .logConfig(GatewayLogConfigArgs.builder()
                    .sls(GatewayLogConfigSlsArgs.builder()
                        .enable(false)
                        .build())
                    .build())
                .build());
    
            var defaultSource = new Source("defaultSource", SourceArgs.builder()
                .type("K8S")
                .gatewayId(defaultGateway.id())
                .k8sSourceInfo(SourceK8sSourceInfoArgs.builder()
                    .clusterId(clusterId)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      clusterId:
        type: string
    resources:
      default:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 10.0.0.0/8
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          vpcId: ${default.id}
          zoneId: cn-hangzhou-i
          cidrBlock: 10.0.0.0/24
      defaultGateway:
        type: alicloud:apig:Gateway
        name: default
        properties:
          gatewayName: ${name}
          spec: apigw.small.x1
          gatewayEdition: Professional
          gatewayType: API
          paymentType: PayAsYouGo
          vpc:
            vpcId: ${default.id}
          vswitch:
            vswitchId: ${defaultSwitch.id}
          networkAccessConfig:
            type: Internet
          zoneConfig:
            selectOption: Auto
          logConfig:
            sls:
              enable: false
      defaultSource:
        type: alicloud:apig:Source
        name: default
        properties:
          type: K8S
          gatewayId: ${defaultGateway.id}
          k8sSourceInfo:
            clusterId: ${clusterId}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_vpc_network" "default" {
      vpc_name   = var.name
      cidr_block = "10.0.0.0/8"
    }
    resource "alicloud_vpc_switch" "default" {
      vswitch_name = var.name
      vpc_id       = alicloud_vpc_network.default.id
      zone_id      = "cn-hangzhou-i"
      cidr_block   = "10.0.0.0/24"
    }
    resource "alicloud_apig_gateway" "default" {
      gateway_name    = var.name
      spec            = "apigw.small.x1"
      gateway_edition = "Professional"
      gateway_type    = "API"
      payment_type    = "PayAsYouGo"
      vpc = {
        vpc_id = alicloud_vpc_network.default.id
      }
      vswitch = {
        vswitch_id = alicloud_vpc_switch.default.id
      }
      network_access_config = {
        type = "Internet"
      }
      zone_config = {
        select_option = "Auto"
      }
      log_config = {
        sls = {
          enable = false
        }
      }
    }
    resource "alicloud_apig_source" "default" {
      type       = "K8S"
      gateway_id = alicloud_apig_gateway.default.id
      k8s_source_info = {
        cluster_id = var.clusterId
      }
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    variable "clusterId" {
      type        = string
      description = "The ID of an existing ACK cluster used as the gateway service source"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Source Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Source(name: string, args: SourceArgs, opts?: CustomResourceOptions);
    @overload
    def Source(resource_name: str,
               args: SourceArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Source(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               gateway_id: Optional[str] = None,
               type: Optional[str] = None,
               k8s_source_info: Optional[SourceK8sSourceInfoArgs] = None,
               nacos_source_info: Optional[SourceNacosSourceInfoArgs] = None,
               resource_group_id: Optional[str] = None)
    func NewSource(ctx *Context, name string, args SourceArgs, opts ...ResourceOption) (*Source, error)
    public Source(string name, SourceArgs args, CustomResourceOptions? opts = null)
    public Source(String name, SourceArgs args)
    public Source(String name, SourceArgs args, CustomResourceOptions options)
    
    type: alicloud:apig:Source
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_apig_source" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SourceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sourceResource = new AliCloud.Apig.Source("sourceResource", new()
    {
        GatewayId = "string",
        Type = "string",
        K8sSourceInfo = new AliCloud.Apig.Inputs.SourceK8sSourceInfoArgs
        {
            ClusterId = "string",
        },
        NacosSourceInfo = new AliCloud.Apig.Inputs.SourceNacosSourceInfoArgs
        {
            Address = "string",
            ClusterId = "string",
            InstanceId = "string",
        },
        ResourceGroupId = "string",
    });
    
    example, err := apig.NewSource(ctx, "sourceResource", &apig.SourceArgs{
    	GatewayId: pulumi.String("string"),
    	Type:      pulumi.String("string"),
    	K8sSourceInfo: &apig.SourceK8sSourceInfoArgs{
    		ClusterId: pulumi.String("string"),
    	},
    	NacosSourceInfo: &apig.SourceNacosSourceInfoArgs{
    		Address:    pulumi.String("string"),
    		ClusterId:  pulumi.String("string"),
    		InstanceId: pulumi.String("string"),
    	},
    	ResourceGroupId: pulumi.String("string"),
    })
    
    resource "alicloud_apig_source" "sourceResource" {
      lifecycle {
        create_before_destroy = true
      }
      gateway_id = "string"
      type       = "string"
      k8s_source_info = {
        cluster_id = "string"
      }
      nacos_source_info = {
        address     = "string"
        cluster_id  = "string"
        instance_id = "string"
      }
      resource_group_id = "string"
    }
    
    var sourceResource = new Source("sourceResource", SourceArgs.builder()
        .gatewayId("string")
        .type("string")
        .k8sSourceInfo(SourceK8sSourceInfoArgs.builder()
            .clusterId("string")
            .build())
        .nacosSourceInfo(SourceNacosSourceInfoArgs.builder()
            .address("string")
            .clusterId("string")
            .instanceId("string")
            .build())
        .resourceGroupId("string")
        .build());
    
    source_resource = alicloud.apig.Source("sourceResource",
        gateway_id="string",
        type="string",
        k8s_source_info={
            "cluster_id": "string",
        },
        nacos_source_info={
            "address": "string",
            "cluster_id": "string",
            "instance_id": "string",
        },
        resource_group_id="string")
    
    const sourceResource = new alicloud.apig.Source("sourceResource", {
        gatewayId: "string",
        type: "string",
        k8sSourceInfo: {
            clusterId: "string",
        },
        nacosSourceInfo: {
            address: "string",
            clusterId: "string",
            instanceId: "string",
        },
        resourceGroupId: "string",
    });
    
    type: alicloud:apig:Source
    properties:
        gatewayId: string
        k8sSourceInfo:
            clusterId: string
        nacosSourceInfo:
            address: string
            clusterId: string
            instanceId: string
        resourceGroupId: string
        type: string
    

    Source Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Source resource accepts the following input properties:

    GatewayId string
    The ID of the gateway instance.
    Type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    K8sSourceInfo Pulumi.AliCloud.Apig.Inputs.SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    NacosSourceInfo Pulumi.AliCloud.Apig.Inputs.SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    ResourceGroupId string
    The ID of the resource group.
    GatewayId string
    The ID of the gateway instance.
    Type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    K8sSourceInfo SourceK8sSourceInfoArgs
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    NacosSourceInfo SourceNacosSourceInfoArgs
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    ResourceGroupId string
    The ID of the resource group.
    gateway_id string
    The ID of the gateway instance.
    type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    k8s_source_info object
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacos_source_info object
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resource_group_id string
    The ID of the resource group.
    gatewayId String
    The ID of the gateway instance.
    type String
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    k8sSourceInfo SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId String
    The ID of the resource group.
    gatewayId string
    The ID of the gateway instance.
    type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    k8sSourceInfo SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId string
    The ID of the resource group.
    gateway_id str
    The ID of the gateway instance.
    type str
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    k8s_source_info SourceK8sSourceInfoArgs
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacos_source_info SourceNacosSourceInfoArgs
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resource_group_id str
    The ID of the resource group.
    gatewayId String
    The ID of the gateway instance.
    type String
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    k8sSourceInfo Property Map
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo Property Map
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId String
    The ID of the resource group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Source resource produces the following output properties:

    AssociationReason string
    The reason for the association status.
    AssociationStatus string
    The association status of the source.
    CreateTime int
    The creation timestamp of the source.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceName string
    The name of the source.
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceName string
    The name of the source.
    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.
    id string
    The provider-assigned unique ID for this managed resource.
    source_name string
    The name of the source.
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceName String
    The name of the source.
    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.
    id string
    The provider-assigned unique ID for this managed resource.
    sourceName string
    The name of the source.
    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.
    id str
    The provider-assigned unique ID for this managed resource.
    source_name str
    The name of the source.
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceName String
    The name of the source.
    updateTime Number
    The update timestamp of the source.

    Look up Existing Source Resource

    Get an existing Source resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SourceState, opts?: CustomResourceOptions): Source
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            association_reason: Optional[str] = None,
            association_status: Optional[str] = None,
            create_time: Optional[int] = None,
            gateway_id: Optional[str] = None,
            k8s_source_info: Optional[SourceK8sSourceInfoArgs] = None,
            nacos_source_info: Optional[SourceNacosSourceInfoArgs] = None,
            resource_group_id: Optional[str] = None,
            source_name: Optional[str] = None,
            type: Optional[str] = None,
            update_time: Optional[int] = None) -> Source
    func GetSource(ctx *Context, name string, id IDInput, state *SourceState, opts ...ResourceOption) (*Source, error)
    public static Source Get(string name, Input<string> id, SourceState? state, CustomResourceOptions? opts = null)
    public static Source get(String name, Output<String> id, SourceState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:apig:Source    get:      id: ${id}
    import {
      to = alicloud_apig_source.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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.
    K8sSourceInfo Pulumi.AliCloud.Apig.Inputs.SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    NacosSourceInfo Pulumi.AliCloud.Apig.Inputs.SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    ResourceGroupId string
    The ID of the resource group.
    SourceName string
    The name of the source.
    Type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    K8sSourceInfo SourceK8sSourceInfoArgs
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    NacosSourceInfo SourceNacosSourceInfoArgs
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    ResourceGroupId string
    The ID of the resource group.
    SourceName string
    The name of the source.
    Type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    k8s_source_info object
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacos_source_info object
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resource_group_id string
    The ID of the resource group.
    source_name string
    The name of the source.
    type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    k8sSourceInfo SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId String
    The ID of the resource group.
    sourceName String
    The name of the source.
    type String
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    k8sSourceInfo SourceK8sSourceInfo
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo SourceNacosSourceInfo
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId string
    The ID of the resource group.
    sourceName string
    The name of the source.
    type string
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    k8s_source_info SourceK8sSourceInfoArgs
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacos_source_info SourceNacosSourceInfoArgs
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resource_group_id str
    The ID of the resource group.
    source_name str
    The name of the source.
    type str
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (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.
    k8sSourceInfo Property Map
    The ACK cluster source information. Required when type is K8S. See k8sSourceInfo below.
    nacosSourceInfo Property Map
    The MSE Nacos source information. Required when type is MSE_NACOS. See nacosSourceInfo below.
    resourceGroupId String
    The ID of the resource group.
    sourceName String
    The name of the source.
    type String
    The type of the source. Valid values: K8S (Container Service for Kubernetes), MSE_NACOS (MSE Nacos).
    updateTime Number
    The update timestamp of the source.

    Supporting Types

    SourceK8sSourceInfo, SourceK8sSourceInfoArgs

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

    SourceNacosSourceInfo, SourceNacosSourceInfoArgs

    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.

    Import

    APIG Source can be imported using the id, e.g.

    $ pulumi import alicloud:apig/source:Source example <source_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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