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

tencentcloud.getCamGroups

Explore with Pulumi AI

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

    Use this data source to query detailed information of CAM groups

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = tencentcloud.getCamGroups({
        groupId: tencentcloud_cam_group.foo.id,
    });
    const bar = tencentcloud.getCamGroups({
        name: "cam-group-test",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.get_cam_groups(group_id=tencentcloud_cam_group["foo"]["id"])
    bar = tencentcloud.get_cam_groups(name="cam-group-test")
    
    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 {
    		_, err := tencentcloud.GetCamGroups(ctx, &tencentcloud.GetCamGroupsArgs{
    			GroupId: pulumi.StringRef(tencentcloud_cam_group.Foo.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.GetCamGroups(ctx, &tencentcloud.GetCamGroupsArgs{
    			Name: pulumi.StringRef("cam-group-test"),
    		}, 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 foo = Tencentcloud.GetCamGroups.Invoke(new()
        {
            GroupId = tencentcloud_cam_group.Foo.Id,
        });
    
        var bar = Tencentcloud.GetCamGroups.Invoke(new()
        {
            Name = "cam-group-test",
        });
    
    });
    
    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.GetCamGroupsArgs;
    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 foo = TencentcloudFunctions.getCamGroups(GetCamGroupsArgs.builder()
                .groupId(tencentcloud_cam_group.foo().id())
                .build());
    
            final var bar = TencentcloudFunctions.getCamGroups(GetCamGroupsArgs.builder()
                .name("cam-group-test")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: tencentcloud:getCamGroups
          arguments:
            groupId: ${tencentcloud_cam_group.foo.id}
      bar:
        fn::invoke:
          function: tencentcloud:getCamGroups
          arguments:
            name: cam-group-test
    

    Using getCamGroups

    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 getCamGroups(args: GetCamGroupsArgs, opts?: InvokeOptions): Promise<GetCamGroupsResult>
    function getCamGroupsOutput(args: GetCamGroupsOutputArgs, opts?: InvokeOptions): Output<GetCamGroupsResult>
    def get_cam_groups(group_id: Optional[str] = None,
                       id: Optional[str] = None,
                       name: Optional[str] = None,
                       remark: Optional[str] = None,
                       result_output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetCamGroupsResult
    def get_cam_groups_output(group_id: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       remark: Optional[pulumi.Input[str]] = None,
                       result_output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetCamGroupsResult]
    func GetCamGroups(ctx *Context, args *GetCamGroupsArgs, opts ...InvokeOption) (*GetCamGroupsResult, error)
    func GetCamGroupsOutput(ctx *Context, args *GetCamGroupsOutputArgs, opts ...InvokeOption) GetCamGroupsResultOutput

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

    public static class GetCamGroups 
    {
        public static Task<GetCamGroupsResult> InvokeAsync(GetCamGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetCamGroupsResult> Invoke(GetCamGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCamGroupsResult> getCamGroups(GetCamGroupsArgs args, InvokeOptions options)
    public static Output<GetCamGroupsResult> getCamGroups(GetCamGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCamGroups:getCamGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupId string
    ID of CAM group to be queried.
    Id string
    Name string
    Name of the CAM group to be queried.
    Remark string
    Description of the cam group to be queried.
    ResultOutputFile string
    Used to save results.
    GroupId string
    ID of CAM group to be queried.
    Id string
    Name string
    Name of the CAM group to be queried.
    Remark string
    Description of the cam group to be queried.
    ResultOutputFile string
    Used to save results.
    groupId String
    ID of CAM group to be queried.
    id String
    name String
    Name of the CAM group to be queried.
    remark String
    Description of the cam group to be queried.
    resultOutputFile String
    Used to save results.
    groupId string
    ID of CAM group to be queried.
    id string
    name string
    Name of the CAM group to be queried.
    remark string
    Description of the cam group to be queried.
    resultOutputFile string
    Used to save results.
    group_id str
    ID of CAM group to be queried.
    id str
    name str
    Name of the CAM group to be queried.
    remark str
    Description of the cam group to be queried.
    result_output_file str
    Used to save results.
    groupId String
    ID of CAM group to be queried.
    id String
    name String
    Name of the CAM group to be queried.
    remark String
    Description of the cam group to be queried.
    resultOutputFile String
    Used to save results.

    getCamGroups Result

    The following output properties are available:

    GroupLists List<GetCamGroupsGroupList>
    A list of CAM groups. Each element contains the following attributes:
    Id string
    GroupId string
    ID of the CAM group.
    Name string
    Name of CAM group.
    Remark string
    Description of CAM group.
    ResultOutputFile string
    GroupLists []GetCamGroupsGroupList
    A list of CAM groups. Each element contains the following attributes:
    Id string
    GroupId string
    ID of the CAM group.
    Name string
    Name of CAM group.
    Remark string
    Description of CAM group.
    ResultOutputFile string
    groupLists List<GetCamGroupsGroupList>
    A list of CAM groups. Each element contains the following attributes:
    id String
    groupId String
    ID of the CAM group.
    name String
    Name of CAM group.
    remark String
    Description of CAM group.
    resultOutputFile String
    groupLists GetCamGroupsGroupList[]
    A list of CAM groups. Each element contains the following attributes:
    id string
    groupId string
    ID of the CAM group.
    name string
    Name of CAM group.
    remark string
    Description of CAM group.
    resultOutputFile string
    group_lists Sequence[GetCamGroupsGroupList]
    A list of CAM groups. Each element contains the following attributes:
    id str
    group_id str
    ID of the CAM group.
    name str
    Name of CAM group.
    remark str
    Description of CAM group.
    result_output_file str
    groupLists List<Property Map>
    A list of CAM groups. Each element contains the following attributes:
    id String
    groupId String
    ID of the CAM group.
    name String
    Name of CAM group.
    remark String
    Description of CAM group.
    resultOutputFile String

    Supporting Types

    GetCamGroupsGroupList

    CreateTime string
    Create time of the CAM group.
    GroupId string
    ID of CAM group to be queried.
    Name string
    Name of the CAM group to be queried.
    Remark string
    Description of the cam group to be queried.
    CreateTime string
    Create time of the CAM group.
    GroupId string
    ID of CAM group to be queried.
    Name string
    Name of the CAM group to be queried.
    Remark string
    Description of the cam group to be queried.
    createTime String
    Create time of the CAM group.
    groupId String
    ID of CAM group to be queried.
    name String
    Name of the CAM group to be queried.
    remark String
    Description of the cam group to be queried.
    createTime string
    Create time of the CAM group.
    groupId string
    ID of CAM group to be queried.
    name string
    Name of the CAM group to be queried.
    remark string
    Description of the cam group to be queried.
    create_time str
    Create time of the CAM group.
    group_id str
    ID of CAM group to be queried.
    name str
    Name of the CAM group to be queried.
    remark str
    Description of the cam group to be queried.
    createTime String
    Create time of the CAM group.
    groupId String
    ID of CAM group to be queried.
    name String
    Name of the CAM group to be queried.
    remark String
    Description of the cam group to be queried.

    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