1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. apig
  6. Route
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi

    Provides a APIG Route resource.

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

    NOTE: Available since v1.287.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const routeHttpapiArr = new alicloud.apig.HttpApi("route_httpapi_arr", {
        httpApiName: "cspec-route-arr-httpapi",
        protocols: ["HTTP"],
        type: "Rest",
        description: "array example httpapi",
        basePath: "/cspec-route-arr",
    });
    const _default = new alicloud.apig.Route("default", {
        domainInfos: [
            {},
            {},
        ],
        backend: {
            services: [
                {
                    version: "v1.0",
                    port: 8080,
                    protocol: "HTTP",
                    weight: 70,
                    serviceId: "svc-a",
                },
                {
                    version: "v1.0",
                    port: 8081,
                    protocol: "HTTP",
                    weight: 30,
                    serviceId: "svc-b",
                },
            ],
            scene: "SingleService",
        },
        description: "array route description",
        routeName: "cspec-arr-route",
        httpApiId: routeHttpapiArr.id,
        match: {
            path: {
                type: "Prefix",
                value: "/arr-path",
            },
            headers: [
                {
                    type: "Exact",
                    value: "v1",
                    name: "h1",
                },
                {
                    type: "Prefix",
                    value: "v2",
                    name: "h2",
                },
            ],
            queryParams: [
                {
                    type: "Exact",
                    value: "v1",
                    name: "q1",
                },
                {
                    type: "Prefix",
                    value: "v2",
                    name: "q2",
                },
            ],
            methods: [
                "GET",
                "POST",
                "PUT",
            ],
            ignoreUriCase: false,
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    route_httpapi_arr = alicloud.apig.HttpApi("route_httpapi_arr",
        http_api_name="cspec-route-arr-httpapi",
        protocols=["HTTP"],
        type="Rest",
        description="array example httpapi",
        base_path="/cspec-route-arr")
    default = alicloud.apig.Route("default",
        domain_infos=[
            {},
            {},
        ],
        backend={
            "services": [
                {
                    "version": "v1.0",
                    "port": 8080,
                    "protocol": "HTTP",
                    "weight": 70,
                    "service_id": "svc-a",
                },
                {
                    "version": "v1.0",
                    "port": 8081,
                    "protocol": "HTTP",
                    "weight": 30,
                    "service_id": "svc-b",
                },
            ],
            "scene": "SingleService",
        },
        description="array route description",
        route_name="cspec-arr-route",
        http_api_id=route_httpapi_arr.id,
        match={
            "path": {
                "type": "Prefix",
                "value": "/arr-path",
            },
            "headers": [
                {
                    "type": "Exact",
                    "value": "v1",
                    "name": "h1",
                },
                {
                    "type": "Prefix",
                    "value": "v2",
                    "name": "h2",
                },
            ],
            "query_params": [
                {
                    "type": "Exact",
                    "value": "v1",
                    "name": "q1",
                },
                {
                    "type": "Prefix",
                    "value": "v2",
                    "name": "q2",
                },
            ],
            "methods": [
                "GET",
                "POST",
                "PUT",
            ],
            "ignore_uri_case": False,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		routeHttpapiArr, err := apig.NewHttpApi(ctx, "route_httpapi_arr", &apig.HttpApiArgs{
    			HttpApiName: pulumi.String("cspec-route-arr-httpapi"),
    			Protocols: pulumi.StringArray{
    				pulumi.String("HTTP"),
    			},
    			Type:        pulumi.String("Rest"),
    			Description: pulumi.String("array example httpapi"),
    			BasePath:    pulumi.String("/cspec-route-arr"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apig.NewRoute(ctx, "default", &apig.RouteArgs{
    			DomainInfos: []map[string]interface{}{
    				map[string]interface{}{},
    				map[string]interface{}{},
    			},
    			Backend: &apig.RouteBackendArgs{
    				Services: apig.RouteBackendServiceArray{
    					&apig.RouteBackendServiceArgs{
    						Version:   pulumi.String("v1.0"),
    						Port:      pulumi.Int(8080),
    						Protocol:  pulumi.String("HTTP"),
    						Weight:    pulumi.Int(70),
    						ServiceId: pulumi.String("svc-a"),
    					},
    					&apig.RouteBackendServiceArgs{
    						Version:   pulumi.String("v1.0"),
    						Port:      pulumi.Int(8081),
    						Protocol:  pulumi.String("HTTP"),
    						Weight:    pulumi.Int(30),
    						ServiceId: pulumi.String("svc-b"),
    					},
    				},
    				Scene: pulumi.String("SingleService"),
    			},
    			Description: pulumi.String("array route description"),
    			RouteName:   pulumi.String("cspec-arr-route"),
    			HttpApiId:   routeHttpapiArr.ID().ToIDOutput().ToStringOutput(),
    			Match: &apig.RouteMatchArgs{
    				Path: &apig.RouteMatchPathArgs{
    					Type:  pulumi.String("Prefix"),
    					Value: pulumi.String("/arr-path"),
    				},
    				Headers: apig.RouteMatchHeaderArray{
    					&apig.RouteMatchHeaderArgs{
    						Type:  pulumi.String("Exact"),
    						Value: pulumi.String("v1"),
    						Name:  pulumi.String("h1"),
    					},
    					&apig.RouteMatchHeaderArgs{
    						Type:  pulumi.String("Prefix"),
    						Value: pulumi.String("v2"),
    						Name:  pulumi.String("h2"),
    					},
    				},
    				QueryParams: apig.RouteMatchQueryParamArray{
    					&apig.RouteMatchQueryParamArgs{
    						Type:  pulumi.String("Exact"),
    						Value: pulumi.String("v1"),
    						Name:  pulumi.String("q1"),
    					},
    					&apig.RouteMatchQueryParamArgs{
    						Type:  pulumi.String("Prefix"),
    						Value: pulumi.String("v2"),
    						Name:  pulumi.String("q2"),
    					},
    				},
    				Methods: pulumi.StringArray{
    					pulumi.String("GET"),
    					pulumi.String("POST"),
    					pulumi.String("PUT"),
    				},
    				IgnoreUriCase: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var routeHttpapiArr = new AliCloud.Apig.HttpApi("route_httpapi_arr", new()
        {
            HttpApiName = "cspec-route-arr-httpapi",
            Protocols = new[]
            {
                "HTTP",
            },
            Type = "Rest",
            Description = "array example httpapi",
            BasePath = "/cspec-route-arr",
        });
    
        var @default = new AliCloud.Apig.Route("default", new()
        {
            DomainInfos = new[]
            {
                null,
                null,
            },
            Backend = new AliCloud.Apig.Inputs.RouteBackendArgs
            {
                Services = new[]
                {
                    new AliCloud.Apig.Inputs.RouteBackendServiceArgs
                    {
                        Version = "v1.0",
                        Port = 8080,
                        Protocol = "HTTP",
                        Weight = 70,
                        ServiceId = "svc-a",
                    },
                    new AliCloud.Apig.Inputs.RouteBackendServiceArgs
                    {
                        Version = "v1.0",
                        Port = 8081,
                        Protocol = "HTTP",
                        Weight = 30,
                        ServiceId = "svc-b",
                    },
                },
                Scene = "SingleService",
            },
            Description = "array route description",
            RouteName = "cspec-arr-route",
            HttpApiId = routeHttpapiArr.Id,
            Match = new AliCloud.Apig.Inputs.RouteMatchArgs
            {
                Path = new AliCloud.Apig.Inputs.RouteMatchPathArgs
                {
                    Type = "Prefix",
                    Value = "/arr-path",
                },
                Headers = new[]
                {
                    new AliCloud.Apig.Inputs.RouteMatchHeaderArgs
                    {
                        Type = "Exact",
                        Value = "v1",
                        Name = "h1",
                    },
                    new AliCloud.Apig.Inputs.RouteMatchHeaderArgs
                    {
                        Type = "Prefix",
                        Value = "v2",
                        Name = "h2",
                    },
                },
                QueryParams = new[]
                {
                    new AliCloud.Apig.Inputs.RouteMatchQueryParamArgs
                    {
                        Type = "Exact",
                        Value = "v1",
                        Name = "q1",
                    },
                    new AliCloud.Apig.Inputs.RouteMatchQueryParamArgs
                    {
                        Type = "Prefix",
                        Value = "v2",
                        Name = "q2",
                    },
                },
                Methods = new[]
                {
                    "GET",
                    "POST",
                    "PUT",
                },
                IgnoreUriCase = false,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.apig.HttpApi;
    import com.pulumi.alicloud.apig.HttpApiArgs;
    import com.pulumi.alicloud.apig.Route;
    import com.pulumi.alicloud.apig.RouteArgs;
    import com.pulumi.alicloud.apig.inputs.RouteBackendArgs;
    import com.pulumi.alicloud.apig.inputs.RouteBackendServiceArgs;
    import com.pulumi.alicloud.apig.inputs.RouteMatchArgs;
    import com.pulumi.alicloud.apig.inputs.RouteMatchPathArgs;
    import com.pulumi.alicloud.apig.inputs.RouteMatchHeaderArgs;
    import com.pulumi.alicloud.apig.inputs.RouteMatchQueryParamArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var routeHttpapiArr = new HttpApi("routeHttpapiArr", HttpApiArgs.builder()
                .httpApiName("cspec-route-arr-httpapi")
                .protocols("HTTP")
                .type("Rest")
                .description("array example httpapi")
                .basePath("/cspec-route-arr")
                .build());
    
            var default_ = new Route("default", RouteArgs.builder()
                .domainInfos(Arrays.asList(            
                    Map.ofEntries(
                    ),
                    Map.ofEntries(
                    )))
                .backend(RouteBackendArgs.builder()
                    .services(                
                        RouteBackendServiceArgs.builder()
                            .version("v1.0")
                            .port(8080)
                            .protocol("HTTP")
                            .weight(70)
                            .serviceId("svc-a")
                            .build(),
                        RouteBackendServiceArgs.builder()
                            .version("v1.0")
                            .port(8081)
                            .protocol("HTTP")
                            .weight(30)
                            .serviceId("svc-b")
                            .build())
                    .scene("SingleService")
                    .build())
                .description("array route description")
                .routeName("cspec-arr-route")
                .httpApiId(routeHttpapiArr.id())
                .match(RouteMatchArgs.builder()
                    .path(RouteMatchPathArgs.builder()
                        .type("Prefix")
                        .value("/arr-path")
                        .build())
                    .headers(                
                        RouteMatchHeaderArgs.builder()
                            .type("Exact")
                            .value("v1")
                            .name("h1")
                            .build(),
                        RouteMatchHeaderArgs.builder()
                            .type("Prefix")
                            .value("v2")
                            .name("h2")
                            .build())
                    .queryParams(                
                        RouteMatchQueryParamArgs.builder()
                            .type("Exact")
                            .value("v1")
                            .name("q1")
                            .build(),
                        RouteMatchQueryParamArgs.builder()
                            .type("Prefix")
                            .value("v2")
                            .name("q2")
                            .build())
                    .methods(                
                        "GET",
                        "POST",
                        "PUT")
                    .ignoreUriCase(false)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      routeHttpapiArr:
        type: alicloud:apig:HttpApi
        name: route_httpapi_arr
        properties:
          httpApiName: cspec-route-arr-httpapi
          protocols:
            - HTTP
          type: Rest
          description: array example httpapi
          basePath: /cspec-route-arr
      default:
        type: alicloud:apig:Route
        properties:
          domainInfos:
            - {}
            - {}
          backend:
            services:
              - version: v1.0
                port: '8080'
                protocol: HTTP
                weight: '70'
                serviceId: svc-a
              - version: v1.0
                port: '8081'
                protocol: HTTP
                weight: '30'
                serviceId: svc-b
            scene: SingleService
          description: array route description
          routeName: cspec-arr-route
          httpApiId: ${routeHttpapiArr.id}
          match:
            path:
              type: Prefix
              value: /arr-path
            headers:
              - type: Exact
                value: v1
                name: h1
              - type: Prefix
                value: v2
                name: h2
            queryParams:
              - type: Exact
                value: v1
                name: q1
              - type: Prefix
                value: v2
                name: q2
            methods:
              - GET
              - POST
              - PUT
            ignoreUriCase: false
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_apig_httpapi" "route_httpapi_arr" {
      http_api_name = "cspec-route-arr-httpapi"
      protocols     = ["HTTP"]
      type          = "Rest"
      description   = "array example httpapi"
      base_path     = "/cspec-route-arr"
    }
    resource "alicloud_apig_route" "default" {
      domain_infos = [{}, {}]
      backend = {
        services = [{
          "version"   = "v1.0"
          "port"      = "8080"
          "protocol"  = "HTTP"
          "weight"    = "70"
          "serviceId" = "svc-a"
          }, {
          "version"   = "v1.0"
          "port"      = "8081"
          "protocol"  = "HTTP"
          "weight"    = "30"
          "serviceId" = "svc-b"
        }]
        scene = "SingleService"
      }
      description = "array route description"
      route_name  = "cspec-arr-route"
      http_api_id = alicloud_apig_httpapi.route_httpapi_arr.id
      match = {
        path = {
          type  = "Prefix"
          value = "/arr-path"
        }
        headers = [{
          "type"  = "Exact"
          "value" = "v1"
          "name"  = "h1"
          }, {
          "type"  = "Prefix"
          "value" = "v2"
          "name"  = "h2"
        }]
        query_params = [{
          "type"  = "Exact"
          "value" = "v1"
          "name"  = "q1"
          }, {
          "type"  = "Prefix"
          "value" = "v2"
          "name"  = "q2"
        }]
        methods         = ["GET", "POST", "PUT"]
        ignore_uri_case = false
      }
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Route Resource

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

    Constructor syntax

    new Route(name: string, args?: RouteArgs, opts?: CustomResourceOptions);
    @overload
    def Route(resource_name: str,
              args: Optional[RouteArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Route(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              backend: Optional[RouteBackendArgs] = None,
              description: Optional[str] = None,
              domain_ids: Optional[Sequence[str]] = None,
              environment_info: Optional[RouteEnvironmentInfoArgs] = None,
              http_api_id: Optional[str] = None,
              match: Optional[RouteMatchArgs] = None,
              route_name: Optional[str] = None)
    func NewRoute(ctx *Context, name string, args *RouteArgs, opts ...ResourceOption) (*Route, error)
    public Route(string name, RouteArgs? args = null, CustomResourceOptions? opts = null)
    public Route(String name, RouteArgs args)
    public Route(String name, RouteArgs args, CustomResourceOptions options)
    
    type: alicloud:apig:Route
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_apig_route" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args RouteArgs
    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 RouteArgs
    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 RouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouteArgs
    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 routeResource = new AliCloud.Apig.Route("routeResource", new()
    {
        Backend = new AliCloud.Apig.Inputs.RouteBackendArgs
        {
            Scene = "string",
            Services = new[]
            {
                new AliCloud.Apig.Inputs.RouteBackendServiceArgs
                {
                    Name = "string",
                    Port = 0,
                    Protocol = "string",
                    ServiceId = "string",
                    Version = "string",
                    Weight = 0,
                },
            },
        },
        Description = "string",
        DomainIds = new[]
        {
            "string",
        },
        EnvironmentInfo = new AliCloud.Apig.Inputs.RouteEnvironmentInfoArgs
        {
            Alias = "string",
            EnvironmentId = "string",
            GatewayInfos = new[]
            {
                new AliCloud.Apig.Inputs.RouteEnvironmentInfoGatewayInfoArgs
                {
                    GatewayEdition = "string",
                    GatewayId = "string",
                    Name = "string",
                },
            },
            Name = "string",
            SubDomains = new[]
            {
                new AliCloud.Apig.Inputs.RouteEnvironmentInfoSubDomainArgs
                {
                    DomainId = "string",
                    Name = "string",
                    NetworkType = "string",
                    Protocol = "string",
                },
            },
        },
        HttpApiId = "string",
        Match = new AliCloud.Apig.Inputs.RouteMatchArgs
        {
            Headers = new[]
            {
                new AliCloud.Apig.Inputs.RouteMatchHeaderArgs
                {
                    Name = "string",
                    Type = "string",
                    Value = "string",
                },
            },
            IgnoreUriCase = false,
            Methods = new[]
            {
                "string",
            },
            Path = new AliCloud.Apig.Inputs.RouteMatchPathArgs
            {
                Type = "string",
                Value = "string",
            },
            QueryParams = new[]
            {
                new AliCloud.Apig.Inputs.RouteMatchQueryParamArgs
                {
                    Name = "string",
                    Type = "string",
                    Value = "string",
                },
            },
        },
        RouteName = "string",
    });
    
    example, err := apig.NewRoute(ctx, "routeResource", &apig.RouteArgs{
    	Backend: &apig.RouteBackendArgs{
    		Scene: pulumi.String("string"),
    		Services: apig.RouteBackendServiceArray{
    			&apig.RouteBackendServiceArgs{
    				Name:      pulumi.String("string"),
    				Port:      pulumi.Int(0),
    				Protocol:  pulumi.String("string"),
    				ServiceId: pulumi.String("string"),
    				Version:   pulumi.String("string"),
    				Weight:    pulumi.Int(0),
    			},
    		},
    	},
    	Description: pulumi.String("string"),
    	DomainIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EnvironmentInfo: &apig.RouteEnvironmentInfoArgs{
    		Alias:         pulumi.String("string"),
    		EnvironmentId: pulumi.String("string"),
    		GatewayInfos: apig.RouteEnvironmentInfoGatewayInfoArray{
    			&apig.RouteEnvironmentInfoGatewayInfoArgs{
    				GatewayEdition: pulumi.String("string"),
    				GatewayId:      pulumi.String("string"),
    				Name:           pulumi.String("string"),
    			},
    		},
    		Name: pulumi.String("string"),
    		SubDomains: apig.RouteEnvironmentInfoSubDomainArray{
    			&apig.RouteEnvironmentInfoSubDomainArgs{
    				DomainId:    pulumi.String("string"),
    				Name:        pulumi.String("string"),
    				NetworkType: pulumi.String("string"),
    				Protocol:    pulumi.String("string"),
    			},
    		},
    	},
    	HttpApiId: pulumi.String("string"),
    	Match: &apig.RouteMatchArgs{
    		Headers: apig.RouteMatchHeaderArray{
    			&apig.RouteMatchHeaderArgs{
    				Name:  pulumi.String("string"),
    				Type:  pulumi.String("string"),
    				Value: pulumi.String("string"),
    			},
    		},
    		IgnoreUriCase: pulumi.Bool(false),
    		Methods: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Path: &apig.RouteMatchPathArgs{
    			Type:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    		QueryParams: apig.RouteMatchQueryParamArray{
    			&apig.RouteMatchQueryParamArgs{
    				Name:  pulumi.String("string"),
    				Type:  pulumi.String("string"),
    				Value: pulumi.String("string"),
    			},
    		},
    	},
    	RouteName: pulumi.String("string"),
    })
    
    resource "alicloud_apig_route" "routeResource" {
      lifecycle {
        create_before_destroy = true
      }
      backend = {
        scene = "string"
        services = [{
          name       = "string"
          port       = 0
          protocol   = "string"
          service_id = "string"
          version    = "string"
          weight     = 0
        }]
      }
      description = "string"
      domain_ids  = ["string"]
      environment_info = {
        alias          = "string"
        environment_id = "string"
        gateway_infos = [{
          gateway_edition = "string"
          gateway_id      = "string"
          name            = "string"
        }]
        name = "string"
        sub_domains = [{
          domain_id    = "string"
          name         = "string"
          network_type = "string"
          protocol     = "string"
        }]
      }
      http_api_id = "string"
      match = {
        headers = [{
          name  = "string"
          type  = "string"
          value = "string"
        }]
        ignore_uri_case = false
        methods         = ["string"]
        path = {
          type  = "string"
          value = "string"
        }
        query_params = [{
          name  = "string"
          type  = "string"
          value = "string"
        }]
      }
      route_name = "string"
    }
    
    var routeResource = new Route("routeResource", RouteArgs.builder()
        .backend(RouteBackendArgs.builder()
            .scene("string")
            .services(RouteBackendServiceArgs.builder()
                .name("string")
                .port(0)
                .protocol("string")
                .serviceId("string")
                .version("string")
                .weight(0)
                .build())
            .build())
        .description("string")
        .domainIds("string")
        .environmentInfo(RouteEnvironmentInfoArgs.builder()
            .alias("string")
            .environmentId("string")
            .gatewayInfos(RouteEnvironmentInfoGatewayInfoArgs.builder()
                .gatewayEdition("string")
                .gatewayId("string")
                .name("string")
                .build())
            .name("string")
            .subDomains(RouteEnvironmentInfoSubDomainArgs.builder()
                .domainId("string")
                .name("string")
                .networkType("string")
                .protocol("string")
                .build())
            .build())
        .httpApiId("string")
        .match(RouteMatchArgs.builder()
            .headers(RouteMatchHeaderArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .ignoreUriCase(false)
            .methods("string")
            .path(RouteMatchPathArgs.builder()
                .type("string")
                .value("string")
                .build())
            .queryParams(RouteMatchQueryParamArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .build())
        .routeName("string")
        .build());
    
    route_resource = alicloud.apig.Route("routeResource",
        backend={
            "scene": "string",
            "services": [{
                "name": "string",
                "port": 0,
                "protocol": "string",
                "service_id": "string",
                "version": "string",
                "weight": 0,
            }],
        },
        description="string",
        domain_ids=["string"],
        environment_info={
            "alias": "string",
            "environment_id": "string",
            "gateway_infos": [{
                "gateway_edition": "string",
                "gateway_id": "string",
                "name": "string",
            }],
            "name": "string",
            "sub_domains": [{
                "domain_id": "string",
                "name": "string",
                "network_type": "string",
                "protocol": "string",
            }],
        },
        http_api_id="string",
        match={
            "headers": [{
                "name": "string",
                "type": "string",
                "value": "string",
            }],
            "ignore_uri_case": False,
            "methods": ["string"],
            "path": {
                "type": "string",
                "value": "string",
            },
            "query_params": [{
                "name": "string",
                "type": "string",
                "value": "string",
            }],
        },
        route_name="string")
    
    const routeResource = new alicloud.apig.Route("routeResource", {
        backend: {
            scene: "string",
            services: [{
                name: "string",
                port: 0,
                protocol: "string",
                serviceId: "string",
                version: "string",
                weight: 0,
            }],
        },
        description: "string",
        domainIds: ["string"],
        environmentInfo: {
            alias: "string",
            environmentId: "string",
            gatewayInfos: [{
                gatewayEdition: "string",
                gatewayId: "string",
                name: "string",
            }],
            name: "string",
            subDomains: [{
                domainId: "string",
                name: "string",
                networkType: "string",
                protocol: "string",
            }],
        },
        httpApiId: "string",
        match: {
            headers: [{
                name: "string",
                type: "string",
                value: "string",
            }],
            ignoreUriCase: false,
            methods: ["string"],
            path: {
                type: "string",
                value: "string",
            },
            queryParams: [{
                name: "string",
                type: "string",
                value: "string",
            }],
        },
        routeName: "string",
    });
    
    type: alicloud:apig:Route
    properties:
        backend:
            scene: string
            services:
                - name: string
                  port: 0
                  protocol: string
                  serviceId: string
                  version: string
                  weight: 0
        description: string
        domainIds:
            - string
        environmentInfo:
            alias: string
            environmentId: string
            gatewayInfos:
                - gatewayEdition: string
                  gatewayId: string
                  name: string
            name: string
            subDomains:
                - domainId: string
                  name: string
                  networkType: string
                  protocol: string
        httpApiId: string
        match:
            headers:
                - name: string
                  type: string
                  value: string
            ignoreUriCase: false
            methods:
                - string
            path:
                type: string
                value: string
            queryParams:
                - name: string
                  type: string
                  value: string
        routeName: string
    

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

    Backend Pulumi.AliCloud.Apig.Inputs.RouteBackend
    Backend service. See backend below.
    Description string
    The description of the route.
    DomainIds List<string>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    EnvironmentInfo Pulumi.AliCloud.Apig.Inputs.RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    HttpApiId string
    The ID of the HTTP API to which the route belongs.
    Match Pulumi.AliCloud.Apig.Inputs.RouteMatch
    The route match rule. See match below.
    RouteName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    Backend RouteBackendArgs
    Backend service. See backend below.
    Description string
    The description of the route.
    DomainIds []string

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    EnvironmentInfo RouteEnvironmentInfoArgs
    The environment information of the route. See environmentInfo below.
    HttpApiId string
    The ID of the HTTP API to which the route belongs.
    Match RouteMatchArgs
    The route match rule. See match below.
    RouteName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    backend object
    Backend service. See backend below.
    description string
    The description of the route.
    domain_ids list(string)

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environment_info object
    The environment information of the route. See environmentInfo below.
    http_api_id string
    The ID of the HTTP API to which the route belongs.
    match object
    The route match rule. See match below.
    route_name string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    backend RouteBackend
    Backend service. See backend below.
    description String
    The description of the route.
    domainIds List<String>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    httpApiId String
    The ID of the HTTP API to which the route belongs.
    match RouteMatch
    The route match rule. See match below.
    routeName String

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    backend RouteBackend
    Backend service. See backend below.
    description string
    The description of the route.
    domainIds string[]

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    httpApiId string
    The ID of the HTTP API to which the route belongs.
    match RouteMatch
    The route match rule. See match below.
    routeName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    backend RouteBackendArgs
    Backend service. See backend below.
    description str
    The description of the route.
    domain_ids Sequence[str]

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environment_info RouteEnvironmentInfoArgs
    The environment information of the route. See environmentInfo below.
    http_api_id str
    The ID of the HTTP API to which the route belongs.
    match RouteMatchArgs
    The route match rule. See match below.
    route_name str

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    backend Property Map
    Backend service. See backend below.
    description String
    The description of the route.
    domainIds List<String>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo Property Map
    The environment information of the route. See environmentInfo below.
    httpApiId String
    The ID of the HTTP API to which the route belongs.
    match Property Map
    The route match rule. See match below.
    routeName String

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    Outputs

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

    Builtin string
    Indicates whether the route is a built-in route.
    CreateTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    GatewayStatus Dictionary<string, string>
    The publishing status of the route on each gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    Status string
    The deployment status of the route.
    UpdateTime string
    The update time in Greenwich Mean Time (GMT).
    Builtin string
    Indicates whether the route is a built-in route.
    CreateTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    GatewayStatus map[string]string
    The publishing status of the route on each gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    Status string
    The deployment status of the route.
    UpdateTime string
    The update time in Greenwich Mean Time (GMT).
    builtin string
    Indicates whether the route is a built-in route.
    create_time string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    gateway_status map(string)
    The publishing status of the route on each gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    route_id string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    status string
    The deployment status of the route.
    update_time string
    The update time in Greenwich Mean Time (GMT).
    builtin String
    Indicates whether the route is a built-in route.
    createTime String
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    gatewayStatus Map<String,String>
    The publishing status of the route on each gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    The unique identifier of the APIG HTTP API route generated by the service backend.
    status String
    The deployment status of the route.
    updateTime String
    The update time in Greenwich Mean Time (GMT).
    builtin string
    Indicates whether the route is a built-in route.
    createTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    gatewayStatus {[key: string]: string}
    The publishing status of the route on each gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    routeId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    status string
    The deployment status of the route.
    updateTime string
    The update time in Greenwich Mean Time (GMT).
    builtin str
    Indicates whether the route is a built-in route.
    create_time str
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    gateway_status Mapping[str, str]
    The publishing status of the route on each gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    route_id str
    The unique identifier of the APIG HTTP API route generated by the service backend.
    status str
    The deployment status of the route.
    update_time str
    The update time in Greenwich Mean Time (GMT).
    builtin String
    Indicates whether the route is a built-in route.
    createTime String
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    gatewayStatus Map<String>
    The publishing status of the route on each gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    The unique identifier of the APIG HTTP API route generated by the service backend.
    status String
    The deployment status of the route.
    updateTime String
    The update time in Greenwich Mean Time (GMT).

    Look up Existing Route Resource

    Get an existing Route 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?: RouteState, opts?: CustomResourceOptions): Route
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[RouteBackendArgs] = None,
            builtin: Optional[str] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            domain_ids: Optional[Sequence[str]] = None,
            environment_info: Optional[RouteEnvironmentInfoArgs] = None,
            gateway_status: Optional[Mapping[str, str]] = None,
            http_api_id: Optional[str] = None,
            match: Optional[RouteMatchArgs] = None,
            route_id: Optional[str] = None,
            route_name: Optional[str] = None,
            status: Optional[str] = None,
            update_time: Optional[str] = None) -> Route
    func GetRoute(ctx *Context, name string, id IDInput, state *RouteState, opts ...ResourceOption) (*Route, error)
    public static Route Get(string name, Input<string> id, RouteState? state, CustomResourceOptions? opts = null)
    public static Route get(String name, Output<String> id, RouteState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:apig:Route    get:      id: ${id}
    import {
      to = alicloud_apig_route.example
      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:
    Backend Pulumi.AliCloud.Apig.Inputs.RouteBackend
    Backend service. See backend below.
    Builtin string
    Indicates whether the route is a built-in route.
    CreateTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    Description string
    The description of the route.
    DomainIds List<string>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    EnvironmentInfo Pulumi.AliCloud.Apig.Inputs.RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    GatewayStatus Dictionary<string, string>
    The publishing status of the route on each gateway.
    HttpApiId string
    The ID of the HTTP API to which the route belongs.
    Match Pulumi.AliCloud.Apig.Inputs.RouteMatch
    The route match rule. See match below.
    RouteId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    RouteName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    Status string
    The deployment status of the route.
    UpdateTime string
    The update time in Greenwich Mean Time (GMT).
    Backend RouteBackendArgs
    Backend service. See backend below.
    Builtin string
    Indicates whether the route is a built-in route.
    CreateTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    Description string
    The description of the route.
    DomainIds []string

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    EnvironmentInfo RouteEnvironmentInfoArgs
    The environment information of the route. See environmentInfo below.
    GatewayStatus map[string]string
    The publishing status of the route on each gateway.
    HttpApiId string
    The ID of the HTTP API to which the route belongs.
    Match RouteMatchArgs
    The route match rule. See match below.
    RouteId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    RouteName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    Status string
    The deployment status of the route.
    UpdateTime string
    The update time in Greenwich Mean Time (GMT).
    backend object
    Backend service. See backend below.
    builtin string
    Indicates whether the route is a built-in route.
    create_time string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    description string
    The description of the route.
    domain_ids list(string)

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environment_info object
    The environment information of the route. See environmentInfo below.
    gateway_status map(string)
    The publishing status of the route on each gateway.
    http_api_id string
    The ID of the HTTP API to which the route belongs.
    match object
    The route match rule. See match below.
    route_id string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    route_name string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    status string
    The deployment status of the route.
    update_time string
    The update time in Greenwich Mean Time (GMT).
    backend RouteBackend
    Backend service. See backend below.
    builtin String
    Indicates whether the route is a built-in route.
    createTime String
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    description String
    The description of the route.
    domainIds List<String>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    gatewayStatus Map<String,String>
    The publishing status of the route on each gateway.
    httpApiId String
    The ID of the HTTP API to which the route belongs.
    match RouteMatch
    The route match rule. See match below.
    routeId String
    The unique identifier of the APIG HTTP API route generated by the service backend.
    routeName String

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    status String
    The deployment status of the route.
    updateTime String
    The update time in Greenwich Mean Time (GMT).
    backend RouteBackend
    Backend service. See backend below.
    builtin string
    Indicates whether the route is a built-in route.
    createTime string
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    description string
    The description of the route.
    domainIds string[]

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo RouteEnvironmentInfo
    The environment information of the route. See environmentInfo below.
    gatewayStatus {[key: string]: string}
    The publishing status of the route on each gateway.
    httpApiId string
    The ID of the HTTP API to which the route belongs.
    match RouteMatch
    The route match rule. See match below.
    routeId string
    The unique identifier of the APIG HTTP API route generated by the service backend.
    routeName string

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    status string
    The deployment status of the route.
    updateTime string
    The update time in Greenwich Mean Time (GMT).
    backend RouteBackendArgs
    Backend service. See backend below.
    builtin str
    Indicates whether the route is a built-in route.
    create_time str
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    description str
    The description of the route.
    domain_ids Sequence[str]

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environment_info RouteEnvironmentInfoArgs
    The environment information of the route. See environmentInfo below.
    gateway_status Mapping[str, str]
    The publishing status of the route on each gateway.
    http_api_id str
    The ID of the HTTP API to which the route belongs.
    match RouteMatchArgs
    The route match rule. See match below.
    route_id str
    The unique identifier of the APIG HTTP API route generated by the service backend.
    route_name str

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    status str
    The deployment status of the route.
    update_time str
    The update time in Greenwich Mean Time (GMT).
    backend Property Map
    Backend service. See backend below.
    builtin String
    Indicates whether the route is a built-in route.
    createTime String
    The creation time in UTC format: yyyy-MM-ddTHH:mm:ssZ.
    description String
    The description of the route.
    domainIds List<String>

    The list of domain name identifiers associated with this APIG route for inbound traffic routing.

    NOTE: This parameter is only evaluated during resource creation and update. Modifying it in isolation will not trigger any action.

    environmentInfo Property Map
    The environment information of the route. See environmentInfo below.
    gatewayStatus Map<String>
    The publishing status of the route on each gateway.
    httpApiId String
    The ID of the HTTP API to which the route belongs.
    match Property Map
    The route match rule. See match below.
    routeId String
    The unique identifier of the APIG HTTP API route generated by the service backend.
    routeName String

    The name of the route.

    NOTE: This parameter is immutable. Changing it after creation has no effect.

    status String
    The deployment status of the route.
    updateTime String
    The update time in Greenwich Mean Time (GMT).

    Supporting Types

    RouteBackend, RouteBackendArgs

    Scene string
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    Services List<Pulumi.AliCloud.Apig.Inputs.RouteBackendService>
    Backend service. See services below.
    Scene string
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    Services []RouteBackendService
    Backend service. See services below.
    scene string
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    services list(object)
    Backend service. See services below.
    scene String
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    services List<RouteBackendService>
    Backend service. See services below.
    scene string
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    services RouteBackendService[]
    Backend service. See services below.
    scene str
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    services Sequence[RouteBackendService]
    Backend service. See services below.
    scene String
    The backend service scenario.

    • SingleService: Single service.
    • MultiServiceByRatio: Canary release across multiple services by ratio.
    • Mock: Mock service.
    • Redirect: Redirect service.
    services List<Property Map>
    Backend service. See services below.

    RouteBackendService, RouteBackendServiceArgs

    Name string
    The name of the second-level domain name.
    Port int
    Service port. Do not specify this parameter for dynamic ports.
    Protocol string
    The domain protocol, such as HTTP or HTTPS.
    ServiceId string
    The unique identifier of the backend service to which this route forwards traffic.
    Version string
    The version label of the backend service used for routing and canary release scenarios.
    Weight int
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    Name string
    The name of the second-level domain name.
    Port int
    Service port. Do not specify this parameter for dynamic ports.
    Protocol string
    The domain protocol, such as HTTP or HTTPS.
    ServiceId string
    The unique identifier of the backend service to which this route forwards traffic.
    Version string
    The version label of the backend service used for routing and canary release scenarios.
    Weight int
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    name string
    The name of the second-level domain name.
    port number
    Service port. Do not specify this parameter for dynamic ports.
    protocol string
    The domain protocol, such as HTTP or HTTPS.
    service_id string
    The unique identifier of the backend service to which this route forwards traffic.
    version string
    The version label of the backend service used for routing and canary release scenarios.
    weight number
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    name String
    The name of the second-level domain name.
    port Integer
    Service port. Do not specify this parameter for dynamic ports.
    protocol String
    The domain protocol, such as HTTP or HTTPS.
    serviceId String
    The unique identifier of the backend service to which this route forwards traffic.
    version String
    The version label of the backend service used for routing and canary release scenarios.
    weight Integer
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    name string
    The name of the second-level domain name.
    port number
    Service port. Do not specify this parameter for dynamic ports.
    protocol string
    The domain protocol, such as HTTP or HTTPS.
    serviceId string
    The unique identifier of the backend service to which this route forwards traffic.
    version string
    The version label of the backend service used for routing and canary release scenarios.
    weight number
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    name str
    The name of the second-level domain name.
    port int
    Service port. Do not specify this parameter for dynamic ports.
    protocol str
    The domain protocol, such as HTTP or HTTPS.
    service_id str
    The unique identifier of the backend service to which this route forwards traffic.
    version str
    The version label of the backend service used for routing and canary release scenarios.
    weight int
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.
    name String
    The name of the second-level domain name.
    port Number
    Service port. Do not specify this parameter for dynamic ports.
    protocol String
    The domain protocol, such as HTTP or HTTPS.
    serviceId String
    The unique identifier of the backend service to which this route forwards traffic.
    version String
    The version label of the backend service used for routing and canary release scenarios.
    weight Number
    The percentage value of the traffic ratio. You can specify the weight of the service when the scenario is proportional (canary) routing. This parameter is not required in other scenarios.

    RouteEnvironmentInfo, RouteEnvironmentInfoArgs

    Alias string
    The alias of the environment name.
    EnvironmentId string
    The unique identifier of the APIG environment where this route is published and deployed.
    GatewayInfos List<Pulumi.AliCloud.Apig.Inputs.RouteEnvironmentInfoGatewayInfo>
    The gateway instance information corresponding to the environment.
    Name string
    The name of the second-level domain name.
    SubDomains List<Pulumi.AliCloud.Apig.Inputs.RouteEnvironmentInfoSubDomain>
    The default second-level domain names of the environment.
    Alias string
    The alias of the environment name.
    EnvironmentId string
    The unique identifier of the APIG environment where this route is published and deployed.
    GatewayInfos []RouteEnvironmentInfoGatewayInfo
    The gateway instance information corresponding to the environment.
    Name string
    The name of the second-level domain name.
    SubDomains []RouteEnvironmentInfoSubDomain
    The default second-level domain names of the environment.
    alias string
    The alias of the environment name.
    environment_id string
    The unique identifier of the APIG environment where this route is published and deployed.
    gateway_infos list(object)
    The gateway instance information corresponding to the environment.
    name string
    The name of the second-level domain name.
    sub_domains list(object)
    The default second-level domain names of the environment.
    alias String
    The alias of the environment name.
    environmentId String
    The unique identifier of the APIG environment where this route is published and deployed.
    gatewayInfos List<RouteEnvironmentInfoGatewayInfo>
    The gateway instance information corresponding to the environment.
    name String
    The name of the second-level domain name.
    subDomains List<RouteEnvironmentInfoSubDomain>
    The default second-level domain names of the environment.
    alias string
    The alias of the environment name.
    environmentId string
    The unique identifier of the APIG environment where this route is published and deployed.
    gatewayInfos RouteEnvironmentInfoGatewayInfo[]
    The gateway instance information corresponding to the environment.
    name string
    The name of the second-level domain name.
    subDomains RouteEnvironmentInfoSubDomain[]
    The default second-level domain names of the environment.
    alias str
    The alias of the environment name.
    environment_id str
    The unique identifier of the APIG environment where this route is published and deployed.
    gateway_infos Sequence[RouteEnvironmentInfoGatewayInfo]
    The gateway instance information corresponding to the environment.
    name str
    The name of the second-level domain name.
    sub_domains Sequence[RouteEnvironmentInfoSubDomain]
    The default second-level domain names of the environment.
    alias String
    The alias of the environment name.
    environmentId String
    The unique identifier of the APIG environment where this route is published and deployed.
    gatewayInfos List<Property Map>
    The gateway instance information corresponding to the environment.
    name String
    The name of the second-level domain name.
    subDomains List<Property Map>
    The default second-level domain names of the environment.

    RouteEnvironmentInfoGatewayInfo, RouteEnvironmentInfoGatewayInfoArgs

    GatewayEdition string
    The edition of the gateway instance.
    GatewayId string
    The ID of the Cloud-native API Gateway.
    Name string
    The name of the second-level domain name.
    GatewayEdition string
    The edition of the gateway instance.
    GatewayId string
    The ID of the Cloud-native API Gateway.
    Name string
    The name of the second-level domain name.
    gateway_edition string
    The edition of the gateway instance.
    gateway_id string
    The ID of the Cloud-native API Gateway.
    name string
    The name of the second-level domain name.
    gatewayEdition String
    The edition of the gateway instance.
    gatewayId String
    The ID of the Cloud-native API Gateway.
    name String
    The name of the second-level domain name.
    gatewayEdition string
    The edition of the gateway instance.
    gatewayId string
    The ID of the Cloud-native API Gateway.
    name string
    The name of the second-level domain name.
    gateway_edition str
    The edition of the gateway instance.
    gateway_id str
    The ID of the Cloud-native API Gateway.
    name str
    The name of the second-level domain name.
    gatewayEdition String
    The edition of the gateway instance.
    gatewayId String
    The ID of the Cloud-native API Gateway.
    name String
    The name of the second-level domain name.

    RouteEnvironmentInfoSubDomain, RouteEnvironmentInfoSubDomainArgs

    DomainId string
    The ID of the second-level domain name.
    Name string
    The name of the second-level domain name.
    NetworkType string
    The domain access type, such as Intranet or Internet.
    Protocol string
    The domain protocol, such as HTTP or HTTPS.
    DomainId string
    The ID of the second-level domain name.
    Name string
    The name of the second-level domain name.
    NetworkType string
    The domain access type, such as Intranet or Internet.
    Protocol string
    The domain protocol, such as HTTP or HTTPS.
    domain_id string
    The ID of the second-level domain name.
    name string
    The name of the second-level domain name.
    network_type string
    The domain access type, such as Intranet or Internet.
    protocol string
    The domain protocol, such as HTTP or HTTPS.
    domainId String
    The ID of the second-level domain name.
    name String
    The name of the second-level domain name.
    networkType String
    The domain access type, such as Intranet or Internet.
    protocol String
    The domain protocol, such as HTTP or HTTPS.
    domainId string
    The ID of the second-level domain name.
    name string
    The name of the second-level domain name.
    networkType string
    The domain access type, such as Intranet or Internet.
    protocol string
    The domain protocol, such as HTTP or HTTPS.
    domain_id str
    The ID of the second-level domain name.
    name str
    The name of the second-level domain name.
    network_type str
    The domain access type, such as Intranet or Internet.
    protocol str
    The domain protocol, such as HTTP or HTTPS.
    domainId String
    The ID of the second-level domain name.
    name String
    The name of the second-level domain name.
    networkType String
    The domain access type, such as Intranet or Internet.
    protocol String
    The domain protocol, such as HTTP or HTTPS.

    RouteMatch, RouteMatchArgs

    Headers List<Pulumi.AliCloud.Apig.Inputs.RouteMatchHeader>
    The list of HTTP request header matching rules. See headers below.
    IgnoreUriCase bool
    Specifies whether the path is case-sensitive.
    Methods List<string>
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    Path Pulumi.AliCloud.Apig.Inputs.RouteMatchPath
    The path rule. See path below.
    QueryParams List<Pulumi.AliCloud.Apig.Inputs.RouteMatchQueryParam>
    The matching rules for query parameters. See queryParams below.
    Headers []RouteMatchHeader
    The list of HTTP request header matching rules. See headers below.
    IgnoreUriCase bool
    Specifies whether the path is case-sensitive.
    Methods []string
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    Path RouteMatchPath
    The path rule. See path below.
    QueryParams []RouteMatchQueryParam
    The matching rules for query parameters. See queryParams below.
    headers list(object)
    The list of HTTP request header matching rules. See headers below.
    ignore_uri_case bool
    Specifies whether the path is case-sensitive.
    methods list(string)
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    path object
    The path rule. See path below.
    query_params list(object)
    The matching rules for query parameters. See queryParams below.
    headers List<RouteMatchHeader>
    The list of HTTP request header matching rules. See headers below.
    ignoreUriCase Boolean
    Specifies whether the path is case-sensitive.
    methods List<String>
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    path RouteMatchPath
    The path rule. See path below.
    queryParams List<RouteMatchQueryParam>
    The matching rules for query parameters. See queryParams below.
    headers RouteMatchHeader[]
    The list of HTTP request header matching rules. See headers below.
    ignoreUriCase boolean
    Specifies whether the path is case-sensitive.
    methods string[]
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    path RouteMatchPath
    The path rule. See path below.
    queryParams RouteMatchQueryParam[]
    The matching rules for query parameters. See queryParams below.
    headers Sequence[RouteMatchHeader]
    The list of HTTP request header matching rules. See headers below.
    ignore_uri_case bool
    Specifies whether the path is case-sensitive.
    methods Sequence[str]
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    path RouteMatchPath
    The path rule. See path below.
    query_params Sequence[RouteMatchQueryParam]
    The matching rules for query parameters. See queryParams below.
    headers List<Property Map>
    The list of HTTP request header matching rules. See headers below.
    ignoreUriCase Boolean
    Specifies whether the path is case-sensitive.
    methods List<String>
    The request method. Valid values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTION, TRACE, and PATCH.
    path Property Map
    The path rule. See path below.
    queryParams List<Property Map>
    The matching rules for query parameters. See queryParams below.

    RouteMatchHeader, RouteMatchHeaderArgs

    Name string
    The name of the second-level domain name.
    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    Name string
    The name of the second-level domain name.
    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name string
    The name of the second-level domain name.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name String
    The name of the second-level domain name.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.
    name string
    The name of the second-level domain name.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name str
    The name of the second-level domain name.
    type str
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value str
    The query parameter value that incoming requests must supply to be routed by this route.
    name String
    The name of the second-level domain name.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.

    RouteMatchPath, RouteMatchPathArgs

    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    type str
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value str
    The query parameter value that incoming requests must supply to be routed by this route.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.

    RouteMatchQueryParam, RouteMatchQueryParamArgs

    Name string
    The name of the second-level domain name.
    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    Name string
    The name of the second-level domain name.
    Type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    Value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name string
    The name of the second-level domain name.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name String
    The name of the second-level domain name.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.
    name string
    The name of the second-level domain name.
    type string
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value string
    The query parameter value that incoming requests must supply to be routed by this route.
    name str
    The name of the second-level domain name.
    type str
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value str
    The query parameter value that incoming requests must supply to be routed by this route.
    name String
    The name of the second-level domain name.
    type String
    The matching rule for the query parameter. Valid values: Exact (exact match), Prefix (prefix match), and Regex (regular expression match).
    value String
    The query parameter value that incoming requests must supply to be routed by this route.

    Import

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

    $ pulumi import alicloud:apig/route:Route example <http_api_id>:<route_id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.108.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial