alicloud.cms.getHybridMonitorDatas
Explore with Pulumi AI
This data source provides the Cms Hybrid Monitor Datas of the current Alibaba Cloud user.
NOTE: Available in v1.177.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Cms.GetHybridMonitorDatas.Invoke(new()
{
Namespace = "example_value",
PromSql = "AliyunEcs_cpu_total",
Start = "1657505665",
End = "1657520065",
});
return new Dictionary<string, object?>
{
["cmsMetricRuleTemplateId1"] = @default.Apply(@default => @default.Apply(getHybridMonitorDatasResult => getHybridMonitorDatasResult.Datas[0])),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := cms.GetHybridMonitorDatas(ctx, &cms.GetHybridMonitorDatasArgs{
Namespace: "example_value",
PromSql: "AliyunEcs_cpu_total",
Start: "1657505665",
End: "1657520065",
}, nil)
if err != nil {
return err
}
ctx.Export("cmsMetricRuleTemplateId1", _default.Datas[0])
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.CmsFunctions;
import com.pulumi.alicloud.cms.inputs.GetHybridMonitorDatasArgs;
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 default = CmsFunctions.getHybridMonitorDatas(GetHybridMonitorDatasArgs.builder()
.namespace("example_value")
.promSql("AliyunEcs_cpu_total")
.start("1657505665")
.end("1657520065")
.build());
ctx.export("cmsMetricRuleTemplateId1", default_.datas()[0]);
}
}
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.cms.get_hybrid_monitor_datas(namespace="example_value",
prom_sql="AliyunEcs_cpu_total",
start="1657505665",
end="1657520065")
pulumi.export("cmsMetricRuleTemplateId1", default.datas[0])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.cms.getHybridMonitorDatas({
namespace: "example_value",
promSql: "AliyunEcs_cpu_total",
start: "1657505665",
end: "1657520065",
});
export const cmsMetricRuleTemplateId1 = _default.then(_default => _default.datas?.[0]);
variables:
default:
fn::invoke:
Function: alicloud:cms:getHybridMonitorDatas
Arguments:
namespace: example_value
promSql: AliyunEcs_cpu_total
start: '1657505665'
end: '1657520065'
outputs:
cmsMetricRuleTemplateId1: ${default.datas[0]}
Using getHybridMonitorDatas
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 getHybridMonitorDatas(args: GetHybridMonitorDatasArgs, opts?: InvokeOptions): Promise<GetHybridMonitorDatasResult>
function getHybridMonitorDatasOutput(args: GetHybridMonitorDatasOutputArgs, opts?: InvokeOptions): Output<GetHybridMonitorDatasResult>
def get_hybrid_monitor_datas(end: Optional[str] = None,
namespace: Optional[str] = None,
output_file: Optional[str] = None,
period: Optional[str] = None,
prom_sql: Optional[str] = None,
start: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHybridMonitorDatasResult
def get_hybrid_monitor_datas_output(end: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
period: Optional[pulumi.Input[str]] = None,
prom_sql: Optional[pulumi.Input[str]] = None,
start: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHybridMonitorDatasResult]
func GetHybridMonitorDatas(ctx *Context, args *GetHybridMonitorDatasArgs, opts ...InvokeOption) (*GetHybridMonitorDatasResult, error)
func GetHybridMonitorDatasOutput(ctx *Context, args *GetHybridMonitorDatasOutputArgs, opts ...InvokeOption) GetHybridMonitorDatasResultOutput
> Note: This function is named GetHybridMonitorDatas
in the Go SDK.
public static class GetHybridMonitorDatas
{
public static Task<GetHybridMonitorDatasResult> InvokeAsync(GetHybridMonitorDatasArgs args, InvokeOptions? opts = null)
public static Output<GetHybridMonitorDatasResult> Invoke(GetHybridMonitorDatasInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHybridMonitorDatasResult> getHybridMonitorDatas(GetHybridMonitorDatasArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cms/getHybridMonitorDatas:getHybridMonitorDatas
arguments:
# arguments dictionary
The following arguments are supported:
- End string
The timestamp that specifies the end of the time range to query.
- Namespace string
The name of the namespace.
- Prom
Sql string The name of the metric. Note PromQL statements are supported.
- Start string
The timestamp that specifies the beginning of the time range to query.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Period string
The interval at which monitoring data is collected. Unit: seconds.
- End string
The timestamp that specifies the end of the time range to query.
- Namespace string
The name of the namespace.
- Prom
Sql string The name of the metric. Note PromQL statements are supported.
- Start string
The timestamp that specifies the beginning of the time range to query.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Period string
The interval at which monitoring data is collected. Unit: seconds.
- end String
The timestamp that specifies the end of the time range to query.
- namespace String
The name of the namespace.
- prom
Sql String The name of the metric. Note PromQL statements are supported.
- start String
The timestamp that specifies the beginning of the time range to query.
- output
File String File name where to save data source results (after running
pulumi preview
).- period String
The interval at which monitoring data is collected. Unit: seconds.
- end string
The timestamp that specifies the end of the time range to query.
- namespace string
The name of the namespace.
- prom
Sql string The name of the metric. Note PromQL statements are supported.
- start string
The timestamp that specifies the beginning of the time range to query.
- output
File string File name where to save data source results (after running
pulumi preview
).- period string
The interval at which monitoring data is collected. Unit: seconds.
- end str
The timestamp that specifies the end of the time range to query.
- namespace str
The name of the namespace.
- prom_
sql str The name of the metric. Note PromQL statements are supported.
- start str
The timestamp that specifies the beginning of the time range to query.
- output_
file str File name where to save data source results (after running
pulumi preview
).- period str
The interval at which monitoring data is collected. Unit: seconds.
- end String
The timestamp that specifies the end of the time range to query.
- namespace String
The name of the namespace.
- prom
Sql String The name of the metric. Note PromQL statements are supported.
- start String
The timestamp that specifies the beginning of the time range to query.
- output
File String File name where to save data source results (after running
pulumi preview
).- period String
The interval at which monitoring data is collected. Unit: seconds.
getHybridMonitorDatas Result
The following output properties are available:
- Datas
List<Pulumi.
Ali Cloud. Cms. Outputs. Get Hybrid Monitor Datas Data> - End string
- Id string
The provider-assigned unique ID for this managed resource.
- Namespace string
- Prom
Sql string - Start string
- Output
File string - Period string
- Datas
[]Get
Hybrid Monitor Datas Data - End string
- Id string
The provider-assigned unique ID for this managed resource.
- Namespace string
- Prom
Sql string - Start string
- Output
File string - Period string
- datas
List<Get
Hybrid Monitor Datas Data> - end String
- id String
The provider-assigned unique ID for this managed resource.
- namespace String
- prom
Sql String - start String
- output
File String - period String
- datas
Get
Hybrid Monitor Datas Data[] - end string
- id string
The provider-assigned unique ID for this managed resource.
- namespace string
- prom
Sql string - start string
- output
File string - period string
- datas
Sequence[Get
Hybrid Monitor Datas Data] - end str
- id str
The provider-assigned unique ID for this managed resource.
- namespace str
- prom_
sql str - start str
- output_
file str - period str
- datas List<Property Map>
- end String
- id String
The provider-assigned unique ID for this managed resource.
- namespace String
- prom
Sql String - start String
- output
File String - period String
Supporting Types
GetHybridMonitorDatasData
- Labels
List<Pulumi.
Ali Cloud. Cms. Inputs. Get Hybrid Monitor Datas Data Label> The label of the time dimension.
- Metric
Name string The name of the monitoring indicator.
- Values
List<Pulumi.
Ali Cloud. Cms. Inputs. Get Hybrid Monitor Datas Data Value> The metric values that are collected at different timestamps.
- Labels
[]Get
Hybrid Monitor Datas Data Label The label of the time dimension.
- Metric
Name string The name of the monitoring indicator.
- Values
[]Get
Hybrid Monitor Datas Data Value The metric values that are collected at different timestamps.
- labels
List<Get
Hybrid Monitor Datas Data Label> The label of the time dimension.
- metric
Name String The name of the monitoring indicator.
- values
List<Get
Hybrid Monitor Datas Data Value> The metric values that are collected at different timestamps.
- labels
Get
Hybrid Monitor Datas Data Label[] The label of the time dimension.
- metric
Name string The name of the monitoring indicator.
- values
Get
Hybrid Monitor Datas Data Value[] The metric values that are collected at different timestamps.
- labels
Sequence[Get
Hybrid Monitor Datas Data Label] The label of the time dimension.
- metric_
name str The name of the monitoring indicator.
- values
Sequence[Get
Hybrid Monitor Datas Data Value] The metric values that are collected at different timestamps.
- labels List<Property Map>
The label of the time dimension.
- metric
Name String The name of the monitoring indicator.
- values List<Property Map>
The metric values that are collected at different timestamps.
GetHybridMonitorDatasDataLabel
GetHybridMonitorDatasDataValue
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.