1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcSecurityGroupRulesExclusive
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Import

    Using pulumi import, import exclusive management of security group rules using the security_group_id. For example:

    $ pulumi import aws:ec2/vpcSecurityGroupRulesExclusive:VpcSecurityGroupRulesExclusive example sg-1234567890abcdef0
    

    Create VpcSecurityGroupRulesExclusive Resource

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

    Constructor syntax

    new VpcSecurityGroupRulesExclusive(name: string, args: VpcSecurityGroupRulesExclusiveArgs, opts?: CustomResourceOptions);
    @overload
    def VpcSecurityGroupRulesExclusive(resource_name: str,
                                       args: VpcSecurityGroupRulesExclusiveArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcSecurityGroupRulesExclusive(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       egress_rule_ids: Optional[Sequence[str]] = None,
                                       ingress_rule_ids: Optional[Sequence[str]] = None,
                                       security_group_id: Optional[str] = None,
                                       region: Optional[str] = None)
    func NewVpcSecurityGroupRulesExclusive(ctx *Context, name string, args VpcSecurityGroupRulesExclusiveArgs, opts ...ResourceOption) (*VpcSecurityGroupRulesExclusive, error)
    public VpcSecurityGroupRulesExclusive(string name, VpcSecurityGroupRulesExclusiveArgs args, CustomResourceOptions? opts = null)
    public VpcSecurityGroupRulesExclusive(String name, VpcSecurityGroupRulesExclusiveArgs args)
    public VpcSecurityGroupRulesExclusive(String name, VpcSecurityGroupRulesExclusiveArgs args, CustomResourceOptions options)
    
    type: aws:ec2:VpcSecurityGroupRulesExclusive
    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 VpcSecurityGroupRulesExclusiveArgs
    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 VpcSecurityGroupRulesExclusiveArgs
    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 VpcSecurityGroupRulesExclusiveArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcSecurityGroupRulesExclusiveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcSecurityGroupRulesExclusiveArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var vpcSecurityGroupRulesExclusiveResource = new Aws.Ec2.VpcSecurityGroupRulesExclusive("vpcSecurityGroupRulesExclusiveResource", new()
    {
        EgressRuleIds = new[]
        {
            "string",
        },
        IngressRuleIds = new[]
        {
            "string",
        },
        SecurityGroupId = "string",
        Region = "string",
    });
    
    example, err := ec2.NewVpcSecurityGroupRulesExclusive(ctx, "vpcSecurityGroupRulesExclusiveResource", &ec2.VpcSecurityGroupRulesExclusiveArgs{
    	EgressRuleIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IngressRuleIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SecurityGroupId: pulumi.String("string"),
    	Region:          pulumi.String("string"),
    })
    
    var vpcSecurityGroupRulesExclusiveResource = new VpcSecurityGroupRulesExclusive("vpcSecurityGroupRulesExclusiveResource", VpcSecurityGroupRulesExclusiveArgs.builder()
        .egressRuleIds("string")
        .ingressRuleIds("string")
        .securityGroupId("string")
        .region("string")
        .build());
    
    vpc_security_group_rules_exclusive_resource = aws.ec2.VpcSecurityGroupRulesExclusive("vpcSecurityGroupRulesExclusiveResource",
        egress_rule_ids=["string"],
        ingress_rule_ids=["string"],
        security_group_id="string",
        region="string")
    
    const vpcSecurityGroupRulesExclusiveResource = new aws.ec2.VpcSecurityGroupRulesExclusive("vpcSecurityGroupRulesExclusiveResource", {
        egressRuleIds: ["string"],
        ingressRuleIds: ["string"],
        securityGroupId: "string",
        region: "string",
    });
    
    type: aws:ec2:VpcSecurityGroupRulesExclusive
    properties:
        egressRuleIds:
            - string
        ingressRuleIds:
            - string
        region: string
        securityGroupId: string
    

    VpcSecurityGroupRulesExclusive Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VpcSecurityGroupRulesExclusive resource accepts the following input properties:

    EgressRuleIds List<string>
    Egress rule IDs.
    IngressRuleIds List<string>
    Ingress rule IDs.
    SecurityGroupId string
    ID of the security group.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    EgressRuleIds []string
    Egress rule IDs.
    IngressRuleIds []string
    Ingress rule IDs.
    SecurityGroupId string
    ID of the security group.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    egressRuleIds List<String>
    Egress rule IDs.
    ingressRuleIds List<String>
    Ingress rule IDs.
    securityGroupId String
    ID of the security group.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    egressRuleIds string[]
    Egress rule IDs.
    ingressRuleIds string[]
    Ingress rule IDs.
    securityGroupId string
    ID of the security group.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    egress_rule_ids Sequence[str]
    Egress rule IDs.
    ingress_rule_ids Sequence[str]
    Ingress rule IDs.
    security_group_id str
    ID of the security group.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    egressRuleIds List<String>
    Egress rule IDs.
    ingressRuleIds List<String>
    Ingress rule IDs.
    securityGroupId String
    ID of the security group.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcSecurityGroupRulesExclusive Resource

    Get an existing VpcSecurityGroupRulesExclusive resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VpcSecurityGroupRulesExclusiveState, opts?: CustomResourceOptions): VpcSecurityGroupRulesExclusive
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            egress_rule_ids: Optional[Sequence[str]] = None,
            ingress_rule_ids: Optional[Sequence[str]] = None,
            region: Optional[str] = None,
            security_group_id: Optional[str] = None) -> VpcSecurityGroupRulesExclusive
    func GetVpcSecurityGroupRulesExclusive(ctx *Context, name string, id IDInput, state *VpcSecurityGroupRulesExclusiveState, opts ...ResourceOption) (*VpcSecurityGroupRulesExclusive, error)
    public static VpcSecurityGroupRulesExclusive Get(string name, Input<string> id, VpcSecurityGroupRulesExclusiveState? state, CustomResourceOptions? opts = null)
    public static VpcSecurityGroupRulesExclusive get(String name, Output<String> id, VpcSecurityGroupRulesExclusiveState state, CustomResourceOptions options)
    resources:  _:    type: aws:ec2:VpcSecurityGroupRulesExclusive    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    EgressRuleIds List<string>
    Egress rule IDs.
    IngressRuleIds List<string>
    Ingress rule IDs.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityGroupId string
    ID of the security group.
    EgressRuleIds []string
    Egress rule IDs.
    IngressRuleIds []string
    Ingress rule IDs.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityGroupId string
    ID of the security group.
    egressRuleIds List<String>
    Egress rule IDs.
    ingressRuleIds List<String>
    Ingress rule IDs.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityGroupId String
    ID of the security group.
    egressRuleIds string[]
    Egress rule IDs.
    ingressRuleIds string[]
    Ingress rule IDs.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityGroupId string
    ID of the security group.
    egress_rule_ids Sequence[str]
    Egress rule IDs.
    ingress_rule_ids Sequence[str]
    Ingress rule IDs.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    security_group_id str
    ID of the security group.
    egressRuleIds List<String>
    Egress rule IDs.
    ingressRuleIds List<String>
    Ingress rule IDs.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityGroupId String
    ID of the security group.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate