@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines • 4.07 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.SourceApiAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS AppSync Source API Association.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.appsync.SourceApiAssociation("test", {
* description: "My source API Merged",
* mergedApiId: "gzos6bteufdunffzzifiowisoe",
* sourceApiId: "fzzifiowisoegzos6bteufdunf",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AppSync Source API Association using the `association_id` and `merged_api_id` separated by `,`. For example:
*
* ```sh
* $ pulumi import aws:appsync/sourceApiAssociation:SourceApiAssociation example gzos6bteufdunffzzifiowisoe,243685a0-9347-4a1a-89c1-9b57dea01e31
* ```
*/
class SourceApiAssociation extends pulumi.CustomResource {
/**
* Get an existing SourceApiAssociation 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 SourceApiAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of SourceApiAssociation. 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'] === SourceApiAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["associationId"] = state?.associationId;
resourceInputs["description"] = state?.description;
resourceInputs["mergedApiArn"] = state?.mergedApiArn;
resourceInputs["mergedApiId"] = state?.mergedApiId;
resourceInputs["region"] = state?.region;
resourceInputs["sourceApiArn"] = state?.sourceApiArn;
resourceInputs["sourceApiAssociationConfigs"] = state?.sourceApiAssociationConfigs;
resourceInputs["sourceApiId"] = state?.sourceApiId;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["mergedApiArn"] = args?.mergedApiArn;
resourceInputs["mergedApiId"] = args?.mergedApiId;
resourceInputs["region"] = args?.region;
resourceInputs["sourceApiArn"] = args?.sourceApiArn;
resourceInputs["sourceApiAssociationConfigs"] = args?.sourceApiAssociationConfigs;
resourceInputs["sourceApiId"] = args?.sourceApiId;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["associationId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SourceApiAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.SourceApiAssociation = SourceApiAssociation;
/** @internal */
SourceApiAssociation.__pulumiType = 'aws:appsync/sourceApiAssociation:SourceApiAssociation';
//# sourceMappingURL=sourceApiAssociation.js.map
;