@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
194 lines • 8.8 kB
JavaScript
;
// *** 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.Registration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ### Clouddomains Registration Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myRegistration = new gcp.clouddomains.Registration("my_registration", {
* domainName: "example-domain.com",
* location: "global",
* labels: {
* labelkey: "labelvalue",
* },
* yearlyPrice: {
* currencyCode: "USD",
* units: "12",
* },
* dnsSettings: {
* customDns: {
* nameServers: [
* "ns-cloud-a1.googledomains.com.",
* "ns-cloud-a2.googledomains.com.",
* "ns-cloud-a3.googledomains.com.",
* "ns-cloud-a4.googledomains.com.",
* ],
* },
* },
* contactSettings: {
* privacy: "REDACTED_CONTACT_DATA",
* registrantContact: {
* phoneNumber: "+12345000000",
* email: "user@example.com",
* postalAddress: {
* regionCode: "US",
* postalCode: "95050",
* administrativeArea: "CA",
* locality: "Example City",
* addressLines: ["1234 Example street"],
* recipients: ["example recipient"],
* },
* },
* adminContact: {
* phoneNumber: "+12345000000",
* email: "user@example.com",
* postalAddress: {
* regionCode: "US",
* postalCode: "95050",
* administrativeArea: "CA",
* locality: "Example City",
* addressLines: ["1234 Example street"],
* recipients: ["example recipient"],
* },
* },
* technicalContact: {
* phoneNumber: "+12345000000",
* email: "user@example.com",
* postalAddress: {
* regionCode: "US",
* postalCode: "95050",
* administrativeArea: "CA",
* locality: "Example City",
* addressLines: ["1234 Example street"],
* recipients: ["example recipient"],
* },
* },
* },
* });
* ```
*
* ## Import
*
* Registration can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}`
*
* * `{{project}}/{{location}}/{{domain_name}}`
*
* * `{{location}}/{{domain_name}}`
*
* When using the `pulumi import` command, Registration can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:clouddomains/registration:Registration default projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}
* ```
*
* ```sh
* $ pulumi import gcp:clouddomains/registration:Registration default {{project}}/{{location}}/{{domain_name}}
* ```
*
* ```sh
* $ pulumi import gcp:clouddomains/registration:Registration default {{location}}/{{domain_name}}
* ```
*/
class Registration extends pulumi.CustomResource {
/**
* Get an existing Registration 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 Registration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Registration. 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'] === Registration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["contactNotices"] = state ? state.contactNotices : undefined;
resourceInputs["contactSettings"] = state ? state.contactSettings : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["dnsSettings"] = state ? state.dnsSettings : undefined;
resourceInputs["domainName"] = state ? state.domainName : undefined;
resourceInputs["domainNotices"] = state ? state.domainNotices : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["expireTime"] = state ? state.expireTime : undefined;
resourceInputs["issues"] = state ? state.issues : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["managementSettings"] = state ? state.managementSettings : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["registerFailureReason"] = state ? state.registerFailureReason : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["supportedPrivacies"] = state ? state.supportedPrivacies : undefined;
resourceInputs["yearlyPrice"] = state ? state.yearlyPrice : undefined;
}
else {
const args = argsOrState;
if ((!args || args.contactSettings === undefined) && !opts.urn) {
throw new Error("Missing required property 'contactSettings'");
}
if ((!args || args.domainName === undefined) && !opts.urn) {
throw new Error("Missing required property 'domainName'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.yearlyPrice === undefined) && !opts.urn) {
throw new Error("Missing required property 'yearlyPrice'");
}
resourceInputs["contactNotices"] = args ? args.contactNotices : undefined;
resourceInputs["contactSettings"] = args ? args.contactSettings : undefined;
resourceInputs["dnsSettings"] = args ? args.dnsSettings : undefined;
resourceInputs["domainName"] = args ? args.domainName : undefined;
resourceInputs["domainNotices"] = args ? args.domainNotices : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["managementSettings"] = args ? args.managementSettings : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["yearlyPrice"] = args ? args.yearlyPrice : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["expireTime"] = undefined /*out*/;
resourceInputs["issues"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["registerFailureReason"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["supportedPrivacies"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Registration.__pulumiType, name, resourceInputs, opts);
}
}
exports.Registration = Registration;
/** @internal */
Registration.__pulumiType = 'gcp:clouddomains/registration:Registration';
//# sourceMappingURL=registration.js.map