1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sae
  5. Ingress
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.sae.Ingress

Explore with Pulumi AI

Provides a Serverless App Engine (SAE) Ingress resource.

For information about Serverless App Engine (SAE) Ingress and how to use it, see What is Ingress.

NOTE: Available since v1.137.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = alicloud.getRegions({
    current: true,
});
const defaultInteger = new random.index.Integer("default", {
    max: 99999,
    min: 10000,
});
const defaultGetZones = alicloud.getZones({
    availableResourceCreation: "VSwitch",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vswitchName: name,
    cidrBlock: "10.4.0.0/24",
    vpcId: defaultNetwork.id,
    zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultNetwork.id});
const defaultNamespace = new alicloud.sae.Namespace("default", {
    namespaceId: _default.then(_default => `${_default.regions?.[0]?.id}:example${defaultInteger.result}`),
    namespaceName: name,
    namespaceDescription: name,
    enableMicroRegistration: false,
});
const defaultApplication = new alicloud.sae.Application("default", {
    appDescription: name,
    appName: `${name}-${defaultInteger.result}`,
    namespaceId: defaultNamespace.id,
    imageUrl: _default.then(_default => `registry-vpc.${_default.regions?.[0]?.id}.aliyuncs.com/sae-demo-image/consumer:1.0`),
    packageType: "Image",
    securityGroupId: defaultSecurityGroup.id,
    vpcId: defaultNetwork.id,
    vswitchId: defaultSwitch.id,
    timezone: "Asia/Beijing",
    replicas: 5,
    cpu: 500,
    memory: 2048,
});
const defaultApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("default", {
    loadBalancerName: name,
    vswitchId: defaultSwitch.id,
    loadBalancerSpec: "slb.s2.small",
    addressType: "intranet",
});
const defaultIngress = new alicloud.sae.Ingress("default", {
    slbId: defaultApplicationLoadBalancer.id,
    namespaceId: defaultNamespace.id,
    listenerPort: 80,
    rules: [{
        appId: defaultApplication.id,
        containerPort: 443,
        domain: "www.alicloud.com",
        appName: defaultApplication.appName,
        path: "/",
    }],
    defaultRule: {
        appId: defaultApplication.id,
        containerPort: 443,
    },
});
Copy
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
default = alicloud.get_regions(current=True)
default_integer = random.index.Integer("default",
    max=99999,
    min=10000)
default_get_zones = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("default",
    vswitch_name=name,
    cidr_block="10.4.0.0/24",
    vpc_id=default_network.id,
    zone_id=default_get_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_network.id)
default_namespace = alicloud.sae.Namespace("default",
    namespace_id=f"{default.regions[0].id}:example{default_integer['result']}",
    namespace_name=name,
    namespace_description=name,
    enable_micro_registration=False)
default_application = alicloud.sae.Application("default",
    app_description=name,
    app_name=f"{name}-{default_integer['result']}",
    namespace_id=default_namespace.id,
    image_url=f"registry-vpc.{default.regions[0].id}.aliyuncs.com/sae-demo-image/consumer:1.0",
    package_type="Image",
    security_group_id=default_security_group.id,
    vpc_id=default_network.id,
    vswitch_id=default_switch.id,
    timezone="Asia/Beijing",
    replicas=5,
    cpu=500,
    memory=2048)
default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("default",
    load_balancer_name=name,
    vswitch_id=default_switch.id,
    load_balancer_spec="slb.s2.small",
    address_type="intranet")
