UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

60 lines 2.08 kB
"use strict"; // *** 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.getRestApiOutput = exports.getRestApi = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get the id and rootResourceId of a REST API in * API Gateway. To fetch the REST API you must provide a name to match against. * As there is no unique name constraint on REST APIs this data source will * error if there is more than one match. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myRestApi = aws.apigateway.getRestApi({ * name: "my-rest-api", * }); * ``` */ function getRestApi(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:apigateway/getRestApi:getRestApi", { "name": args.name, "region": args.region, "tags": args.tags, }, opts); } exports.getRestApi = getRestApi; /** * Use this data source to get the id and rootResourceId of a REST API in * API Gateway. To fetch the REST API you must provide a name to match against. * As there is no unique name constraint on REST APIs this data source will * error if there is more than one match. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myRestApi = aws.apigateway.getRestApi({ * name: "my-rest-api", * }); * ``` */ function getRestApiOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:apigateway/getRestApi:getRestApi", { "name": args.name, "region": args.region, "tags": args.tags, }, opts); } exports.getRestApiOutput = getRestApiOutput; //# sourceMappingURL=getRestApi.js.map