getPrometheis

This data source provides the Arms Prometheis of the current Alibaba Cloud user.

NOTE: Available in v1.203.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.ArmsFunctions;
import com.pulumi.alicloud.arms.inputs.GetPrometheisArgs;
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 ids = ArmsFunctions.getPrometheis(GetPrometheisArgs.builder()
.ids("example_id")
.build());
ctx.export("armsPrometheisId1", ids.applyValue(getPrometheisResult -> getPrometheisResult.prometheis()[0].id()));
final var nameRegex = ArmsFunctions.getPrometheis(GetPrometheisArgs.builder()
.nameRegex("tf-example")
.build());
ctx.export("armsPrometheisId2", nameRegex.applyValue(getPrometheisResult -> getPrometheisResult.prometheis()[0].id()));
}
}

Return

A collection of values returned by getPrometheis.

Parameters

argument

A collection of arguments for invoking getPrometheis.


suspend fun getPrometheis(ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, resourceGroupId: String? = null, tags: Map<String, Any>? = null): GetPrometheisResult

Return

A collection of values returned by getPrometheis.

See also

Parameters

ids

A list of Prometheus IDs.

nameRegex

A regex string to filter results by Prometheus name.

outputFile

File name where to save data source results (after running pulumi preview).

resourceGroupId

The ID of the resource group.

tags

A mapping of tags to assign to the resource.


Return

A collection of values returned by getPrometheis.

See also

Parameters

argument

Builder for com.pulumi.alicloud.arms.kotlin.inputs.GetPrometheisPlainArgs.