default_ingress = alicloud.sae.Ingress("default",
    slb_id=default_application_load_balancer.id,
    namespace_id=default_namespace.id,
    listener_port=80,
    rules=[{
        "app_id": default_application.id,
        "container_port": 443,
        "domain": "www.alicloud.com",
        "app_name": default_application.app_name,
        "path": "/",
    }],
    default_rule={
        "app_id": default_application.id,
        "container_port": 443,
    })
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sae"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"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 := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
			Current: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Max: 99999,
			Min: 10000,
		})
		if err != nil {
			return err
		}
		defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.4.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			CidrBlock:   pulumi.String("10.4.0.0/24"),
			VpcId:       defaultNetwork.ID(),
			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultNamespace, err := sae.NewNamespace(ctx, "default", &sae.NamespaceArgs{
			NamespaceId:             pulumi.Sprintf("%v:example%v", _default.Regions[0].Id, defaultInteger.Result),
			NamespaceName:           pulumi.String(name),
			NamespaceDescription:    pulumi.String(name),
			EnableMicroRegistration: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		defaultApplication, err := sae.NewApplication(ctx, "default", &sae.ApplicationArgs{
			AppDescription:  pulumi.String(name),
			AppName:         pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
			NamespaceId:     defaultNamespace.ID(),
			ImageUrl:        pulumi.Sprintf("registry-vpc.%v.aliyuncs.com/sae-demo-image/consumer:1.0", _default.Regions[0].Id),
			PackageType:     pulumi.String("Image"),
			SecurityGroupId: defaultSecurityGroup.ID(),
			VpcId:           defaultNetwork.ID(),
			VswitchId:       defaultSwitch.ID(),
			Timezone:        pulumi.String("Asia/Beijing"),
			Replicas:        pulumi.Int(5),
			Cpu:             pulumi.Int(500),
			Memory:          pulumi.Int(2048),
		})
		if err != nil {
			return err
		}
		defaultApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "default", &slb.ApplicationLoadBalancerArgs{
			LoadBalancerName: pulumi.String(name),
			VswitchId:        defaultSwitch.ID(),
			LoadBalancerSpec: pulumi.String("slb.s2.small"),
			AddressType:      pulumi.String("intranet"),
		})
		if err != nil {
			return err
		}
		_, err = sae.NewIngress(ctx, "default", &sae.IngressArgs{
			SlbId:        defaultApplicationLoadBalancer.ID(),
			NamespaceId:  defaultNamespace.ID(),
			ListenerPort: pulumi.Int(80),
			Rules: sae.IngressRuleArray{
				&sae.IngressRuleArgs{
					AppId:         defaultApplication.ID(),
					ContainerPort: pulumi.Int(443),
					Domain:        pulumi.String("www.alicloud.com"),
					AppName:       defaultApplication.AppName,
					Path:          pulumi.String("/"),
				},
			},
			DefaultRule: &sae.IngressDefaultRuleArgs{
				AppId:         defaultApplication.ID(),
				ContainerPort: pulumi.Int(443),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var @default = AliCloud.GetRegions.Invoke(new()
    {
        Current = true,
    });

    var defaultInteger = new Random.Index.Integer("default", new()
    {
        Max = 99999,
        Min = 10000,
    });

    var defaultGetZones = AliCloud.GetZones.Invoke(new()
    {
        AvailableResourceCreation = "VSwitch",
    });

    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        CidrBlock = "10.4.0.0/16",
    });

    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VswitchName = name,
        CidrBlock = "10.4.0.0/24",
        VpcId = defaultNetwork.Id,
        ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
    });

    var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
    {
        VpcId = defaultNetwork.Id,
    });

    var defaultNamespace = new AliCloud.Sae.Namespace("default", new()
    {
        NamespaceId = @default.Apply(@default => $"{@default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)}:example{defaultInteger.Result}"),
        NamespaceName = name,
        NamespaceDescription = name,
        EnableMicroRegistration = false,
    });

    var defaultApplication = new AliCloud.Sae.Application("default", new()
    {
        AppDescription = name,
        AppName = $"{name}-{defaultInteger.Result}",
        NamespaceId = defaultNamespace.Id,
        ImageUrl = @default.Apply(@default => $"registry-vpc.{@default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)}.aliyuncs.com/sae-demo-image/consumer:1.0"),
        PackageType = "Image",
        SecurityGroupId = defaultSecurityGroup.Id,
        VpcId = defaultNetwork.Id,
        VswitchId = defaultSwitch.Id,
        Timezone = "Asia/Beijing",
        Replicas = 5,
        Cpu = 500,
        Memory = 2048,
    });

    var defaultApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("default", new()
    {
        LoadBalancerName = name,
        VswitchId = defaultSwitch.Id,
        LoadBalancerSpec = "slb.s2.small",
        AddressType = "intranet",
    });

    var defaultIngress = new AliCloud.Sae.Ingress("default", new()
    {
        SlbId = defaultApplicationLoadBalancer.Id,
        NamespaceId = defaultNamespace.Id,
        ListenerPort = 80,
        Rules = new[]
        {
            new AliCloud.Sae.Inputs.IngressRuleArgs
            {
                AppId = defaultApplication.Id,
                ContainerPort = 443,
                Domain = "www.alicloud.com",
                AppName = defaultApplication.AppName,
                Path = "/",
            },
        },
        DefaultRule = new AliCloud.Sae.Inputs.IngressDefaultRuleArgs
        {
            AppId = defaultApplication.Id,
            ContainerPort = 443,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.sae.Namespace;
import com.pulumi.alicloud.sae.NamespaceArgs;
import com.pulumi.alicloud.sae.Application;
import com.pulumi.alicloud.sae.ApplicationArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.sae.Ingress;
import com.pulumi.alicloud.sae.IngressArgs;
import com.pulumi.alicloud.sae.inputs.IngressRuleArgs;
import com.pulumi.alicloud.sae.inputs.IngressDefaultRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("tf-example");
        final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
            .current(true)
            .build());

        var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
            .max(99999)
            .min(10000)
            .build());

        final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("VSwitch")
            .build());

        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("10.4.0.0/16")
            .build());

        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vswitchName(name)
            .cidrBlock("10.4.0.0/24")
            .vpcId(defaultNetwork.id())
            .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .build());

        var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
            .vpcId(defaultNetwork.id())
            .build());

        var defaultNamespace = new Namespace("defaultNamespace", NamespaceArgs.builder()
            .namespaceId(String.format("%s:example%s", default_.regions()[0].id(),defaultInteger.result()))
            .namespaceName(name)
            .namespaceDescription(name)
            .enableMicroRegistration(false)
            .build());

        var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()
            .appDescription(name)
            .appName(String.format("%s-%s", name,defaultInteger.result()))
            .namespaceId(defaultNamespace.id())
            .imageUrl(String.format("registry-vpc.%s.aliyuncs.com/sae-demo-image/consumer:1.0", default_.regions()[0].id()))
            .packageType("Image")
            .securityGroupId(defaultSecurityGroup.id())
            .vpcId(defaultNetwork.id())
            .vswitchId(defaultSwitch.id())
            .timezone("Asia/Beijing")
            .replicas("5")
            .cpu("500")
            .memory("2048")
            .build());

        var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
            .loadBalancerName(name)
            .vswitchId(defaultSwitch.id())
            .loadBalancerSpec("slb.s2.small")
            .addressType("intranet")
            .build());

        var defaultIngress = new Ingress("defaultIngress", IngressArgs.builder()
            .slbId(defaultApplicationLoadBalancer.id())
            .namespaceId(defaultNamespace.id())
            .listenerPort("80")
            .rules(IngressRuleArgs.builder()
                .appId(defaultApplication.id())
                .containerPort("443")
                .domain("www.alicloud.com")
                .appName(defaultApplication.appName())
                .path("/")
                .build())
            .defaultRule(IngressDefaultRuleArgs.builder()
                .appId(defaultApplication.id())
                .containerPort("443")
                .build())
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf-example
resources:
  defaultInteger:
    type: random:integer
    name: default
    properties:
      max: 99999
      min: 10000
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${name}
      cidrBlock: 10.4.0.0/16
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vswitchName: ${name}
      cidrBlock: 10.4.0.0/24
      vpcId: ${defaultNetwork.id}
      zoneId: ${defaultGetZones.zones[0].id}
  defaultSecurityGroup:
    type: alicloud:ecs:SecurityGroup
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
  defaultNamespace:
    type: alicloud:sae:Namespace
    name: default
    properties:
      namespaceId: ${default.regions[0].id}:example${defaultInteger.result}
      namespaceName: ${name}
      namespaceDescription: ${name}
      enableMicroRegistration: false
  defaultApplication:
    type: alicloud:sae:Application
    name: default
    properties:
      appDescription: ${name}
      appName: ${name}-${defaultInteger.result}
      namespaceId: ${defaultNamespace.id}
      imageUrl: registry-vpc.${default.regions[0].id}.aliyuncs.com/sae-demo-image/consumer:1.0
      packageType: Image
      securityGroupId: ${defaultSecurityGroup.id}
      vpcId: ${defaultNetwork.id}
      vswitchId: ${defaultSwitch.id}
      timezone: Asia/Beijing
      replicas: '5'
      cpu: '500'
      memory: '2048'
  defaultApplicationLoadBalancer:
    type: alicloud:slb:ApplicationLoadBalancer
    name: default
    properties:
      loadBalancerName: ${name}
      vswitchId: ${defaultSwitch.id}
      loadBalancerSpec: slb.s2.small
      addressType: intranet
  defaultIngress:
    type: alicloud:sae:Ingress
    name: default
    properties:
      slbId: ${defaultApplicationLoadBalancer.id}
      namespaceId: ${defaultNamespace.id}
      listenerPort: '80'
      rules:
        - appId: ${defaultApplication.id}
          containerPort: '443'
          domain: www.alicloud.com
          appName: ${defaultApplication.appName}
          path: /
      defaultRule:
        appId: ${defaultApplication.id}
        containerPort: '443'
variables:
  default:
    fn::invoke:
      function: alicloud:getRegions
      arguments:
        current: true
  defaultGetZones:
    fn::invoke:
      function: alicloud:getZones
      arguments:
        availableResourceCreation: VSwitch
Copy

Create Ingress Resource

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

Constructor syntax

new Ingress(name: string, args: IngressArgs, opts?: CustomResourceOptions);
@overload
def Ingress(resource_name: str,
            args: IngressArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Ingress(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            listener_port: Optional[int] = None,
            namespace_id: Optional[str] = None,
            rules: Optional[Sequence[IngressRuleArgs]] = None,
            slb_id: Optional[str] = None,
            cert_id: Optional[str] = None,
            cert_ids: Optional[str] = None,
            default_rule: Optional[IngressDefaultRuleArgs] = None,
            description: Optional[str] = None,
            listener_protocol: Optional[str] = None,
            load_balance_type: Optional[str] = None)
func NewIngress(ctx *Context, name string, args IngressArgs, opts ...ResourceOption) (*Ingress, error)
public Ingress(string name, IngressArgs args, CustomResourceOptions? opts = null)
public Ingress(String name, IngressArgs args)
public Ingress(String name, IngressArgs args, CustomResourceOptions options)
type: alicloud:sae:Ingress
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IngressArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IngressArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IngressArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IngressArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IngressArgs
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 ingressResource = new AliCloud.Sae.Ingress("ingressResource", new()
{
    ListenerPort = 0,
    NamespaceId = "string",
    Rules = new[]
    {
        new AliCloud.Sae.Inputs.IngressRuleArgs
        {
            AppId = "string",
            AppName = "string",
            ContainerPort = 0,
            Domain = "string",
            Path = "string",
            BackendProtocol = "string",
            RewritePath = "string",
        },
    },
    SlbId = "string",
    CertId = "string",
    CertIds = "string",
    DefaultRule = new AliCloud.Sae.Inputs.IngressDefaultRuleArgs
    {
        AppId = "string",
        AppName = "string",
        ContainerPort = 0,
    },
    Description = "string",
    ListenerProtocol = "string",
    LoadBalanceType = "string",
});
Copy
example, err := sae.NewIngress(ctx, "ingressResource", &sae.IngressArgs{
	ListenerPort: pulumi.Int(0),
	NamespaceId:  pulumi.String("string"),
	Rules: sae.IngressRuleArray{
		&sae.IngressRuleArgs{
			AppId:           pulumi.String("string"),
			AppName:         pulumi.String("string"),
			ContainerPort:   pulumi.Int(0),
			Domain:          pulumi.String("string"),
			Path:            pulumi.String("string"),
			BackendProtocol: pulumi.String("string"),
			RewritePath:     pulumi.String("string"),
		},
	},
	SlbId:   pulumi.String("string"),
	CertId:  pulumi.String("string"),
	CertIds: pulumi.String("string"),
	DefaultRule: &sae.IngressDefaultRuleArgs{
		AppId:         pulumi.String("string"),
		AppName:       pulumi.String("string"),
		ContainerPort: pulumi.Int(0),
	},
	Description:      pulumi.String("string"),
	ListenerProtocol: pulumi.String("string"),
	LoadBalanceType:  pulumi.String("string"),
})
Copy
var ingressResource = new Ingress("ingressResource", IngressArgs.builder()
    .listenerPort(0)
    .namespaceId("string")
    .rules(IngressRuleArgs.builder()
        .appId("string")
        .appName("string")
        .containerPort(0)
        .domain("string")
        .path("string")
        .backendProtocol("string")
        .rewritePath("string")
        .build())
    .slbId("string")
    .certId("string")
    .certIds("string")
    .defaultRule(IngressDefaultRuleArgs.builder()
        .appId("string")
        .appName("string")
        .containerPort(0)
        .build())
    .description("string")
    .listenerProtocol("string")
    .loadBalanceType("string")
    .build());
Copy
ingress_resource = alicloud.sae.Ingress("ingressResource",
    listener_port=0,
    namespace_id="string",
    rules=[{
        "app_id": "string",
        "app_name": "string",
        "container_port": 0,
        "domain": "string",
        "path": "string",
        "backend_protocol": "string",
        "rewrite_path": "string",
    }],
    slb_id="string",
    cert_id="string",
    cert_ids="string",
    default_rule={
        "app_id": "string",
        "app_name": "string",
        "container_port": 0,
    },
    description="string",
    listener_protocol="string",
    load_balance_type="string")
Copy
const ingressResource = new alicloud.sae.Ingress("ingressResource", {
    listenerPort: 0,
    namespaceId: "string",
    rules: [{
        appId: "string",
        appName: "string",
        containerPort: 0,
        domain: "string",
        path: "string",
        backendProtocol: "string",
        rewritePath: "string",
    }],
    slbId: "string",
    certId: "string",
    certIds: "string",
    defaultRule: {
        appId: "string",
        appName: "string",
        containerPort: 0,
    },
    description: "string",
    listenerProtocol: "string",
    loadBalanceType: "string",
});
Copy
type: alicloud:sae:Ingress
properties:
    certId: string
    certIds: string
    defaultRule:
        appId: string
        appName: string
        containerPort: 0
    description: string
    listenerPort: 0
    listenerProtocol: string
    loadBalanceType: string
    namespaceId: string
    rules:
        - appId: string
          appName: string
          backendProtocol: string
          containerPort: 0
          domain: string
          path: string
          rewritePath: string
    slbId: string
Copy

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

ListenerPort This property is required. int
SLB listening port.
NamespaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
Rules This property is required. List<Pulumi.AliCloud.Sae.Inputs.IngressRule>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
SlbId
This property is required.
Changes to this property will trigger replacement.
string
SLB ID.
CertId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
CertIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
DefaultRule Pulumi.AliCloud.Sae.Inputs.IngressDefaultRule
Default Rule. See default_rule below.
Description string
Description.
ListenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
LoadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
ListenerPort This property is required. int
SLB listening port.
NamespaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
Rules This property is required. []IngressRuleArgs
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
SlbId
This property is required.
Changes to this property will trigger replacement.
string
SLB ID.
CertId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
CertIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
DefaultRule IngressDefaultRuleArgs
Default Rule. See default_rule below.
Description string
Description.
ListenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
LoadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
listenerPort This property is required. Integer
SLB listening port.
namespaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules This property is required. List<IngressRule>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId
This property is required.
Changes to this property will trigger replacement.
String
SLB ID.
certId String
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds String
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule IngressDefaultRule
Default Rule. See default_rule below.
description String
Description.
listenerProtocol String
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType String
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
listenerPort This property is required. number
SLB listening port.
namespaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules This property is required. IngressRule[]
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId
This property is required.
Changes to this property will trigger replacement.
string
SLB ID.
certId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule IngressDefaultRule
Default Rule. See default_rule below.
description string
Description.
listenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
listener_port This property is required. int
SLB listening port.
namespace_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules This property is required. Sequence[IngressRuleArgs]
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slb_id
This property is required.
Changes to this property will trigger replacement.
str
SLB ID.
cert_id str
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
cert_ids str
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
default_rule IngressDefaultRuleArgs
Default Rule. See default_rule below.
description str
Description.
listener_protocol str
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
load_balance_type str
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
listenerPort This property is required. Number
SLB listening port.
namespaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules This property is required. List<Property Map>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId
This property is required.
Changes to this property will trigger replacement.
String
SLB ID.
certId String
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds String
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule Property Map
Default Rule. See default_rule below.
description String
Description.
listenerProtocol String
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType String
The type of the SLB instance. Default value: clb. Valid values: clb, alb.

Outputs

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

Get an existing Ingress 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?: IngressState, opts?: CustomResourceOptions): Ingress
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cert_id: Optional[str] = None,
        cert_ids: Optional[str] = None,
        default_rule: Optional[IngressDefaultRuleArgs] = None,
        description: Optional[str] = None,
        listener_port: Optional[int] = None,
        listener_protocol: Optional[str] = None,
        load_balance_type: Optional[str] = None,
        namespace_id: Optional[str] = None,
        rules: Optional[Sequence[IngressRuleArgs]] = None,
        slb_id: Optional[str] = None) -> Ingress
