1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. sae
  5. getGreyTagRoutes
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.sae.getGreyTagRoutes

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Sae GreyTagRoutes of the current Alibaba Cloud user.

    NOTE: Available in v1.160.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const nameRegex = alicloud.sae.getGreyTagRoutes({
        appId: "example_id",
        nameRegex: "^my-GreyTagRoute",
    });
    export const saeGreyTagRoutesId = nameRegex.then(nameRegex => nameRegex.routes?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    name_regex = alicloud.sae.get_grey_tag_routes(app_id="example_id",
        name_regex="^my-GreyTagRoute")
    pulumi.export("saeGreyTagRoutesId", name_regex.routes[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sae"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nameRegex, err := sae.GetGreyTagRoutes(ctx, &sae.GetGreyTagRoutesArgs{
    			AppId:     "example_id",
    			NameRegex: pulumi.StringRef("^my-GreyTagRoute"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("saeGreyTagRoutesId", nameRegex.Routes[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var nameRegex = AliCloud.Sae.GetGreyTagRoutes.Invoke(new()
        {
            AppId = "example_id",
            NameRegex = "^my-GreyTagRoute",
        });
    
        return new Dictionary<string, object?>
        {
            ["saeGreyTagRoutesId"] = nameRegex.Apply(getGreyTagRoutesResult => getGreyTagRoutesResult.Routes[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.sae.SaeFunctions;
    import com.pulumi.alicloud.sae.inputs.GetGreyTagRoutesArgs;
    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 nameRegex = SaeFunctions.getGreyTagRoutes(GetGreyTagRoutesArgs.builder()
                .appId("example_id")
                .nameRegex("^my-GreyTagRoute")
                .build());
    
            ctx.export("saeGreyTagRoutesId", nameRegex.applyValue(getGreyTagRoutesResult -> getGreyTagRoutesResult.routes()[0].id()));
        }
    }
    
    variables:
      nameRegex:
        fn::invoke:
          Function: alicloud:sae:getGreyTagRoutes
          Arguments:
            appId: example_id
            nameRegex: ^my-GreyTagRoute
    outputs:
      saeGreyTagRoutesId: ${nameRegex.routes[0].id}
    

    Using getGreyTagRoutes

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGreyTagRoutes(args: GetGreyTagRoutesArgs, opts?: InvokeOptions): Promise<GetGreyTagRoutesResult>
    function getGreyTagRoutesOutput(args: GetGreyTagRoutesOutputArgs, opts?: InvokeOptions): Output<GetGreyTagRoutesResult>
    def get_grey_tag_routes(app_id: Optional[str] = None,
                            ids: Optional[Sequence[str]] = None,
                            name_regex: Optional[str] = None,
                            output_file: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetGreyTagRoutesResult
    def get_grey_tag_routes_output(app_id: Optional[pulumi.Input[str]] = None,
                            ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            name_regex: Optional[pulumi.Input[str]] = None,
                            output_file: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetGreyTagRoutesResult]
    func GetGreyTagRoutes(ctx *Context, args *GetGreyTagRoutesArgs, opts ...InvokeOption) (*GetGreyTagRoutesResult, error)
    func GetGreyTagRoutesOutput(ctx *Context, args *GetGreyTagRoutesOutputArgs, opts ...InvokeOption) GetGreyTagRoutesResultOutput

    > Note: This function is named GetGreyTagRoutes in the Go SDK.

    public static class GetGreyTagRoutes 
    {
        public static Task<GetGreyTagRoutesResult> InvokeAsync(GetGreyTagRoutesArgs args, InvokeOptions? opts = null)
        public static Output<GetGreyTagRoutesResult> Invoke(GetGreyTagRoutesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGreyTagRoutesResult> getGreyTagRoutes(GetGreyTagRoutesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:sae/getGreyTagRoutes:getGreyTagRoutes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AppId string
    The ID of the SAE Application.
    Ids List<string>
    A list of GreyTagRoute IDs.
    NameRegex string
    A regex string to filter results by GreyTagRoute name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    AppId string
    The ID of the SAE Application.
    Ids []string
    A list of GreyTagRoute IDs.
    NameRegex string
    A regex string to filter results by GreyTagRoute name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    appId String
    The ID of the SAE Application.
    ids List<String>
    A list of GreyTagRoute IDs.
    nameRegex String
    A regex string to filter results by GreyTagRoute name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    appId string
    The ID of the SAE Application.
    ids string[]
    A list of GreyTagRoute IDs.
    nameRegex string
    A regex string to filter results by GreyTagRoute name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    app_id str
    The ID of the SAE Application.
    ids Sequence[str]
    A list of GreyTagRoute IDs.
    name_regex str
    A regex string to filter results by GreyTagRoute name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    appId String
    The ID of the SAE Application.
    ids List<String>
    A list of GreyTagRoute IDs.
    nameRegex String
    A regex string to filter results by GreyTagRoute name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getGreyTagRoutes Result

    The following output properties are available:

    AppId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Routes List<Pulumi.AliCloud.Sae.Outputs.GetGreyTagRoutesRoute>
    NameRegex string
    OutputFile string
    AppId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Routes []GetGreyTagRoutesRoute
    NameRegex string
    OutputFile string
    appId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    routes List<GetGreyTagRoutesRoute>
    nameRegex String
    outputFile String
    appId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    routes GetGreyTagRoutesRoute[]
    nameRegex string
    outputFile string
    app_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    routes Sequence[GetGreyTagRoutesRoute]
    name_regex str
    output_file str
    appId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    routes List<Property Map>
    nameRegex String
    outputFile String

    Supporting Types

    GetGreyTagRoutesRoute

    Description string
    The description of GreyTagRoute.
    DubboRules List<Pulumi.AliCloud.Sae.Inputs.GetGreyTagRoutesRouteDubboRule>
    The grayscale rule created for Dubbo Application.
    GreyTagRouteName string
    The name of GreyTagRoute.
    Id string
    The ID of the GreyTagRoute.
    ScRules List<Pulumi.AliCloud.Sae.Inputs.GetGreyTagRoutesRouteScRule>
    The grayscale rule created for SpringCloud Application.
    Description string
    The description of GreyTagRoute.
    DubboRules []GetGreyTagRoutesRouteDubboRule
    The grayscale rule created for Dubbo Application.
    GreyTagRouteName string
    The name of GreyTagRoute.
    Id string
    The ID of the GreyTagRoute.
    ScRules []GetGreyTagRoutesRouteScRule
    The grayscale rule created for SpringCloud Application.
    description String
    The description of GreyTagRoute.
    dubboRules List<GetGreyTagRoutesRouteDubboRule>
    The grayscale rule created for Dubbo Application.
    greyTagRouteName String
    The name of GreyTagRoute.
    id String
    The ID of the GreyTagRoute.
    scRules List<GetGreyTagRoutesRouteScRule>
    The grayscale rule created for SpringCloud Application.
    description string
    The description of GreyTagRoute.
    dubboRules GetGreyTagRoutesRouteDubboRule[]
    The grayscale rule created for Dubbo Application.
    greyTagRouteName string
    The name of GreyTagRoute.
    id string
    The ID of the GreyTagRoute.
    scRules GetGreyTagRoutesRouteScRule[]
    The grayscale rule created for SpringCloud Application.
    description str
    The description of GreyTagRoute.
    dubbo_rules Sequence[GetGreyTagRoutesRouteDubboRule]
    The grayscale rule created for Dubbo Application.
    grey_tag_route_name str
    The name of GreyTagRoute.
    id str
    The ID of the GreyTagRoute.
    sc_rules Sequence[GetGreyTagRoutesRouteScRule]
    The grayscale rule created for SpringCloud Application.
    description String
    The description of GreyTagRoute.
    dubboRules List<Property Map>
    The grayscale rule created for Dubbo Application.
    greyTagRouteName String
    The name of GreyTagRoute.
    id String
    The ID of the GreyTagRoute.
    scRules List<Property Map>
    The grayscale rule created for SpringCloud Application.

    GetGreyTagRoutesRouteDubboRule

    GetGreyTagRoutesRouteDubboRuleItem

    Cond string
    Expr string
    Index int
    Operator string
    Value string
    Cond string
    Expr string
    Index int
    Operator string
    Value string
    cond String
    expr String
    index Integer
    operator String
    value String
    cond string
    expr string
    index number
    operator string
    value string
    cond str
    expr str
    index int
    operator str
    value str
    cond String
    expr String
    index Number
    operator String
    value String

    GetGreyTagRoutesRouteScRule

    GetGreyTagRoutesRouteScRuleItem

    Cond string
    Name string
    Operator string
    Type string
    Value string
    Cond string
    Name string
    Operator string
    Type string
    Value string
    cond String
    name String
    operator String
    type String
    value String
    cond string
    name string
    operator string
    type string
    value string
    cond str
    name str
    operator str
    type str
    value str
    cond String
    name String
    operator String
    type String
    value String

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi