1. Packages
  2. Volcengine
  3. API Docs
  4. vpc
  5. SecurityGroups
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.vpc.SecurityGroups

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Use this data source to query detailed information of security groups

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Volcengine.Vpc.SecurityGroups.Invoke(new()
        {
            Ids = new[]
            {
                "sg-273ycgql3ig3k7fap8t3dyvqx",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpc.SecurityGroups(ctx, &vpc.SecurityGroupsArgs{
    			Ids: []string{
    				"sg-273ycgql3ig3k7fap8t3dyvqx",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.VpcFunctions;
    import com.pulumi.volcengine.vpc.inputs.SecurityGroupsArgs;
    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 = VpcFunctions.SecurityGroups(SecurityGroupsArgs.builder()
                .ids("sg-273ycgql3ig3k7fap8t3dyvqx")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.vpc.security_groups(ids=["sg-273ycgql3ig3k7fap8t3dyvqx"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.vpc.SecurityGroups({
        ids: ["sg-273ycgql3ig3k7fap8t3dyvqx"],
    });
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:vpc:SecurityGroups
          Arguments:
            ids:
              - sg-273ycgql3ig3k7fap8t3dyvqx
    

    Using SecurityGroups

    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 securityGroups(args: SecurityGroupsArgs, opts?: InvokeOptions): Promise<SecurityGroupsResult>
    function securityGroupsOutput(args: SecurityGroupsOutputArgs, opts?: InvokeOptions): Output<SecurityGroupsResult>
    def security_groups(ids: Optional[Sequence[str]] = None,
                        name_regex: Optional[str] = None,
                        output_file: Optional[str] = None,
                        project_name: Optional[str] = None,
                        security_group_names: Optional[Sequence[str]] = None,
                        tags: Optional[Sequence[SecurityGroupsTag]] = None,
                        vpc_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> SecurityGroupsResult
    def security_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        name_regex: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        project_name: Optional[pulumi.Input[str]] = None,
                        security_group_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        tags: Optional[pulumi.Input[Sequence[pulumi.Input[SecurityGroupsTagArgs]]]] = None,
                        vpc_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[SecurityGroupsResult]
    func SecurityGroups(ctx *Context, args *SecurityGroupsArgs, opts ...InvokeOption) (*SecurityGroupsResult, error)
    func SecurityGroupsOutput(ctx *Context, args *SecurityGroupsOutputArgs, opts ...InvokeOption) SecurityGroupsResultOutput
    public static class SecurityGroups 
    {
        public static Task<SecurityGroupsResult> InvokeAsync(SecurityGroupsArgs args, InvokeOptions? opts = null)
        public static Output<SecurityGroupsResult> Invoke(SecurityGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<SecurityGroupsResult> securityGroups(SecurityGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:vpc:SecurityGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of SecurityGroup IDs.
    NameRegex string
    A Name Regex of SecurityGroup.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupNames List<string>
    The list of security group name to query.
    Tags List<SecurityGroupsTag>
    Tags.
    VpcId string
    The ID of vpc where security group is located.
    Ids []string
    A list of SecurityGroup IDs.
    NameRegex string
    A Name Regex of SecurityGroup.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupNames []string
    The list of security group name to query.
    Tags []SecurityGroupsTag
    Tags.
    VpcId string
    The ID of vpc where security group is located.
    ids List<String>
    A list of SecurityGroup IDs.
    nameRegex String
    A Name Regex of SecurityGroup.
    outputFile String
    File name where to save data source results.
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupNames List<String>
    The list of security group name to query.
    tags List<SecurityGroupsTag>
    Tags.
    vpcId String
    The ID of vpc where security group is located.
    ids string[]
    A list of SecurityGroup IDs.
    nameRegex string
    A Name Regex of SecurityGroup.
    outputFile string
    File name where to save data source results.
    projectName string
    The ProjectName of SecurityGroup.
    securityGroupNames string[]
    The list of security group name to query.
    tags SecurityGroupsTag[]
    Tags.
    vpcId string
    The ID of vpc where security group is located.
    ids Sequence[str]
    A list of SecurityGroup IDs.
    name_regex str
    A Name Regex of SecurityGroup.
    output_file str
    File name where to save data source results.
    project_name str
    The ProjectName of SecurityGroup.
    security_group_names Sequence[str]
    The list of security group name to query.
    tags Sequence[SecurityGroupsTag]
    Tags.
    vpc_id str
    The ID of vpc where security group is located.
    ids List<String>
    A list of SecurityGroup IDs.
    nameRegex String
    A Name Regex of SecurityGroup.
    outputFile String
    File name where to save data source results.
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupNames List<String>
    The list of security group name to query.
    tags List<Property Map>
    Tags.
    vpcId String
    The ID of vpc where security group is located.

    SecurityGroups Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    SecurityGroups List<SecurityGroupsSecurityGroup>
    The collection of SecurityGroup query.
    TotalCount int
    The total count of SecurityGroup query.
    Ids List<string>
    NameRegex string
    OutputFile string
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupNames List<string>
    Tags List<SecurityGroupsTag>
    Tags.
    VpcId string
    The ID of Vpc.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecurityGroups []SecurityGroupsSecurityGroup
    The collection of SecurityGroup query.
    TotalCount int
    The total count of SecurityGroup query.
    Ids []string
    NameRegex string
    OutputFile string
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupNames []string
    Tags []SecurityGroupsTag
    Tags.
    VpcId string
    The ID of Vpc.
    id String
    The provider-assigned unique ID for this managed resource.
    securityGroups List<SecurityGroupsSecurityGroup>
    The collection of SecurityGroup query.
    totalCount Integer
    The total count of SecurityGroup query.
    ids List<String>
    nameRegex String
    outputFile String
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupNames List<String>
    tags List<SecurityGroupsTag>
    Tags.
    vpcId String
    The ID of Vpc.
    id string
    The provider-assigned unique ID for this managed resource.
    securityGroups SecurityGroupsSecurityGroup[]
    The collection of SecurityGroup query.
    totalCount number
    The total count of SecurityGroup query.
    ids string[]
    nameRegex string
    outputFile string
    projectName string
    The ProjectName of SecurityGroup.
    securityGroupNames string[]
    tags SecurityGroupsTag[]
    Tags.
    vpcId string
    The ID of Vpc.
    id str
    The provider-assigned unique ID for this managed resource.
    security_groups Sequence[SecurityGroupsSecurityGroup]
    The collection of SecurityGroup query.
    total_count int
    The total count of SecurityGroup query.
    ids Sequence[str]
    name_regex str
    output_file str
    project_name str
    The ProjectName of SecurityGroup.
    security_group_names Sequence[str]
    tags Sequence[SecurityGroupsTag]
    Tags.
    vpc_id str
    The ID of Vpc.
    id String
    The provider-assigned unique ID for this managed resource.
    securityGroups List<Property Map>
    The collection of SecurityGroup query.
    totalCount Number
    The total count of SecurityGroup query.
    ids List<String>
    nameRegex String
    outputFile String
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupNames List<String>
    tags List<Property Map>
    Tags.
    vpcId String
    The ID of Vpc.

    Supporting Types

    SecurityGroupsSecurityGroup

    CreationTime string
    The creation time of SecurityGroup.
    Description string
    The description of SecurityGroup.
    Id string
    The ID of SecurityGroup.
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupId string
    The ID of SecurityGroup.
    SecurityGroupName string
    The Name of SecurityGroup.
    Status string
    The Status of SecurityGroup.
    Tags List<SecurityGroupsSecurityGroupTag>
    Tags.
    Type string
    A Name Regex of SecurityGroup.
    VpcId string
    The ID of vpc where security group is located.
    CreationTime string
    The creation time of SecurityGroup.
    Description string
    The description of SecurityGroup.
    Id string
    The ID of SecurityGroup.
    ProjectName string
    The ProjectName of SecurityGroup.
    SecurityGroupId string
    The ID of SecurityGroup.
    SecurityGroupName string
    The Name of SecurityGroup.
    Status string
    The Status of SecurityGroup.
    Tags []SecurityGroupsSecurityGroupTag
    Tags.
    Type string
    A Name Regex of SecurityGroup.
    VpcId string
    The ID of vpc where security group is located.
    creationTime String
    The creation time of SecurityGroup.
    description String
    The description of SecurityGroup.
    id String
    The ID of SecurityGroup.
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupId String
    The ID of SecurityGroup.
    securityGroupName String
    The Name of SecurityGroup.
    status String
    The Status of SecurityGroup.
    tags List<SecurityGroupsSecurityGroupTag>
    Tags.
    type String
    A Name Regex of SecurityGroup.
    vpcId String
    The ID of vpc where security group is located.
    creationTime string
    The creation time of SecurityGroup.
    description string
    The description of SecurityGroup.
    id string
    The ID of SecurityGroup.
    projectName string
    The ProjectName of SecurityGroup.
    securityGroupId string
    The ID of SecurityGroup.
    securityGroupName string
    The Name of SecurityGroup.
    status string
    The Status of SecurityGroup.
    tags SecurityGroupsSecurityGroupTag[]
    Tags.
    type string
    A Name Regex of SecurityGroup.
    vpcId string
    The ID of vpc where security group is located.
    creation_time str
    The creation time of SecurityGroup.
    description str
    The description of SecurityGroup.
    id str
    The ID of SecurityGroup.
    project_name str
    The ProjectName of SecurityGroup.
    security_group_id str
    The ID of SecurityGroup.
    security_group_name str
    The Name of SecurityGroup.
    status str
    The Status of SecurityGroup.
    tags Sequence[SecurityGroupsSecurityGroupTag]
    Tags.
    type str
    A Name Regex of SecurityGroup.
    vpc_id str
    The ID of vpc where security group is located.
    creationTime String
    The creation time of SecurityGroup.
    description String
    The description of SecurityGroup.
    id String
    The ID of SecurityGroup.
    projectName String
    The ProjectName of SecurityGroup.
    securityGroupId String
    The ID of SecurityGroup.
    securityGroupName String
    The Name of SecurityGroup.
    status String
    The Status of SecurityGroup.
    tags List<Property Map>
    Tags.
    type String
    A Name Regex of SecurityGroup.
    vpcId String
    The ID of vpc where security group is located.

    SecurityGroupsSecurityGroupTag

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    SecurityGroupsTag

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine