get Prometheis
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()));
}
}
Content copied to clipboard
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.
name Regex
A regex string to filter results by Prometheus name.
output File
File name where to save data source results (after running pulumi preview
).
resource Group Id
The ID of the resource group.
tags
A mapping of tags to assign to the resource.
suspend fun getPrometheis(argument: suspend GetPrometheisPlainArgsBuilder.() -> Unit): GetPrometheisResult
Return
A collection of values returned by getPrometheis.
See also
Parameters
argument
Builder for com.pulumi.alicloud.arms.kotlin.inputs.GetPrometheisPlainArgs.