Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.arms.getRemoteWrites
Explore with Pulumi AI
This data source provides the Arms Remote Writes of the current Alibaba Cloud user.
NOTE: Available since v1.204.0.
DEPRECATED: This resource has been deprecated since v1.228.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.arms.getRemoteWrites({
ids: ["example_id"],
clusterId: "your_cluster_id",
});
export const armsRemoteWritesId1 = ids.then(ids => ids.remoteWrites?.[0]?.id);
const nameRegex = alicloud.arms.getRemoteWrites({
nameRegex: "tf-example",
clusterId: "your_cluster_id",
});
export const armsRemoteWritesId2 = nameRegex.then(nameRegex => nameRegex.remoteWrites?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.arms.get_remote_writes(ids=["example_id"],
cluster_id="your_cluster_id")
pulumi.export("armsRemoteWritesId1", ids.remote_writes[0].id)
name_regex = alicloud.arms.get_remote_writes(name_regex="tf-example",
cluster_id="your_cluster_id")
pulumi.export("armsRemoteWritesId2", name_regex.remote_writes[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.GetRemoteWrites(ctx, &arms.GetRemoteWritesArgs{
Ids: []string{
"example_id",
},
ClusterId: "your_cluster_id",
}, nil)
if err != nil {
return err
}
ctx.Export("armsRemoteWritesId1", ids.RemoteWrites[0].Id)
nameRegex, err := arms.GetRemoteWrites(ctx, &arms.GetRemoteWritesArgs{
NameRegex: pulumi.StringRef("tf-example"),
ClusterId: "your_cluster_id",
}, nil)
if err != nil {
return err
}
ctx.Export("armsRemoteWritesId2", nameRegex.RemoteWrites[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Arms.GetRemoteWrites.Invoke(new()
{
Ids = new[]
{
"example_id",
},
ClusterId = "your_cluster_id",
});
var nameRegex = AliCloud.Arms.GetRemoteWrites.Invoke(new()
{
NameRegex = "tf-example",
ClusterId = "your_cluster_id",
});
return new Dictionary<string, object?>
{
["armsRemoteWritesId1"] = ids.Apply(getRemoteWritesResult => getRemoteWritesResult.RemoteWrites[0]?.Id),
["armsRemoteWritesId2"] = nameRegex.Apply(getRemoteWritesResult => getRemoteWritesResult.RemoteWrites[0]?.Id),
};
});
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.GetRemoteWritesArgs;
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.getRemoteWrites(GetRemoteWritesArgs.builder()
.ids("example_id")
.clusterId("your_cluster_id")
.build());
ctx.export("armsRemoteWritesId1", ids.applyValue(getRemoteWritesResult -> getRemoteWritesResult.remoteWrites()[0].id()));
final var nameRegex = ArmsFunctions.getRemoteWrites(GetRemoteWritesArgs.builder()
.nameRegex("tf-example")
.clusterId("your_cluster_id")
.build());
ctx.export("armsRemoteWritesId2", nameRegex.applyValue(getRemoteWritesResult -> getRemoteWritesResult.remoteWrites()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:arms:getRemoteWrites
Arguments:
ids:
- example_id
clusterId: your_cluster_id
nameRegex:
fn::invoke:
Function: alicloud:arms:getRemoteWrites
Arguments:
nameRegex: tf-example
clusterId: your_cluster_id
outputs:
armsRemoteWritesId1: ${ids.remoteWrites[0].id}
armsRemoteWritesId2: ${nameRegex.remoteWrites[0].id}
Using getRemoteWrites
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 getRemoteWrites(args: GetRemoteWritesArgs, opts?: InvokeOptions): Promise<GetRemoteWritesResult>
function getRemoteWritesOutput(args: GetRemoteWritesOutputArgs, opts?: InvokeOptions): Output<GetRemoteWritesResult>
def get_remote_writes(cluster_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRemoteWritesResult
def get_remote_writes_output(cluster_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[GetRemoteWritesResult]
func GetRemoteWrites(ctx *Context, args *GetRemoteWritesArgs, opts ...InvokeOption) (*GetRemoteWritesResult, error)
func GetRemoteWritesOutput(ctx *Context, args *GetRemoteWritesOutputArgs, opts ...InvokeOption) GetRemoteWritesResultOutput
> Note: This function is named GetRemoteWrites
in the Go SDK.
public static class GetRemoteWrites
{
public static Task<GetRemoteWritesResult> InvokeAsync(GetRemoteWritesArgs args, InvokeOptions? opts = null)
public static Output<GetRemoteWritesResult> Invoke(GetRemoteWritesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRemoteWritesResult> getRemoteWrites(GetRemoteWritesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:arms/getRemoteWrites:getRemoteWrites
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - The ID of the Prometheus instance.
- Ids List<string>
- A list of Remote Write IDs.
- Name
Regex string - A regex string to filter results by Remote Write name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Cluster
Id string - The ID of the Prometheus instance.
- Ids []string
- A list of Remote Write IDs.
- Name
Regex string - A regex string to filter results by Remote Write name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- cluster
Id String - The ID of the Prometheus instance.
- ids List<String>
- A list of Remote Write IDs.
- name
Regex String - A regex string to filter results by Remote Write name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- cluster
Id string - The ID of the Prometheus instance.
- ids string[]
- A list of Remote Write IDs.
- name
Regex string - A regex string to filter results by Remote Write name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- cluster_
id str - The ID of the Prometheus instance.
- ids Sequence[str]
- A list of Remote Write IDs.
- name_
regex str - A regex string to filter results by Remote Write name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- cluster
Id String - The ID of the Prometheus instance.
- ids List<String>
- A list of Remote Write IDs.
- name
Regex String - A regex string to filter results by Remote Write name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getRemoteWrites Result
The following output properties are available:
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Remote Write names.
- Remote
Writes List<Pulumi.Ali Cloud. Arms. Outputs. Get Remote Writes Remote Write> - A list of Remote Writes. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Remote Write names.
- Remote
Writes []GetRemote Writes Remote Write - A list of Remote Writes. Each element contains the following attributes:
- Name
Regex string - Output
File string
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Remote Write names.
- remote
Writes List<GetRemote Writes Remote Write> - A list of Remote Writes. Each element contains the following attributes:
- name
Regex String - output
File String
- cluster
Id string - The ID of the Prometheus instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Remote Write names.
- remote
Writes GetRemote Writes Remote Write[] - A list of Remote Writes. Each element contains the following attributes:
- name
Regex string - output
File string
- cluster_
id str - The ID of the Prometheus instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Remote Write names.
- remote_
writes Sequence[GetRemote Writes Remote Write] - A list of Remote Writes. Each element contains the following attributes:
- name_
regex str - output_
file str
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Remote Write names.
- remote
Writes List<Property Map> - A list of Remote Writes. Each element contains the following attributes:
- name
Regex String - output
File String
Supporting Types
GetRemoteWritesRemoteWrite
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - Remote
Write stringName - The name of the Remote Write configuration item.
- Remote
Write stringYaml - The details of the Remote Write configuration item. The value is in the YAML format.
- Cluster
Id string - The ID of the Prometheus instance.
- Id string
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - Remote
Write stringName - The name of the Remote Write configuration item.
- Remote
Write stringYaml - The details of the Remote Write configuration item. The value is in the YAML format.
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - remote
Write StringName - The name of the Remote Write configuration item.
- remote
Write StringYaml - The details of the Remote Write configuration item. The value is in the YAML format.
- cluster
Id string - The ID of the Prometheus instance.
- id string
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - remote
Write stringName - The name of the Remote Write configuration item.
- remote
Write stringYaml - The details of the Remote Write configuration item. The value is in the YAML format.
- cluster_
id str - The ID of the Prometheus instance.
- id str
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - remote_
write_ strname - The name of the Remote Write configuration item.
- remote_
write_ stryaml - The details of the Remote Write configuration item. The value is in the YAML format.
- cluster
Id String - The ID of the Prometheus instance.
- id String
- The ID of the Remote Write. It formats as
<cluster_id>:<remote_write_name>
. - remote
Write StringName - The name of the Remote Write configuration item.
- remote
Write StringYaml - The details of the Remote Write configuration item. The value is in the YAML format.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.