@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
91 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.ListenerCertificate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Load Balancer Listener Certificate resource.
*
* This resource is for additional certificates and does not replace the default certificate on the listener.
*
* > **Note:** `aws.alb.ListenerCertificate` is known as `aws.lb.ListenerCertificate`. The functionality is identical.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.acm.Certificate("example", {});
* const frontEnd = new aws.lb.LoadBalancer("front_end", {});
* const frontEndListener = new aws.lb.Listener("front_end", {});
* const exampleListenerCertificate = new aws.lb.ListenerCertificate("example", {
* listenerArn: frontEndListener.arn,
* certificateArn: example.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Listener Certificates using the listener arn and certificate arn, separated by an underscore (`_`). For example:
*
* ```sh
* $ pulumi import aws:alb/listenerCertificate:ListenerCertificate example arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/test/8e4497da625e2d8a/9ab28ade35828f96/67b3d2d36dd7c26b_arn:aws:iam::123456789012:server-certificate/tf-acc-test-6453083910015726063
* ```
*/
class ListenerCertificate extends pulumi.CustomResource {
/**
* Get an existing ListenerCertificate 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 ListenerCertificate(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ListenerCertificate. 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'] === ListenerCertificate.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["certificateArn"] = state?.certificateArn;
resourceInputs["listenerArn"] = state?.listenerArn;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.certificateArn === undefined && !opts.urn) {
throw new Error("Missing required property 'certificateArn'");
}
if (args?.listenerArn === undefined && !opts.urn) {
throw new Error("Missing required property 'listenerArn'");
}
resourceInputs["certificateArn"] = args?.certificateArn;
resourceInputs["listenerArn"] = args?.listenerArn;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "aws:applicationloadbalancing/listenerCertificate:ListenerCertificate" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(ListenerCertificate.__pulumiType, name, resourceInputs, opts);
}
}
exports.ListenerCertificate = ListenerCertificate;
/** @internal */
ListenerCertificate.__pulumiType = 'aws:alb/listenerCertificate:ListenerCertificate';
//# sourceMappingURL=listenerCertificate.js.map