@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
103 lines • 4.54 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.ListenerDomainExtension = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage alb listener domain extension
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooListener = new volcengine.alb.Listener("fooListener", {
* loadBalancerId: "alb-1iidd17v3klj474adhfrunyz9",
* listenerName: "acc-test-listener-1",
* protocol: "HTTPS",
* port: 6666,
* enabled: "on",
* certificateId: "cert-1iidd2pahdyio74adhfr9ajwg",
* caCertificateId: "cert-1iidd2r9ii0hs74adhfeodxo1",
* serverGroupId: "rsp-1g72w74y4umf42zbhq4k4hnln",
* enableHttp2: "on",
* enableQuic: "off",
* aclStatus: "on",
* aclType: "white",
* aclIds: ["acl-1g72w6z11ighs2zbhq4v3rvh4"],
* description: "acc test listener",
* });
* const fooListenerDomainExtension = new volcengine.alb.ListenerDomainExtension("fooListenerDomainExtension", {
* listenerId: fooListener.id,
* domain: "test-modify.com",
* certificateId: "cert-1iidd2pahdyio74adhfr9ajwg",
* });
* ```
*
* ## Import
*
* AlbListenerDomainExtension can be imported using the listener id and domain extension id, e.g.
*
* ```sh
* $ pulumi import volcengine:alb/listenerDomainExtension:ListenerDomainExtension default listenerId:extensionId
* ```
*/
class ListenerDomainExtension extends pulumi.CustomResource {
/**
* Get an existing ListenerDomainExtension 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 ListenerDomainExtension(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ListenerDomainExtension. 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'] === ListenerDomainExtension.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["certificateId"] = state ? state.certificateId : undefined;
resourceInputs["domain"] = state ? state.domain : undefined;
resourceInputs["domainExtensionId"] = state ? state.domainExtensionId : undefined;
resourceInputs["listenerId"] = state ? state.listenerId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.certificateId === undefined) && !opts.urn) {
throw new Error("Missing required property 'certificateId'");
}
if ((!args || args.domain === undefined) && !opts.urn) {
throw new Error("Missing required property 'domain'");
}
if ((!args || args.listenerId === undefined) && !opts.urn) {
throw new Error("Missing required property 'listenerId'");
}
resourceInputs["certificateId"] = args ? args.certificateId : undefined;
resourceInputs["domain"] = args ? args.domain : undefined;
resourceInputs["listenerId"] = args ? args.listenerId : undefined;
resourceInputs["domainExtensionId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ListenerDomainExtension.__pulumiType, name, resourceInputs, opts);
}
}
exports.ListenerDomainExtension = ListenerDomainExtension;
/** @internal */
ListenerDomainExtension.__pulumiType = 'volcengine:alb/listenerDomainExtension:ListenerDomainExtension';
//# sourceMappingURL=listenerDomainExtension.js.map