get Grey Tag Routes
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);
Content copied to clipboard
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)
Content copied to clipboard
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),
};
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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()));
}
}
Content copied to clipboard
variables:
nameRegex:
fn::invoke:
function: alicloud:sae:getGreyTagRoutes
arguments:
appId: example_id
nameRegex: ^my-GreyTagRoute
outputs:
saeGreyTagRoutesId: ${nameRegex.routes[0].id}
Content copied to clipboard
Return
A collection of values returned by getGreyTagRoutes.
Parameters
argument
A collection of arguments for invoking getGreyTagRoutes.
suspend fun getGreyTagRoutes(appId: String, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null): GetGreyTagRoutesResult
Return
A collection of values returned by getGreyTagRoutes.
Parameters
app Id
The ID of the SAE Application.
ids
A list of GreyTagRoute IDs.
name Regex
A regex string to filter results by GreyTagRoute name.
output File
File name where to save data source results (after running pulumi preview
).
See also
suspend fun getGreyTagRoutes(argument: suspend GetGreyTagRoutesPlainArgsBuilder.() -> Unit): GetGreyTagRoutesResult
Return
A collection of values returned by getGreyTagRoutes.
Parameters
argument
Builder for com.pulumi.alicloud.sae.kotlin.inputs.GetGreyTagRoutesPlainArgs.