1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ApigInstanceRoutes
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.ApigInstanceRoutes

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Using this resource to manage the instance routes within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const instanceId = config.requireObject("instanceId");
    const test = new flexibleengine.ApigInstanceRoutes("test", {
        instanceId: instanceId,
        nexthops: [
            "172.16.3.0/24",
            "172.16.7.0/24",
        ],
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    instance_id = config.require_object("instanceId")
    test = flexibleengine.ApigInstanceRoutes("test",
        instance_id=instance_id,
        nexthops=[
            "172.16.3.0/24",
            "172.16.7.0/24",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"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, "")
    		instanceId := cfg.RequireObject("instanceId")
    		_, err := flexibleengine.NewApigInstanceRoutes(ctx, "test", &flexibleengine.ApigInstanceRoutesArgs{
    			InstanceId: pulumi.Any(instanceId),
    			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 Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var instanceId = config.RequireObject<dynamic>("instanceId");
        var test = new Flexibleengine.ApigInstanceRoutes("test", new()
        {
            InstanceId = instanceId,
            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.flexibleengine.ApigInstanceRoutes;
    import com.pulumi.flexibleengine.ApigInstanceRoutesArgs;
    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 instanceId = config.get("instanceId");
            var test = new ApigInstanceRoutes("test", ApigInstanceRoutesArgs.builder()
                .instanceId(instanceId)
                .nexthops(            
                    "172.16.3.0/24",
                    "172.16.7.0/24")
                .build());
    
        }
    }
    
    configuration:
      instanceId:
        type: dynamic
    resources:
      test:
        type: flexibleengine:ApigInstanceRoutes
        properties:
          instanceId: ${instanceId}
          nexthops:
            - 172.16.3.0/24
            - 172.16.7.0/24
    

    Create ApigInstanceRoutes Resource

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

    Constructor syntax

    new ApigInstanceRoutes(name: string, args: ApigInstanceRoutesArgs, opts?: CustomResourceOptions);
    @overload
    def ApigInstanceRoutes(resource_name: str,
                           args: ApigInstanceRoutesArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigInstanceRoutes(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           instance_id: Optional[str] = None,
                           nexthops: Optional[Sequence[str]] = None,
                           apig_instance_routes_id: Optional[str] = None,
                           region: Optional[str] = None)
    func NewApigInstanceRoutes(ctx *Context, name string, args ApigInstanceRoutesArgs, opts ...ResourceOption) (*ApigInstanceRoutes, error)
    public ApigInstanceRoutes(string name, ApigInstanceRoutesArgs args, CustomResourceOptions? opts = null)
    public ApigInstanceRoutes(String name, ApigInstanceRoutesArgs args)
    public ApigInstanceRoutes(String name, ApigInstanceRoutesArgs args, CustomResourceOptions options)
    
    type: flexibleengine:ApigInstanceRoutes
    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 ApigInstanceRoutesArgs
    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 ApigInstanceRoutesArgs
    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 ApigInstanceRoutesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigInstanceRoutesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigInstanceRoutesArgs
    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 apigInstanceRoutesResource = new Flexibleengine.ApigInstanceRoutes("apigInstanceRoutesResource", new()
    {
        InstanceId = "string",
        Nexthops = new[]
        {
            "string",
        },
        ApigInstanceRoutesId = "string",
        Region = "string",
    });
    
    example, err := flexibleengine.NewApigInstanceRoutes(ctx, "apigInstanceRoutesResource", &flexibleengine.ApigInstanceRoutesArgs{
    	InstanceId: pulumi.String("string"),
    	Nexthops: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ApigInstanceRoutesId: pulumi.String("string"),
    	Region:               pulumi.String("string"),
    })
    
    var apigInstanceRoutesResource = new ApigInstanceRoutes("apigInstanceRoutesResource", ApigInstanceRoutesArgs.builder()
        .instanceId("string")
        .nexthops("string")
        .apigInstanceRoutesId("string")
        .region("string")
        .build());
    
    apig_instance_routes_resource = flexibleengine.ApigInstanceRoutes("apigInstanceRoutesResource",
        instance_id="string",
        nexthops=["string"],
        apig_instance_routes_id="string",
        region="string")
    
    const apigInstanceRoutesResource = new flexibleengine.ApigInstanceRoutes("apigInstanceRoutesResource", {
        instanceId: "string",
        nexthops: ["string"],
        apigInstanceRoutesId: "string",
        region: "string",
    });
    
    type: flexibleengine:ApigInstanceRoutes
    properties:
        apigInstanceRoutesId: string
        instanceId: string
        nexthops:
            - string
        region: string
    

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

    InstanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    ApigInstanceRoutesId string
    The resource ID (instance ID).
    Region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    ApigInstanceRoutesId string
    The resource ID (instance ID).
    Region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance 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 APIG instance.

    apigInstanceRoutesId String
    The resource ID (instance ID).
    region String
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    apigInstanceRoutesId string
    The resource ID (instance ID).
    region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instance_id str
    Specifies the ID of the dedicated instance 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 APIG instance.

    apig_instance_routes_id str
    The resource ID (instance ID).
    region str
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance 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 APIG instance.

    apigInstanceRoutesId String
    The resource ID (instance ID).
    region String
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApigInstanceRoutes Resource

    Get an existing ApigInstanceRoutes 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?: ApigInstanceRoutesState, opts?: CustomResourceOptions): ApigInstanceRoutes
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apig_instance_routes_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            nexthops: Optional[Sequence[str]] = None,
            region: Optional[str] = None) -> ApigInstanceRoutes
    func GetApigInstanceRoutes(ctx *Context, name string, id IDInput, state *ApigInstanceRoutesState, opts ...ResourceOption) (*ApigInstanceRoutes, error)
    public static ApigInstanceRoutes Get(string name, Input<string> id, ApigInstanceRoutesState? state, CustomResourceOptions? opts = null)
    public static ApigInstanceRoutes get(String name, Output<String> id, ApigInstanceRoutesState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:ApigInstanceRoutes    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:
    ApigInstanceRoutesId string
    The resource ID (instance ID).
    InstanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    Region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    ApigInstanceRoutesId string
    The resource ID (instance ID).
    InstanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    Region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigInstanceRoutesId String
    The resource ID (instance ID).
    instanceId String
    Specifies the ID of the dedicated instance 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 APIG instance.

    region String
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigInstanceRoutesId string
    The resource ID (instance ID).
    instanceId string
    Specifies the ID of the dedicated instance 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 APIG instance.

    region string
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apig_instance_routes_id str
    The resource ID (instance ID).
    instance_id str
    Specifies the ID of the dedicated instance 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 APIG instance.

    region str
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigInstanceRoutesId String
    The resource ID (instance ID).
    instanceId String
    Specifies the ID of the dedicated instance 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 APIG instance.

    region String
    Specifies the region where the dedicated instance and routes are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.

    Import

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

    bash

    $ pulumi import flexibleengine:index/apigInstanceRoutes:ApigInstanceRoutes test 128001b3c5eb4d3e91a8da9c0f46420f
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud