@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
84 lines • 3.42 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.Amqp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an IoTDA AMQP queue resource within HuaweiCloud.
*
* > When accessing an IoTDA **standard** or **enterprise** edition instance, you need to specify the IoTDA service
* endpoint in `provider` block.
* You can login to the IoTDA console, choose the instance **Overview** and click **Access Details**
* to view the HTTPS application access address. An example of the access address might be
* **9bc34xxxxx.st1.iotda-app.ap-southeast-1.myhuaweicloud.com**, then you need to configure the
* `provider` block as follows:
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const queueName = config.requireObject("queueName");
* const test = new huaweicloud.iotda.Amqp("test", {});
* ```
*
* ## Import
*
* The AMQP queue can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:IoTDA/amqp:Amqp test <id>
* ```
*/
class Amqp extends pulumi.CustomResource {
/**
* Get an existing Amqp 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 Amqp(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Amqp. 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'] === Amqp.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
}
else {
const args = argsOrState;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Amqp.__pulumiType, name, resourceInputs, opts);
}
}
exports.Amqp = Amqp;
/** @internal */
Amqp.__pulumiType = 'huaweicloud:IoTDA/amqp:Amqp';
//# sourceMappingURL=amqp.js.map