1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. getSecurityGroup

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.105.0 published on Thursday, May 2, 2024 by Pulumi

aws-native.ec2.getSecurityGroup

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.105.0 published on Thursday, May 2, 2024 by Pulumi

    Resource Type definition for AWS::EC2::SecurityGroup

    Using getSecurityGroup

    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 getSecurityGroup(args: GetSecurityGroupArgs, opts?: InvokeOptions): Promise<GetSecurityGroupResult>
    function getSecurityGroupOutput(args: GetSecurityGroupOutputArgs, opts?: InvokeOptions): Output<GetSecurityGroupResult>
    def get_security_group(id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetSecurityGroupResult
    def get_security_group_output(id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGroupResult]
    func LookupSecurityGroup(ctx *Context, args *LookupSecurityGroupArgs, opts ...InvokeOption) (*LookupSecurityGroupResult, error)
    func LookupSecurityGroupOutput(ctx *Context, args *LookupSecurityGroupOutputArgs, opts ...InvokeOption) LookupSecurityGroupResultOutput

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

    public static class GetSecurityGroup 
    {
        public static Task<GetSecurityGroupResult> InvokeAsync(GetSecurityGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityGroupResult> Invoke(GetSecurityGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityGroupResult> getSecurityGroup(GetSecurityGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:ec2:getSecurityGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    Id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    id String
    The group name or group ID depending on whether the SG is created in default or specific VPC
    id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    id str
    The group name or group ID depending on whether the SG is created in default or specific VPC
    id String
    The group name or group ID depending on whether the SG is created in default or specific VPC

    getSecurityGroup Result

    The following output properties are available:

    GroupId string
    The group ID of the specified security group.
    Id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    SecurityGroupEgress List<Pulumi.AwsNative.Ec2.Outputs.SecurityGroupEgress>
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    SecurityGroupIngress List<Pulumi.AwsNative.Ec2.Outputs.SecurityGroupIngress>
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    Any tags assigned to the security group.
    GroupId string
    The group ID of the specified security group.
    Id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    SecurityGroupEgress []SecurityGroupEgressType
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    SecurityGroupIngress []SecurityGroupIngressType
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    Tags Tag
    Any tags assigned to the security group.
    groupId String
    The group ID of the specified security group.
    id String
    The group name or group ID depending on whether the SG is created in default or specific VPC
    securityGroupEgress List<SecurityGroupEgress>
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    securityGroupIngress List<SecurityGroupIngress>
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    tags List<Tag>
    Any tags assigned to the security group.
    groupId string
    The group ID of the specified security group.
    id string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    securityGroupEgress SecurityGroupEgress[]
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    securityGroupIngress SecurityGroupIngress[]
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    tags Tag[]
    Any tags assigned to the security group.
    group_id str
    The group ID of the specified security group.
    id str
    The group name or group ID depending on whether the SG is created in default or specific VPC
    security_group_egress Sequence[SecurityGroupEgress]
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    security_group_ingress Sequence[SecurityGroupIngress]
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    tags Sequence[root_Tag]
    Any tags assigned to the security group.
    groupId String
    The group ID of the specified security group.
    id String
    The group name or group ID depending on whether the SG is created in default or specific VPC
    securityGroupEgress List<Property Map>
    [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    securityGroupIngress List<Property Map>
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    tags List<Property Map>
    Any tags assigned to the security group.

    Supporting Types

    SecurityGroupEgress

    SecurityGroupIngress

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.105.0 published on Thursday, May 2, 2024 by Pulumi