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

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.SecurityGroup

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

    Create SecurityGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecurityGroup(name: string, args: SecurityGroupArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroup(resource_name: str,
                      args: SecurityGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      group_description: Optional[str] = None,
                      group_name: Optional[str] = None,
                      security_group_egress: Optional[Sequence[SecurityGroupEgressArgs]] = None,
                      security_group_ingress: Optional[Sequence[SecurityGroupIngressArgs]] = None,
                      tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
                      vpc_id: Optional[str] = None)
    func NewSecurityGroup(ctx *Context, name string, args SecurityGroupArgs, opts ...ResourceOption) (*SecurityGroup, error)
    public SecurityGroup(string name, SecurityGroupArgs args, CustomResourceOptions? opts = null)
    public SecurityGroup(String name, SecurityGroupArgs args)
    public SecurityGroup(String name, SecurityGroupArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:SecurityGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const securityGroupResource = new aws_native.ec2.SecurityGroup("securityGroupResource", {
        groupDescription: "string",
        groupName: "string",
        securityGroupEgress: [{
            ipProtocol: "string",
            cidrIp: "string",
            cidrIpv6: "string",
            description: "string",
            destinationPrefixListId: "string",
            destinationSecurityGroupId: "string",
            fromPort: 0,
            toPort: 0,
        }],
        securityGroupIngress: [{
            ipProtocol: "string",
            cidrIp: "string",
            cidrIpv6: "string",
            description: "string",
            fromPort: 0,
            sourcePrefixListId: "string",
            sourceSecurityGroupId: "string",
            sourceSecurityGroupName: "string",
            sourceSecurityGroupOwnerId: "string",
            toPort: 0,
        }],
        tags: [{
            key: "string",
            value: "string",
        }],
        vpcId: "string",
    });
    
    Coming soon!
    

    SecurityGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecurityGroup resource accepts the following input properties:

    GroupDescription string
    A description for the security group.
    GroupName string
    The name of the security group.
    SecurityGroupEgress List<Pulumi.AwsNative.Ec2.Inputs.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.Inputs.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.Inputs.Tag>
    Any tags assigned to the security group.
    VpcId string
    The ID of the VPC for the security group.
    GroupDescription string
    A description for the security group.
    GroupName string
    The name of the security group.
    SecurityGroupEgress []SecurityGroupEgressTypeArgs
    [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 []SecurityGroupIngressTypeArgs
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    Tags TagArgs
    Any tags assigned to the security group.
    VpcId string
    The ID of the VPC for the security group.
    groupDescription String
    A description for the security group.
    groupName String
    The name of the security group.
    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.
    vpcId String
    The ID of the VPC for the security group.
    groupDescription string
    A description for the security group.
    groupName string
    The name of the security group.
    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.
    vpcId string
    The ID of the VPC for the security group.
    group_description str
    A description for the security group.
    group_name str
    The name of the security group.
    security_group_egress Sequence[SecurityGroupEgressArgs]
    [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[SecurityGroupIngressArgs]
    The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
    tags Sequence[TagArgs]
    Any tags assigned to the security group.
    vpc_id str
    The ID of the VPC for the security group.
    groupDescription String
    A description for the security group.
    groupName String
    The name of the security group.
    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.
    vpcId String
    The ID of the VPC for the security group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityGroup resource produces the following output properties:

    AwsId string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    GroupId string
    The group ID of the specified security group.
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    GroupId string
    The group ID of the specified security group.
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The group name or group ID depending on whether the SG is created in default or specific VPC
    groupId String
    The group ID of the specified security group.
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The group name or group ID depending on whether the SG is created in default or specific VPC
    groupId string
    The group ID of the specified security group.
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The group name or group ID depending on whether the SG is created in default or specific VPC
    group_id str
    The group ID of the specified security group.
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The group name or group ID depending on whether the SG is created in default or specific VPC
    groupId String
    The group ID of the specified security group.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    SecurityGroupEgress, SecurityGroupEgressArgs

    SecurityGroupIngress, SecurityGroupIngressArgs

    Tag, TagArgs

    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