@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
121 lines • 6.31 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.FunctionConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* An example resource schema demonstrating some basic constructs and validation rules.
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const graphQlApiId = config.require("graphQlApiId");
* const name = config.require("name");
* const description = config.require("description");
* const dataSourceName = config.require("dataSourceName");
* const functionVersion = config.require("functionVersion");
* const requestMappingTemplateS3LocationInput = config.require("requestMappingTemplateS3LocationInput");
* const responseMappingTemplateS3LocationInput = config.require("responseMappingTemplateS3LocationInput");
* const functionConfiguration = new aws_native.appsync.FunctionConfiguration("functionConfiguration", {
* apiId: graphQlApiId,
* name: name,
* description: description,
* functionVersion: functionVersion,
* dataSourceName: dataSourceName,
* requestMappingTemplateS3Location: requestMappingTemplateS3LocationInput,
* responseMappingTemplateS3Location: responseMappingTemplateS3LocationInput,
* });
*
* ```
*/
class FunctionConfiguration extends pulumi.CustomResource {
/**
* Get an existing FunctionConfiguration 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new FunctionConfiguration(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FunctionConfiguration. 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'] === FunctionConfiguration.__pulumiType;
}
/**
* Create a FunctionConfiguration resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.apiId === undefined) && !opts.urn) {
throw new Error("Missing required property 'apiId'");
}
if ((!args || args.dataSourceName === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataSourceName'");
}
resourceInputs["apiId"] = args ? args.apiId : undefined;
resourceInputs["code"] = args ? args.code : undefined;
resourceInputs["codeS3Location"] = args ? args.codeS3Location : undefined;
resourceInputs["dataSourceName"] = args ? args.dataSourceName : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["functionVersion"] = args ? args.functionVersion : undefined;
resourceInputs["maxBatchSize"] = args ? args.maxBatchSize : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["requestMappingTemplate"] = args ? args.requestMappingTemplate : undefined;
resourceInputs["requestMappingTemplateS3Location"] = args ? args.requestMappingTemplateS3Location : undefined;
resourceInputs["responseMappingTemplate"] = args ? args.responseMappingTemplate : undefined;
resourceInputs["responseMappingTemplateS3Location"] = args ? args.responseMappingTemplateS3Location : undefined;
resourceInputs["runtime"] = args ? args.runtime : undefined;
resourceInputs["syncConfig"] = args ? args.syncConfig : undefined;
resourceInputs["functionArn"] = undefined /*out*/;
resourceInputs["functionId"] = undefined /*out*/;
}
else {
resourceInputs["apiId"] = undefined /*out*/;
resourceInputs["code"] = undefined /*out*/;
resourceInputs["codeS3Location"] = undefined /*out*/;
resourceInputs["dataSourceName"] = undefined /*out*/;
resourceInputs["description"] = undefined /*out*/;
resourceInputs["functionArn"] = undefined /*out*/;
resourceInputs["functionId"] = undefined /*out*/;
resourceInputs["functionVersion"] = undefined /*out*/;
resourceInputs["maxBatchSize"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["requestMappingTemplate"] = undefined /*out*/;
resourceInputs["requestMappingTemplateS3Location"] = undefined /*out*/;
resourceInputs["responseMappingTemplate"] = undefined /*out*/;
resourceInputs["responseMappingTemplateS3Location"] = undefined /*out*/;
resourceInputs["runtime"] = undefined /*out*/;
resourceInputs["syncConfig"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["apiId"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(FunctionConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.FunctionConfiguration = FunctionConfiguration;
/** @internal */
FunctionConfiguration.__pulumiType = 'aws-native:appsync:FunctionConfiguration';
//# sourceMappingURL=functionConfiguration.js.map