UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

131 lines 5.72 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Domain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates a Microsoft AD domain * * To get more information about Domain, see: * * * [API documentation](https://cloud.google.com/managed-microsoft-ad/reference/rest/v1/projects.locations.global.domains) * * How-to Guides * * [Managed Microsoft Active Directory Quickstart](https://cloud.google.com/managed-microsoft-ad/docs/quickstarts) * * ## Example Usage * * ### Active Directory Domain Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const ad_domain = new gcp.activedirectory.Domain("ad-domain", { * domainName: "tfgen.org.com", * locations: ["us-central1"], * reservedIpRange: "192.168.255.0/24", * deletionProtection: false, * }); * ``` * * ## Import * * Domain can be imported using any of these accepted formats: * * * `{{project}}/{{name}}` * * * `{{project}} {{name}}` * * * `{{name}}` * * When using the `pulumi import` command, Domain can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:activedirectory/domain:Domain default {{project}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:activedirectory/domain:Domain default "{{project}} {{name}}" * ``` * * ```sh * $ pulumi import gcp:activedirectory/domain:Domain default {{name}} * ``` */ class Domain extends pulumi.CustomResource { /** * Get an existing Domain 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 Domain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Domain. 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'] === Domain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["admin"] = state ? state.admin : undefined; resourceInputs["authorizedNetworks"] = state ? state.authorizedNetworks : undefined; resourceInputs["deletionProtection"] = state ? state.deletionProtection : undefined; resourceInputs["domainName"] = state ? state.domainName : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["fqdn"] = state ? state.fqdn : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["locations"] = state ? state.locations : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["reservedIpRange"] = state ? state.reservedIpRange : undefined; } else { const args = argsOrState; if ((!args || args.domainName === undefined) && !opts.urn) { throw new Error("Missing required property 'domainName'"); } if ((!args || args.locations === undefined) && !opts.urn) { throw new Error("Missing required property 'locations'"); } if ((!args || args.reservedIpRange === undefined) && !opts.urn) { throw new Error("Missing required property 'reservedIpRange'"); } resourceInputs["admin"] = args ? args.admin : undefined; resourceInputs["authorizedNetworks"] = args ? args.authorizedNetworks : undefined; resourceInputs["deletionProtection"] = args ? args.deletionProtection : undefined; resourceInputs["domainName"] = args ? args.domainName : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["locations"] = args ? args.locations : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["reservedIpRange"] = args ? args.reservedIpRange : undefined; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["fqdn"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Domain.__pulumiType, name, resourceInputs, opts); } } exports.Domain = Domain; /** @internal */ Domain.__pulumiType = 'gcp:activedirectory/domain:Domain'; //# sourceMappingURL=domain.js.map