func GetIngress(ctx *Context, name string, id IDInput, state *IngressState, opts ...ResourceOption) (*Ingress, error)
public static Ingress Get(string name, Input<string> id, IngressState? state, CustomResourceOptions? opts = null)
public static Ingress get(String name, Output<String> id, IngressState state, CustomResourceOptions options)
resources:  _:    type: alicloud:sae:Ingress    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CertId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
CertIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
DefaultRule Pulumi.AliCloud.Sae.Inputs.IngressDefaultRule
Default Rule. See default_rule below.
Description string
Description.
ListenerPort int
SLB listening port.
ListenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
LoadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
NamespaceId Changes to this property will trigger replacement. string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
Rules List<Pulumi.AliCloud.Sae.Inputs.IngressRule>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
SlbId Changes to this property will trigger replacement. string
SLB ID.
CertId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
CertIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
DefaultRule IngressDefaultRuleArgs
Default Rule. See default_rule below.
Description string
Description.
ListenerPort int
SLB listening port.
ListenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
LoadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
NamespaceId Changes to this property will trigger replacement. string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
Rules []IngressRuleArgs
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
SlbId Changes to this property will trigger replacement. string
SLB ID.
certId String
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds String
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule IngressDefaultRule
Default Rule. See default_rule below.
description String
Description.
listenerPort Integer
SLB listening port.
listenerProtocol String
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType String
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
namespaceId Changes to this property will trigger replacement. String
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules List<IngressRule>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId Changes to this property will trigger replacement. String
SLB ID.
certId string
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds string
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule IngressDefaultRule
Default Rule. See default_rule below.
description string
Description.
listenerPort number
SLB listening port.
listenerProtocol string
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType string
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
namespaceId Changes to this property will trigger replacement. string
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules IngressRule[]
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId Changes to this property will trigger replacement. string
SLB ID.
cert_id str
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
cert_ids str
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
default_rule IngressDefaultRuleArgs
Default Rule. See default_rule below.
description str
Description.
listener_port int
SLB listening port.
listener_protocol str
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
load_balance_type str
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
namespace_id Changes to this property will trigger replacement. str
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules Sequence[IngressRuleArgs]
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slb_id Changes to this property will trigger replacement. str
SLB ID.
certId String
The certificate ID of the HTTPS listener. The cert_id takes effect only when load_balance_type is set to clb.
certIds String
The certificate IDs of the HTTPS listener, and multiple certificate IDs are separated by commas. The cert_ids takes effect only when load_balance_type is set to alb.
defaultRule Property Map
Default Rule. See default_rule below.
description String
Description.
listenerPort Number
SLB listening port.
listenerProtocol String
The protocol that is used to forward requests. Default value: HTTP. Valid values: HTTP, HTTPS.
loadBalanceType String
The type of the SLB instance. Default value: clb. Valid values: clb, alb.
namespaceId Changes to this property will trigger replacement. String
The ID of Namespace. It can contain 2 to 32 lowercase characters.The value is in format {RegionId}:{namespace}.
rules List<Property Map>
Forwarding rules. Forward traffic to the specified application according to the domain name and path. See rules below.
slbId Changes to this property will trigger replacement. String
SLB ID.

