1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. sae
  5. GreyTagRoute
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

alicloud.sae.GreyTagRoute

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 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 defaultRandomInteger = new random.RandomInteger("defaultRandomInteger", {
        max: 99999,
        min: 10000,
    });
    const defaultRegions = alicloud.getRegions({
        current: true,
    });
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
    const defaultNamespace = new alicloud.sae.Namespace("defaultNamespace", {
        namespaceId: pulumi.all([defaultRegions, defaultRandomInteger.result]).apply(([defaultRegions, result]) => `${defaultRegions.regions?.[0]?.id}:example${result}`),
        namespaceName: name,
        namespaceDescription: name,
        enableMicroRegistration: false,
    });
    const defaultApplication = new alicloud.sae.Application("defaultApplication", {
        appDescription: name,
        appName: pulumi.interpolate`${name}-${defaultRandomInteger.result}`,
        namespaceId: defaultNamespace.id,
        imageUrl: defaultRegions.then(defaultRegions => `registry-vpc.${defaultRegions.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("defaultGreyTagRoute", {
        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_random_integer = random.RandomInteger("defaultRandomInteger",
        max=99999,
        min=10000)
    default_regions = alicloud.get_regions(current=True)
    default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
    default_namespace = alicloud.sae.Namespace("defaultNamespace",
        namespace_id=default_random_integer.result.apply(lambda result: f"{default_regions.regions[0].id}:example{result}"),
        namespace_name=name,
        namespace_description=name,
        enable_micro_registration=False)
    default_application = alicloud.sae.Application("defaultApplication",
        app_description=name,
        app_name=default_random_integer.result.apply(lambda result: f"{name}-{result}"),
        namespace_id=default_namespace.id,
        image_url=f"registry-vpc.{default_regions.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("defaultGreyTagRoute",
        grey_tag_route_name=name,
        description=name,
        app_id=default_application.id,
        sc_rules=[alicloud.sae.GreyTagRouteScRuleArgs(
            items=[alicloud.sae.GreyTagRouteScRuleItemArgs(
                type="param",
                name="tfexample",
                operator="rawvalue",
                value="example",
                cond="==",
            )],
            path="/tf/example",
            condition="AND",
        )],
        dubbo_rules=[alicloud.sae.GreyTagRouteDubboRuleArgs(
            items=[alicloud.sae.GreyTagRouteDubboRuleItemArgs(
                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
    		}
    		defaultRandomInteger, err := random.NewRandomInteger(ctx, "defaultRandomInteger", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultNamespace, err := sae.NewNamespace(ctx, "defaultNamespace", &sae.NamespaceArgs{
    			NamespaceId: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("%v:example%v", defaultRegions.Regions[0].Id, result), nil
    			}).(pulumi.StringOutput),
    			NamespaceName:           pulumi.String(name),
    			NamespaceDescription:    pulumi.String(name),
    			EnableMicroRegistration: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		defaultApplication, err := sae.NewApplication(ctx, "defaultApplication", &sae.ApplicationArgs{
    			AppDescription: pulumi.String(name),
    			AppName: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("%v-%v", name, result), nil
    			}).(pulumi.StringOutput),
    			NamespaceId:     defaultNamespace.ID(),
    			ImageUrl:        pulumi.String(fmt.Sprintf("registry-vpc.%v.aliyuncs.com/sae-demo-image/consumer:1.0", defaultRegions.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, "defaultGreyTagRoute", &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 defaultRandomInteger = new Random.RandomInteger("defaultRandomInteger", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultRegions = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultNamespace = new AliCloud.Sae.Namespace("defaultNamespace", new()
        {
            NamespaceId = Output.Tuple(defaultRegions, defaultRandomInteger.Result).Apply(values =>
            {
                var defaultRegions = values.Item1;
                var result = values.Item2;
                return $"{defaultRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)}:example{result}";
            }),
            NamespaceName = name,
            NamespaceDescription = name,
            EnableMicroRegistration = false,
        });
    
        var defaultApplication = new AliCloud.Sae.Application("defaultApplication", new()
        {
            AppDescription = name,
            AppName = defaultRandomInteger.Result.Apply(result => $"{name}-{result}"),
            NamespaceId = defaultNamespace.Id,
            ImageUrl = $"registry-vpc.{defaultRegions.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("defaultGreyTagRoute", 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.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    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 defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            final var defaultZones = 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(defaultZones.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(defaultRandomInteger.result().applyValue(result -> String.format("%s:example%s", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()),result)))
                .namespaceName(name)
                .namespaceDescription(name)
                .enableMicroRegistration(false)
                .build());
    
            var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()        
                .appDescription(name)
                .appName(defaultRandomInteger.result().applyValue(result -> String.format("%s-%s", name,result)))
                .namespaceId(defaultNamespace.id())
                .imageUrl(String.format("registry-vpc.%s.aliyuncs.com/sae-demo-image/consumer:1.0", defaultRegions.applyValue(getRegionsResult -> getRegionsResult.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:
      defaultRandomInteger:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${defaultNetwork.id}
      defaultNamespace:
        type: alicloud:sae:Namespace
        properties:
          namespaceId: ${defaultRegions.regions[0].id}:example${defaultRandomInteger.result}
          namespaceName: ${name}
          namespaceDescription: ${name}
          enableMicroRegistration: false
      defaultApplication:
        type: alicloud:sae:Application
        properties:
          appDescription: ${name}
          appName: ${name}-${defaultRandomInteger.result}
          namespaceId: ${defaultNamespace.id}
          imageUrl: registry-vpc.${defaultRegions.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
        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:
      defaultRegions:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
      defaultZones:
        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.

    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
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    Expr string
    The parameter value gets the expression.
    Index int
    The parameter number.
    Operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    Value string
    The value of the parameter.
    Cond string
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    Expr string
    The parameter value gets the expression.
    Index int
    The parameter number.
    Operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    Value string
    The value of the parameter.
    cond String
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    expr String
    The parameter value gets the expression.
    index Integer
    The parameter number.
    operator String
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    value String
    The value of the parameter.
    cond string
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    expr string
    The parameter value gets the expression.
    index number
    The parameter number.
    operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    value string
    The value of the parameter.
    cond str
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    expr str
    The parameter value gets the expression.
    index int
    The parameter number.
    operator str
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    value str
    The value of the parameter.
    cond String
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    expr String
    The parameter value gets the expression.
    index Number
    The parameter number.
    operator String
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    value String
    The value of the parameter.

    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
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    Name string
    The name of the parameter.
    Operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    Type string
    The compare types. Valid values: param, cookie, header.
    Value string
    The value of the parameter.
    Cond string
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    Name string
    The name of the parameter.
    Operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    Type string
    The compare types. Valid values: param, cookie, header.
    Value string
    The value of the parameter.
    cond String
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    name String
    The name of the parameter.
    operator String
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    type String
    The compare types. Valid values: param, cookie, header.
    value String
    The value of the parameter.
    cond string
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    name string
    The name of the parameter.
    operator string
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    type string
    The compare types. Valid values: param, cookie, header.
    value string
    The value of the parameter.
    cond str
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    name str
    The name of the parameter.
    operator str
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    type str
    The compare types. Valid values: param, cookie, header.
    value str
    The value of the parameter.
    cond String
    The comparison operator. Valid values: >, <, >=, <=, ==, !=.
    name String
    The name of the parameter.
    operator String
    The operator. Valid values: rawvalue, list, mod, deterministic_proportional_steaming_division.
    type String
    The compare types. Valid values: param, cookie, header.
    value String
    The value of the parameter.

    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.52.1 published on Thursday, Apr 4, 2024 by Pulumi