1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. ApigatewayRoute
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.ApigatewayRoute

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Manages an API Gateway Route on IonosCloud.

    Example Usage

    This resource will create an operational API Gateway Route. After this section completes, the provisioner can be called.

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = new ionoscloud.Apigateway("example", {
        metrics: true,
        customDomains: [
            {
                name: "example.com",
                certificateId: "00000000-0000-0000-0000-000000000000",
            },
            {
                name: "example.org",
                certificateId: "00000000-0000-0000-0000-000000000000",
            },
        ],
    });
    const apigatewayRoute = new ionoscloud.ApigatewayRoute("apigatewayRoute", {
        type: "http",
        paths: [
            "/foo/*",
            "/bar",
        ],
        methods: [
            "GET",
            "POST",
        ],
        websocket: false,
        upstreams: [{
            scheme: "http",
            loadbalancer: "roundrobin",
            host: "example.com",
            port: 80,
            weight: 100,
        }],
        gatewayId: example.id,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.Apigateway("example",
        metrics=True,
        custom_domains=[
            {
                "name": "example.com",
                "certificate_id": "00000000-0000-0000-0000-000000000000",
            },
            {
                "name": "example.org",
                "certificate_id": "00000000-0000-0000-0000-000000000000",
            },
        ])
    apigateway_route = ionoscloud.ApigatewayRoute("apigatewayRoute",
        type="http",
        paths=[
            "/foo/*",
            "/bar",
        ],
        methods=[
            "GET",
            "POST",
        ],
        websocket=False,
        upstreams=[{
            "scheme": "http",
            "loadbalancer": "roundrobin",
            "host": "example.com",
            "port": 80,
            "weight": 100,
        }],
        gateway_id=example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ionoscloud.NewApigateway(ctx, "example", &ionoscloud.ApigatewayArgs{
    			Metrics: pulumi.Bool(true),
    			CustomDomains: ionoscloud.ApigatewayCustomDomainArray{
    				&ionoscloud.ApigatewayCustomDomainArgs{
    					Name:          pulumi.String("example.com"),
    					CertificateId: pulumi.String("00000000-0000-0000-0000-000000000000"),
    				},
    				&ionoscloud.ApigatewayCustomDomainArgs{
    					Name:          pulumi.String("example.org"),
    					CertificateId: pulumi.String("00000000-0000-0000-0000-000000000000"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ionoscloud.NewApigatewayRoute(ctx, "apigatewayRoute", &ionoscloud.ApigatewayRouteArgs{
    			Type: pulumi.String("http"),
    			Paths: pulumi.StringArray{
    				pulumi.String("/foo/*"),
    				pulumi.String("/bar"),
    			},
    			Methods: pulumi.StringArray{
    				pulumi.String("GET"),
    				pulumi.String("POST"),
    			},
    			Websocket: pulumi.Bool(false),
    			Upstreams: ionoscloud.ApigatewayRouteUpstreamArray{
    				&ionoscloud.ApigatewayRouteUpstreamArgs{
    					Scheme:       pulumi.String("http"),
    					Loadbalancer: pulumi.String("roundrobin"),
    					Host:         pulumi.String("example.com"),
    					Port:         pulumi.Float64(80),
    					Weight:       pulumi.Float64(100),
    				},
    			},
    			GatewayId: example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Apigateway("example", new()
        {
            Metrics = true,
            CustomDomains = new[]
            {
                new Ionoscloud.Inputs.ApigatewayCustomDomainArgs
                {
                    Name = "example.com",
                    CertificateId = "00000000-0000-0000-0000-000000000000",
                },
                new Ionoscloud.Inputs.ApigatewayCustomDomainArgs
                {
                    Name = "example.org",
                    CertificateId = "00000000-0000-0000-0000-000000000000",
                },
            },
        });
    
        var apigatewayRoute = new Ionoscloud.ApigatewayRoute("apigatewayRoute", new()
        {
            Type = "http",
            Paths = new[]
            {
                "/foo/*",
                "/bar",
            },
            Methods = new[]
            {
                "GET",
                "POST",
            },
            Websocket = false,
            Upstreams = new[]
            {
                new Ionoscloud.Inputs.ApigatewayRouteUpstreamArgs
                {
                    Scheme = "http",
                    Loadbalancer = "roundrobin",
                    Host = "example.com",
                    Port = 80,
                    Weight = 100,
                },
            },
            GatewayId = example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.Apigateway;
    import com.pulumi.ionoscloud.ApigatewayArgs;
    import com.pulumi.ionoscloud.inputs.ApigatewayCustomDomainArgs;
    import com.pulumi.ionoscloud.ApigatewayRoute;
    import com.pulumi.ionoscloud.ApigatewayRouteArgs;
    import com.pulumi.ionoscloud.inputs.ApigatewayRouteUpstreamArgs;
    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) {
            var example = new Apigateway("example", ApigatewayArgs.builder()
                .metrics(true)
                .customDomains(            
                    ApigatewayCustomDomainArgs.builder()
                        .name("example.com")
                        .certificateId("00000000-0000-0000-0000-000000000000")
                        .build(),
                    ApigatewayCustomDomainArgs.builder()
                        .name("example.org")
                        .certificateId("00000000-0000-0000-0000-000000000000")
                        .build())
                .build());
    
            var apigatewayRoute = new ApigatewayRoute("apigatewayRoute", ApigatewayRouteArgs.builder()
                .type("http")
                .paths(            
                    "/foo/*",
                    "/bar")
                .methods(            
                    "GET",
                    "POST")
                .websocket(false)
                .upstreams(ApigatewayRouteUpstreamArgs.builder()
                    .scheme("http")
                    .loadbalancer("roundrobin")
                    .host("example.com")
                    .port(80)
                    .weight(100)
                    .build())
                .gatewayId(example.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:Apigateway
        properties:
          metrics: true
          customDomains:
            - name: example.com
              certificateId: 00000000-0000-0000-0000-000000000000
            - name: example.org
              certificateId: 00000000-0000-0000-0000-000000000000
      apigatewayRoute:
        type: ionoscloud:ApigatewayRoute
        properties:
          type: http
          paths:
            - /foo/*
            - /bar
          methods:
            - GET
            - POST
          websocket: false
          upstreams:
            - scheme: http
              loadbalancer: roundrobin
              host: example.com
              port: 80
              weight: 100
          gatewayId: ${example.id}
    

    Create ApigatewayRoute Resource

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

    Constructor syntax

    new ApigatewayRoute(name: string, args: ApigatewayRouteArgs, opts?: CustomResourceOptions);
    @overload
    def ApigatewayRoute(resource_name: str,
                        args: ApigatewayRouteArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigatewayRoute(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        gateway_id: Optional[str] = None,
                        methods: Optional[Sequence[str]] = None,
                        paths: Optional[Sequence[str]] = None,
                        upstreams: Optional[Sequence[ApigatewayRouteUpstreamArgs]] = None,
                        name: Optional[str] = None,
                        timeouts: Optional[ApigatewayRouteTimeoutsArgs] = None,
                        type: Optional[str] = None,
                        websocket: Optional[bool] = None)
    func NewApigatewayRoute(ctx *Context, name string, args ApigatewayRouteArgs, opts ...ResourceOption) (*ApigatewayRoute, error)
    public ApigatewayRoute(string name, ApigatewayRouteArgs args, CustomResourceOptions? opts = null)
    public ApigatewayRoute(String name, ApigatewayRouteArgs args)
    public ApigatewayRoute(String name, ApigatewayRouteArgs args, CustomResourceOptions options)
    
    type: ionoscloud:ApigatewayRoute
    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 ApigatewayRouteArgs
    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 ApigatewayRouteArgs
    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 ApigatewayRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigatewayRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigatewayRouteArgs
    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 apigatewayRouteResource = new Ionoscloud.ApigatewayRoute("apigatewayRouteResource", new()
    {
        GatewayId = "string",
        Methods = new[]
        {
            "string",
        },
        Paths = new[]
        {
            "string",
        },
        Upstreams = new[]
        {
            new Ionoscloud.Inputs.ApigatewayRouteUpstreamArgs
            {
                Host = "string",
                Loadbalancer = "string",
                Port = 0,
                Scheme = "string",
                Weight = 0,
            },
        },
        Name = "string",
        Timeouts = new Ionoscloud.Inputs.ApigatewayRouteTimeoutsArgs
        {
            Create = "string",
            Default = "string",
            Delete = "string",
            Update = "string",
        },
        Type = "string",
        Websocket = false,
    });
    
    example, err := ionoscloud.NewApigatewayRoute(ctx, "apigatewayRouteResource", &ionoscloud.ApigatewayRouteArgs{
    	GatewayId: pulumi.String("string"),
    	Methods: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Paths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Upstreams: ionoscloud.ApigatewayRouteUpstreamArray{
    		&ionoscloud.ApigatewayRouteUpstreamArgs{
    			Host:         pulumi.String("string"),
    			Loadbalancer: pulumi.String("string"),
    			Port:         pulumi.Float64(0),
    			Scheme:       pulumi.String("string"),
    			Weight:       pulumi.Float64(0),
    		},
    	},
    	Name: pulumi.String("string"),
    	Timeouts: &ionoscloud.ApigatewayRouteTimeoutsArgs{
    		Create:  pulumi.String("string"),
    		Default: pulumi.String("string"),
    		Delete:  pulumi.String("string"),
    		Update:  pulumi.String("string"),
    	},
    	Type:      pulumi.String("string"),
    	Websocket: pulumi.Bool(false),
    })
    
    var apigatewayRouteResource = new ApigatewayRoute("apigatewayRouteResource", ApigatewayRouteArgs.builder()
        .gatewayId("string")
        .methods("string")
        .paths("string")
        .upstreams(ApigatewayRouteUpstreamArgs.builder()
            .host("string")
            .loadbalancer("string")
            .port(0)
            .scheme("string")
            .weight(0)
            .build())
        .name("string")
        .timeouts(ApigatewayRouteTimeoutsArgs.builder()
            .create("string")
            .default_("string")
            .delete("string")
            .update("string")
            .build())
        .type("string")
        .websocket(false)
        .build());
    
    apigateway_route_resource = ionoscloud.ApigatewayRoute("apigatewayRouteResource",
        gateway_id="string",
        methods=["string"],
        paths=["string"],
        upstreams=[{
            "host": "string",
            "loadbalancer": "string",
            "port": 0,
            "scheme": "string",
            "weight": 0,
        }],
        name="string",
        timeouts={
            "create": "string",
            "default": "string",
            "delete": "string",
            "update": "string",
        },
        type="string",
        websocket=False)
    
    const apigatewayRouteResource = new ionoscloud.ApigatewayRoute("apigatewayRouteResource", {
        gatewayId: "string",
        methods: ["string"],
        paths: ["string"],
        upstreams: [{
            host: "string",
            loadbalancer: "string",
            port: 0,
            scheme: "string",
            weight: 0,
        }],
        name: "string",
        timeouts: {
            create: "string",
            "default": "string",
            "delete": "string",
            update: "string",
        },
        type: "string",
        websocket: false,
    });
    
    type: ionoscloud:ApigatewayRoute
    properties:
        gatewayId: string
        methods:
            - string
        name: string
        paths:
            - string
        timeouts:
            create: string
            default: string
            delete: string
            update: string
        type: string
        upstreams:
            - host: string
              loadbalancer: string
              port: 0
              scheme: string
              weight: 0
        websocket: false
    

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

    GatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    Methods List<string>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    Paths List<string>
    [list] The paths that the route should match. Minimum items: 1.
    Upstreams List<ApigatewayRouteUpstream>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    Name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    Timeouts ApigatewayRouteTimeouts
    Type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    Websocket bool
    [bool] To enable websocket support. Default value: false.
    GatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    Methods []string
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    Paths []string
    [list] The paths that the route should match. Minimum items: 1.
    Upstreams []ApigatewayRouteUpstreamArgs
    Upstreams information of the API Gateway Route. Minimum items: 1.
    Name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    Timeouts ApigatewayRouteTimeoutsArgs
    Type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    Websocket bool
    [bool] To enable websocket support. Default value: false.
    gatewayId String
    [string] The ID of the API Gateway that the route belongs to.
    methods List<String>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    paths List<String>
    [list] The paths that the route should match. Minimum items: 1.
    upstreams List<ApigatewayRouteUpstream>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    name String
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    timeouts ApigatewayRouteTimeouts
    type String
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    websocket Boolean
    [bool] To enable websocket support. Default value: false.
    gatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    methods string[]
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    paths string[]
    [list] The paths that the route should match. Minimum items: 1.
    upstreams ApigatewayRouteUpstream[]
    Upstreams information of the API Gateway Route. Minimum items: 1.
    name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    timeouts ApigatewayRouteTimeouts
    type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    websocket boolean
    [bool] To enable websocket support. Default value: false.
    gateway_id str
    [string] The ID of the API Gateway that the route belongs to.
    methods Sequence[str]
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    paths Sequence[str]
    [list] The paths that the route should match. Minimum items: 1.
    upstreams Sequence[ApigatewayRouteUpstreamArgs]
    Upstreams information of the API Gateway Route. Minimum items: 1.
    name str
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    timeouts ApigatewayRouteTimeoutsArgs
    type str
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    websocket bool
    [bool] To enable websocket support. Default value: false.
    gatewayId String
    [string] The ID of the API Gateway that the route belongs to.
    methods List<String>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    paths List<String>
    [list] The paths that the route should match. Minimum items: 1.
    upstreams List<Property Map>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    name String
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    timeouts Property Map
    type String
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    websocket Boolean
    [bool] To enable websocket support. Default value: false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApigatewayRoute 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 ApigatewayRoute Resource

    Get an existing ApigatewayRoute 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?: ApigatewayRouteState, opts?: CustomResourceOptions): ApigatewayRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            gateway_id: Optional[str] = None,
            methods: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            paths: Optional[Sequence[str]] = None,
            timeouts: Optional[ApigatewayRouteTimeoutsArgs] = None,
            type: Optional[str] = None,
            upstreams: Optional[Sequence[ApigatewayRouteUpstreamArgs]] = None,
            websocket: Optional[bool] = None) -> ApigatewayRoute
    func GetApigatewayRoute(ctx *Context, name string, id IDInput, state *ApigatewayRouteState, opts ...ResourceOption) (*ApigatewayRoute, error)
    public static ApigatewayRoute Get(string name, Input<string> id, ApigatewayRouteState? state, CustomResourceOptions? opts = null)
    public static ApigatewayRoute get(String name, Output<String> id, ApigatewayRouteState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:ApigatewayRoute    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:
    GatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    Methods List<string>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    Name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    Paths List<string>
    [list] The paths that the route should match. Minimum items: 1.
    Timeouts ApigatewayRouteTimeouts
    Type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    Upstreams List<ApigatewayRouteUpstream>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    Websocket bool
    [bool] To enable websocket support. Default value: false.
    GatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    Methods []string
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    Name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    Paths []string
    [list] The paths that the route should match. Minimum items: 1.
    Timeouts ApigatewayRouteTimeoutsArgs
    Type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    Upstreams []ApigatewayRouteUpstreamArgs
    Upstreams information of the API Gateway Route. Minimum items: 1.
    Websocket bool
    [bool] To enable websocket support. Default value: false.
    gatewayId String
    [string] The ID of the API Gateway that the route belongs to.
    methods List<String>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    name String
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    paths List<String>
    [list] The paths that the route should match. Minimum items: 1.
    timeouts ApigatewayRouteTimeouts
    type String
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    upstreams List<ApigatewayRouteUpstream>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    websocket Boolean
    [bool] To enable websocket support. Default value: false.
    gatewayId string
    [string] The ID of the API Gateway that the route belongs to.
    methods string[]
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    name string
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    paths string[]
    [list] The paths that the route should match. Minimum items: 1.
    timeouts ApigatewayRouteTimeouts
    type string
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    upstreams ApigatewayRouteUpstream[]
    Upstreams information of the API Gateway Route. Minimum items: 1.
    websocket boolean
    [bool] To enable websocket support. Default value: false.
    gateway_id str
    [string] The ID of the API Gateway that the route belongs to.
    methods Sequence[str]
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    name str
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    paths Sequence[str]
    [list] The paths that the route should match. Minimum items: 1.
    timeouts ApigatewayRouteTimeoutsArgs
    type str
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    upstreams Sequence[ApigatewayRouteUpstreamArgs]
    Upstreams information of the API Gateway Route. Minimum items: 1.
    websocket bool
    [bool] To enable websocket support. Default value: false.
    gatewayId String
    [string] The ID of the API Gateway that the route belongs to.
    methods List<String>
    [list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, CONNECT, TRACE.
    name String
    [string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
    paths List<String>
    [list] The paths that the route should match. Minimum items: 1.
    timeouts Property Map
    type String
    [string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http.
    upstreams List<Property Map>
    Upstreams information of the API Gateway Route. Minimum items: 1.
    websocket Boolean
    [bool] To enable websocket support. Default value: false.

    Supporting Types

    ApigatewayRouteTimeouts, ApigatewayRouteTimeoutsArgs

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    ApigatewayRouteUpstream, ApigatewayRouteUpstreamArgs

    Host string
    [string] The host of the upstream.
    Loadbalancer string
    [string] The load balancer algorithm. Default value: roundrobin.
    Port double
    [int] The port of the upstream. Default value: 80.
    Scheme string
    [string] The target URL of the upstream. Default value: http.
    Weight double
    [int] Weight with which to split traffic to the upstream. Default value: 100.
    Host string
    [string] The host of the upstream.
    Loadbalancer string
    [string] The load balancer algorithm. Default value: roundrobin.
    Port float64
    [int] The port of the upstream. Default value: 80.
    Scheme string
    [string] The target URL of the upstream. Default value: http.
    Weight float64
    [int] Weight with which to split traffic to the upstream. Default value: 100.
    host String
    [string] The host of the upstream.
    loadbalancer String
    [string] The load balancer algorithm. Default value: roundrobin.
    port Double
    [int] The port of the upstream. Default value: 80.
    scheme String
    [string] The target URL of the upstream. Default value: http.
    weight Double
    [int] Weight with which to split traffic to the upstream. Default value: 100.
    host string
    [string] The host of the upstream.
    loadbalancer string
    [string] The load balancer algorithm. Default value: roundrobin.
    port number
    [int] The port of the upstream. Default value: 80.
    scheme string
    [string] The target URL of the upstream. Default value: http.
    weight number
    [int] Weight with which to split traffic to the upstream. Default value: 100.
    host str
    [string] The host of the upstream.
    loadbalancer str
    [string] The load balancer algorithm. Default value: roundrobin.
    port float
    [int] The port of the upstream. Default value: 80.
    scheme str
    [string] The target URL of the upstream. Default value: http.
    weight float
    [int] Weight with which to split traffic to the upstream. Default value: 100.
    host String
    [string] The host of the upstream.
    loadbalancer String
    [string] The load balancer algorithm. Default value: roundrobin.
    port Number
    [int] The port of the upstream. Default value: 80.
    scheme String
    [string] The target URL of the upstream. Default value: http.
    weight Number
    [int] Weight with which to split traffic to the upstream. Default value: 100.

    Import

    API Gateway route can be imported using the apigateway route id:

    $ pulumi import ionoscloud:index/apigatewayRoute:ApigatewayRoute myroute apigateway uuid:apigateway route uuid
    

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

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud