@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
130 lines (129 loc) • 4.34 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* 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",
* });
* ```
*/
export declare function getRestApi(args: GetRestApiArgs, opts?: pulumi.InvokeOptions): Promise<GetRestApiResult>;
/**
* A collection of arguments for invoking getRestApi.
*/
export interface GetRestApiArgs {
/**
* Name of the REST API to look up. If no REST API is found with this name, an error will be returned. If multiple REST APIs are found with this name, an error will be returned.
*/
name: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
/**
* Key-value map of resource tags.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getRestApi.
*/
export interface GetRestApiResult {
/**
* Source of the API key for requests.
*/
readonly apiKeySource: string;
/**
* ARN of the REST API.
*/
readonly arn: string;
/**
* List of binary media types supported by the REST API.
*/
readonly binaryMediaTypes: string[];
/**
* Description of the REST API.
*/
readonly description: string;
/**
* The endpoint configuration of this RestApi showing the endpoint types of the API.
*/
readonly endpointConfigurations: outputs.apigateway.GetRestApiEndpointConfiguration[];
/**
* Execution ARN part to be used in `lambdaPermission`'s `sourceArn` when allowing API Gateway to invoke a Lambda function, e.g., `arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j`, which can be concatenated with allowed stage, method and resource path.
*/
readonly executionArn: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Minimum response size to compress for the REST API.
*/
readonly minimumCompressionSize: string;
readonly name: string;
/**
* JSON formatted policy document that controls access to the API Gateway.
*/
readonly policy: string;
readonly region: string;
/**
* Set to the ID of the API Gateway Resource on the found REST API where the route matches '/'.
*/
readonly rootResourceId: string;
/**
* Key-value map of resource tags.
*/
readonly tags: {
[key: string]: string;
};
}
/**
* 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",
* });
* ```
*/
export declare function getRestApiOutput(args: GetRestApiOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRestApiResult>;
/**
* A collection of arguments for invoking getRestApi.
*/
export interface GetRestApiOutputArgs {
/**
* Name of the REST API to look up. If no REST API is found with this name, an error will be returned. If multiple REST APIs are found with this name, an error will be returned.
*/
name: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Key-value map of resource tags.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}