1. Packages
  2. Volcengine
  3. API Docs
  4. apig
  5. ApigGateway
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.apig.ApigGateway

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage apig gateway

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.getZones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const foo1 = new volcengine.vpc.Subnet("foo1", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const foo2 = new volcengine.vpc.Subnet("foo2", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.1.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id),
        vpcId: fooVpc.id,
    });
    const fooApigGateway = new volcengine.apig.ApigGateway("fooApigGateway", {
        type: "standard",
        comments: "acc-test",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
        networkSpec: {
            vpcId: fooVpc.id,
            subnetIds: [
                foo1.id,
                foo2.id,
            ],
        },
        resourceSpec: {
            replicas: 2,
            instanceSpecCode: "1c2g",
            clbSpecCode: "small_1",
            publicNetworkBillingType: "bandwidth",
            publicNetworkBandwidth: 1,
            networkType: {
                enablePublicNetwork: true,
                enablePrivateNetwork: true,
            },
        },
        logSpec: {
            enable: true,
            projectId: "d3cb87c0-faeb-4074-b1ee-9bd747865a76",
            topicId: "d339482e-d86d-4bd8-a9bb-f270417f00a1",
        },
        monitorSpec: {
            enable: true,
            workspaceId: "4ed1caf3-279d-4c5f-8301-87ea38e92ffc",
        },
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.get_zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo1 = volcengine.vpc.Subnet("foo1",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    foo2 = volcengine.vpc.Subnet("foo2",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.1.0/24",
        zone_id=foo_zones.zones[1].id,
        vpc_id=foo_vpc.id)
    foo_apig_gateway = volcengine.apig.ApigGateway("fooApigGateway",
        type="standard",
        comments="acc-test",
        project_name="default",
        tags=[volcengine.apig.ApigGatewayTagArgs(
            key="k1",
            value="v1",
        )],
        network_spec=volcengine.apig.ApigGatewayNetworkSpecArgs(
            vpc_id=foo_vpc.id,
            subnet_ids=[
                foo1.id,
                foo2.id,
            ],
        ),
        resource_spec=volcengine.apig.ApigGatewayResourceSpecArgs(
            replicas=2,
            instance_spec_code="1c2g",
            clb_spec_code="small_1",
            public_network_billing_type="bandwidth",
            public_network_bandwidth=1,
            network_type=volcengine.apig.ApigGatewayResourceSpecNetworkTypeArgs(
                enable_public_network=True,
                enable_private_network=True,
            ),
        ),
        log_spec=volcengine.apig.ApigGatewayLogSpecArgs(
            enable=True,
            project_id="d3cb87c0-faeb-4074-b1ee-9bd747865a76",
            topic_id="d339482e-d86d-4bd8-a9bb-f270417f00a1",
        ),
        monitor_spec=volcengine.apig.ApigGatewayMonitorSpecArgs(
            enable=True,
            workspace_id="4ed1caf3-279d-4c5f-8301-87ea38e92ffc",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/apig"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		foo1, err := vpc.NewSubnet(ctx, "foo1", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		foo2, err := vpc.NewSubnet(ctx, "foo2", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.1.0/24"),
    			ZoneId:     pulumi.String(fooZones.Zones[1].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apig.NewApigGateway(ctx, "fooApigGateway", &apig.ApigGatewayArgs{
    			Type:        pulumi.String("standard"),
    			Comments:    pulumi.String("acc-test"),
    			ProjectName: pulumi.String("default"),
    			Tags: apig.ApigGatewayTagArray{
    				&apig.ApigGatewayTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    			NetworkSpec: &apig.ApigGatewayNetworkSpecArgs{
    				VpcId: fooVpc.ID(),
    				SubnetIds: pulumi.StringArray{
    					foo1.ID(),
    					foo2.ID(),
    				},
    			},
    			ResourceSpec: &apig.ApigGatewayResourceSpecArgs{
    				Replicas:                 pulumi.Int(2),
    				InstanceSpecCode:         pulumi.String("1c2g"),
    				ClbSpecCode:              pulumi.String("small_1"),
    				PublicNetworkBillingType: pulumi.String("bandwidth"),
    				PublicNetworkBandwidth:   pulumi.Int(1),
    				NetworkType: &apig.ApigGatewayResourceSpecNetworkTypeArgs{
    					EnablePublicNetwork:  pulumi.Bool(true),
    					EnablePrivateNetwork: pulumi.Bool(true),
    				},
    			},
    			LogSpec: &apig.ApigGatewayLogSpecArgs{
    				Enable:    pulumi.Bool(true),
    				ProjectId: pulumi.String("d3cb87c0-faeb-4074-b1ee-9bd747865a76"),
    				TopicId:   pulumi.String("d339482e-d86d-4bd8-a9bb-f270417f00a1"),
    			},
    			MonitorSpec: &apig.ApigGatewayMonitorSpecArgs{
    				Enable:      pulumi.Bool(true),
    				WorkspaceId: pulumi.String("4ed1caf3-279d-4c5f-8301-87ea38e92ffc"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooZones = Volcengine.Ecs.GetZones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var foo1 = new Volcengine.Vpc.Subnet("foo1", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var foo2 = new Volcengine.Vpc.Subnet("foo2", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.1.0/24",
            ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var fooApigGateway = new Volcengine.Apig.ApigGateway("fooApigGateway", new()
        {
            Type = "standard",
            Comments = "acc-test",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Apig.Inputs.ApigGatewayTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
            NetworkSpec = new Volcengine.Apig.Inputs.ApigGatewayNetworkSpecArgs
            {
                VpcId = fooVpc.Id,
                SubnetIds = new[]
                {
                    foo1.Id,
                    foo2.Id,
                },
            },
            ResourceSpec = new Volcengine.Apig.Inputs.ApigGatewayResourceSpecArgs
            {
                Replicas = 2,
                InstanceSpecCode = "1c2g",
                ClbSpecCode = "small_1",
                PublicNetworkBillingType = "bandwidth",
                PublicNetworkBandwidth = 1,
                NetworkType = new Volcengine.Apig.Inputs.ApigGatewayResourceSpecNetworkTypeArgs
                {
                    EnablePublicNetwork = true,
                    EnablePrivateNetwork = true,
                },
            },
            LogSpec = new Volcengine.Apig.Inputs.ApigGatewayLogSpecArgs
            {
                Enable = true,
                ProjectId = "d3cb87c0-faeb-4074-b1ee-9bd747865a76",
                TopicId = "d339482e-d86d-4bd8-a9bb-f270417f00a1",
            },
            MonitorSpec = new Volcengine.Apig.Inputs.ApigGatewayMonitorSpecArgs
            {
                Enable = true,
                WorkspaceId = "4ed1caf3-279d-4c5f-8301-87ea38e92ffc",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.ecs.EcsFunctions;
    import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.apig.ApigGateway;
    import com.pulumi.volcengine.apig.ApigGatewayArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayTagArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayNetworkSpecArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayResourceSpecArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayResourceSpecNetworkTypeArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayLogSpecArgs;
    import com.pulumi.volcengine.apig.inputs.ApigGatewayMonitorSpecArgs;
    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 fooZones = EcsFunctions.getZones();
    
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var foo1 = new Subnet("foo1", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var foo2 = new Subnet("foo2", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.1.0/24")
                .zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var fooApigGateway = new ApigGateway("fooApigGateway", ApigGatewayArgs.builder()        
                .type("standard")
                .comments("acc-test")
                .projectName("default")
                .tags(ApigGatewayTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .networkSpec(ApigGatewayNetworkSpecArgs.builder()
                    .vpcId(fooVpc.id())
                    .subnetIds(                
                        foo1.id(),
                        foo2.id())
                    .build())
                .resourceSpec(ApigGatewayResourceSpecArgs.builder()
                    .replicas(2)
                    .instanceSpecCode("1c2g")
                    .clbSpecCode("small_1")
                    .publicNetworkBillingType("bandwidth")
                    .publicNetworkBandwidth(1)
                    .networkType(ApigGatewayResourceSpecNetworkTypeArgs.builder()
                        .enablePublicNetwork(true)
                        .enablePrivateNetwork(true)
                        .build())
                    .build())
                .logSpec(ApigGatewayLogSpecArgs.builder()
                    .enable(true)
                    .projectId("d3cb87c0-faeb-4074-b1ee-9bd747865a76")
                    .topicId("d339482e-d86d-4bd8-a9bb-f270417f00a1")
                    .build())
                .monitorSpec(ApigGatewayMonitorSpecArgs.builder()
                    .enable(true)
                    .workspaceId("4ed1caf3-279d-4c5f-8301-87ea38e92ffc")
                    .build())
                .build());
    
        }
    }
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      foo1:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: ${fooZones.zones[0].id}
          vpcId: ${fooVpc.id}
      foo2:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.1.0/24
          zoneId: ${fooZones.zones[1].id}
          vpcId: ${fooVpc.id}
      fooApigGateway:
        type: volcengine:apig:ApigGateway
        properties:
          type: standard
          comments: acc-test
          projectName: default
          tags:
            - key: k1
              value: v1
          networkSpec:
            vpcId: ${fooVpc.id}
            subnetIds:
              - ${foo1.id}
              - ${foo2.id}
          resourceSpec:
            replicas: 2
            instanceSpecCode: 1c2g
            clbSpecCode: small_1
            publicNetworkBillingType: bandwidth
            publicNetworkBandwidth: 1
            networkType:
              enablePublicNetwork: true
              enablePrivateNetwork: true
          logSpec:
            enable: true
            projectId: d3cb87c0-faeb-4074-b1ee-9bd747865a76
            topicId: d339482e-d86d-4bd8-a9bb-f270417f00a1
          monitorSpec:
            enable: true
            workspaceId: 4ed1caf3-279d-4c5f-8301-87ea38e92ffc
    variables:
      fooZones:
        fn::invoke:
          Function: volcengine:ecs:getZones
          Arguments: {}
    

    Create ApigGateway Resource

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

    Constructor syntax

    new ApigGateway(name: string, args: ApigGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def ApigGateway(resource_name: str,
                    args: ApigGatewayArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigGateway(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    network_spec: Optional[ApigGatewayNetworkSpecArgs] = None,
                    backend_spec: Optional[ApigGatewayBackendSpecArgs] = None,
                    comments: Optional[str] = None,
                    log_spec: Optional[ApigGatewayLogSpecArgs] = None,
                    monitor_spec: Optional[ApigGatewayMonitorSpecArgs] = None,
                    name: Optional[str] = None,
                    project_name: Optional[str] = None,
                    resource_spec: Optional[ApigGatewayResourceSpecArgs] = None,
                    tags: Optional[Sequence[ApigGatewayTagArgs]] = None,
                    type: Optional[str] = None)
    func NewApigGateway(ctx *Context, name string, args ApigGatewayArgs, opts ...ResourceOption) (*ApigGateway, error)
    public ApigGateway(string name, ApigGatewayArgs args, CustomResourceOptions? opts = null)
    public ApigGateway(String name, ApigGatewayArgs args)
    public ApigGateway(String name, ApigGatewayArgs args, CustomResourceOptions options)
    
    type: volcengine:apig:ApigGateway
    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 ApigGatewayArgs
    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 ApigGatewayArgs
    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 ApigGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigGatewayArgs
    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 apigGatewayResource = new Volcengine.Apig.ApigGateway("apigGatewayResource", new()
    {
        NetworkSpec = new Volcengine.Apig.Inputs.ApigGatewayNetworkSpecArgs
        {
            SubnetIds = new[]
            {
                "string",
            },
            VpcId = "string",
        },
        BackendSpec = new Volcengine.Apig.Inputs.ApigGatewayBackendSpecArgs
        {
            IsVkeWithFlannelCniSupported = false,
            VkePodCidr = "string",
        },
        Comments = "string",
        LogSpec = new Volcengine.Apig.Inputs.ApigGatewayLogSpecArgs
        {
            Enable = false,
            ProjectId = "string",
            TopicId = "string",
        },
        MonitorSpec = new Volcengine.Apig.Inputs.ApigGatewayMonitorSpecArgs
        {
            Enable = false,
            WorkspaceId = "string",
        },
        Name = "string",
        ProjectName = "string",
        ResourceSpec = new Volcengine.Apig.Inputs.ApigGatewayResourceSpecArgs
        {
            InstanceSpecCode = "string",
            Replicas = 0,
            ClbSpecCode = "string",
            NetworkType = new Volcengine.Apig.Inputs.ApigGatewayResourceSpecNetworkTypeArgs
            {
                EnablePrivateNetwork = false,
                EnablePublicNetwork = false,
            },
            PublicNetworkBandwidth = 0,
            PublicNetworkBillingType = "string",
        },
        Tags = new[]
        {
            new Volcengine.Apig.Inputs.ApigGatewayTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Type = "string",
    });
    
    example, err := apig.NewApigGateway(ctx, "apigGatewayResource", &apig.ApigGatewayArgs{
    	NetworkSpec: &apig.ApigGatewayNetworkSpecArgs{
    		SubnetIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		VpcId: pulumi.String("string"),
    	},
    	BackendSpec: &apig.ApigGatewayBackendSpecArgs{
    		IsVkeWithFlannelCniSupported: pulumi.Bool(false),
    		VkePodCidr:                   pulumi.String("string"),
    	},
    	Comments: pulumi.String("string"),
    	LogSpec: &apig.ApigGatewayLogSpecArgs{
    		Enable:    pulumi.Bool(false),
    		ProjectId: pulumi.String("string"),
    		TopicId:   pulumi.String("string"),
    	},
    	MonitorSpec: &apig.ApigGatewayMonitorSpecArgs{
    		Enable:      pulumi.Bool(false),
    		WorkspaceId: pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    	ResourceSpec: &apig.ApigGatewayResourceSpecArgs{
    		InstanceSpecCode: pulumi.String("string"),
    		Replicas:         pulumi.Int(0),
    		ClbSpecCode:      pulumi.String("string"),
    		NetworkType: &apig.ApigGatewayResourceSpecNetworkTypeArgs{
    			EnablePrivateNetwork: pulumi.Bool(false),
    			EnablePublicNetwork:  pulumi.Bool(false),
    		},
    		PublicNetworkBandwidth:   pulumi.Int(0),
    		PublicNetworkBillingType: pulumi.String("string"),
    	},
    	Tags: apig.ApigGatewayTagArray{
    		&apig.ApigGatewayTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Type: pulumi.String("string"),
    })
    
    var apigGatewayResource = new ApigGateway("apigGatewayResource", ApigGatewayArgs.builder()
        .networkSpec(ApigGatewayNetworkSpecArgs.builder()
            .subnetIds("string")
            .vpcId("string")
            .build())
        .backendSpec(ApigGatewayBackendSpecArgs.builder()
            .isVkeWithFlannelCniSupported(false)
            .vkePodCidr("string")
            .build())
        .comments("string")
        .logSpec(ApigGatewayLogSpecArgs.builder()
            .enable(false)
            .projectId("string")
            .topicId("string")
            .build())
        .monitorSpec(ApigGatewayMonitorSpecArgs.builder()
            .enable(false)
            .workspaceId("string")
            .build())
        .name("string")
        .projectName("string")
        .resourceSpec(ApigGatewayResourceSpecArgs.builder()
            .instanceSpecCode("string")
            .replicas(0)
            .clbSpecCode("string")
            .networkType(ApigGatewayResourceSpecNetworkTypeArgs.builder()
                .enablePrivateNetwork(false)
                .enablePublicNetwork(false)
                .build())
            .publicNetworkBandwidth(0)
            .publicNetworkBillingType("string")
            .build())
        .tags(ApigGatewayTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .type("string")
        .build());
    
    apig_gateway_resource = volcengine.apig.ApigGateway("apigGatewayResource",
        network_spec={
            "subnet_ids": ["string"],
            "vpc_id": "string",
        },
        backend_spec={
            "is_vke_with_flannel_cni_supported": False,
            "vke_pod_cidr": "string",
        },
        comments="string",
        log_spec={
            "enable": False,
            "project_id": "string",
            "topic_id": "string",
        },
        monitor_spec={
            "enable": False,
            "workspace_id": "string",
        },
        name="string",
        project_name="string",
        resource_spec={
            "instance_spec_code": "string",
            "replicas": 0,
            "clb_spec_code": "string",
            "network_type": {
                "enable_private_network": False,
                "enable_public_network": False,
            },
            "public_network_bandwidth": 0,
            "public_network_billing_type": "string",
        },
        tags=[{
            "key": "string",
            "value": "string",
        }],
        type="string")
    
    const apigGatewayResource = new volcengine.apig.ApigGateway("apigGatewayResource", {
        networkSpec: {
            subnetIds: ["string"],
            vpcId: "string",
        },
        backendSpec: {
            isVkeWithFlannelCniSupported: false,
            vkePodCidr: "string",
        },
        comments: "string",
        logSpec: {
            enable: false,
            projectId: "string",
            topicId: "string",
        },
        monitorSpec: {
            enable: false,
            workspaceId: "string",
        },
        name: "string",
        projectName: "string",
        resourceSpec: {
            instanceSpecCode: "string",
            replicas: 0,
            clbSpecCode: "string",
            networkType: {
                enablePrivateNetwork: false,
                enablePublicNetwork: false,
            },
            publicNetworkBandwidth: 0,
            publicNetworkBillingType: "string",
        },
        tags: [{
            key: "string",
            value: "string",
        }],
        type: "string",
    });
    
    type: volcengine:apig:ApigGateway
    properties:
        backendSpec:
            isVkeWithFlannelCniSupported: false
            vkePodCidr: string
        comments: string
        logSpec:
            enable: false
            projectId: string
            topicId: string
        monitorSpec:
            enable: false
            workspaceId: string
        name: string
        networkSpec:
            subnetIds:
                - string
            vpcId: string
        projectName: string
        resourceSpec:
            clbSpecCode: string
            instanceSpecCode: string
            networkType:
                enablePrivateNetwork: false
                enablePublicNetwork: false
            publicNetworkBandwidth: 0
            publicNetworkBillingType: string
            replicas: 0
        tags:
            - key: string
              value: string
        type: string
    

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

    NetworkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    BackendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    Comments string
    The comments of the api gateway.
    LogSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    MonitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    Name string
    The name of the api gateway.
    ProjectName string
    The project name of the api gateway.
    ResourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    Tags List<ApigGatewayTag>
    Tags.
    Type string
    The type of the api gateway. Valid values: standard, serverless.
    NetworkSpec ApigGatewayNetworkSpecArgs
    The network spec of the api gateway.
    BackendSpec ApigGatewayBackendSpecArgs
    The backend spec of the api gateway.
    Comments string
    The comments of the api gateway.
    LogSpec ApigGatewayLogSpecArgs
    The log spec of the api gateway.
    MonitorSpec ApigGatewayMonitorSpecArgs
    The monitor spec of the api gateway.
    Name string
    The name of the api gateway.
    ProjectName string
    The project name of the api gateway.
    ResourceSpec ApigGatewayResourceSpecArgs
    The resource spec of the api gateway.
    Tags []ApigGatewayTagArgs
    Tags.
    Type string
    The type of the api gateway. Valid values: standard, serverless.
    networkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    backendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    comments String
    The comments of the api gateway.
    logSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    monitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    name String
    The name of the api gateway.
    projectName String
    The project name of the api gateway.
    resourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    tags List<ApigGatewayTag>
    Tags.
    type String
    The type of the api gateway. Valid values: standard, serverless.
    networkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    backendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    comments string
    The comments of the api gateway.
    logSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    monitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    name string
    The name of the api gateway.
    projectName string
    The project name of the api gateway.
    resourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    tags ApigGatewayTag[]
    Tags.
    type string
    The type of the api gateway. Valid values: standard, serverless.
    network_spec ApigGatewayNetworkSpecArgs
    The network spec of the api gateway.
    backend_spec ApigGatewayBackendSpecArgs
    The backend spec of the api gateway.
    comments str
    The comments of the api gateway.
    log_spec ApigGatewayLogSpecArgs
    The log spec of the api gateway.
    monitor_spec ApigGatewayMonitorSpecArgs
    The monitor spec of the api gateway.
    name str
    The name of the api gateway.
    project_name str
    The project name of the api gateway.
    resource_spec ApigGatewayResourceSpecArgs
    The resource spec of the api gateway.
    tags Sequence[ApigGatewayTagArgs]
    Tags.
    type str
    The type of the api gateway. Valid values: standard, serverless.
    networkSpec Property Map
    The network spec of the api gateway.
    backendSpec Property Map
    The backend spec of the api gateway.
    comments String
    The comments of the api gateway.
    logSpec Property Map
    The log spec of the api gateway.
    monitorSpec Property Map
    The monitor spec of the api gateway.
    name String
    The name of the api gateway.
    projectName String
    The project name of the api gateway.
    resourceSpec Property Map
    The resource spec of the api gateway.
    tags List<Property Map>
    Tags.
    type String
    The type of the api gateway. Valid values: standard, serverless.

    Outputs

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

    CreateTime string
    The create time of the api gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    Message string
    The error message of the api gateway.
    Status string
    The status of the api gateway.
    Version string
    The version of the api gateway.
    CreateTime string
    The create time of the api gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    Message string
    The error message of the api gateway.
    Status string
    The status of the api gateway.
    Version string
    The version of the api gateway.
    createTime String
    The create time of the api gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    message String
    The error message of the api gateway.
    status String
    The status of the api gateway.
    version String
    The version of the api gateway.
    createTime string
    The create time of the api gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    message string
    The error message of the api gateway.
    status string
    The status of the api gateway.
    version string
    The version of the api gateway.
    create_time str
    The create time of the api gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    message str
    The error message of the api gateway.
    status str
    The status of the api gateway.
    version str
    The version of the api gateway.
    createTime String
    The create time of the api gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    message String
    The error message of the api gateway.
    status String
    The status of the api gateway.
    version String
    The version of the api gateway.

    Look up Existing ApigGateway Resource

    Get an existing ApigGateway 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?: ApigGatewayState, opts?: CustomResourceOptions): ApigGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend_spec: Optional[ApigGatewayBackendSpecArgs] = None,
            comments: Optional[str] = None,
            create_time: Optional[str] = None,
            log_spec: Optional[ApigGatewayLogSpecArgs] = None,
            message: Optional[str] = None,
            monitor_spec: Optional[ApigGatewayMonitorSpecArgs] = None,
            name: Optional[str] = None,
            network_spec: Optional[ApigGatewayNetworkSpecArgs] = None,
            project_name: Optional[str] = None,
            resource_spec: Optional[ApigGatewayResourceSpecArgs] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[ApigGatewayTagArgs]] = None,
            type: Optional[str] = None,
            version: Optional[str] = None) -> ApigGateway
    func GetApigGateway(ctx *Context, name string, id IDInput, state *ApigGatewayState, opts ...ResourceOption) (*ApigGateway, error)
    public static ApigGateway Get(string name, Input<string> id, ApigGatewayState? state, CustomResourceOptions? opts = null)
    public static ApigGateway get(String name, Output<String> id, ApigGatewayState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:apig:ApigGateway    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:
    BackendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    Comments string
    The comments of the api gateway.
    CreateTime string
    The create time of the api gateway.
    LogSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    Message string
    The error message of the api gateway.
    MonitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    Name string
    The name of the api gateway.
    NetworkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    ProjectName string
    The project name of the api gateway.
    ResourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    Status string
    The status of the api gateway.
    Tags List<ApigGatewayTag>
    Tags.
    Type string
    The type of the api gateway. Valid values: standard, serverless.
    Version string
    The version of the api gateway.
    BackendSpec ApigGatewayBackendSpecArgs
    The backend spec of the api gateway.
    Comments string
    The comments of the api gateway.
    CreateTime string
    The create time of the api gateway.
    LogSpec ApigGatewayLogSpecArgs
    The log spec of the api gateway.
    Message string
    The error message of the api gateway.
    MonitorSpec ApigGatewayMonitorSpecArgs
    The monitor spec of the api gateway.
    Name string
    The name of the api gateway.
    NetworkSpec ApigGatewayNetworkSpecArgs
    The network spec of the api gateway.
    ProjectName string
    The project name of the api gateway.
    ResourceSpec ApigGatewayResourceSpecArgs
    The resource spec of the api gateway.
    Status string
    The status of the api gateway.
    Tags []ApigGatewayTagArgs
    Tags.
    Type string
    The type of the api gateway. Valid values: standard, serverless.
    Version string
    The version of the api gateway.
    backendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    comments String
    The comments of the api gateway.
    createTime String
    The create time of the api gateway.
    logSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    message String
    The error message of the api gateway.
    monitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    name String
    The name of the api gateway.
    networkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    projectName String
    The project name of the api gateway.
    resourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    status String
    The status of the api gateway.
    tags List<ApigGatewayTag>
    Tags.
    type String
    The type of the api gateway. Valid values: standard, serverless.
    version String
    The version of the api gateway.
    backendSpec ApigGatewayBackendSpec
    The backend spec of the api gateway.
    comments string
    The comments of the api gateway.
    createTime string
    The create time of the api gateway.
    logSpec ApigGatewayLogSpec
    The log spec of the api gateway.
    message string
    The error message of the api gateway.
    monitorSpec ApigGatewayMonitorSpec
    The monitor spec of the api gateway.
    name string
    The name of the api gateway.
    networkSpec ApigGatewayNetworkSpec
    The network spec of the api gateway.
    projectName string
    The project name of the api gateway.
    resourceSpec ApigGatewayResourceSpec
    The resource spec of the api gateway.
    status string
    The status of the api gateway.
    tags ApigGatewayTag[]
    Tags.
    type string
    The type of the api gateway. Valid values: standard, serverless.
    version string
    The version of the api gateway.
    backend_spec ApigGatewayBackendSpecArgs
    The backend spec of the api gateway.
    comments str
    The comments of the api gateway.
    create_time str
    The create time of the api gateway.
    log_spec ApigGatewayLogSpecArgs
    The log spec of the api gateway.
    message str
    The error message of the api gateway.
    monitor_spec ApigGatewayMonitorSpecArgs
    The monitor spec of the api gateway.
    name str
    The name of the api gateway.
    network_spec ApigGatewayNetworkSpecArgs
    The network spec of the api gateway.
    project_name str
    The project name of the api gateway.
    resource_spec ApigGatewayResourceSpecArgs
    The resource spec of the api gateway.
    status str
    The status of the api gateway.
    tags Sequence[ApigGatewayTagArgs]
    Tags.
    type str
    The type of the api gateway. Valid values: standard, serverless.
    version str
    The version of the api gateway.
    backendSpec Property Map
    The backend spec of the api gateway.
    comments String
    The comments of the api gateway.
    createTime String
    The create time of the api gateway.
    logSpec Property Map
    The log spec of the api gateway.
    message String
    The error message of the api gateway.
    monitorSpec Property Map
    The monitor spec of the api gateway.
    name String
    The name of the api gateway.
    networkSpec Property Map
    The network spec of the api gateway.
    projectName String
    The project name of the api gateway.
    resourceSpec Property Map
    The resource spec of the api gateway.
    status String
    The status of the api gateway.
    tags List<Property Map>
    Tags.
    type String
    The type of the api gateway. Valid values: standard, serverless.
    version String
    The version of the api gateway.

    Supporting Types

    ApigGatewayBackendSpec, ApigGatewayBackendSpecArgs

    IsVkeWithFlannelCniSupported bool
    Whether the api gateway support vke flannel cni.
    VkePodCidr string
    The vke pod cidr of the api gateway.
    IsVkeWithFlannelCniSupported bool
    Whether the api gateway support vke flannel cni.
    VkePodCidr string
    The vke pod cidr of the api gateway.
    isVkeWithFlannelCniSupported Boolean
    Whether the api gateway support vke flannel cni.
    vkePodCidr String
    The vke pod cidr of the api gateway.
    isVkeWithFlannelCniSupported boolean
    Whether the api gateway support vke flannel cni.
    vkePodCidr string
    The vke pod cidr of the api gateway.
    is_vke_with_flannel_cni_supported bool
    Whether the api gateway support vke flannel cni.
    vke_pod_cidr str
    The vke pod cidr of the api gateway.
    isVkeWithFlannelCniSupported Boolean
    Whether the api gateway support vke flannel cni.
    vkePodCidr String
    The vke pod cidr of the api gateway.

    ApigGatewayLogSpec, ApigGatewayLogSpecArgs

    Enable bool
    Whether the api gateway enable tls log.
    ProjectId string
    The project id of the tls. This field is required when enable is true.
    TopicId string
    The topic id of the tls.
    Enable bool
    Whether the api gateway enable tls log.
    ProjectId string
    The project id of the tls. This field is required when enable is true.
    TopicId string
    The topic id of the tls.
    enable Boolean
    Whether the api gateway enable tls log.
    projectId String
    The project id of the tls. This field is required when enable is true.
    topicId String
    The topic id of the tls.
    enable boolean
    Whether the api gateway enable tls log.
    projectId string
    The project id of the tls. This field is required when enable is true.
    topicId string
    The topic id of the tls.
    enable bool
    Whether the api gateway enable tls log.
    project_id str
    The project id of the tls. This field is required when enable is true.
    topic_id str
    The topic id of the tls.
    enable Boolean
    Whether the api gateway enable tls log.
    projectId String
    The project id of the tls. This field is required when enable is true.
    topicId String
    The topic id of the tls.

    ApigGatewayMonitorSpec, ApigGatewayMonitorSpecArgs

    Enable bool
    Whether the api gateway enable monitor.
    WorkspaceId string
    The workspace id of the monitor. This field is required when enable is true.
    Enable bool
    Whether the api gateway enable monitor.
    WorkspaceId string
    The workspace id of the monitor. This field is required when enable is true.
    enable Boolean
    Whether the api gateway enable monitor.
    workspaceId String
    The workspace id of the monitor. This field is required when enable is true.
    enable boolean
    Whether the api gateway enable monitor.
    workspaceId string
    The workspace id of the monitor. This field is required when enable is true.
    enable bool
    Whether the api gateway enable monitor.
    workspace_id str
    The workspace id of the monitor. This field is required when enable is true.
    enable Boolean
    Whether the api gateway enable monitor.
    workspaceId String
    The workspace id of the monitor. This field is required when enable is true.

    ApigGatewayNetworkSpec, ApigGatewayNetworkSpecArgs

    SubnetIds List<string>
    The subnet ids of the network spec.
    VpcId string
    The vpc id of the network spec.
    SubnetIds []string
    The subnet ids of the network spec.
    VpcId string
    The vpc id of the network spec.
    subnetIds List<String>
    The subnet ids of the network spec.
    vpcId String
    The vpc id of the network spec.
    subnetIds string[]
    The subnet ids of the network spec.
    vpcId string
    The vpc id of the network spec.
    subnet_ids Sequence[str]
    The subnet ids of the network spec.
    vpc_id str
    The vpc id of the network spec.
    subnetIds List<String>
    The subnet ids of the network spec.
    vpcId String
    The vpc id of the network spec.

    ApigGatewayResourceSpec, ApigGatewayResourceSpecArgs

    InstanceSpecCode string
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    Replicas int
    The replicas of the resource spec.
    ClbSpecCode string
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    NetworkType ApigGatewayResourceSpecNetworkType
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    PublicNetworkBandwidth int
    The public network bandwidth of the resource spec.
    PublicNetworkBillingType string
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.
    InstanceSpecCode string
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    Replicas int
    The replicas of the resource spec.
    ClbSpecCode string
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    NetworkType ApigGatewayResourceSpecNetworkType
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    PublicNetworkBandwidth int
    The public network bandwidth of the resource spec.
    PublicNetworkBillingType string
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.
    instanceSpecCode String
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    replicas Integer
    The replicas of the resource spec.
    clbSpecCode String
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    networkType ApigGatewayResourceSpecNetworkType
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    publicNetworkBandwidth Integer
    The public network bandwidth of the resource spec.
    publicNetworkBillingType String
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.
    instanceSpecCode string
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    replicas number
    The replicas of the resource spec.
    clbSpecCode string
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    networkType ApigGatewayResourceSpecNetworkType
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    publicNetworkBandwidth number
    The public network bandwidth of the resource spec.
    publicNetworkBillingType string
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.
    instance_spec_code str
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    replicas int
    The replicas of the resource spec.
    clb_spec_code str
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    network_type ApigGatewayResourceSpecNetworkType
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    public_network_bandwidth int
    The public network bandwidth of the resource spec.
    public_network_billing_type str
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.
    instanceSpecCode String
    The instance spec code of the resource spec. Valid values: 1c2g, 2c4g, 4c8g, 8c16g.
    replicas Number
    The replicas of the resource spec.
    clbSpecCode String
    The clb spec code of the resource spec. Valid values: small_1, small_2, medium_1, medium_2, large_1, large_2.
    networkType Property Map
    The network type of the resource spec. The default values for both enable_public_network and enable_private_network are true.
    publicNetworkBandwidth Number
    The public network bandwidth of the resource spec.
    publicNetworkBillingType String
    The public network billing type of the resource spec. Valid values: traffic, bandwidth.

    ApigGatewayResourceSpecNetworkType, ApigGatewayResourceSpecNetworkTypeArgs

    EnablePrivateNetwork bool
    Whether the api gateway enable private network.
    EnablePublicNetwork bool
    Whether the api gateway enable public network.
    EnablePrivateNetwork bool
    Whether the api gateway enable private network.
    EnablePublicNetwork bool
    Whether the api gateway enable public network.
    enablePrivateNetwork Boolean
    Whether the api gateway enable private network.
    enablePublicNetwork Boolean
    Whether the api gateway enable public network.
    enablePrivateNetwork boolean
    Whether the api gateway enable private network.
    enablePublicNetwork boolean
    Whether the api gateway enable public network.
    enable_private_network bool
    Whether the api gateway enable private network.
    enable_public_network bool
    Whether the api gateway enable public network.
    enablePrivateNetwork Boolean
    Whether the api gateway enable private network.
    enablePublicNetwork Boolean
    Whether the api gateway enable public network.

    ApigGatewayTag, ApigGatewayTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

    ApigGateway can be imported using the id, e.g.

    $ pulumi import volcengine:apig/apigGateway:ApigGateway default resource_id
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine