alicloud.arms.getPrometheis
Explore with Pulumi AI
This data source provides the Arms Prometheis of the current Alibaba Cloud user.
NOTE: Available in v1.203.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Arms.GetPrometheis.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Arms.GetPrometheis.Invoke(new()
{
NameRegex = "tf-example",
});
return new Dictionary<string, object?>
{
["armsPrometheisId1"] = ids.Apply(getPrometheisResult => getPrometheisResult.Prometheis[0]?.Id),
["armsPrometheisId2"] = nameRegex.Apply(getPrometheisResult => getPrometheisResult.Prometheis[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := arms.GetPrometheis(ctx, &arms.GetPrometheisArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("armsPrometheisId1", ids.Prometheis[0].Id)
nameRegex, err := arms.GetPrometheis(ctx, &arms.GetPrometheisArgs{
NameRegex: pulumi.StringRef("tf-example"),
}, nil)
if err != nil {
return err
}
ctx.Export("armsPrometheisId2", nameRegex.Prometheis[0].Id)
return nil
})
}
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()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.arms.get_prometheis(ids=["example_id"])
pulumi.export("armsPrometheisId1", ids.prometheis[0].id)
name_regex = alicloud.arms.get_prometheis(name_regex="tf-example")
pulumi.export("armsPrometheisId2", name_regex.prometheis[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.arms.getPrometheis({
ids: ["example_id"],
});
export const armsPrometheisId1 = ids.then(ids => ids.prometheis?.[0]?.id);
const nameRegex = alicloud.arms.getPrometheis({
nameRegex: "tf-example",
});
export const armsPrometheisId2 = nameRegex.then(nameRegex => nameRegex.prometheis?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:arms:getPrometheis
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:arms:getPrometheis
Arguments:
nameRegex: tf-example
outputs:
armsPrometheisId1: ${ids.prometheis[0].id}
armsPrometheisId2: ${nameRegex.prometheis[0].id}
Using getPrometheis
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 getPrometheis(args: GetPrometheisArgs, opts?: InvokeOptions): Promise<GetPrometheisResult>
function getPrometheisOutput(args: GetPrometheisOutputArgs, opts?: InvokeOptions): Output<GetPrometheisResult>
def get_prometheis(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
opts: Optional[InvokeOptions] = None) -> GetPrometheisResult
def get_prometheis_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPrometheisResult]
func GetPrometheis(ctx *Context, args *GetPrometheisArgs, opts ...InvokeOption) (*GetPrometheisResult, error)
func GetPrometheisOutput(ctx *Context, args *GetPrometheisOutputArgs, opts ...InvokeOption) GetPrometheisResultOutput
> Note: This function is named GetPrometheis
in the Go SDK.
public static class GetPrometheis
{
public static Task<GetPrometheisResult> InvokeAsync(GetPrometheisArgs args, InvokeOptions? opts = null)
public static Output<GetPrometheisResult> Invoke(GetPrometheisInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPrometheisResult> getPrometheis(GetPrometheisArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:arms/getPrometheis:getPrometheis
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Prometheus IDs.
- Name
Regex string A regex string to filter results by Prometheus name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId The ID of the resource group.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Ids []string
A list of Prometheus IDs.
- Name
Regex string A regex string to filter results by Prometheus name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId The ID of the resource group.
- map[string]interface{}
A mapping of tags to assign to the resource.
- ids List<String>
A list of Prometheus IDs.
- name
Regex String A regex string to filter results by Prometheus name.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId The ID of the resource group.
- Map<String,Object>
A mapping of tags to assign to the resource.
- ids string[]
A list of Prometheus IDs.
- name
Regex string A regex string to filter results by Prometheus name.
- output
File string File name where to save data source results (after running
pulumi preview
).- resource
Group stringId The ID of the resource group.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- ids Sequence[str]
A list of Prometheus IDs.
- name_
regex str A regex string to filter results by Prometheus name.
- output_
file str File name where to save data source results (after running
pulumi preview
).- resource_
group_ strid The ID of the resource group.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- ids List<String>
A list of Prometheus IDs.
- name
Regex String A regex string to filter results by Prometheus name.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId The ID of the resource group.
- Map<Any>
A mapping of tags to assign to the resource.
getPrometheis Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
A list of Prometheus names.
- Prometheis
List<Pulumi.
Ali Cloud. Arms. Outputs. Get Prometheis Promethei> A list of Prometheis. Each element contains the following attributes:
- Name
Regex string - Output
File string - Resource
Group stringId The ID of the resource group.
- Dictionary<string, object>
The tag of the Prometheus.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
A list of Prometheus names.
- Prometheis
[]Get
Prometheis Promethei A list of Prometheis. Each element contains the following attributes:
- Name
Regex string - Output
File string - Resource
Group stringId The ID of the resource group.
- map[string]interface{}
The tag of the Prometheus.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
A list of Prometheus names.
- prometheis
List<Get
Prometheis Promethei> A list of Prometheis. Each element contains the following attributes:
- name
Regex String - output
File String - resource
Group StringId The ID of the resource group.
- Map<String,Object>
The tag of the Prometheus.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
A list of Prometheus names.
- prometheis
Get
Prometheis Promethei[] A list of Prometheis. Each element contains the following attributes:
- name
Regex string - output
File string - resource
Group stringId The ID of the resource group.
- {[key: string]: any}
The tag of the Prometheus.
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
A list of Prometheus names.
- prometheis
Sequence[Get
Prometheis Promethei] A list of Prometheis. Each element contains the following attributes:
- name_
regex str - output_
file str - resource_
group_ strid The ID of the resource group.
- Mapping[str, Any]
The tag of the Prometheus.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
A list of Prometheus names.
- prometheis List<Property Map>
A list of Prometheis. Each element contains the following attributes:
- name
Regex String - output
File String - resource
Group StringId The ID of the resource group.
- Map<Any>
The tag of the Prometheus.
Supporting Types
GetPrometheisPromethei
- Cluster
Id string The ID of the cluster.
- Cluster
Name string The name of the cluster.
- Cluster
Type string The type of the cluster.
- Grafana
Instance stringId The ID of the Grafana workspace.
- Id string
The ID of the Prometheus.
- Resource
Group stringId The ID of the resource group.
- Security
Group stringId The ID of the security group.
- Sub
Clusters stringJson The child instance json string of the globalView instance.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vpc
Id string The ID of the VPC.
- Vswitch
Id string The ID of the VSwitch.
- Cluster
Id string The ID of the cluster.
- Cluster
Name string The name of the cluster.
- Cluster
Type string The type of the cluster.
- Grafana
Instance stringId The ID of the Grafana workspace.
- Id string
The ID of the Prometheus.
- Resource
Group stringId The ID of the resource group.
- Security
Group stringId The ID of the security group.
- Sub
Clusters stringJson The child instance json string of the globalView instance.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vpc
Id string The ID of the VPC.
- Vswitch
Id string The ID of the VSwitch.
- cluster
Id String The ID of the cluster.
- cluster
Name String The name of the cluster.
- cluster
Type String The type of the cluster.
- grafana
Instance StringId The ID of the Grafana workspace.
- id String
The ID of the Prometheus.
- resource
Group StringId The ID of the resource group.
- security
Group StringId The ID of the security group.
- sub
Clusters StringJson The child instance json string of the globalView instance.
- Map<String,Object>
A mapping of tags to assign to the resource.
- vpc
Id String The ID of the VPC.
- vswitch
Id String The ID of the VSwitch.
- cluster
Id string The ID of the cluster.
- cluster
Name string The name of the cluster.
- cluster
Type string The type of the cluster.
- grafana
Instance stringId The ID of the Grafana workspace.
- id string
The ID of the Prometheus.
- resource
Group stringId The ID of the resource group.
- security
Group stringId The ID of the security group.
- sub
Clusters stringJson The child instance json string of the globalView instance.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vpc
Id string The ID of the VPC.
- vswitch
Id string The ID of the VSwitch.
- cluster_
id str The ID of the cluster.
- cluster_
name str The name of the cluster.
- cluster_
type str The type of the cluster.
- grafana_
instance_ strid The ID of the Grafana workspace.
- id str
The ID of the Prometheus.
- resource_
group_ strid The ID of the resource group.
- security_
group_ strid The ID of the security group.
- sub_
clusters_ strjson The child instance json string of the globalView instance.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- vpc_
id str The ID of the VPC.
- vswitch_
id str The ID of the VSwitch.
- cluster
Id String The ID of the cluster.
- cluster
Name String The name of the cluster.
- cluster
Type String The type of the cluster.
- grafana
Instance StringId The ID of the Grafana workspace.
- id String
The ID of the Prometheus.
- resource
Group StringId The ID of the resource group.
- security
Group StringId The ID of the security group.
- sub
Clusters StringJson The child instance json string of the globalView instance.
- Map<Any>
A mapping of tags to assign to the resource.
- vpc
Id String The ID of the VPC.
- vswitch
Id String The ID of the VSwitch.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.