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