@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
96 lines • 4.08 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.TransferRequest = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a DNS zone transfer request 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: "jdoe@example.com",
* description: "An example zone",
* ttl: 3000,
* type: "PRIMARY",
* });
* const request1 = new openstack.dns.TransferRequest("request_1", {
* zoneId: exampleZone.id,
* description: "a transfer request",
* });
* ```
*
* ## Import
*
* This resource can be imported by specifying the transferRequest ID:
*
* ```sh
* $ pulumi import openstack:dns/transferRequest:TransferRequest request_1 request_id
* ```
*/
class TransferRequest extends pulumi.CustomResource {
/**
* Get an existing TransferRequest 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 TransferRequest(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of TransferRequest. 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'] === TransferRequest.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["disableStatusCheck"] = state ? state.disableStatusCheck : undefined;
resourceInputs["key"] = state ? state.key : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["targetProjectId"] = state ? state.targetProjectId : undefined;
resourceInputs["valueSpecs"] = state ? state.valueSpecs : undefined;
resourceInputs["zoneId"] = state ? state.zoneId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.zoneId === undefined) && !opts.urn) {
throw new Error("Missing required property 'zoneId'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["disableStatusCheck"] = args ? args.disableStatusCheck : undefined;
resourceInputs["key"] = args ? args.key : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["targetProjectId"] = args ? args.targetProjectId : undefined;
resourceInputs["valueSpecs"] = args ? args.valueSpecs : undefined;
resourceInputs["zoneId"] = args ? args.zoneId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TransferRequest.__pulumiType, name, resourceInputs, opts);
}
}
exports.TransferRequest = TransferRequest;
/** @internal */
TransferRequest.__pulumiType = 'openstack:dns/transferRequest:TransferRequest';
//# sourceMappingURL=transferRequest.js.map