@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
94 lines • 4.46 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.DomainNameAccessAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Creates a domain name access association resource between an access association source and a private custom domain name.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.apigateway.DomainNameAccessAssociation("example", {
* accessAssociationSource: exampleAwsVpcEndpoint.id,
* accessAssociationSourceType: "VPCE",
* domainNameArn: exampleAwsApiGatewayDomainName.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import API Gateway domain name acces associations as using their `arn`. For example:
*
* ```sh
* $ pulumi import aws:apigateway/domainNameAccessAssociation:DomainNameAccessAssociation example arn:aws:apigateway:us-west-2:123456789012:/domainnameaccessassociations/domainname/12qmzgp2.9m7ilski.test+hykg7a12e7/vpcesource/vpce-05de3f8f82740a748
* ```
*/
class DomainNameAccessAssociation extends pulumi.CustomResource {
/**
* Get an existing DomainNameAccessAssociation 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 DomainNameAccessAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DomainNameAccessAssociation. 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'] === DomainNameAccessAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessAssociationSource"] = state?.accessAssociationSource;
resourceInputs["accessAssociationSourceType"] = state?.accessAssociationSourceType;
resourceInputs["arn"] = state?.arn;
resourceInputs["domainNameArn"] = state?.domainNameArn;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.accessAssociationSource === undefined && !opts.urn) {
throw new Error("Missing required property 'accessAssociationSource'");
}
if (args?.accessAssociationSourceType === undefined && !opts.urn) {
throw new Error("Missing required property 'accessAssociationSourceType'");
}
if (args?.domainNameArn === undefined && !opts.urn) {
throw new Error("Missing required property 'domainNameArn'");
}
resourceInputs["accessAssociationSource"] = args?.accessAssociationSource;
resourceInputs["accessAssociationSourceType"] = args?.accessAssociationSourceType;
resourceInputs["domainNameArn"] = args?.domainNameArn;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DomainNameAccessAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.DomainNameAccessAssociation = DomainNameAccessAssociation;
/** @internal */
DomainNameAccessAssociation.__pulumiType = 'aws:apigateway/domainNameAccessAssociation:DomainNameAccessAssociation';
//# sourceMappingURL=domainNameAccessAssociation.js.map
;