1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. apig
  5. Gateway
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi

    Provides a APIG Gateway resource.

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

    NOTE: Available since v1.240.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";
    const _default = alicloud.resourcemanager.getResourceGroups({});
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = defaultGetNetworks.then(defaultGetNetworks => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
    }));
    const defaultGateway = new alicloud.apig.Gateway("default", {
        networkAccessConfig: {
            type: "Intranet",
        },
        logConfig: {
            sls: {
                enable: false,
            },
        },
        resourceGroupId: _default.then(_default => _default.ids?.[1]),
        spec: "apigw.small.x1",
        vpc: {
            vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
        },
        zoneConfig: {
            selectOption: "Auto",
        },
        vswitch: {
            vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        },
        paymentType: "PayAsYouGo",
        gatewayName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.resourcemanager.get_resource_groups()
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0])
    default_gateway = alicloud.apig.Gateway("default",
        network_access_config={
            "type": "Intranet",
        },
        log_config={
            "sls": {
                "enable": False,
            },
        },
        resource_group_id=default.ids[1],
        spec="apigw.small.x1",
        vpc={
            "vpc_id": default_get_networks.ids[0],
        },
        zone_config={
            "select_option": "Auto",
        },
        vswitch={
            "vswitch_id": default_get_switches.ids[0],
        },
        payment_type="PayAsYouGo",
        gateway_name=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apig"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"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
    		}
    		_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId: pulumi.StringRef(defaultGetNetworks.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = apig.NewGateway(ctx, "default", &apig.GatewayArgs{
    			NetworkAccessConfig: &apig.GatewayNetworkAccessConfigArgs{
    				Type: pulumi.String("Intranet"),
    			},
    			LogConfig: &apig.GatewayLogConfigArgs{
    				Sls: &apig.GatewayLogConfigSlsArgs{
    					Enable: pulumi.Bool(false),
    				},
    			},
    			ResourceGroupId: pulumi.String(_default.Ids[1]),
    			Spec:            pulumi.String("apigw.small.x1"),
    			Vpc: &apig.GatewayVpcArgs{
    				VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
    			},
    			ZoneConfig: &apig.GatewayZoneConfigArgs{
    				SelectOption: pulumi.String("Auto"),
    			},
    			Vswitch: &apig.GatewayVswitchArgs{
    				VswitchId: pulumi.String(defaultGetSwitches.Ids[0]),
    			},
    			PaymentType: pulumi.String("PayAsYouGo"),
    			GatewayName: pulumi.String(name),
    		})
    		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";
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultGateway = new AliCloud.Apig.Gateway("default", new()
        {
            NetworkAccessConfig = new AliCloud.Apig.Inputs.GatewayNetworkAccessConfigArgs
            {
                Type = "Intranet",
            },
            LogConfig = new AliCloud.Apig.Inputs.GatewayLogConfigArgs
            {
                Sls = new AliCloud.Apig.Inputs.GatewayLogConfigSlsArgs
                {
                    Enable = false,
                },
            },
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[1])),
            Spec = "apigw.small.x1",
            Vpc = new AliCloud.Apig.Inputs.GatewayVpcArgs
            {
                VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            },
            ZoneConfig = new AliCloud.Apig.Inputs.GatewayZoneConfigArgs
            {
                SelectOption = "Auto",
            },
            Vswitch = new AliCloud.Apig.Inputs.GatewayVswitchArgs
            {
                VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            },
            PaymentType = "PayAsYouGo",
            GatewayName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.apig.Gateway;
    import com.pulumi.alicloud.apig.GatewayArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayNetworkAccessConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayLogConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayLogConfigSlsArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayVpcArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayZoneConfigArgs;
    import com.pulumi.alicloud.apig.inputs.GatewayVswitchArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.ids()[0])
                .build());
    
            var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()
                .networkAccessConfig(GatewayNetworkAccessConfigArgs.builder()
                    .type("Intranet")
                    .build())
                .logConfig(GatewayLogConfigArgs.builder()
                    .sls(GatewayLogConfigSlsArgs.builder()
                        .enable(false)
                        .build())
                    .build())
                .resourceGroupId(default_.ids()[1])
                .spec("apigw.small.x1")
                .vpc(GatewayVpcArgs.builder()
                    .vpcId(defaultGetNetworks.ids()[0])
                    .build())
                .zoneConfig(GatewayZoneConfigArgs.builder()
                    .selectOption("Auto")
                    .build())
                .vswitch(GatewayVswitchArgs.builder()
                    .vswitchId(defaultGetSwitches.ids()[0])
                    .build())
                .paymentType("PayAsYouGo")
                .gatewayName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultGateway:
        type: alicloud:apig:Gateway
        name: default
        properties:
          networkAccessConfig:
            type: Intranet
          logConfig:
            sls:
              enable: 'false'
          resourceGroupId: ${default.ids[1]}
          spec: apigw.small.x1
          vpc:
            vpcId: ${defaultGetNetworks.ids[0]}
          zoneConfig:
            selectOption: Auto
          vswitch:
            vswitchId: ${defaultGetSwitches.ids[0]}
          paymentType: PayAsYouGo
          gatewayName: ${name}
    variables:
      default:
        fn::invoke:
          function: alicloud:resourcemanager:getResourceGroups
          arguments: {}
      defaultGetNetworks:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: ^default-NODELETING$
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
    

    Deleting alicloud.apig.Gateway or removing it from your configuration

    The alicloud.apig.Gateway resource allows you to manage payment_type </span>= "Subscription" instance, but Terraform cannot destroy it. Deleting the subscription resource or removing it from your configuration will remove it from your state file and management, but will not destroy the Instance. You can resume managing the subscription instance via the AlibabaCloud Console.

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Gateway Resource

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

    Constructor syntax

    new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
    @overload
    def Gateway(resource_name: str,
                args: GatewayArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Gateway(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                payment_type: Optional[str] = None,
                zone_config: Optional[GatewayZoneConfigArgs] = None,
                gateway_name: Optional[str] = None,
                gateway_type: Optional[str] = None,
                log_config: Optional[GatewayLogConfigArgs] = None,
                network_access_config: Optional[GatewayNetworkAccessConfigArgs] = None,
                resource_group_id: Optional[str] = None,
                spec: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                vpc: Optional[GatewayVpcArgs] = None,
                vswitch: Optional[GatewayVswitchArgs] = None,
                zones: Optional[Sequence[GatewayZoneArgs]] = None)
    func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
    public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
    public Gateway(String name, GatewayArgs args)
    public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
    
    type: alicloud:apig:Gateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GatewayArgs
    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 GatewayArgs
    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 GatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayArgs
    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 gatewayResource = new AliCloud.Apig.Gateway("gatewayResource", new()
    {
        PaymentType = "string",
        ZoneConfig = new AliCloud.Apig.Inputs.GatewayZoneConfigArgs
        {
            SelectOption = "string",
        },
        GatewayName = "string",
        GatewayType = "string",
        LogConfig = new AliCloud.Apig.Inputs.GatewayLogConfigArgs
        {
            Sls = new AliCloud.Apig.Inputs.GatewayLogConfigSlsArgs
            {
                Enable = false,
            },
        },
        NetworkAccessConfig = new AliCloud.Apig.Inputs.GatewayNetworkAccessConfigArgs
        {
            Type = "string",
        },
        ResourceGroupId = "string",
        Spec = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Vpc = new AliCloud.Apig.Inputs.GatewayVpcArgs
        {
            VpcId = "string",
            Name = "string",
        },
        Vswitch = new AliCloud.Apig.Inputs.GatewayVswitchArgs
        {
            Name = "string",
            VswitchId = "string",
        },
        Zones = new[]
        {
            new AliCloud.Apig.Inputs.GatewayZoneArgs
            {
                Name = "string",
                VswitchId = "string",
                ZoneId = "string",
            },
        },
    });
    
    example, err := apig.NewGateway(ctx, "gatewayResource", &apig.GatewayArgs{
    	PaymentType: pulumi.String("string"),
    	ZoneConfig: &apig.GatewayZoneConfigArgs{
    		SelectOption: pulumi.String("string"),
    	},
    	GatewayName: pulumi.String("string"),
    	GatewayType: pulumi.String("string"),
    	LogConfig: &apig.GatewayLogConfigArgs{
    		Sls: &apig.GatewayLogConfigSlsArgs{
    			Enable: pulumi.Bool(false),
    		},
    	},
    	NetworkAccessConfig: &apig.GatewayNetworkAccessConfigArgs{
    		Type: pulumi.String("string"),
    	},
    	ResourceGroupId: pulumi.String("string"),
    	Spec:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Vpc: &apig.GatewayVpcArgs{
    		VpcId: pulumi.String("string"),
    		Name:  pulumi.String("string"),
    	},
    	Vswitch: &apig.GatewayVswitchArgs{
    		Name:      pulumi.String("string"),
    		VswitchId: pulumi.String("string"),
    	},
    	Zones: apig.GatewayZoneArray{
    		&apig.GatewayZoneArgs{
    			Name:      pulumi.String("string"),
    			VswitchId: pulumi.String("string"),
    			ZoneId:    pulumi.String("string"),
    		},
    	},
    })
    
    var gatewayResource = new com.pulumi.alicloud.apig.Gateway("gatewayResource", com.pulumi.alicloud.apig.GatewayArgs.builder()
        .paymentType("string")
        .zoneConfig(GatewayZoneConfigArgs.builder()
            .selectOption("string")
            .build())
        .gatewayName("string")
        .gatewayType("string")
        .logConfig(GatewayLogConfigArgs.builder()
            .sls(GatewayLogConfigSlsArgs.builder()
                .enable(false)
                .build())
            .build())
        .networkAccessConfig(GatewayNetworkAccessConfigArgs.builder()
            .type("string")
            .build())
        .resourceGroupId("string")
        .spec("string")
        .tags(Map.of("string", "string"))
        .vpc(GatewayVpcArgs.builder()
            .vpcId("string")
            .name("string")
            .build())
        .vswitch(GatewayVswitchArgs.builder()
            .name("string")
            .vswitchId("string")
            .build())
        .zones(GatewayZoneArgs.builder()
            .name("string")
            .vswitchId("string")
            .zoneId("string")
            .build())
        .build());
    
    gateway_resource = alicloud.apig.Gateway("gatewayResource",
        payment_type="string",
        zone_config={
            "select_option": "string",
        },
        gateway_name="string",
        gateway_type="string",
        log_config={
            "sls": {
                "enable": False,
            },
        },
        network_access_config={
            "type": "string",
        },
        resource_group_id="string",
        spec="string",
        tags={
            "string": "string",
        },
        vpc={
            "vpc_id": "string",
            "name": "string",
        },
        vswitch={
            "name": "string",
            "vswitch_id": "string",
        },
        zones=[{
            "name": "string",
            "vswitch_id": "string",
            "zone_id": "string",
        }])
    
    const gatewayResource = new alicloud.apig.Gateway("gatewayResource", {
        paymentType: "string",
        zoneConfig: {
            selectOption: "string",
        },
        gatewayName: "string",
        gatewayType: "string",
        logConfig: {
            sls: {
                enable: false,
            },
        },
        networkAccessConfig: {
            type: "string",
        },
        resourceGroupId: "string",
        spec: "string",
        tags: {
            string: "string",
        },
        vpc: {
            vpcId: "string",
            name: "string",
        },
        vswitch: {
            name: "string",
            vswitchId: "string",
        },
        zones: [{
            name: "string",
            vswitchId: "string",
            zoneId: "string",
        }],
    });
    
    type: alicloud:apig:Gateway
    properties:
        gatewayName: string
        gatewayType: string
        logConfig:
            sls:
                enable: false
        networkAccessConfig:
            type: string
        paymentType: string
        resourceGroupId: string
        spec: string
        tags:
            string: string
        vpc:
            name: string
            vpcId: string
        vswitch:
            name: string
            vswitchId: string
        zoneConfig:
            selectOption: string
        zones:
            - name: string
              vswitchId: string
              zoneId: string
    

    Gateway 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 Gateway resource accepts the following input properties:

    PaymentType string
    The payment type of the resource
    ZoneConfig Pulumi.AliCloud.Apig.Inputs.GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    GatewayName string
    The name of the resource
    GatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    LogConfig Pulumi.AliCloud.Apig.Inputs.GatewayLogConfig
    Log Configuration See log_config below.
    NetworkAccessConfig Pulumi.AliCloud.Apig.Inputs.GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    ResourceGroupId string
    The ID of the resource group
    Spec string
    Gateway instance specifications
    Tags Dictionary<string, string>
    The tag of the resource
    Vpc Pulumi.AliCloud.Apig.Inputs.GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    Vswitch Pulumi.AliCloud.Apig.Inputs.GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    Zones List<Pulumi.AliCloud.Apig.Inputs.GatewayZone>
    The List of zones associated with the Gateway. See zones below.
    PaymentType string
    The payment type of the resource
    ZoneConfig GatewayZoneConfigArgs
    Availability Zone Configuration See zone_config below.
    GatewayName string
    The name of the resource
    GatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    LogConfig GatewayLogConfigArgs
    Log Configuration See log_config below.
    NetworkAccessConfig GatewayNetworkAccessConfigArgs
    Network Access Configuration See network_access_config below.
    ResourceGroupId string
    The ID of the resource group
    Spec string
    Gateway instance specifications
    Tags map[string]string
    The tag of the resource
    Vpc GatewayVpcArgs
    The VPC associated with the Gateway. See vpc below.
    Vswitch GatewayVswitchArgs
    The virtual switch associated with the Gateway. See vswitch below.
    Zones []GatewayZoneArgs
    The List of zones associated with the Gateway. See zones below.
    paymentType String
    The payment type of the resource
    zoneConfig GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    gatewayName String
    The name of the resource
    gatewayType String
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig GatewayLogConfig
    Log Configuration See log_config below.
    networkAccessConfig GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    resourceGroupId String
    The ID of the resource group
    spec String
    Gateway instance specifications
    tags Map<String,String>
    The tag of the resource
    vpc GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    zones List<GatewayZone>
    The List of zones associated with the Gateway. See zones below.
    paymentType string
    The payment type of the resource
    zoneConfig GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    gatewayName string
    The name of the resource
    gatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig GatewayLogConfig
    Log Configuration See log_config below.
    networkAccessConfig GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    resourceGroupId string
    The ID of the resource group
    spec string
    Gateway instance specifications
    tags {[key: string]: string}
    The tag of the resource
    vpc GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    zones GatewayZone[]
    The List of zones associated with the Gateway. See zones below.
    payment_type str
    The payment type of the resource
    zone_config GatewayZoneConfigArgs
    Availability Zone Configuration See zone_config below.
    gateway_name str
    The name of the resource
    gateway_type str
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    log_config GatewayLogConfigArgs
    Log Configuration See log_config below.
    network_access_config GatewayNetworkAccessConfigArgs
    Network Access Configuration See network_access_config below.
    resource_group_id str
    The ID of the resource group
    spec str
    Gateway instance specifications
    tags Mapping[str, str]
    The tag of the resource
    vpc GatewayVpcArgs
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitchArgs
    The virtual switch associated with the Gateway. See vswitch below.
    zones Sequence[GatewayZoneArgs]
    The List of zones associated with the Gateway. See zones below.
    paymentType String
    The payment type of the resource
    zoneConfig Property Map
    Availability Zone Configuration See zone_config below.
    gatewayName String
    The name of the resource
    gatewayType String
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig Property Map
    Log Configuration See log_config below.
    networkAccessConfig Property Map
    Network Access Configuration See network_access_config below.
    resourceGroupId String
    The ID of the resource group
    spec String
    Gateway instance specifications
    tags Map<String>
    The tag of the resource
    vpc Property Map
    The VPC associated with the Gateway. See vpc below.
    vswitch Property Map
    The virtual switch associated with the Gateway. See vswitch below.
    zones List<Property Map>
    The List of zones associated with the Gateway. See zones below.

    Outputs

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

    CreateTime int
    The creation timestamp. Unit: milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource
    CreateTime int
    The creation timestamp. Unit: milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource
    createTime Integer
    The creation timestamp. Unit: milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource
    createTime number
    The creation timestamp. Unit: milliseconds.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource
    create_time int
    The creation timestamp. Unit: milliseconds.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource
    createTime Number
    The creation timestamp. Unit: milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource

    Look up Existing Gateway Resource

    Get an existing Gateway 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?: GatewayState, opts?: CustomResourceOptions): Gateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[int] = None,
            gateway_name: Optional[str] = None,
            gateway_type: Optional[str] = None,
            log_config: Optional[GatewayLogConfigArgs] = None,
            network_access_config: Optional[GatewayNetworkAccessConfigArgs] = None,
            payment_type: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            spec: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc: Optional[GatewayVpcArgs] = None,
            vswitch: Optional[GatewayVswitchArgs] = None,
            zone_config: Optional[GatewayZoneConfigArgs] = None,
            zones: Optional[Sequence[GatewayZoneArgs]] = None) -> Gateway
    func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
    public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
    public static Gateway get(String name, Output<String> id, GatewayState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:apig:Gateway    get:      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:
    CreateTime int
    The creation timestamp. Unit: milliseconds.
    GatewayName string
    The name of the resource
    GatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    LogConfig Pulumi.AliCloud.Apig.Inputs.GatewayLogConfig
    Log Configuration See log_config below.
    NetworkAccessConfig Pulumi.AliCloud.Apig.Inputs.GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    PaymentType string
    The payment type of the resource
    ResourceGroupId string
    The ID of the resource group
    Spec string
    Gateway instance specifications
    Status string
    The status of the resource
    Tags Dictionary<string, string>
    The tag of the resource
    Vpc Pulumi.AliCloud.Apig.Inputs.GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    Vswitch Pulumi.AliCloud.Apig.Inputs.GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    ZoneConfig Pulumi.AliCloud.Apig.Inputs.GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    Zones List<Pulumi.AliCloud.Apig.Inputs.GatewayZone>
    The List of zones associated with the Gateway. See zones below.
    CreateTime int
    The creation timestamp. Unit: milliseconds.
    GatewayName string
    The name of the resource
    GatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    LogConfig GatewayLogConfigArgs
    Log Configuration See log_config below.
    NetworkAccessConfig GatewayNetworkAccessConfigArgs
    Network Access Configuration See network_access_config below.
    PaymentType string
    The payment type of the resource
    ResourceGroupId string
    The ID of the resource group
    Spec string
    Gateway instance specifications
    Status string
    The status of the resource
    Tags map[string]string
    The tag of the resource
    Vpc GatewayVpcArgs
    The VPC associated with the Gateway. See vpc below.
    Vswitch GatewayVswitchArgs
    The virtual switch associated with the Gateway. See vswitch below.
    ZoneConfig GatewayZoneConfigArgs
    Availability Zone Configuration See zone_config below.
    Zones []GatewayZoneArgs
    The List of zones associated with the Gateway. See zones below.
    createTime Integer
    The creation timestamp. Unit: milliseconds.
    gatewayName String
    The name of the resource
    gatewayType String
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig GatewayLogConfig
    Log Configuration See log_config below.
    networkAccessConfig GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    paymentType String
    The payment type of the resource
    resourceGroupId String
    The ID of the resource group
    spec String
    Gateway instance specifications
    status String
    The status of the resource
    tags Map<String,String>
    The tag of the resource
    vpc GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    zoneConfig GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    zones List<GatewayZone>
    The List of zones associated with the Gateway. See zones below.
    createTime number
    The creation timestamp. Unit: milliseconds.
    gatewayName string
    The name of the resource
    gatewayType string
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig GatewayLogConfig
    Log Configuration See log_config below.
    networkAccessConfig GatewayNetworkAccessConfig
    Network Access Configuration See network_access_config below.
    paymentType string
    The payment type of the resource
    resourceGroupId string
    The ID of the resource group
    spec string
    Gateway instance specifications
    status string
    The status of the resource
    tags {[key: string]: string}
    The tag of the resource
    vpc GatewayVpc
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitch
    The virtual switch associated with the Gateway. See vswitch below.
    zoneConfig GatewayZoneConfig
    Availability Zone Configuration See zone_config below.
    zones GatewayZone[]
    The List of zones associated with the Gateway. See zones below.
    create_time int
    The creation timestamp. Unit: milliseconds.
    gateway_name str
    The name of the resource
    gateway_type str
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    log_config GatewayLogConfigArgs
    Log Configuration See log_config below.
    network_access_config GatewayNetworkAccessConfigArgs
    Network Access Configuration See network_access_config below.
    payment_type str
    The payment type of the resource
    resource_group_id str
    The ID of the resource group
    spec str
    Gateway instance specifications
    status str
    The status of the resource
    tags Mapping[str, str]
    The tag of the resource
    vpc GatewayVpcArgs
    The VPC associated with the Gateway. See vpc below.
    vswitch GatewayVswitchArgs
    The virtual switch associated with the Gateway. See vswitch below.
    zone_config GatewayZoneConfigArgs
    Availability Zone Configuration See zone_config below.
    zones Sequence[GatewayZoneArgs]
    The List of zones associated with the Gateway. See zones below.
    createTime Number
    The creation timestamp. Unit: milliseconds.
    gatewayName String
    The name of the resource
    gatewayType String
    Describes the gateway type, which is categorized into the following two types:

    • API: indicates an API gateway
    • AI: Indicates an AI gateway
    logConfig Property Map
    Log Configuration See log_config below.
    networkAccessConfig Property Map
    Network Access Configuration See network_access_config below.
    paymentType String
    The payment type of the resource
    resourceGroupId String
    The ID of the resource group
    spec String
    Gateway instance specifications
    status String
    The status of the resource
    tags Map<String>
    The tag of the resource
    vpc Property Map
    The VPC associated with the Gateway. See vpc below.
    vswitch Property Map
    The virtual switch associated with the Gateway. See vswitch below.
    zoneConfig Property Map
    Availability Zone Configuration See zone_config below.
    zones List<Property Map>
    The List of zones associated with the Gateway. See zones below.

    Supporting Types

    GatewayLogConfig, GatewayLogConfigArgs

    Sls GatewayLogConfigSls
    Sls See sls below.
    sls GatewayLogConfigSls
    Sls See sls below.
    sls GatewayLogConfigSls
    Sls See sls below.
    sls GatewayLogConfigSls
    Sls See sls below.
    sls Property Map
    Sls See sls below.

    GatewayLogConfigSls, GatewayLogConfigSlsArgs

    Enable bool
    Enable Log Service
    Enable bool
    Enable Log Service
    enable Boolean
    Enable Log Service
    enable boolean
    Enable Log Service
    enable bool
    Enable Log Service
    enable Boolean
    Enable Log Service

    GatewayNetworkAccessConfig, GatewayNetworkAccessConfigArgs

    Type string
    Network Access Type
    Type string
    Network Access Type
    type String
    Network Access Type
    type string
    Network Access Type
    type str
    Network Access Type
    type String
    Network Access Type

    GatewayVpc, GatewayVpcArgs

    VpcId string
    The VPC network ID.
    Name string
    The zone name.
    VpcId string
    The VPC network ID.
    Name string
    The zone name.
    vpcId String
    The VPC network ID.
    name String
    The zone name.
    vpcId string
    The VPC network ID.
    name string
    The zone name.
    vpc_id str
    The VPC network ID.
    name str
    The zone name.
    vpcId String
    The VPC network ID.
    name String
    The zone name.

    GatewayVswitch, GatewayVswitchArgs

    Name string
    The zone name.
    VswitchId string
    The ID of the virtual switch.
    Name string
    The zone name.
    VswitchId string
    The ID of the virtual switch.
    name String
    The zone name.
    vswitchId String
    The ID of the virtual switch.
    name string
    The zone name.
    vswitchId string
    The ID of the virtual switch.
    name str
    The zone name.
    vswitch_id str
    The ID of the virtual switch.
    name String
    The zone name.
    vswitchId String
    The ID of the virtual switch.

    GatewayZone, GatewayZoneArgs

    Name string
    The zone name.
    VswitchId string
    The vswitch ID.
    ZoneId string
    The zone ID.
    Name string
    The zone name.
    VswitchId string
    The vswitch ID.
    ZoneId string
    The zone ID.
    name String
    The zone name.
    vswitchId String
    The vswitch ID.
    zoneId String
    The zone ID.
    name string
    The zone name.
    vswitchId string
    The vswitch ID.
    zoneId string
    The zone ID.
    name str
    The zone name.
    vswitch_id str
    The vswitch ID.
    zone_id str
    The zone ID.
    name String
    The zone name.
    vswitchId String
    The vswitch ID.
    zoneId String
    The zone ID.

    GatewayZoneConfig, GatewayZoneConfigArgs

    SelectOption string
    Availability Zone Options
    SelectOption string
    Availability Zone Options
    selectOption String
    Availability Zone Options
    selectOption string
    Availability Zone Options
    select_option str
    Availability Zone Options
    selectOption String
    Availability Zone Options

    Import

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

    $ pulumi import alicloud:apig/gateway:Gateway example <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
    Viewing docs for Alibaba Cloud v3.97.0
    published on Saturday, Mar 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.