IpAccessSettings class
Resource for managing an AWS WorkSpaces Web IP Access Settings resource. Once associated with a web portal, IP access settings control which IP addresses users can connect from.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.workspacesweb.IpAccessSettings("example", {
ipRules: [{
ipRange: "10.0.0.0/16",
}],
displayName: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.workspacesweb.IpAccessSettings("example",
ip_rules=[{
"ip_range": "10.0.0.0/16",
}],
display_name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.WorkSpacesWeb.IpAccessSettings("example", new()
{
IpRules = new[]
{
new Aws.WorkSpacesWeb.Inputs.IpAccessSettingsIpRuleArgs
{
IpRange = "10.0.0.0/16",
},
},
DisplayName = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := workspacesweb.NewIpAccessSettings(ctx, "example", &workspacesweb.IpAccessSettingsArgs{
IpRules: workspacesweb.IpAccessSettingsIpRuleArray{
&workspacesweb.IpAccessSettingsIpRuleArgs{
IpRange: pulumi.String("10.0.0.0/16"),
},
},
DisplayName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_workspacesweb_ipaccesssettings" "example" {
ip_rules {
ip_range = "10.0.0.0/16"
}
display_name = "example"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspacesweb.IpAccessSettings;
import com.pulumi.aws.workspacesweb.IpAccessSettingsArgs;
import com.pulumi.aws.workspacesweb.inputs.IpAccessSettingsIpRuleArgs;
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 IpAccessSettings("example", IpAccessSettingsArgs.builder()
.ipRules(IpAccessSettingsIpRuleArgs.builder()
.ipRange("10.0.0.0/16")
.build())
.displayName("example")
.build());
}
}
resources:
example:
type: aws:workspacesweb:IpAccessSettings
properties:
ipRules:
- ipRange: 10.0.0.0/16
displayName: example
With Multiple IP Rules
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.workspacesweb.IpAccessSettings("example", {
ipRules: [
{
ipRange: "10.0.0.0/16",
description: "Main office",
},
{
ipRange: "192.168.0.0/24",
description: "Branch office",
},
],
displayName: "example",
description: "Example IP access settings",
});
import pulumi
import pulumi_aws as aws
example = aws.workspacesweb.IpAccessSettings("example",
ip_rules=[
{
"ip_range": "10.0.0.0/16",
"description": "Main office",
},
{
"ip_range": "192.168.0.0/24",
"description": "Branch office",
},
],
display_name="example",
description="Example IP access settings")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.WorkSpacesWeb.IpAccessSettings("example", new()
{
IpRules = new[]
{
new Aws.WorkSpacesWeb.Inputs.IpAccessSettingsIpRuleArgs
{
IpRange = "10.0.0.0/16",
Description = "Main office",
},
new Aws.WorkSpacesWeb.Inputs.IpAccessSettingsIpRuleArgs
{
IpRange = "192.168.0.0/24",
Description = "Branch office",
},
},
DisplayName = "example",
Description = "Example IP access settings",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := workspacesweb.NewIpAccessSettings(ctx, "example", &workspacesweb.IpAccessSettingsArgs{
IpRules: workspacesweb.IpAccessSettingsIpRuleArray{
&workspacesweb.IpAccessSettingsIpRuleArgs{
IpRange: pulumi.String("10.0.0.0/16"),
Description: pulumi.String("Main office"),
},
&workspacesweb.IpAccessSettingsIpRuleArgs{
IpRange: pulumi.String("192.168.0.0/24"),
Description: pulumi.String("Branch office"),
},
},
DisplayName: pulumi.String("example"),
Description: pulumi.String("Example IP access settings"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_workspacesweb_ipaccesssettings" "example" {
ip_rules {
ip_range = "10.0.0.0/16"
description = "Main office"
}
ip_rules {
ip_range = "192.168.0.0/24"
description = "Branch office"
}
display_name = "example"
description = "Example IP access settings"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspacesweb.IpAccessSettings;
import com.pulumi.aws.workspacesweb.IpAccessSettingsArgs;
import com.pulumi.aws.workspacesweb.inputs.IpAccessSettingsIpRuleArgs;
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 IpAccessSettings("example", IpAccessSettingsArgs.builder()
.ipRules(
IpAccessSettingsIpRuleArgs.builder()
.ipRange("10.0.0.0/16")
.description("Main office")
.build(),
IpAccessSettingsIpRuleArgs.builder()
.ipRange("192.168.0.0/24")
.description("Branch office")
.build())
.displayName("example")
.description("Example IP access settings")
.build());
}
}
resources:
example:
type: aws:workspacesweb:IpAccessSettings
properties:
ipRules:
- ipRange: 10.0.0.0/16
description: Main office
- ipRange: 192.168.0.0/24
description: Branch office
displayName: example
description: Example IP access settings
With All Arguments
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.kms.Key("example", {
description: "KMS key for WorkSpaces Web IP Access Settings",
deletionWindowInDays: 7,
});
const exampleIpAccessSettings = new aws.workspacesweb.IpAccessSettings("example", {
ipRules: [
{
ipRange: "10.0.0.0/16",
description: "Main office",
},
{
ipRange: "192.168.0.0/24",
description: "Branch office",
},
],
displayName: "example",
description: "Example IP access settings",
customerManagedKey: example.arn,
additionalEncryptionContext: {
Environment: "Production",
},
tags: {
Name: "example-ip-access-settings",
},
});
import pulumi
import pulumi_aws as aws
example = aws.kms.Key("example",
description="KMS key for WorkSpaces Web IP Access Settings",
deletion_window_in_days=7)
example_ip_access_settings = aws.workspacesweb.IpAccessSettings("example",
ip_rules=[
{
"ip_range": "10.0.0.0/16",
"description": "Main office",
},
{
"ip_range": "192.168.0.0/24",
"description": "Branch office",
},
],
display_name="example",
description="Example IP access settings",
customer_managed_key=example.arn,
additional_encryption_context={
"Environment": "Production",
},
tags={
"Name": "example-ip-access-settings",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Kms.Key("example", new()
{
Description = "KMS key for WorkSpaces Web IP Access Settings",
DeletionWindowInDays = 7,
});
var exampleIpAccessSettings = new Aws.WorkSpacesWeb.IpAccessSettings("example", new()
{
IpRules = new[]
{
new Aws.WorkSpacesWeb.Inputs.IpAccessSettingsIpRuleArgs
{
IpRange = "10.0.0.0/16",
Description = "Main office",
},
new Aws.WorkSpacesWeb.Inputs.IpAccessSettingsIpRuleArgs
{
IpRange = "192.168.0.0/24",
Description = "Branch office",
},
},
DisplayName = "example",
Description = "Example IP access settings",
CustomerManagedKey = example.Arn,
AdditionalEncryptionContext =
{
{ "Environment", "Production" },
},
Tags =
{
{ "Name", "example-ip-access-settings" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/kms"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
Description: pulumi.String("KMS key for WorkSpaces Web IP Access Settings"),
DeletionWindowInDays: pulumi.Int(7),
})
if err != nil {
return err
}
_, err = workspacesweb.NewIpAccessSettings(ctx, "example", &workspacesweb.IpAccessSettingsArgs{
IpRules: workspacesweb.IpAccessSettingsIpRuleArray{
&workspacesweb.IpAccessSettingsIpRuleArgs{
IpRange: pulumi.String("10.0.0.0/16"),
Description: pulumi.String("Main office"),
},
&workspacesweb.IpAccessSettingsIpRuleArgs{
IpRange: pulumi.String("192.168.0.0/24"),
Description: pulumi.String("Branch office"),
},
},
DisplayName: pulumi.String("example"),
Description: pulumi.String("Example IP access settings"),
CustomerManagedKey: example.Arn,
AdditionalEncryptionContext: pulumi.StringMap{
"Environment": pulumi.String("Production"),
},
Tags: pulumi.StringMap{
"Name": pulumi.String("example-ip-access-settings"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_kms_key" "example" {
description = "KMS key for WorkSpaces Web IP Access Settings"
deletion_window_in_days = 7
}
resource "aws_workspacesweb_ipaccesssettings" "example" {
ip_rules {
ip_range = "10.0.0.0/16"
description = "Main office"
}
ip_rules {
ip_range = "192.168.0.0/24"
description = "Branch office"
}
display_name = "example"
description = "Example IP access settings"
customer_managed_key = aws_kms_key.example.arn
additional_encryption_context = {
"Environment" = "Production"
}
tags = {
"Name" = "example-ip-access-settings"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.workspacesweb.IpAccessSettings;
import com.pulumi.aws.workspacesweb.IpAccessSettingsArgs;
import com.pulumi.aws.workspacesweb.inputs.IpAccessSettingsIpRuleArgs;
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 Key("example", KeyArgs.builder()
.description("KMS key for WorkSpaces Web IP Access Settings")
.deletionWindowInDays(7)
.build());
var exampleIpAccessSettings = new IpAccessSettings("exampleIpAccessSettings", IpAccessSettingsArgs.builder()
.ipRules(
IpAccessSettingsIpRuleArgs.builder()
.ipRange("10.0.0.0/16")
.description("Main office")
.build(),
IpAccessSettingsIpRuleArgs.builder()
.ipRange("192.168.0.0/24")
.description("Branch office")
.build())
.displayName("example")
.description("Example IP access settings")
.customerManagedKey(example.arn())
.additionalEncryptionContext(Map.of("Environment", "Production"))
.tags(Map.of("Name", "example-ip-access-settings"))
.build());
}
}
resources:
example:
type: aws:kms:Key
properties:
description: KMS key for WorkSpaces Web IP Access Settings
deletionWindowInDays: 7
exampleIpAccessSettings:
type: aws:workspacesweb:IpAccessSettings
name: example
properties:
ipRules:
- ipRange: 10.0.0.0/16
description: Main office
- ipRange: 192.168.0.0/24
description: Branch office
displayName: example
description: Example IP access settings
customerManagedKey: ${example.arn}
additionalEncryptionContext:
Environment: Production
tags:
Name: example-ip-access-settings
Import
Using pulumi import, import WorkSpaces Web IP Access Settings using the ipAccessSettingsArn. For example:
$ pulumi import aws:workspacesweb/ipAccessSettings:IpAccessSettings example arn:aws:workspaces-web:us-west-2:123456789012:ipAccessSettings/abcdef12345
Constructors
- IpAccessSettings(String name, {IpAccessSettingsArgs? args, CustomResourceOptions? options})
-
Creates a new IpAccessSettings.
nameThe Pulumi resource name.argsArguments used to configure this IpAccessSettings. The set of arguments for IpAccessSettings.optionsResource options controlling this resource's behavior. - IpAccessSettings.reference(String urn)
- Creates a typed reference to an existing IpAccessSettings resource.
Properties
-
additionalEncryptionContext
↔ Output<
Map< String, String> ?> -
Additional encryption context for the IP access settings.
latefinal
-
associatedPortalArns
↔ Output<
List< String> > -
List of web portal ARNs that this IP access settings resource is associated with.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
customerManagedKey
↔ Output<
String?> -
ARN of the customer managed KMS key.
latefinal
-
description
↔ Output<
String?> -
The description of the IP access settings.
latefinal
-
displayName
↔ Output<
String> -
The display name of the IP access settings.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
ipAccessSettingsArn
↔ Output<
String> -
ARN of the IP access settings resource.
latefinal
-
ipRules
↔ Output<
List< IpAccessSettingsIpRule> > -
The IP rules of the IP access settings. See IP Rule below.
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
-
Map of tags assigned to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
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, {IpAccessSettingsState? state, CustomResourceOptions? options}) → IpAccessSettings -
Gets an existing IpAccessSettings resource's state with the given
nameandid.