UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

102 lines 3.87 kB
"use strict"; // *** 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.AddressScope = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 Neutron addressscope resource within OpenStack. * * ## Example Usage * * ### Create an Address-scope * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const addressscope1 = new openstack.networking.AddressScope("addressscope_1", { * name: "addressscope_1", * ipVersion: 6, * }); * ``` * * ### Create a Subnet Pool from an Address-scope * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const addressscope1 = new openstack.networking.AddressScope("addressscope_1", { * name: "addressscope_1", * ipVersion: 6, * }); * const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", { * name: "subnetpool_1", * prefixes: [ * "fdf7:b13d:dead:beef::/64", * "fd65:86cc:a334:39b7::/64", * ], * addressScopeId: addressscope1.id, * }); * ``` * * ## Import * * Address-scopes can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:networking/addressScope:AddressScope addressscope_1 9cc35860-522a-4d35-974d-51d4b011801e * ``` */ class AddressScope extends pulumi.CustomResource { /** * Get an existing AddressScope 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 AddressScope(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AddressScope. 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'] === AddressScope.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["ipVersion"] = state ? state.ipVersion : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["shared"] = state ? state.shared : undefined; } else { const args = argsOrState; resourceInputs["ipVersion"] = args ? args.ipVersion : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["shared"] = args ? args.shared : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AddressScope.__pulumiType, name, resourceInputs, opts); } } exports.AddressScope = AddressScope; /** @internal */ AddressScope.__pulumiType = 'openstack:networking/addressScope:AddressScope'; //# sourceMappingURL=addressScope.js.map