@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines • 5.76 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.IpAccessSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.workspacesweb.IpAccessSettings("example", {
* displayName: "example",
* ipRules: [{
* ipRange: "10.0.0.0/16",
* }],
* });
* ```
*
* ### With Multiple IP Rules
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.workspacesweb.IpAccessSettings("example", {
* displayName: "example",
* description: "Example IP access settings",
* ipRules: [
* {
* ipRange: "10.0.0.0/16",
* description: "Main office",
* },
* {
* ipRange: "192.168.0.0/24",
* description: "Branch office",
* },
* ],
* });
* ```
*
* ### With All Arguments
*
* ```typescript
* 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", {
* displayName: "example",
* description: "Example IP access settings",
* customerManagedKey: example.arn,
* additionalEncryptionContext: {
* Environment: "Production",
* },
* ipRules: [
* {
* ipRange: "10.0.0.0/16",
* description: "Main office",
* },
* {
* ipRange: "192.168.0.0/24",
* description: "Branch office",
* },
* ],
* tags: {
* Name: "example-ip-access-settings",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import WorkSpaces Web IP Access Settings using the `ip_access_settings_arn`. For example:
*
* ```sh
* $ pulumi import aws:workspacesweb/ipAccessSettings:IpAccessSettings example arn:aws:workspaces-web:us-west-2:123456789012:ipAccessSettings/abcdef12345
* ```
*/
class IpAccessSettings extends pulumi.CustomResource {
/**
* Get an existing IpAccessSettings resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new IpAccessSettings(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of IpAccessSettings. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === IpAccessSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalEncryptionContext"] = state?.additionalEncryptionContext;
resourceInputs["associatedPortalArns"] = state?.associatedPortalArns;
resourceInputs["customerManagedKey"] = state?.customerManagedKey;
resourceInputs["description"] = state?.description;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["ipAccessSettingsArn"] = state?.ipAccessSettingsArn;
resourceInputs["ipRules"] = state?.ipRules;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["additionalEncryptionContext"] = args?.additionalEncryptionContext;
resourceInputs["customerManagedKey"] = args?.customerManagedKey;
resourceInputs["description"] = args?.description;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["ipRules"] = args?.ipRules;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["associatedPortalArns"] = undefined /*out*/;
resourceInputs["ipAccessSettingsArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IpAccessSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.IpAccessSettings = IpAccessSettings;
/** @internal */
IpAccessSettings.__pulumiType = 'aws:workspacesweb/ipAccessSettings:IpAccessSettings';
//# sourceMappingURL=ipAccessSettings.js.map