1. Packages
  2. Alicloud Provider
  3. API Docs
  4. sae
  5. GreyTagRoute
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.sae.GreyTagRoute

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a Serverless App Engine (SAE) GreyTagRoute resource.

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

    NOTE: Available since v1.160.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 defaultInteger = new random.index.Integer("default", {
        max: 99999,
        min: 10000,
    });
    const default = alicloud.getRegions({
        current: true,
    });
    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 defaultGreyTagRoute = new alicloud.sae.GreyTagRoute("default", {
        greyTagRouteName: name,
        description: name,
        appId: defaultApplication.id,
        scRules: [{
            items: [{
                type: "param",
                name: "tfexample",
                operator: "rawvalue",
                value: "example",
                cond: "==",
            }],
            path: "/tf/example",
            condition: "AND",
        }],
        dubboRules: [{
            items: [{
                cond: "==",
                expr: ".key1",
                index: 1,
                operator: "rawvalue",
                value: "value1",
            }],
            condition: "OR",
            group: "DUBBO",
            methodName: "example",
            serviceName: "com.example.service",
            version: "1.0.0",
        }],
    });
    
    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_integer = random.index.Integer("default",
        max=99999,
        min=10000)
    default = alicloud.get_regions(current=True)
    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_grey_tag_route = alicloud.sae.GreyTagRoute("default",
        grey_tag_route_name=name,
        description=name,
        app_id=default_application.id,
        sc_rules=[{
            "items": [{
                "type": "param",
                "name": "tfexample",
                "operator": "rawvalue",
                "value": "example",
                "cond": "==",
            }],
            "path": "/tf/example",
            "condition": "AND",
        }],
        dubbo_rules=[{
            "items": [{
                "cond": "==",
                "expr": ".key1",
                "index": 1,
                "operator": "rawvalue",
                "value": "value1",
            }],
            "condition": "OR",
            "group": "DUBBO",
            "method_name": "example",
            "service_name": "com.example.service",
            "version": "1.0.0",
        }])
    
    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/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
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Max: 99999,
    			Min: 10000,
    		})
    		if err != nil {
    			return err
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		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
    		}
    		_, err = sae.NewGreyTagRoute(ctx, "default", &sae.GreyTagRouteArgs{
    			GreyTagRouteName: pulumi.String(name),
    			Description:      pulumi.String(name),
    			AppId:            defaultApplication.ID(),
    			ScRules: sae.GreyTagRouteScRuleArray{
    				&sae.GreyTagRouteScRuleArgs{
    					Items: sae.GreyTagRouteScRuleItemArray{
    						&sae.GreyTagRouteScRuleItemArgs{
    							Type:     pulumi.String("param"),
    							Name:     pulumi.String("tfexample"),
    							Operator: pulumi.String("rawvalue"),
    							Value:    pulumi.String("example"),
    							Cond:     pulumi.String("=="),
    						},
    					},
    					Path:      pulumi.String("/tf/example"),
    					Condition: pulumi.String("AND"),
    				},
    			},
    			DubboRules: sae.GreyTagRouteDubboRuleArray{
    				&sae.GreyTagRouteDubboRuleArgs{
    					Items: sae.GreyTagRouteDubboRuleItemArray{
    						&sae.GreyTagRouteDubboRuleItemArgs{
    							Cond:     pulumi.String("=="),
    							Expr:     pulumi.String(".key1"),
    							Index:    pulumi.Int(1),
    							Operator: pulumi.String("rawvalue"),
    							Value:    pulumi.String("value1"),
    						},
    					},
    					Condition:   pulumi.String("OR"),
    					Group:       pulumi.String("DUBBO"),
    					MethodName:  pulumi.String("example"),
    					ServiceName: pulumi.String("com.example.service"),
    					Version:     pulumi.String("1.0.0"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 defaultInteger = new Random.Index.Integer("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        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 defaultGreyTagRoute = new AliCloud.Sae.GreyTagRoute("default", new()
        {
            GreyTagRouteName = name,
            Description = name,
            AppId = defaultApplication.Id,
            ScRules = new[]
            {
                new AliCloud.Sae.Inputs.GreyTagRouteScRuleArgs
                {
                    Items = new[]
                    {
                        new AliCloud.Sae.Inputs.GreyTagRouteScRuleItemArgs
                        {
                            Type = "param",
                            Name = "tfexample",
                            Operator = "rawvalue",
                            Value = "example",
                            Cond = "==",
                        },
                    },
                    Path = "/tf/example",
                    Condition = "AND",
                },
            },
            DubboRules = new[]
            {
                new AliCloud.Sae.Inputs.GreyTagRouteDubboRuleArgs
                {
                    Items = new[]
                    {
                        new AliCloud.Sae.Inputs.GreyTagRouteDubboRuleItemArgs
                        {
                            Cond = "==",
                            Expr = ".key1",
                            Index = 1,
                            Operator = "rawvalue",
                            Value = "value1",
                        },
                    },
                    Condition = "OR",
                    Group = "DUBBO",
                    MethodName = "example",
                    ServiceName = "com.example.service",
                    Version = "1.0.0",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetRegionsArgs;
    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.sae.GreyTagRoute;
    import com.pulumi.alicloud.sae.GreyTagRouteArgs;
    import com.pulumi.alicloud.sae.inputs.GreyTagRouteScRuleArgs;
    import com.pulumi.alicloud.sae.inputs.GreyTagRouteDubboRuleArgs;
    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");
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .max(99999)
                .min(10000)
                .build());
    
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .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 defaultGreyTagRoute = new GreyTagRoute("defaultGreyTagRoute", GreyTagRouteArgs.builder()
                .greyTagRouteName(name)
                .description(name)
                .appId(defaultApplication.id())
                .scRules(GreyTagRouteScRuleArgs.builder()
                    .items(GreyTagRouteScRuleItemArgs.builder()
                        .type("param")
                        .name("tfexample")
                        .operator("rawvalue")
                        .value("example")
                        .cond("==")
                        .build())
                    .path("/tf/example")
                    .condition("AND")
                    .build())
                .dubboRules(GreyTagRouteDubboRuleArgs.builder()
                    .items(GreyTagRouteDubboRuleItemArgs.builder()
                        .cond("==")
                        .expr(".key1")
                        .index("1")
                        .operator("rawvalue")
                        .value("value1")
                        .build())
                    .condition("OR")
                    .group("DUBBO")
                    .methodName("example")
                    .serviceName("com.example.service")
                    .version("1.0.0")
                    .build())
                .build());
    
        }
    }
    
    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'
      defaultGreyTagRoute:
        type: alicloud:sae:GreyTagRoute
        name: default
        properties:
          greyTagRouteName: ${name}
          description: ${name}
          appId: ${defaultApplication.id}
          scRules:
            - items:
                - type: param
                  name: tfexample
                  operator: rawvalue
                  value: example
                  cond: ==
              path: /tf/example
              condition: AND
          dubboRules:
            - items:
                - cond: ==
                  expr: .key1
                  index: '1'
                  operator: rawvalue
                  value: value1
              condition: OR
              group: DUBBO
              methodName: example
              serviceName: com.example.service
              version: 1.0.0
    variables:
      default:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
      defaultGetZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    Create GreyTagRoute Resource

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

    Constructor syntax

    new GreyTagRoute(name: string, args: GreyTagRouteArgs, opts?: CustomResourceOptions);
    @overload
    def GreyTagRoute(resource_name: str,
                     args: GreyTagRouteArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def GreyTagRoute(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     app_id: Optional[str] = None,
                     grey_tag_route_name: Optional[str] = None,
                     description: Optional[str] = None,
                     dubbo_rules: Optional[Sequence[GreyTagRouteDubboRuleArgs]] = None,
                     sc_rules: Optional[Sequence[GreyTagRouteScRuleArgs]] = None)
    func NewGreyTagRoute(ctx *Context, name string, args GreyTagRouteArgs, opts ...ResourceOption) (*GreyTagRoute, error)
    public GreyTagRoute(string name, GreyTagRouteArgs args, CustomResourceOptions? opts = null)
    public GreyTagRoute(String name, GreyTagRouteArgs args)
    public GreyTagRoute(String name, GreyTagRouteArgs args, CustomResourceOptions options)
    
    type: alicloud:sae:GreyTagRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GreyTagRouteArgs
    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 GreyTagRouteArgs
    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 GreyTagRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GreyTagRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GreyTagRouteArgs
    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 greyTagRouteResource = new AliCloud.Sae.GreyTagRoute("greyTagRouteResource", new()
    {
        AppId = "string",
        GreyTagRouteName = "string",
        Description = "string",
        DubboRules = new[]
        {
            new AliCloud.Sae.Inputs.GreyTagRouteDubboRuleArgs
            {
                Condition = "string",
                Group = "string",
                Items = new[]
                {
                    new AliCloud.Sae.Inputs.GreyTagRouteDubboRuleItemArgs
                    {
                        Cond = "string",
                        Expr = "string",
                        Index = 0,
                        Operator = "string",
                        Value = "string",
                    },
                },
                MethodName = "string",
                ServiceName = "string",
                Version = "string",
            },
        },
        ScRules = new[]
        {
            new AliCloud.Sae.Inputs.GreyTagRouteScRuleArgs
            {
                Condition = "string",
                Items = new[]
                {
                    new AliCloud.Sae.Inputs.GreyTagRouteScRuleItemArgs
                    {
                        Cond = "string",
                        Name = "string",
                        Operator = "string",
                        Type = "string",
                        Value = "string",
                    },
                },
                Path = "string",
            },
        },
    });
    
    example, err := sae.NewGreyTagRoute(ctx, "greyTagRouteResource", &sae.GreyTagRouteArgs{
    	AppId:            pulumi.String("string"),
    	GreyTagRouteName: pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	DubboRules: sae.GreyTagRouteDubboRuleArray{
    		&sae.GreyTagRouteDubboRuleArgs{
    			Condition: pulumi.String("string"),
    			Group:     pulumi.String("string"),
    			Items: sae.GreyTagRouteDubboRuleItemArray{
    				&sae.GreyTagRouteDubboRuleItemArgs{
    					Cond:     pulumi.String("string"),
    					Expr:     pulumi.String("string"),
    					Index:    pulumi.Int(0),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			MethodName:  pulumi.String("string"),
    			ServiceName: pulumi.String("string"),
    			Version:     pulumi.String("string"),
    		},
    	},
    	ScRules: sae.GreyTagRouteScRuleArray{
    		&sae.GreyTagRouteScRuleArgs{
    			Condition: pulumi.String("string"),
    			Items: sae.GreyTagRouteScRuleItemArray{
    				&sae.GreyTagRouteScRuleItemArgs{
    					Cond:     pulumi.String("string"),
    					Name:     pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Type:     pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			Path: pulumi.String("string"),
    		},
    	},
    })
    
    var greyTagRouteResource = new GreyTagRoute("greyTagRouteResource", GreyTagRouteArgs.builder()
        .appId("string")
        .greyTagRouteName("string")
        .description("string")
        .dubboRules(GreyTagRouteDubboRuleArgs.builder()
            .condition("string")
            .group("string")
            .items(GreyTagRouteDubboRuleItemArgs.builder()
                .cond("string")
                .expr("string")
                .index(0)
                .operator("string")
                .value("string")
                .build())
            .methodName("string")
            .serviceName("string")
            .version("string")
            .build())
        .scRules(GreyTagRouteScRuleArgs.builder()
            .condition("string")
            .items(GreyTagRouteScRuleItemArgs.builder()
                .cond("string")
                .name("string")
                .operator("string")
                .type("string")
                .value("string")
                .build())
            .path("string")
            .build())
        .build());
    
    grey_tag_route_resource = alicloud.sae.GreyTagRoute("greyTagRouteResource",
        app_id="string",
        grey_tag_route_name="string",
        description="string",
        dubbo_rules=[alicloud.sae.GreyTagRouteDubboRuleArgs(
            condition="string",
            group="string",
            items=[alicloud.sae.GreyTagRouteDubboRuleItemArgs(
                cond="string",
                expr="string",
                index=0,
                operator="string",
                value="string",
            )],
            method_name="string",
            service_name="string",
            version="string",
        )],
        sc_rules=[alicloud.sae.GreyTagRouteScRuleArgs(
            condition="string",
            items=[alicloud.sae.GreyTagRouteScRuleItemArgs(
                cond="string",
                name="string",
                operator="string",
                type="string",
                value="string",
            )],
            path="string",
        )])
    
    const greyTagRouteResource = new alicloud.sae.GreyTagRoute("greyTagRouteResource", {
        appId: "string",
        greyTagRouteName: "string",
        description: "string",
        dubboRules: [{
            condition: "string",
            group: "string",
            items: [{
                cond: "string",
                expr: "string",
                index: 0,
                operator: "string",
                value: "string",
            }],
            methodName: "string",
            serviceName: "string",
            version: "string",
        }],
        scRules: [{
            condition: "string",
            items: [{
                cond: "string",
                name: "string",
                operator: "string",
                type: "string",
                value: "string",
            }],
            path: "string",
        }],
    });
    
    type: alicloud:sae:GreyTagRoute
    properties:
        appId: string
        description: string
        dubboRules:
            - condition: string
              group: string
              items:
                - cond: string
                  expr: string
                  index: 0
                  operator: string
                  value: string
              methodName: string
              serviceName: string
              version: string
        greyTagRouteName: string
        scRules:
            - condition: string
              items:
                - cond: string
                  name: string
                  operator: string
                  type: string
                  value: string
              path: string
    

    GreyTagRoute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GreyTagRoute resource accepts the following input properties:

    AppId string
    The ID of the SAE Application.
    GreyTagRouteName string
    The name of GreyTagRoute.
    Description string
    The description of GreyTagRoute.
    DubboRules List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteDubboRule>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    ScRules List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteScRule>
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    AppId string
    The ID of the SAE Application.
    GreyTagRouteName string
    The name of GreyTagRoute.
    Description string
    The description of GreyTagRoute.
    DubboRules []GreyTagRouteDubboRuleArgs
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    ScRules []GreyTagRouteScRuleArgs
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId String
    The ID of the SAE Application.
    greyTagRouteName String
    The name of GreyTagRoute.
    description String
    The description of GreyTagRoute.
    dubboRules List<GreyTagRouteDubboRule>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    scRules List<GreyTagRouteScRule>
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId string
    The ID of the SAE Application.
    greyTagRouteName string
    The name of GreyTagRoute.
    description string
    The description of GreyTagRoute.
    dubboRules GreyTagRouteDubboRule[]
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    scRules GreyTagRouteScRule[]
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    app_id str
    The ID of the SAE Application.
    grey_tag_route_name str
    The name of GreyTagRoute.
    description str
    The description of GreyTagRoute.
    dubbo_rules Sequence[GreyTagRouteDubboRuleArgs]
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    sc_rules Sequence[GreyTagRouteScRuleArgs]
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId String
    The ID of the SAE Application.
    greyTagRouteName String
    The name of GreyTagRoute.
    description String
    The description of GreyTagRoute.
    dubboRules List<Property Map>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    scRules List<Property Map>
    The grayscale rule created for SpringCloud Application. See sc_rules below.

    Outputs

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

    Get an existing GreyTagRoute 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?: GreyTagRouteState, opts?: CustomResourceOptions): GreyTagRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            description: Optional[str] = None,
            dubbo_rules: Optional[Sequence[GreyTagRouteDubboRuleArgs]] = None,
            grey_tag_route_name: Optional[str] = None,
            sc_rules: Optional[Sequence[GreyTagRouteScRuleArgs]] = None) -> GreyTagRoute
    func GetGreyTagRoute(ctx *Context, name string, id IDInput, state *GreyTagRouteState, opts ...ResourceOption) (*GreyTagRoute, error)
    public static GreyTagRoute Get(string name, Input<string> id, GreyTagRouteState? state, CustomResourceOptions? opts = null)
    public static GreyTagRoute get(String name, Output<String> id, GreyTagRouteState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AppId string
    The ID of the SAE Application.
    Description string
    The description of GreyTagRoute.
    DubboRules List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteDubboRule>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    GreyTagRouteName string
    The name of GreyTagRoute.
    ScRules List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteScRule>
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    AppId string
    The ID of the SAE Application.
    Description string
    The description of GreyTagRoute.
    DubboRules []GreyTagRouteDubboRuleArgs
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    GreyTagRouteName string
    The name of GreyTagRoute.
    ScRules []GreyTagRouteScRuleArgs
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId String
    The ID of the SAE Application.
    description String
    The description of GreyTagRoute.
    dubboRules List<GreyTagRouteDubboRule>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    greyTagRouteName String
    The name of GreyTagRoute.
    scRules List<GreyTagRouteScRule>
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId string
    The ID of the SAE Application.
    description string
    The description of GreyTagRoute.
    dubboRules GreyTagRouteDubboRule[]
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    greyTagRouteName string
    The name of GreyTagRoute.
    scRules GreyTagRouteScRule[]
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    app_id str
    The ID of the SAE Application.
    description str
    The description of GreyTagRoute.
    dubbo_rules Sequence[GreyTagRouteDubboRuleArgs]
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    grey_tag_route_name str
    The name of GreyTagRoute.
    sc_rules Sequence[GreyTagRouteScRuleArgs]
    The grayscale rule created for SpringCloud Application. See sc_rules below.
    appId String
    The ID of the SAE Application.
    description String
    The description of GreyTagRoute.
    dubboRules List<Property Map>
    The grayscale rule created for Dubbo Application. See dubbo_rules below.
    greyTagRouteName String
    The name of GreyTagRoute.
    scRules List<Property Map>
    The grayscale rule created for SpringCloud Application. See sc_rules below.

    Supporting Types

    GreyTagRouteDubboRule, GreyTagRouteDubboRuleArgs

    Condition string
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    Group string
    The service group.
    Items List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteDubboRuleItem>
    A list of conditions items. See items below.
    MethodName string
    The method name
    ServiceName string
    The service name.
    Version string
    The service version.
    Condition string
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    Group string
    The service group.
    Items []GreyTagRouteDubboRuleItem
    A list of conditions items. See items below.
    MethodName string
    The method name
    ServiceName string
    The service name.
    Version string
    The service version.
    condition String
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    group String
    The service group.
    items List<GreyTagRouteDubboRuleItem>
    A list of conditions items. See items below.
    methodName String
    The method name
    serviceName String
    The service name.
    version String
    The service version.
    condition string
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    group string
    The service group.
    items GreyTagRouteDubboRuleItem[]
    A list of conditions items. See items below.
    methodName string
    The method name
    serviceName string
    The service name.
    version string
    The service version.
    condition str
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    group str
    The service group.
    items Sequence[GreyTagRouteDubboRuleItem]
    A list of conditions items. See items below.
    method_name str
    The method name
    service_name str
    The service name.
    version str
    The service version.
    condition String
    The Conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    group String
    The service group.
    items List<Property Map>
    A list of conditions items. See items below.
    methodName String
    The method name
    serviceName String
    The service name.
    version String
    The service version.

    GreyTagRouteDubboRuleItem, GreyTagRouteDubboRuleItemArgs

    Cond string
    Expr string
    The parameter value gets the expression.
    Index int
    The parameter number.
    Operator string
    Value string
    Cond string
    Expr string
    The parameter value gets the expression.
    Index int
    The parameter number.
    Operator string
    Value string
    cond String
    expr String
    The parameter value gets the expression.
    index Integer
    The parameter number.
    operator String
    value String
    cond string
    expr string
    The parameter value gets the expression.
    index number
    The parameter number.
    operator string
    value string
    cond str
    expr str
    The parameter value gets the expression.
    index int
    The parameter number.
    operator str
    value str
    cond String
    expr String
    The parameter value gets the expression.
    index Number
    The parameter number.
    operator String
    value String

    GreyTagRouteScRule, GreyTagRouteScRuleArgs

    Condition string
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    Items List<Pulumi.AliCloud.Sae.Inputs.GreyTagRouteScRuleItem>
    A list of conditions items. See items below.
    Path string
    The path corresponding to the grayscale rule.
    Condition string
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    Items []GreyTagRouteScRuleItem
    A list of conditions items. See items below.
    Path string
    The path corresponding to the grayscale rule.
    condition String
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    items List<GreyTagRouteScRuleItem>
    A list of conditions items. See items below.
    path String
    The path corresponding to the grayscale rule.
    condition string
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    items GreyTagRouteScRuleItem[]
    A list of conditions items. See items below.
    path string
    The path corresponding to the grayscale rule.
    condition str
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    items Sequence[GreyTagRouteScRuleItem]
    A list of conditions items. See items below.
    path str
    The path corresponding to the grayscale rule.
    condition String
    The conditional Patterns for Grayscale Rules. Valid values: AND, OR.
    items List<Property Map>
    A list of conditions items. See items below.
    path String
    The path corresponding to the grayscale rule.

    GreyTagRouteScRuleItem, GreyTagRouteScRuleItemArgs

    Cond string
    Name string
    The name of the parameter.
    Operator string
    Type string
    The compare types. Valid values: param, cookie, header.
    Value string
    Cond string
    Name string
    The name of the parameter.
    Operator string
    Type string
    The compare types. Valid values: param, cookie, header.
    Value string
    cond String
    name String
    The name of the parameter.
    operator String
    type String
    The compare types. Valid values: param, cookie, header.
    value String
    cond string
    name string
    The name of the parameter.
    operator string
    type string
    The compare types. Valid values: param, cookie, header.
    value string
    cond str
    name str
    The name of the parameter.
    operator str
    type str
    The compare types. Valid values: param, cookie, header.
    value str
    cond String
    name String
    The name of the parameter.
    operator String
    type String
    The compare types. Valid values: param, cookie, header.
    value String

    Import

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

    $ pulumi import alicloud:sae/greyTagRoute:GreyTagRoute example <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
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi