1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getMonitorBindingObjects
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getMonitorBindingObjects

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query policy group binding objects.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const name = tencentcloud.getMonitorPolicyGroups({
        name: "test",
    });
    const objects = name.then(name => tencentcloud.getMonitorBindingObjects({
        groupId: name.lists?.[0]?.groupId,
    }));
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    name = tencentcloud.get_monitor_policy_groups(name="test")
    objects = tencentcloud.get_monitor_binding_objects(group_id=name.lists[0].group_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		name, err := tencentcloud.GetMonitorPolicyGroups(ctx, &tencentcloud.GetMonitorPolicyGroupsArgs{
    			Name: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.GetMonitorBindingObjects(ctx, &tencentcloud.GetMonitorBindingObjectsArgs{
    			GroupId: name.Lists[0].GroupId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var name = Tencentcloud.GetMonitorPolicyGroups.Invoke(new()
        {
            Name = "test",
        });
    
        var objects = Tencentcloud.GetMonitorBindingObjects.Invoke(new()
        {
            GroupId = name.Apply(getMonitorPolicyGroupsResult => getMonitorPolicyGroupsResult.Lists[0]?.GroupId),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetMonitorPolicyGroupsArgs;
    import com.pulumi.tencentcloud.inputs.GetMonitorBindingObjectsArgs;
    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 name = TencentcloudFunctions.getMonitorPolicyGroups(GetMonitorPolicyGroupsArgs.builder()
                .name("test")
                .build());
    
            final var objects = TencentcloudFunctions.getMonitorBindingObjects(GetMonitorBindingObjectsArgs.builder()
                .groupId(name.applyValue(getMonitorPolicyGroupsResult -> getMonitorPolicyGroupsResult.lists()[0].groupId()))
                .build());
    
        }
    }
    
    variables:
      name:
        fn::invoke:
          function: tencentcloud:getMonitorPolicyGroups
          arguments:
            name: test
      objects:
        fn::invoke:
          function: tencentcloud:getMonitorBindingObjects
          arguments:
            groupId: ${name.lists[0].groupId}
    

    Using getMonitorBindingObjects

    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 getMonitorBindingObjects(args: GetMonitorBindingObjectsArgs, opts?: InvokeOptions): Promise<GetMonitorBindingObjectsResult>
    function getMonitorBindingObjectsOutput(args: GetMonitorBindingObjectsOutputArgs, opts?: InvokeOptions): Output<GetMonitorBindingObjectsResult>
    def get_monitor_binding_objects(group_id: Optional[float] = None,
                                    id: Optional[str] = None,
                                    result_output_file: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetMonitorBindingObjectsResult
    def get_monitor_binding_objects_output(group_id: Optional[pulumi.Input[float]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    result_output_file: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetMonitorBindingObjectsResult]
    func GetMonitorBindingObjects(ctx *Context, args *GetMonitorBindingObjectsArgs, opts ...InvokeOption) (*GetMonitorBindingObjectsResult, error)
    func GetMonitorBindingObjectsOutput(ctx *Context, args *GetMonitorBindingObjectsOutputArgs, opts ...InvokeOption) GetMonitorBindingObjectsResultOutput

    > Note: This function is named GetMonitorBindingObjects in the Go SDK.

    public static class GetMonitorBindingObjects 
    {
        public static Task<GetMonitorBindingObjectsResult> InvokeAsync(GetMonitorBindingObjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetMonitorBindingObjectsResult> Invoke(GetMonitorBindingObjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMonitorBindingObjectsResult> getMonitorBindingObjects(GetMonitorBindingObjectsArgs args, InvokeOptions options)
    public static Output<GetMonitorBindingObjectsResult> getMonitorBindingObjects(GetMonitorBindingObjectsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMonitorBindingObjects:getMonitorBindingObjects
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupId double
    Policy group ID for query.
    Id string
    ResultOutputFile string
    Used to store results.
    GroupId float64
    Policy group ID for query.
    Id string
    ResultOutputFile string
    Used to store results.
    groupId Double
    Policy group ID for query.
    id String
    resultOutputFile String
    Used to store results.
    groupId number
    Policy group ID for query.
    id string
    resultOutputFile string
    Used to store results.
    group_id float
    Policy group ID for query.
    id str
    result_output_file str
    Used to store results.
    groupId Number
    Policy group ID for query.
    id String
    resultOutputFile String
    Used to store results.

    getMonitorBindingObjects Result

    The following output properties are available:

    GroupId double
    Id string
    Lists List<GetMonitorBindingObjectsList>
    A list objects. Each element contains the following attributes:
    ResultOutputFile string
    GroupId float64
    Id string
    Lists []GetMonitorBindingObjectsList
    A list objects. Each element contains the following attributes:
    ResultOutputFile string
    groupId Double
    id String
    lists List<GetMonitorBindingObjectsList>
    A list objects. Each element contains the following attributes:
    resultOutputFile String
    groupId number
    id string
    lists GetMonitorBindingObjectsList[]
    A list objects. Each element contains the following attributes:
    resultOutputFile string
    group_id float
    id str
    lists Sequence[GetMonitorBindingObjectsList]
    A list objects. Each element contains the following attributes:
    result_output_file str
    groupId Number
    id String
    lists List<Property Map>
    A list objects. Each element contains the following attributes:
    resultOutputFile String

    Supporting Types

    GetMonitorBindingObjectsList

    DimensionsJson string
    Represents a collection of dimensions of an object instance, json format.
    IsShielded double
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    Region string
    The region where the object is located.
    UniqueId string
    Object unique ID.
    DimensionsJson string
    Represents a collection of dimensions of an object instance, json format.
    IsShielded float64
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    Region string
    The region where the object is located.
    UniqueId string
    Object unique ID.
    dimensionsJson String
    Represents a collection of dimensions of an object instance, json format.
    isShielded Double
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    region String
    The region where the object is located.
    uniqueId String
    Object unique ID.
    dimensionsJson string
    Represents a collection of dimensions of an object instance, json format.
    isShielded number
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    region string
    The region where the object is located.
    uniqueId string
    Object unique ID.
    dimensions_json str
    Represents a collection of dimensions of an object instance, json format.
    is_shielded float
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    region str
    The region where the object is located.
    unique_id str
    Object unique ID.
    dimensionsJson String
    Represents a collection of dimensions of an object instance, json format.
    isShielded Number
    Whether the object is shielded or not, 0 means unshielded and 1 means shielded.
    region String
    The region where the object is located.
    uniqueId String
    Object unique ID.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack