@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines • 6.12 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, Object.assign(Object.assign({}, 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 ? state.additionalEncryptionContext : undefined;
resourceInputs["associatedPortalArns"] = state ? state.associatedPortalArns : undefined;
resourceInputs["customerManagedKey"] = state ? state.customerManagedKey : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["ipAccessSettingsArn"] = state ? state.ipAccessSettingsArn : undefined;
resourceInputs["ipRules"] = state ? state.ipRules : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["additionalEncryptionContext"] = args ? args.additionalEncryptionContext : undefined;
resourceInputs["customerManagedKey"] = args ? args.customerManagedKey : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["ipRules"] = args ? args.ipRules : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
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