1. Packages
  2. AWS
  3. API Docs
  4. quicksight
  5. IpRestriction
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

aws.quicksight.IpRestriction

Explore with Pulumi AI

aws logo
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

    Manages the content and status of IP rules.

    Deletion of this resource clears all IP restrictions from a QuickSight account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.quicksight.IpRestriction("example", {
        enabled: true,
        ipRestrictionRuleMap: {
            "108.56.166.202/32": "Allow self",
        },
        vpcIdRestrictionRuleMap: {
            [exampleAwsVpc.id]: "Main VPC",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.quicksight.IpRestriction("example",
        enabled=True,
        ip_restriction_rule_map={
            "108.56.166.202/32": "Allow self",
        },
        vpc_id_restriction_rule_map={
            example_aws_vpc["id"]: "Main VPC",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/quicksight"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := quicksight.NewIpRestriction(ctx, "example", &quicksight.IpRestrictionArgs{
    			Enabled: pulumi.Bool(true),
    			IpRestrictionRuleMap: pulumi.StringMap{
    				"108.56.166.202/32": pulumi.String("Allow self"),
    			},
    			VpcIdRestrictionRuleMap: pulumi.StringMap{
    				exampleAwsVpc.Id: "Main VPC",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Quicksight.IpRestriction("example", new()
        {
            Enabled = true,
            IpRestrictionRuleMap = 
            {
                { "108.56.166.202/32", "Allow self" },
            },
            VpcIdRestrictionRuleMap = 
            {
                { exampleAwsVpc.Id, "Main VPC" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.quicksight.IpRestriction;
    import com.pulumi.aws.quicksight.IpRestrictionArgs;
    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) {
            var example = new IpRestriction("example", IpRestrictionArgs.builder()
                .enabled(true)
                .ipRestrictionRuleMap(Map.of("108.56.166.202/32", "Allow self"))
                .vpcIdRestrictionRuleMap(Map.of(exampleAwsVpc.id(), "Main VPC"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:quicksight:IpRestriction
        properties:
          enabled: true
          ipRestrictionRuleMap:
            108.56.166.202/32: Allow self
          vpcIdRestrictionRuleMap:
            ${exampleAwsVpc.id}: Main VPC
    

    Create IpRestriction Resource

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

    Constructor syntax

    new IpRestriction(name: string, args: IpRestrictionArgs, opts?: CustomResourceOptions);
    @overload
    def IpRestriction(resource_name: str,
                      args: IpRestrictionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpRestriction(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      enabled: Optional[bool] = None,
                      aws_account_id: Optional[str] = None,
                      ip_restriction_rule_map: Optional[Mapping[str, str]] = None,
                      region: Optional[str] = None,
                      vpc_endpoint_id_restriction_rule_map: Optional[Mapping[str, str]] = None,
                      vpc_id_restriction_rule_map: Optional[Mapping[str, str]] = None)
    func NewIpRestriction(ctx *Context, name string, args IpRestrictionArgs, opts ...ResourceOption) (*IpRestriction, error)
    public IpRestriction(string name, IpRestrictionArgs args, CustomResourceOptions? opts = null)
    public IpRestriction(String name, IpRestrictionArgs args)
    public IpRestriction(String name, IpRestrictionArgs args, CustomResourceOptions options)
    
    type: aws:quicksight:IpRestriction
    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 IpRestrictionArgs
    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 IpRestrictionArgs
    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 IpRestrictionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpRestrictionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpRestrictionArgs
    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 ipRestrictionResource = new Aws.Quicksight.IpRestriction("ipRestrictionResource", new()
    {
        Enabled = false,
        AwsAccountId = "string",
        IpRestrictionRuleMap = 
        {
            { "string", "string" },
        },
        Region = "string",
        VpcEndpointIdRestrictionRuleMap = 
        {
            { "string", "string" },
        },
        VpcIdRestrictionRuleMap = 
        {
            { "string", "string" },
        },
    });
    
    example, err := quicksight.NewIpRestriction(ctx, "ipRestrictionResource", &quicksight.IpRestrictionArgs{
    	Enabled:      pulumi.Bool(false),
    	AwsAccountId: pulumi.String("string"),
    	IpRestrictionRuleMap: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    	VpcEndpointIdRestrictionRuleMap: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	VpcIdRestrictionRuleMap: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var ipRestrictionResource = new IpRestriction("ipRestrictionResource", IpRestrictionArgs.builder()
        .enabled(false)
        .awsAccountId("string")
        .ipRestrictionRuleMap(Map.of("string", "string"))
        .region("string")
        .vpcEndpointIdRestrictionRuleMap(Map.of("string", "string"))
        .vpcIdRestrictionRuleMap(Map.of("string", "string"))
        .build());
    
    ip_restriction_resource = aws.quicksight.IpRestriction("ipRestrictionResource",
        enabled=False,
        aws_account_id="string",
        ip_restriction_rule_map={
            "string": "string",
        },
        region="string",
        vpc_endpoint_id_restriction_rule_map={
            "string": "string",
        },
        vpc_id_restriction_rule_map={
            "string": "string",
        })
    
    const ipRestrictionResource = new aws.quicksight.IpRestriction("ipRestrictionResource", {
        enabled: false,
        awsAccountId: "string",
        ipRestrictionRuleMap: {
            string: "string",
        },
        region: "string",
        vpcEndpointIdRestrictionRuleMap: {
            string: "string",
        },
        vpcIdRestrictionRuleMap: {
            string: "string",
        },
    });
    
    type: aws:quicksight:IpRestriction
    properties:
        awsAccountId: string
        enabled: false
        ipRestrictionRuleMap:
            string: string
        region: string
        vpcEndpointIdRestrictionRuleMap:
            string: string
        vpcIdRestrictionRuleMap:
            string: string
    

    IpRestriction 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 IpRestriction resource accepts the following input properties:

    Enabled bool
    Whether IP rules are turned on.
    AwsAccountId string
    IpRestrictionRuleMap Dictionary<string, string>
    Map of allowed IPv4 CIDR ranges and descriptions.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VpcEndpointIdRestrictionRuleMap Dictionary<string, string>
    Map of allowed VPC endpoint IDs and descriptions.
    VpcIdRestrictionRuleMap Dictionary<string, string>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    Enabled bool
    Whether IP rules are turned on.
    AwsAccountId string
    IpRestrictionRuleMap map[string]string
    Map of allowed IPv4 CIDR ranges and descriptions.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VpcEndpointIdRestrictionRuleMap map[string]string
    Map of allowed VPC endpoint IDs and descriptions.
    VpcIdRestrictionRuleMap map[string]string
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    enabled Boolean
    Whether IP rules are turned on.
    awsAccountId String
    ipRestrictionRuleMap Map<String,String>
    Map of allowed IPv4 CIDR ranges and descriptions.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap Map<String,String>
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap Map<String,String>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    enabled boolean
    Whether IP rules are turned on.
    awsAccountId string
    ipRestrictionRuleMap {[key: string]: string}
    Map of allowed IPv4 CIDR ranges and descriptions.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap {[key: string]: string}
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap {[key: string]: string}
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    enabled bool
    Whether IP rules are turned on.
    aws_account_id str
    ip_restriction_rule_map Mapping[str, str]
    Map of allowed IPv4 CIDR ranges and descriptions.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpc_endpoint_id_restriction_rule_map Mapping[str, str]
    Map of allowed VPC endpoint IDs and descriptions.
    vpc_id_restriction_rule_map Mapping[str, str]
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    enabled Boolean
    Whether IP rules are turned on.
    awsAccountId String
    ipRestrictionRuleMap Map<String>
    Map of allowed IPv4 CIDR ranges and descriptions.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap Map<String>
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap Map<String>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IpRestriction 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 IpRestriction Resource

    Get an existing IpRestriction 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?: IpRestrictionState, opts?: CustomResourceOptions): IpRestriction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_account_id: Optional[str] = None,
            enabled: Optional[bool] = None,
            ip_restriction_rule_map: Optional[Mapping[str, str]] = None,
            region: Optional[str] = None,
            vpc_endpoint_id_restriction_rule_map: Optional[Mapping[str, str]] = None,
            vpc_id_restriction_rule_map: Optional[Mapping[str, str]] = None) -> IpRestriction
    func GetIpRestriction(ctx *Context, name string, id IDInput, state *IpRestrictionState, opts ...ResourceOption) (*IpRestriction, error)
    public static IpRestriction Get(string name, Input<string> id, IpRestrictionState? state, CustomResourceOptions? opts = null)
    public static IpRestriction get(String name, Output<String> id, IpRestrictionState state, CustomResourceOptions options)
    resources:  _:    type: aws:quicksight:IpRestriction    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:
    AwsAccountId string
    Enabled bool
    Whether IP rules are turned on.
    IpRestrictionRuleMap Dictionary<string, string>
    Map of allowed IPv4 CIDR ranges and descriptions.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VpcEndpointIdRestrictionRuleMap Dictionary<string, string>
    Map of allowed VPC endpoint IDs and descriptions.
    VpcIdRestrictionRuleMap Dictionary<string, string>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    AwsAccountId string
    Enabled bool
    Whether IP rules are turned on.
    IpRestrictionRuleMap map[string]string
    Map of allowed IPv4 CIDR ranges and descriptions.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    VpcEndpointIdRestrictionRuleMap map[string]string
    Map of allowed VPC endpoint IDs and descriptions.
    VpcIdRestrictionRuleMap map[string]string
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    awsAccountId String
    enabled Boolean
    Whether IP rules are turned on.
    ipRestrictionRuleMap Map<String,String>
    Map of allowed IPv4 CIDR ranges and descriptions.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap Map<String,String>
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap Map<String,String>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    awsAccountId string
    enabled boolean
    Whether IP rules are turned on.
    ipRestrictionRuleMap {[key: string]: string}
    Map of allowed IPv4 CIDR ranges and descriptions.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap {[key: string]: string}
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap {[key: string]: string}
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    aws_account_id str
    enabled bool
    Whether IP rules are turned on.
    ip_restriction_rule_map Mapping[str, str]
    Map of allowed IPv4 CIDR ranges and descriptions.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpc_endpoint_id_restriction_rule_map Mapping[str, str]
    Map of allowed VPC endpoint IDs and descriptions.
    vpc_id_restriction_rule_map Mapping[str, str]
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
    awsAccountId String
    enabled Boolean
    Whether IP rules are turned on.
    ipRestrictionRuleMap Map<String>
    Map of allowed IPv4 CIDR ranges and descriptions.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    vpcEndpointIdRestrictionRuleMap Map<String>
    Map of allowed VPC endpoint IDs and descriptions.
    vpcIdRestrictionRuleMap Map<String>
    Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.

    Import

    Using pulumi import, import QuickSight IP restriction using the AWS account ID. For example:

    $ pulumi import aws:quicksight/ipRestriction:IpRestriction example "012345678901"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.7.0 published on Friday, Sep 5, 2025 by Pulumi