@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines • 4.43 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["associationId"] = state ? state.associationId : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["mergedApiArn"] = state ? state.mergedApiArn : undefined;
resourceInputs["mergedApiId"] = state ? state.mergedApiId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["sourceApiArn"] = state ? state.sourceApiArn : undefined;
resourceInputs["sourceApiAssociationConfigs"] = state ? state.sourceApiAssociationConfigs : undefined;
resourceInputs["sourceApiId"] = state ? state.sourceApiId : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
}
else {
const args = argsOrState;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["mergedApiArn"] = args ? args.mergedApiArn : undefined;
resourceInputs["mergedApiId"] = args ? args.mergedApiId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["sourceApiArn"] = args ? args.sourceApiArn : undefined;
resourceInputs["sourceApiAssociationConfigs"] = args ? args.sourceApiAssociationConfigs : undefined;
resourceInputs["sourceApiId"] = args ? args.sourceApiId : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
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