tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getSecurityGroups
Start a Neo task
Explain and create a tencentcloud.getSecurityGroups resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query detailed information of security groups.
Example Usage
Query all security groups
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = tencentcloud.getSecurityGroups({});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.get_security_groups()
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.GetSecurityGroups(ctx, &tencentcloud.GetSecurityGroupsArgs{}, 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 example = Tencentcloud.GetSecurityGroups.Invoke();
});
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.GetSecurityGroupsArgs;
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 example = TencentcloudFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
.build());
}
}
variables:
example:
fn::invoke:
function: tencentcloud:getSecurityGroups
arguments: {}
Using getSecurityGroups
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 getSecurityGroups(args: GetSecurityGroupsArgs, opts?: InvokeOptions): Promise<GetSecurityGroupsResult>
function getSecurityGroupsOutput(args: GetSecurityGroupsOutputArgs, opts?: InvokeOptions): Output<GetSecurityGroupsResult>def get_security_groups(id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
result_output_file: Optional[str] = None,
security_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityGroupsResult
def get_security_groups_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
security_group_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGroupsResult]func GetSecurityGroups(ctx *Context, args *GetSecurityGroupsArgs, opts ...InvokeOption) (*GetSecurityGroupsResult, error)
func GetSecurityGroupsOutput(ctx *Context, args *GetSecurityGroupsOutputArgs, opts ...InvokeOption) GetSecurityGroupsResultOutput> Note: This function is named GetSecurityGroups in the Go SDK.
public static class GetSecurityGroups
{
public static Task<GetSecurityGroupsResult> InvokeAsync(GetSecurityGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityGroupsResult> Invoke(GetSecurityGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecurityGroupsResult> getSecurityGroups(GetSecurityGroupsArgs args, InvokeOptions options)
public static Output<GetSecurityGroupsResult> getSecurityGroups(GetSecurityGroupsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getSecurityGroups:getSecurityGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- Name string
- Name of the security group to be queried. Conflict with
security_group_id. - Project
Id double - Project ID of the security group to be queried. Conflict with
security_group_id. - Result
Output stringFile - Used to save results.
- Security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Dictionary<string, string>
- Tags of the security group to be queried. Conflict with
security_group_id.
- Id string
- Name string
- Name of the security group to be queried. Conflict with
security_group_id. - Project
Id float64 - Project ID of the security group to be queried. Conflict with
security_group_id. - Result
Output stringFile - Used to save results.
- Security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - map[string]string
- Tags of the security group to be queried. Conflict with
security_group_id.
- id String
- name String
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id Double - Project ID of the security group to be queried. Conflict with
security_group_id. - result
Output StringFile - Used to save results.
- security
Group StringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Map<String,String>
- Tags of the security group to be queried. Conflict with
security_group_id.
- id string
- name string
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id number - Project ID of the security group to be queried. Conflict with
security_group_id. - result
Output stringFile - Used to save results.
- security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - {[key: string]: string}
- Tags of the security group to be queried. Conflict with
security_group_id.
- id str
- name str
- Name of the security group to be queried. Conflict with
security_group_id. - project_
id float - Project ID of the security group to be queried. Conflict with
security_group_id. - result_
output_ strfile - Used to save results.
- security_
group_ strid - ID of the security group to be queried. Conflict with
nameandproject_id. - Mapping[str, str]
- Tags of the security group to be queried. Conflict with
security_group_id.
- id String
- name String
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id Number - Project ID of the security group to be queried. Conflict with
security_group_id. - result
Output StringFile - Used to save results.
- security
Group StringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Map<String>
- Tags of the security group to be queried. Conflict with
security_group_id.
getSecurityGroups Result
The following output properties are available:
- Id string
- Security
Groups List<GetSecurity Groups Security Group> - Information list of security group.
- Name string
- Name of the security group.
- Project
Id double - Project ID of the security group.
- Result
Output stringFile - Security
Group stringId - ID of the security group.
- Dictionary<string, string>
- Tags of the security group.
- Id string
- Security
Groups []GetSecurity Groups Security Group - Information list of security group.
- Name string
- Name of the security group.
- Project
Id float64 - Project ID of the security group.
- Result
Output stringFile - Security
Group stringId - ID of the security group.
- map[string]string
- Tags of the security group.
- id String
- security
Groups List<GetSecurity Groups Security Group> - Information list of security group.
- name String
- Name of the security group.
- project
Id Double - Project ID of the security group.
- result
Output StringFile - security
Group StringId - ID of the security group.
- Map<String,String>
- Tags of the security group.
- id string
- security
Groups GetSecurity Groups Security Group[] - Information list of security group.
- name string
- Name of the security group.
- project
Id number - Project ID of the security group.
- result
Output stringFile - security
Group stringId - ID of the security group.
- {[key: string]: string}
- Tags of the security group.
- id str
- security_
groups Sequence[GetSecurity Groups Security Group] - Information list of security group.
- name str
- Name of the security group.
- project_
id float - Project ID of the security group.
- result_
output_ strfile - security_
group_ strid - ID of the security group.
- Mapping[str, str]
- Tags of the security group.
- id String
- security
Groups List<Property Map> - Information list of security group.
- name String
- Name of the security group.
- project
Id Number - Project ID of the security group.
- result
Output StringFile - security
Group StringId - ID of the security group.
- Map<String>
- Tags of the security group.
Supporting Types
GetSecurityGroupsSecurityGroup
- Be
Associate doubleCount - Number of security group binding resources.
- Create
Time string - Creation time of security group.
- Description string
- Description of the security group.
- Egresses List<string>
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - Ingresses List<string>
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - Name string
- Name of the security group to be queried. Conflict with
security_group_id. - Project
Id double - Project ID of the security group to be queried. Conflict with
security_group_id. - Security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Dictionary<string, string>
- Tags of the security group to be queried. Conflict with
security_group_id.
- Be
Associate float64Count - Number of security group binding resources.
- Create
Time string - Creation time of security group.
- Description string
- Description of the security group.
- Egresses []string
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - Ingresses []string
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - Name string
- Name of the security group to be queried. Conflict with
security_group_id. - Project
Id float64 - Project ID of the security group to be queried. Conflict with
security_group_id. - Security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - map[string]string
- Tags of the security group to be queried. Conflict with
security_group_id.
- be
Associate DoubleCount - Number of security group binding resources.
- create
Time String - Creation time of security group.
- description String
- Description of the security group.
- egresses List<String>
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - ingresses List<String>
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - name String
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id Double - Project ID of the security group to be queried. Conflict with
security_group_id. - security
Group StringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Map<String,String>
- Tags of the security group to be queried. Conflict with
security_group_id.
- be
Associate numberCount - Number of security group binding resources.
- create
Time string - Creation time of security group.
- description string
- Description of the security group.
- egresses string[]
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - ingresses string[]
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - name string
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id number - Project ID of the security group to be queried. Conflict with
security_group_id. - security
Group stringId - ID of the security group to be queried. Conflict with
nameandproject_id. - {[key: string]: string}
- Tags of the security group to be queried. Conflict with
security_group_id.
- be_
associate_ floatcount - Number of security group binding resources.
- create_
time str - Creation time of security group.
- description str
- Description of the security group.
- egresses Sequence[str]
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - ingresses Sequence[str]
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - name str
- Name of the security group to be queried. Conflict with
security_group_id. - project_
id float - Project ID of the security group to be queried. Conflict with
security_group_id. - security_
group_ strid - ID of the security group to be queried. Conflict with
nameandproject_id. - Mapping[str, str]
- Tags of the security group to be queried. Conflict with
security_group_id.
- be
Associate NumberCount - Number of security group binding resources.
- create
Time String - Creation time of security group.
- description String
- Description of the security group.
- egresses List<String>
- Egress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - ingresses List<String>
- Ingress rules set. For items like
[action]#<span pulumi-lang-nodejs="[cidrIp]" pulumi-lang-dotnet="[CidrIp]" pulumi-lang-go="[cidrIp]" pulumi-lang-python="[cidr_ip]" pulumi-lang-yaml="[cidrIp]" pulumi-lang-java="[cidrIp]">[cidr_ip]</span>#[port]#[protocol], it means a regular rule; for items likesg-XXXX, it means a nested security group. - name String
- Name of the security group to be queried. Conflict with
security_group_id. - project
Id Number - Project ID of the security group to be queried. Conflict with
security_group_id. - security
Group StringId - ID of the security group to be queried. Conflict with
nameandproject_id. - Map<String>
- Tags of the security group to be queried. Conflict with
security_group_id.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
