1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ApigwGatewayRoutesV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.ApigwGatewayRoutesV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for API Gateway environment variable service you can get at documentation portal

    Manages a APIGW gateway routes resource within OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const gatewayId = config.requireObject("gatewayId");
    const rt = new opentelekomcloud.ApigwGatewayRoutesV2("rt", {
        gatewayId: gatewayId,
        nexthops: [
            "172.16.3.0/24",
            "172.16.7.0/24",
        ],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    gateway_id = config.require_object("gatewayId")
    rt = opentelekomcloud.ApigwGatewayRoutesV2("rt",
        gateway_id=gateway_id,
        nexthops=[
            "172.16.3.0/24",
            "172.16.7.0/24",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		gatewayId := cfg.RequireObject("gatewayId")
    		_, err := opentelekomcloud.NewApigwGatewayRoutesV2(ctx, "rt", &opentelekomcloud.ApigwGatewayRoutesV2Args{
    			GatewayId: pulumi.Any(gatewayId),
    			Nexthops: pulumi.StringArray{
    				pulumi.String("172.16.3.0/24"),
    				pulumi.String("172.16.7.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var gatewayId = config.RequireObject<dynamic>("gatewayId");
        var rt = new Opentelekomcloud.ApigwGatewayRoutesV2("rt", new()
        {
            GatewayId = gatewayId,
            Nexthops = new[]
            {
                "172.16.3.0/24",
                "172.16.7.0/24",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ApigwGatewayRoutesV2;
    import com.pulumi.opentelekomcloud.ApigwGatewayRoutesV2Args;
    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 gatewayId = config.get("gatewayId");
            var rt = new ApigwGatewayRoutesV2("rt", ApigwGatewayRoutesV2Args.builder()
                .gatewayId(gatewayId)
                .nexthops(            
                    "172.16.3.0/24",
                    "172.16.7.0/24")
                .build());
    
        }
    }
    
    configuration:
      gatewayId:
        type: dynamic
    resources:
      rt:
        type: opentelekomcloud:ApigwGatewayRoutesV2
        properties:
          gatewayId: ${gatewayId}
          nexthops:
            - 172.16.3.0/24
            - 172.16.7.0/24
    

    Create ApigwGatewayRoutesV2 Resource

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

    Constructor syntax

    new ApigwGatewayRoutesV2(name: string, args: ApigwGatewayRoutesV2Args, opts?: CustomResourceOptions);
    @overload
    def ApigwGatewayRoutesV2(resource_name: str,
                             args: ApigwGatewayRoutesV2Args,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigwGatewayRoutesV2(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             gateway_id: Optional[str] = None,
                             nexthops: Optional[Sequence[str]] = None,
                             apigw_gateway_routes_v2_id: Optional[str] = None)
    func NewApigwGatewayRoutesV2(ctx *Context, name string, args ApigwGatewayRoutesV2Args, opts ...ResourceOption) (*ApigwGatewayRoutesV2, error)
    public ApigwGatewayRoutesV2(string name, ApigwGatewayRoutesV2Args args, CustomResourceOptions? opts = null)
    public ApigwGatewayRoutesV2(String name, ApigwGatewayRoutesV2Args args)
    public ApigwGatewayRoutesV2(String name, ApigwGatewayRoutesV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:ApigwGatewayRoutesV2
    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 ApigwGatewayRoutesV2Args
    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 ApigwGatewayRoutesV2Args
    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 ApigwGatewayRoutesV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigwGatewayRoutesV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigwGatewayRoutesV2Args
    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 apigwGatewayRoutesV2Resource = new Opentelekomcloud.ApigwGatewayRoutesV2("apigwGatewayRoutesV2Resource", new()
    {
        GatewayId = "string",
        Nexthops = new[]
        {
            "string",
        },
        ApigwGatewayRoutesV2Id = "string",
    });
    
    example, err := opentelekomcloud.NewApigwGatewayRoutesV2(ctx, "apigwGatewayRoutesV2Resource", &opentelekomcloud.ApigwGatewayRoutesV2Args{
    	GatewayId: pulumi.String("string"),
    	Nexthops: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ApigwGatewayRoutesV2Id: pulumi.String("string"),
    })
    
    var apigwGatewayRoutesV2Resource = new ApigwGatewayRoutesV2("apigwGatewayRoutesV2Resource", ApigwGatewayRoutesV2Args.builder()
        .gatewayId("string")
        .nexthops("string")
        .apigwGatewayRoutesV2Id("string")
        .build());
    
    apigw_gateway_routes_v2_resource = opentelekomcloud.ApigwGatewayRoutesV2("apigwGatewayRoutesV2Resource",
        gateway_id="string",
        nexthops=["string"],
        apigw_gateway_routes_v2_id="string")
    
    const apigwGatewayRoutesV2Resource = new opentelekomcloud.ApigwGatewayRoutesV2("apigwGatewayRoutesV2Resource", {
        gatewayId: "string",
        nexthops: ["string"],
        apigwGatewayRoutesV2Id: "string",
    });
    
    type: opentelekomcloud:ApigwGatewayRoutesV2
    properties:
        apigwGatewayRoutesV2Id: string
        gatewayId: string
        nexthops:
            - string
    

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

    GatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    Nexthops List<string>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    ApigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    GatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    Nexthops []string

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    ApigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    gatewayId String
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops List<String>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    apigwGatewayRoutesV2Id String
    The resource ID (gateway ID).
    gatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops string[]

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    apigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    gateway_id str
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops Sequence[str]

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    apigw_gateway_routes_v2_id str
    The resource ID (gateway ID).
    gatewayId String
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops List<String>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    apigwGatewayRoutesV2Id String
    The resource ID (gateway ID).

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region where the dedicated gateway and routes are located.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region where the dedicated gateway and routes are located.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region where the dedicated gateway and routes are located.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    The region where the dedicated gateway and routes are located.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    The region where the dedicated gateway and routes are located.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region where the dedicated gateway and routes are located.

    Look up Existing ApigwGatewayRoutesV2 Resource

    Get an existing ApigwGatewayRoutesV2 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?: ApigwGatewayRoutesV2State, opts?: CustomResourceOptions): ApigwGatewayRoutesV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apigw_gateway_routes_v2_id: Optional[str] = None,
            gateway_id: Optional[str] = None,
            nexthops: Optional[Sequence[str]] = None,
            region: Optional[str] = None) -> ApigwGatewayRoutesV2
    func GetApigwGatewayRoutesV2(ctx *Context, name string, id IDInput, state *ApigwGatewayRoutesV2State, opts ...ResourceOption) (*ApigwGatewayRoutesV2, error)
    public static ApigwGatewayRoutesV2 Get(string name, Input<string> id, ApigwGatewayRoutesV2State? state, CustomResourceOptions? opts = null)
    public static ApigwGatewayRoutesV2 get(String name, Output<String> id, ApigwGatewayRoutesV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:ApigwGatewayRoutesV2    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:
    ApigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    GatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    Nexthops List<string>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    Region string
    The region where the dedicated gateway and routes are located.
    ApigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    GatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    Nexthops []string

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    Region string
    The region where the dedicated gateway and routes are located.
    apigwGatewayRoutesV2Id String
    The resource ID (gateway ID).
    gatewayId String
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops List<String>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    region String
    The region where the dedicated gateway and routes are located.
    apigwGatewayRoutesV2Id string
    The resource ID (gateway ID).
    gatewayId string
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops string[]

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    region string
    The region where the dedicated gateway and routes are located.
    apigw_gateway_routes_v2_id str
    The resource ID (gateway ID).
    gateway_id str
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops Sequence[str]

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    region str
    The region where the dedicated gateway and routes are located.
    apigwGatewayRoutesV2Id String
    The resource ID (gateway ID).
    gatewayId String
    Specifies the ID of the dedicated gateway to which the routes belong. Changing this will create a new resource.
    nexthops List<String>

    Specifies the configuration of the next-hop routes.

    The network segment of the next hop cannot overlap with the network segment of the APIGW gateway.

    region String
    The region where the dedicated gateway and routes are located.

    Import

    Routes can be imported using their related dedicated instance ID (gateway_id), e.g.

    bash

    $ pulumi import opentelekomcloud:index/apigwGatewayRoutesV2:ApigwGatewayRoutesV2 rt 628001b3c5eg6d3e91a8da530f46427y
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud