IpRestriction class

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",
    })
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 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
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_quicksight_iprestriction" "example" {
  enabled = true
  ip_restriction_rule_map = {
    "108.56.166.202/32" = "Allow self"
  }
  vpc_id_restriction_rule_map = {
    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.ArrayList;
import java.util.Arrays;
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

Import

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

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

Constructors

IpRestriction(String name, {IpRestrictionArgs? args, CustomResourceOptions? options})
Creates a new IpRestriction. name The Pulumi resource name. args Arguments used to configure this IpRestriction. The set of arguments for IpRestriction. options Resource options controlling this resource's behavior.
IpRestriction.reference(String urn)
Creates a typed reference to an existing IpRestriction resource.

Properties

awsAccountId ↔ Output<String>
AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
enabled ↔ Output<bool>
Whether IP rules are turned on.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
ipRestrictionRuleMap ↔ Output<Map<String, String>?>
Map of allowed IPv4 CIDR ranges and descriptions.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
vpcEndpointIdRestrictionRuleMap ↔ Output<Map<String, String>?>
Map of allowed VPC endpoint IDs and descriptions.
latefinal
vpcIdRestrictionRuleMap ↔ Output<Map<String, String>?>
Map of VPC IDs and descriptions. Traffic from all VPC endpoints that are present in the specified VPC is allowed.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {IpRestrictionState? state, CustomResourceOptions? options}) → IpRestriction
Gets an existing IpRestriction resource's state with the given name and id.