Supporting Types

IngressDefaultRule
, IngressDefaultRuleArgs

AppId string
Target application ID.
AppName string
Target application name.
ContainerPort int
Application backend port.
AppId string
Target application ID.
AppName string
Target application name.
ContainerPort int
Application backend port.
appId String
Target application ID.
appName String
Target application name.
containerPort Integer
Application backend port.
appId string
Target application ID.
appName string
Target application name.
containerPort number
Application backend port.
app_id str
Target application ID.
app_name str
Target application name.
container_port int
Application backend port.
appId String
Target application ID.
appName String
Target application name.
containerPort Number
Application backend port.

IngressRule
, IngressRuleArgs

AppId This property is required. string
Target application ID.
AppName This property is required. string
Target application name.
ContainerPort This property is required. int
Application backend port.
Domain This property is required. string
Application domain name.
Path This property is required. string
URL path.
BackendProtocol string
The backend protocol.
RewritePath string
The rewrite path.
AppId This property is required. string
Target application ID.
AppName This property is required. string
Target application name.
ContainerPort This property is required. int
Application backend port.
Domain This property is required. string
Application domain name.
Path This property is required. string
URL path.
BackendProtocol string
The backend protocol.
RewritePath string
The rewrite path.
appId This property is required. String
Target application ID.
appName This property is required. String
Target application name.
containerPort This property is required. Integer
Application backend port.
domain This property is required. String
Application domain name.
path This property is required. String
URL path.
backendProtocol String
The backend protocol.
rewritePath String
The rewrite path.
appId This property is required. string
Target application ID.
appName This property is required. string
Target application name.
containerPort This property is required. number
Application backend port.
domain This property is required. string
Application domain name.
path This property is required. string
URL path.
backendProtocol string
The backend protocol.
rewritePath string
The rewrite path.
app_id This property is required. str
Target application ID.
app_name This property is required. str
Target application name.
container_port This property is required. int
Application backend port.
domain This property is required. str
Application domain name.
path This property is required. str
URL path.
backend_protocol str
The backend protocol.
rewrite_path str
The rewrite path.
appId This property is required. String
Target application ID.
appName This property is required. String
Target application name.
containerPort This property is required. Number
Application backend port.
domain This property is required. String
Application domain name.
path This property is required. String
URL path.
backendProtocol String
The backend protocol.
rewritePath String
The rewrite path.

Import

Serverless App Engine (SAE) Ingress can be imported using the id, e.g.

$ pulumi import alicloud:sae/ingress:Ingress example <id>
Copy

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.