1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. getHybridMonitorDatas
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.cms.getHybridMonitorDatas

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    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

    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]);
    
    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])
    
    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
    	})
    }
    
    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 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]);
        }
    }
    
    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.
    PromSql 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.
    OutputFile 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.
    PromSql 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.
    OutputFile 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.
    promSql 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.
    outputFile 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.
    promSql 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.
    outputFile 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.
    promSql 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.
    outputFile 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.AliCloud.Cms.Outputs.GetHybridMonitorDatasData>
    End string
    Id string
    The provider-assigned unique ID for this managed resource.
    Namespace string
    PromSql string
    Start string
    OutputFile string
    Period string
    Datas []GetHybridMonitorDatasData
    End string
    Id string
    The provider-assigned unique ID for this managed resource.
    Namespace string
    PromSql string
    Start string
    OutputFile string
    Period string
    datas List<GetHybridMonitorDatasData>
    end String
    id String
    The provider-assigned unique ID for this managed resource.
    namespace String
    promSql String
    start String
    outputFile String
    period String
    datas GetHybridMonitorDatasData[]
    end string
    id string
    The provider-assigned unique ID for this managed resource.
    namespace string
    promSql string
    start string
    outputFile string
    period string
    datas Sequence[GetHybridMonitorDatasData]
    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
    promSql String
    start String
    outputFile String
    period String

    Supporting Types

    GetHybridMonitorDatasData

    Labels List<Pulumi.AliCloud.Cms.Inputs.GetHybridMonitorDatasDataLabel>
    The label of the time dimension.
    MetricName string
    The name of the monitoring indicator.
    Values List<Pulumi.AliCloud.Cms.Inputs.GetHybridMonitorDatasDataValue>
    The metric values that are collected at different timestamps.
    Labels []GetHybridMonitorDatasDataLabel
    The label of the time dimension.
    MetricName string
    The name of the monitoring indicator.
    Values []GetHybridMonitorDatasDataValue
    The metric values that are collected at different timestamps.
    labels List<GetHybridMonitorDatasDataLabel>
    The label of the time dimension.
    metricName String
    The name of the monitoring indicator.
    values List<GetHybridMonitorDatasDataValue>
    The metric values that are collected at different timestamps.
    labels GetHybridMonitorDatasDataLabel[]
    The label of the time dimension.
    metricName string
    The name of the monitoring indicator.
    values GetHybridMonitorDatasDataValue[]
    The metric values that are collected at different timestamps.
    labels Sequence[GetHybridMonitorDatasDataLabel]
    The label of the time dimension.
    metric_name str
    The name of the monitoring indicator.
    values Sequence[GetHybridMonitorDatasDataValue]
    The metric values that are collected at different timestamps.
    labels List<Property Map>
    The label of the time dimension.
    metricName String
    The name of the monitoring indicator.
    values List<Property Map>
    The metric values that are collected at different timestamps.

    GetHybridMonitorDatasDataLabel

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetHybridMonitorDatasDataValue

    Ts string
    Value string
    Ts string
    Value string
    ts String
    value String
    ts string
    value string
    ts str
    value str
    ts String
    value String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi