UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

113 lines 4.38 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.RecordSet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a DNS record set in the OpenStack DNS Service. * * ## Example Usage * * ### Automatically detect the correct network * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const exampleZone = new openstack.dns.Zone("example_zone", { * name: "example.com.", * email: "email2@example.com", * description: "a zone", * ttl: 6000, * type: "PRIMARY", * }); * const rsExampleCom = new openstack.dns.RecordSet("rs_example_com", { * zoneId: exampleZone.id, * name: "rs.example.com.", * description: "An example record set", * ttl: 3000, * type: "A", * records: ["10.0.0.1"], * }); * ``` * * ## Import * * This resource can be imported by specifying the zone ID and recordset ID with an optional project ID as a prefix: * * ```sh * $ pulumi import openstack:dns/recordSet:RecordSet recordset_1 project_id/zone_id/recordset_id * ``` * * ```sh * $ pulumi import openstack:dns/recordSet:RecordSet recordset_1 zone_id/recordset_id * ``` */ class RecordSet extends pulumi.CustomResource { /** * Get an existing RecordSet 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 RecordSet(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of RecordSet. 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'] === RecordSet.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state?.description; resourceInputs["disableStatusCheck"] = state?.disableStatusCheck; resourceInputs["name"] = state?.name; resourceInputs["projectId"] = state?.projectId; resourceInputs["records"] = state?.records; resourceInputs["region"] = state?.region; resourceInputs["ttl"] = state?.ttl; resourceInputs["type"] = state?.type; resourceInputs["valueSpecs"] = state?.valueSpecs; resourceInputs["zoneId"] = state?.zoneId; } else { const args = argsOrState; if (args?.records === undefined && !opts.urn) { throw new Error("Missing required property 'records'"); } if (args?.zoneId === undefined && !opts.urn) { throw new Error("Missing required property 'zoneId'"); } resourceInputs["description"] = args?.description; resourceInputs["disableStatusCheck"] = args?.disableStatusCheck; resourceInputs["name"] = args?.name; resourceInputs["projectId"] = args?.projectId; resourceInputs["records"] = args?.records; resourceInputs["region"] = args?.region; resourceInputs["ttl"] = args?.ttl; resourceInputs["type"] = args?.type; resourceInputs["valueSpecs"] = args?.valueSpecs; resourceInputs["zoneId"] = args?.zoneId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(RecordSet.__pulumiType, name, resourceInputs, opts); } } exports.RecordSet = RecordSet; /** @internal */ RecordSet.__pulumiType = 'openstack:dns/recordSet:RecordSet'; //# sourceMappingURL=recordSet.js.map