1. Packages
  2. AWS Classic
  3. API Docs
  4. apigateway
  5. RestApi

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

aws.apigateway.RestApi

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

    Manages an API Gateway REST API. The REST API can be configured via importing an OpenAPI specification in the body argument (with other arguments serving as overrides) or via other provider resources to manage the resources (aws.apigateway.Resource resource), methods (aws.apigateway.Method resource), integrations (aws.apigateway.Integration resource), etc. of the REST API. Once the REST API is configured, the aws.apigateway.Deployment resource can be used along with the aws.apigateway.Stage resource to publish the REST API.

    Note: Amazon API Gateway Version 1 resources are used for creating and deploying REST APIs. To create and deploy WebSocket and HTTP APIs, use Amazon API Gateway Version 2 resources.

    !> WARN: When importing Open API Specifications with the body argument, by default the API Gateway REST API will be replaced with the Open API Specification thus removing any existing methods, resources, integrations, or endpoints. Endpoint mutations are asynchronous operations, and race conditions with DNS are possible. To overcome this limitation, use the put_rest_api_mode attribute and set it to merge.

    Example Usage

    OpenAPI Specification

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const example = new aws.apigateway.RestApi("example", {
        body: JSON.stringify({
            openapi: "3.0.1",
            info: {
                title: "example",
                version: "1.0",
            },
            paths: {
                "/path1": {
                    get: {
                        "x-amazon-apigateway-integration": {
                            httpMethod: "GET",
                            payloadFormatVersion: "1.0",
                            type: "HTTP_PROXY",
                            uri: "https://ip-ranges.amazonaws.com/ip-ranges.json",
                        },
                    },
                },
            },
        }),
        name: "example",
        endpointConfiguration: {
            types: "REGIONAL",
        },
    });
    const exampleDeployment = new aws.apigateway.Deployment("example", {
        restApi: example.id,
        triggers: {
            redeployment: std.sha1Output({
                input: pulumi.jsonStringify(example.body),
            }).apply(invoke => invoke.result),
        },
    });
    const exampleStage = new aws.apigateway.Stage("example", {
        deployment: exampleDeployment.id,
        restApi: example.id,
        stageName: "example",
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    import pulumi_std as std
    
    example = aws.apigateway.RestApi("example",
        body=json.dumps({
            "openapi": "3.0.1",
            "info": {
                "title": "example",
                "version": "1.0",
            },
            "paths": {
                "/path1": {
                    "get": {
                        "x-amazon-apigateway-integration": {
                            "httpMethod": "GET",
                            "payloadFormatVersion": "1.0",
                            "type": "HTTP_PROXY",
                            "uri": "https://ip-ranges.amazonaws.com/ip-ranges.json",
                        },
                    },
                },
            },
        }),
        name="example",
        endpoint_configuration=aws.apigateway.RestApiEndpointConfigurationArgs(
            types="REGIONAL",
        ))
    example_deployment = aws.apigateway.Deployment("example",
        rest_api=example.id,
        triggers={
            "redeployment": std.sha1_output(input=pulumi.Output.json_dumps(example.body)).apply(lambda invoke: invoke.result),
        })
    example_stage = aws.apigateway.Stage("example",
        deployment=example_deployment.id,
        rest_api=example.id,
        stage_name="example")
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"openapi": "3.0.1",
    			"info": map[string]interface{}{
    				"title":   "example",
    				"version": "1.0",
    			},
    			"paths": map[string]interface{}{
    				"/path1": map[string]interface{}{
    					"get": map[string]interface{}{
    						"x-amazon-apigateway-integration": map[string]interface{}{
    							"httpMethod":           "GET",
    							"payloadFormatVersion": "1.0",
    							"type":                 "HTTP_PROXY",
    							"uri":                  "https://ip-ranges.amazonaws.com/ip-ranges.json",
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		example, err := apigateway.NewRestApi(ctx, "example", &apigateway.RestApiArgs{
    			Body: pulumi.String(json0),
    			Name: pulumi.String("example"),
    			EndpointConfiguration: &apigateway.RestApiEndpointConfigurationArgs{
    				Types: pulumi.String("REGIONAL"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleDeployment, err := apigateway.NewDeployment(ctx, "example", &apigateway.DeploymentArgs{
    			RestApi: example.ID(),
    			Triggers: pulumi.StringMap{
    				"redeployment": std.Sha1Output(ctx, std.Sha1OutputArgs{
    					Input: example.Body.ApplyT(func(body *string) (pulumi.String, error) {
    						var _zero pulumi.String
    						tmpJSON1, err := json.Marshal(body)
    						if err != nil {
    							return _zero, err
    						}
    						json1 := string(tmpJSON1)
    						return pulumi.String(json1), nil
    					}).(pulumi.StringOutput),
    				}, nil).ApplyT(func(invoke std.Sha1Result) (*string, error) {
    					return invoke.Result, nil
    				}).(pulumi.StringPtrOutput),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewStage(ctx, "example", &apigateway.StageArgs{
    			Deployment: exampleDeployment.ID(),
    			RestApi:    example.ID(),
    			StageName:  pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ApiGateway.RestApi("example", new()
        {
            Body = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["openapi"] = "3.0.1",
                ["info"] = new Dictionary<string, object?>
                {
                    ["title"] = "example",
                    ["version"] = "1.0",
                },
                ["paths"] = new Dictionary<string, object?>
                {
                    ["/path1"] = new Dictionary<string, object?>
                    {
                        ["get"] = new Dictionary<string, object?>
                        {
                            ["x-amazon-apigateway-integration"] = new Dictionary<string, object?>
                            {
                                ["httpMethod"] = "GET",
                                ["payloadFormatVersion"] = "1.0",
                                ["type"] = "HTTP_PROXY",
                                ["uri"] = "https://ip-ranges.amazonaws.com/ip-ranges.json",
                            },
                        },
                    },
                },
            }),
            Name = "example",
            EndpointConfiguration = new Aws.ApiGateway.Inputs.RestApiEndpointConfigurationArgs
            {
                Types = "REGIONAL",
            },
        });
    
        var exampleDeployment = new Aws.ApiGateway.Deployment("example", new()
        {
            RestApi = example.Id,
            Triggers = 
            {
                { "redeployment", Std.Sha1.Invoke(new()
                {
                    Input = Output.JsonSerialize(Output.Create(example.Body)),
                }).Apply(invoke => invoke.Result) },
            },
        });
    
        var exampleStage = new Aws.ApiGateway.Stage("example", new()
        {
            Deployment = exampleDeployment.Id,
            RestApi = example.Id,
            StageName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.inputs.RestApiEndpointConfigurationArgs;
    import com.pulumi.aws.apigateway.Deployment;
    import com.pulumi.aws.apigateway.DeploymentArgs;
    import com.pulumi.aws.apigateway.Stage;
    import com.pulumi.aws.apigateway.StageArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RestApi("example", RestApiArgs.builder()        
                .body(serializeJson(
                    jsonObject(
                        jsonProperty("openapi", "3.0.1"),
                        jsonProperty("info", jsonObject(
                            jsonProperty("title", "example"),
                            jsonProperty("version", "1.0")
                        )),
                        jsonProperty("paths", jsonObject(
                            jsonProperty("/path1", jsonObject(
                                jsonProperty("get", jsonObject(
                                    jsonProperty("x-amazon-apigateway-integration", jsonObject(
                                        jsonProperty("httpMethod", "GET"),
                                        jsonProperty("payloadFormatVersion", "1.0"),
                                        jsonProperty("type", "HTTP_PROXY"),
                                        jsonProperty("uri", "https://ip-ranges.amazonaws.com/ip-ranges.json")
                                    ))
                                ))
                            ))
                        ))
                    )))
                .name("example")
                .endpointConfiguration(RestApiEndpointConfigurationArgs.builder()
                    .types("REGIONAL")
                    .build())
                .build());
    
            var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()        
                .restApi(example.id())
                .triggers(Map.of("redeployment", StdFunctions.sha1().applyValue(invoke -> invoke.result())))
                .build());
    
            var exampleStage = new Stage("exampleStage", StageArgs.builder()        
                .deployment(exampleDeployment.id())
                .restApi(example.id())
                .stageName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:apigateway:RestApi
        properties:
          body:
            fn::toJSON:
              openapi: 3.0.1
              info:
                title: example
                version: '1.0'
              paths:
                /path1:
                  get:
                    x-amazon-apigateway-integration:
                      httpMethod: GET
                      payloadFormatVersion: '1.0'
                      type: HTTP_PROXY
                      uri: https://ip-ranges.amazonaws.com/ip-ranges.json
          name: example
          endpointConfiguration:
            types: REGIONAL
      exampleDeployment:
        type: aws:apigateway:Deployment
        name: example
        properties:
          restApi: ${example.id}
          triggers:
            redeployment:
              fn::invoke:
                Function: std:sha1
                Arguments:
                  input:
                    fn::toJSON: ${example.body}
                Return: result
      exampleStage:
        type: aws:apigateway:Stage
        name: example
        properties:
          deployment: ${exampleDeployment.id}
          restApi: ${example.id}
          stageName: example
    

    OpenAPI Specification with Private Endpoints

    Using put_rest_api_mode = merge when importing the OpenAPI Specification, the AWS control plane will not delete all existing literal properties that are not explicitly set in the OpenAPI definition. Impacted API Gateway properties: ApiKeySourceType, BinaryMediaTypes, Description, EndpointConfiguration, MinimumCompressionSize, Name, Policy).

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const available = aws.getAvailabilityZones({
        state: "available",
        filters: [{
            name: "opt-in-status",
            values: ["opt-in-not-required"],
        }],
    });
    const current = aws.getRegion({});
    const example = new aws.ec2.Vpc("example", {
        cidrBlock: "10.0.0.0/16",
        enableDnsSupport: true,
        enableDnsHostnames: true,
    });
    const exampleDefaultSecurityGroup = new aws.ec2.DefaultSecurityGroup("example", {vpcId: example.id});
    const exampleSubnet = new aws.ec2.Subnet("example", {
        availabilityZone: available.then(available => available.names?.[0]),
        cidrBlock: example.cidrBlock.apply(cidrBlock => std.cidrsubnetOutput({
            input: cidrBlock,
            newbits: 8,
            netnum: 0,
        })).apply(invoke => invoke.result),
        vpcId: example.id,
    });
    const exampleVpcEndpoint: aws.ec2.VpcEndpoint[] = [];
    for (const range = {value: 0}; range.value < 3; range.value++) {
        exampleVpcEndpoint.push(new aws.ec2.VpcEndpoint(`example-${range.value}`, {
            privateDnsEnabled: false,
            securityGroupIds: [exampleDefaultSecurityGroup.id],
            serviceName: current.then(current => `com.amazonaws.${current.name}.execute-api`),
            subnetIds: [exampleSubnet.id],
            vpcEndpointType: "Interface",
            vpcId: example.id,
        }));
    }
    const exampleRestApi = new aws.apigateway.RestApi("example", {
        body: JSON.stringify({
            openapi: "3.0.1",
            info: {
                title: "example",
                version: "1.0",
            },
            paths: {
                "/path1": {
                    get: {
                        "x-amazon-apigateway-integration": {
                            httpMethod: "GET",
                            payloadFormatVersion: "1.0",
                            type: "HTTP_PROXY",
                            uri: "https://ip-ranges.amazonaws.com/ip-ranges.json",
                        },
                    },
                },
            },
        }),
        name: "example",
        putRestApiMode: "merge",
        endpointConfiguration: {
            types: "PRIVATE",
            vpcEndpointIds: [
                exampleVpcEndpoint[0].id,
                exampleVpcEndpoint[1].id,
                exampleVpcEndpoint[2].id,
            ],
        },
    });
    const exampleDeployment = new aws.apigateway.Deployment("example", {
        restApi: exampleRestApi.id,
        triggers: {
            redeployment: std.sha1Output({
                input: pulumi.jsonStringify(exampleRestApi.body),
            }).apply(invoke => invoke.result),
        },
    });
    const exampleStage = new aws.apigateway.Stage("example", {
        deployment: exampleDeployment.id,
        restApi: exampleRestApi.id,
        stageName: "example",
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    import pulumi_std as std
    
    available = aws.get_availability_zones(state="available",
        filters=[aws.GetAvailabilityZonesFilterArgs(
            name="opt-in-status",
            values=["opt-in-not-required"],
        )])
    current = aws.get_region()
    example = aws.ec2.Vpc("example",
        cidr_block="10.0.0.0/16",
        enable_dns_support=True,
        enable_dns_hostnames=True)
    example_default_security_group = aws.ec2.DefaultSecurityGroup("example", vpc_id=example.id)
    example_subnet = aws.ec2.Subnet("example",
        availability_zone=available.names[0],
        cidr_block=example.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,
            newbits=8,
            netnum=0)).apply(lambda invoke: invoke.result),
        vpc_id=example.id)
    example_vpc_endpoint = []
    for range in [{"value": i} for i in range(0, 3)]:
        example_vpc_endpoint.append(aws.ec2.VpcEndpoint(f"example-{range['value']}",
            private_dns_enabled=False,
            security_group_ids=[example_default_security_group.id],
            service_name=f"com.amazonaws.{current.name}.execute-api",
            subnet_ids=[example_subnet.id],
            vpc_endpoint_type="Interface",
            vpc_id=example.id))
    example_rest_api = aws.apigateway.RestApi("example",
        body=json.dumps({
            "openapi": "3.0.1",
            "info": {
                "title": "example",
                "version": "1.0",
            },
            "paths": {
                "/path1": {
                    "get": {
                        "x-amazon-apigateway-integration": {
                            "httpMethod": "GET",
                            "payloadFormatVersion": "1.0",
                            "type": "HTTP_PROXY",
                            "uri": "https://ip-ranges.amazonaws.com/ip-ranges.json",
                        },
                    },
                },
            },
        }),
        name="example",
        put_rest_api_mode="merge",
        endpoint_configuration=aws.apigateway.RestApiEndpointConfigurationArgs(
            types="PRIVATE",
            vpc_endpoint_ids=[
                example_vpc_endpoint[0].id,
                example_vpc_endpoint[1].id,
                example_vpc_endpoint[2].id,
            ],
        ))
    example_deployment = aws.apigateway.Deployment("example",
        rest_api=example_rest_api.id,
        triggers={
            "redeployment": std.sha1_output(input=pulumi.Output.json_dumps(example_rest_api.body)).apply(lambda invoke: invoke.result),
        })
    example_stage = aws.apigateway.Stage("example",
        deployment=example_deployment.id,
        rest_api=example_rest_api.id,
        stage_name="example")
    
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
    			State: pulumi.StringRef("available"),
    			Filters: []aws.GetAvailabilityZonesFilter{
    				{
    					Name: "opt-in-status",
    					Values: []string{
    						"opt-in-not-required",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		current, err := aws.GetRegion(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		example, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
    			CidrBlock:          pulumi.String("10.0.0.0/16"),
    			EnableDnsSupport:   pulumi.Bool(true),
    			EnableDnsHostnames: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDefaultSecurityGroup, err := ec2.NewDefaultSecurityGroup(ctx, "example", &ec2.DefaultSecurityGroupArgs{
    			VpcId: example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := ec2.NewSubnet(ctx, "example", &ec2.SubnetArgs{
    			AvailabilityZone: *pulumi.String(available.Names[0]),
    			CidrBlock: example.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {
    				return std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{
    					Input:   cidrBlock,
    					Newbits: 8,
    					Netnum:  0,
    				}, nil), nil
    			}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {
    				return invoke.Result, nil
    			}).(pulumi.StringPtrOutput),
    			VpcId: example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		var exampleVpcEndpoint []*ec2.VpcEndpoint
    		for index := 0; index < 3; index++ {
    			key0 := index
    			_ := index
    			__res, err := ec2.NewVpcEndpoint(ctx, fmt.Sprintf("example-%v", key0), &ec2.VpcEndpointArgs{
    				PrivateDnsEnabled: pulumi.Bool(false),
    				SecurityGroupIds: pulumi.StringArray{
    					exampleDefaultSecurityGroup.ID(),
    				},
    				ServiceName: pulumi.String(fmt.Sprintf("com.amazonaws.%v.execute-api", current.Name)),
    				SubnetIds: pulumi.StringArray{
    					exampleSubnet.ID(),
    				},
    				VpcEndpointType: pulumi.String("Interface"),
    				VpcId:           example.ID(),
    			})
    			if err != nil {
    				return err
    			}
    			exampleVpcEndpoint = append(exampleVpcEndpoint, __res)
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"openapi": "3.0.1",
    			"info": map[string]interface{}{
    				"title":   "example",
    				"version": "1.0",
    			},
    			"paths": map[string]interface{}{
    				"/path1": map[string]interface{}{
    					"get": map[string]interface{}{
    						"x-amazon-apigateway-integration": map[string]interface{}{
    							"httpMethod":           "GET",
    							"payloadFormatVersion": "1.0",
    							"type":                 "HTTP_PROXY",
    							"uri":                  "https://ip-ranges.amazonaws.com/ip-ranges.json",
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		exampleRestApi, err := apigateway.NewRestApi(ctx, "example", &apigateway.RestApiArgs{
    			Body:           pulumi.String(json0),
    			Name:           pulumi.String("example"),
    			PutRestApiMode: pulumi.String("merge"),
    			EndpointConfiguration: &apigateway.RestApiEndpointConfigurationArgs{
    				Types: pulumi.String("PRIVATE"),
    				VpcEndpointIds: pulumi.StringArray{
    					exampleVpcEndpoint[0].ID(),
    					exampleVpcEndpoint[1].ID(),
    					exampleVpcEndpoint[2].ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleDeployment, err := apigateway.NewDeployment(ctx, "example", &apigateway.DeploymentArgs{
    			RestApi: exampleRestApi.ID(),
    			Triggers: pulumi.StringMap{
    				"redeployment": std.Sha1Output(ctx, std.Sha1OutputArgs{
    					Input: exampleRestApi.Body.ApplyT(func(body *string) (pulumi.String, error) {
    						var _zero pulumi.String
    						tmpJSON1, err := json.Marshal(body)
    						if err != nil {
    							return _zero, err
    						}
    						json1 := string(tmpJSON1)
    						return pulumi.String(json1), nil
    					}).(pulumi.StringOutput),
    				}, nil).ApplyT(func(invoke std.Sha1Result) (*string, error) {
    					return invoke.Result, nil
    				}).(pulumi.StringPtrOutput),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewStage(ctx, "example", &apigateway.StageArgs{
    			Deployment: exampleDeployment.ID(),
    			RestApi:    exampleRestApi.ID(),
    			StageName:  pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var available = Aws.GetAvailabilityZones.Invoke(new()
        {
            State = "available",
            Filters = new[]
            {
                new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
                {
                    Name = "opt-in-status",
                    Values = new[]
                    {
                        "opt-in-not-required",
                    },
                },
            },
        });
    
        var current = Aws.GetRegion.Invoke();
    
        var example = new Aws.Ec2.Vpc("example", new()
        {
            CidrBlock = "10.0.0.0/16",
            EnableDnsSupport = true,
            EnableDnsHostnames = true,
        });
    
        var exampleDefaultSecurityGroup = new Aws.Ec2.DefaultSecurityGroup("example", new()
        {
            VpcId = example.Id,
        });
    
        var exampleSubnet = new Aws.Ec2.Subnet("example", new()
        {
            AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
            CidrBlock = example.CidrBlock.Apply(cidrBlock => Std.Cidrsubnet.Invoke(new()
            {
                Input = cidrBlock,
                Newbits = 8,
                Netnum = 0,
            })).Apply(invoke => invoke.Result),
            VpcId = example.Id,
        });
    
        var exampleVpcEndpoint = new List<Aws.Ec2.VpcEndpoint>();
        for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            exampleVpcEndpoint.Add(new Aws.Ec2.VpcEndpoint($"example-{range.Value}", new()
            {
                PrivateDnsEnabled = false,
                SecurityGroupIds = new[]
                {
                    exampleDefaultSecurityGroup.Id,
                },
                ServiceName = $"com.amazonaws.{current.Apply(getRegionResult => getRegionResult.Name)}.execute-api",
                SubnetIds = new[]
                {
                    exampleSubnet.Id,
                },
                VpcEndpointType = "Interface",
                VpcId = example.Id,
            }));
        }
        var exampleRestApi = new Aws.ApiGateway.RestApi("example", new()
        {
            Body = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["openapi"] = "3.0.1",
                ["info"] = new Dictionary<string, object?>
                {
                    ["title"] = "example",
                    ["version"] = "1.0",
                },
                ["paths"] = new Dictionary<string, object?>
                {
                    ["/path1"] = new Dictionary<string, object?>
                    {
                        ["get"] = new Dictionary<string, object?>
                        {
                            ["x-amazon-apigateway-integration"] = new Dictionary<string, object?>
                            {
                                ["httpMethod"] = "GET",
                                ["payloadFormatVersion"] = "1.0",
                                ["type"] = "HTTP_PROXY",
                                ["uri"] = "https://ip-ranges.amazonaws.com/ip-ranges.json",
                            },
                        },
                    },
                },
            }),
            Name = "example",
            PutRestApiMode = "merge",
            EndpointConfiguration = new Aws.ApiGateway.Inputs.RestApiEndpointConfigurationArgs
            {
                Types = "PRIVATE",
                VpcEndpointIds = new[]
                {
                    exampleVpcEndpoint[0].Id,
                    exampleVpcEndpoint[1].Id,
                    exampleVpcEndpoint[2].Id,
                },
            },
        });
    
        var exampleDeployment = new Aws.ApiGateway.Deployment("example", new()
        {
            RestApi = exampleRestApi.Id,
            Triggers = 
            {
                { "redeployment", Std.Sha1.Invoke(new()
                {
                    Input = Output.JsonSerialize(Output.Create(exampleRestApi.Body)),
                }).Apply(invoke => invoke.Result) },
            },
        });
    
        var exampleStage = new Aws.ApiGateway.Stage("example", new()
        {
            Deployment = exampleDeployment.Id,
            RestApi = exampleRestApi.Id,
            StageName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
    import com.pulumi.aws.inputs.GetRegionArgs;
    import com.pulumi.aws.ec2.Vpc;
    import com.pulumi.aws.ec2.VpcArgs;
    import com.pulumi.aws.ec2.DefaultSecurityGroup;
    import com.pulumi.aws.ec2.DefaultSecurityGroupArgs;
    import com.pulumi.aws.ec2.Subnet;
    import com.pulumi.aws.ec2.SubnetArgs;
    import com.pulumi.aws.ec2.VpcEndpoint;
    import com.pulumi.aws.ec2.VpcEndpointArgs;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.inputs.RestApiEndpointConfigurationArgs;
    import com.pulumi.aws.apigateway.Deployment;
    import com.pulumi.aws.apigateway.DeploymentArgs;
    import com.pulumi.aws.apigateway.Stage;
    import com.pulumi.aws.apigateway.StageArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import com.pulumi.codegen.internal.KeyedValue;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
                .state("available")
                .filters(GetAvailabilityZonesFilterArgs.builder()
                    .name("opt-in-status")
                    .values("opt-in-not-required")
                    .build())
                .build());
    
            final var current = AwsFunctions.getRegion();
    
            var example = new Vpc("example", VpcArgs.builder()        
                .cidrBlock("10.0.0.0/16")
                .enableDnsSupport(true)
                .enableDnsHostnames(true)
                .build());
    
            var exampleDefaultSecurityGroup = new DefaultSecurityGroup("exampleDefaultSecurityGroup", DefaultSecurityGroupArgs.builder()        
                .vpcId(example.id())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
                .cidrBlock(example.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
                .vpcId(example.id())
                .build());
    
            for (var i = 0; i < 3; i++) {
                new VpcEndpoint("exampleVpcEndpoint-" + i, VpcEndpointArgs.builder()            
                    .privateDnsEnabled(false)
                    .securityGroupIds(exampleDefaultSecurityGroup.id())
                    .serviceName(String.format("com.amazonaws.%s.execute-api", current.applyValue(getRegionResult -> getRegionResult.name())))
                    .subnetIds(exampleSubnet.id())
                    .vpcEndpointType("Interface")
                    .vpcId(example.id())
                    .build());
    
            
    }
            var exampleRestApi = new RestApi("exampleRestApi", RestApiArgs.builder()        
                .body(serializeJson(
                    jsonObject(
                        jsonProperty("openapi", "3.0.1"),
                        jsonProperty("info", jsonObject(
                            jsonProperty("title", "example"),
                            jsonProperty("version", "1.0")
                        )),
                        jsonProperty("paths", jsonObject(
                            jsonProperty("/path1", jsonObject(
                                jsonProperty("get", jsonObject(
                                    jsonProperty("x-amazon-apigateway-integration", jsonObject(
                                        jsonProperty("httpMethod", "GET"),
                                        jsonProperty("payloadFormatVersion", "1.0"),
                                        jsonProperty("type", "HTTP_PROXY"),
                                        jsonProperty("uri", "https://ip-ranges.amazonaws.com/ip-ranges.json")
                                    ))
                                ))
                            ))
                        ))
                    )))
                .name("example")
                .putRestApiMode("merge")
                .endpointConfiguration(RestApiEndpointConfigurationArgs.builder()
                    .types("PRIVATE")
                    .vpcEndpointIds(                
                        exampleVpcEndpoint[0].id(),
                        exampleVpcEndpoint[1].id(),
                        exampleVpcEndpoint[2].id())
                    .build())
                .build());
    
            var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()        
                .restApi(exampleRestApi.id())
                .triggers(Map.of("redeployment", StdFunctions.sha1().applyValue(invoke -> invoke.result())))
                .build());
    
            var exampleStage = new Stage("exampleStage", StageArgs.builder()        
                .deployment(exampleDeployment.id())
                .restApi(exampleRestApi.id())
                .stageName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
          enableDnsSupport: true
          enableDnsHostnames: true
      exampleDefaultSecurityGroup:
        type: aws:ec2:DefaultSecurityGroup
        name: example
        properties:
          vpcId: ${example.id}
      exampleSubnet:
        type: aws:ec2:Subnet
        name: example
        properties:
          availabilityZone: ${available.names[0]}
          cidrBlock:
            fn::invoke:
              Function: std:cidrsubnet
              Arguments:
                input: ${example.cidrBlock}
                newbits: 8
                netnum: 0
              Return: result
          vpcId: ${example.id}
      exampleVpcEndpoint:
        type: aws:ec2:VpcEndpoint
        name: example
        properties:
          privateDnsEnabled: false
          securityGroupIds:
            - ${exampleDefaultSecurityGroup.id}
          serviceName: com.amazonaws.${current.name}.execute-api
          subnetIds:
            - ${exampleSubnet.id}
          vpcEndpointType: Interface
          vpcId: ${example.id}
        options: {}
      exampleRestApi:
        type: aws:apigateway:RestApi
        name: example
        properties:
          body:
            fn::toJSON:
              openapi: 3.0.1
              info:
                title: example
                version: '1.0'
              paths:
                /path1:
                  get:
                    x-amazon-apigateway-integration:
                      httpMethod: GET
                      payloadFormatVersion: '1.0'
                      type: HTTP_PROXY
                      uri: https://ip-ranges.amazonaws.com/ip-ranges.json
          name: example
          putRestApiMode: merge
          endpointConfiguration:
            types: PRIVATE
            vpcEndpointIds:
              - ${exampleVpcEndpoint[0].id}
              - ${exampleVpcEndpoint[1].id}
              - ${exampleVpcEndpoint[2].id}
      exampleDeployment:
        type: aws:apigateway:Deployment
        name: example
        properties:
          restApi: ${exampleRestApi.id}
          triggers:
            redeployment:
              fn::invoke:
                Function: std:sha1
                Arguments:
                  input:
                    fn::toJSON: ${exampleRestApi.body}
                Return: result
      exampleStage:
        type: aws:apigateway:Stage
        name: example
        properties:
          deployment: ${exampleDeployment.id}
          restApi: ${exampleRestApi.id}
          stageName: example
    variables:
      available:
        fn::invoke:
          Function: aws:getAvailabilityZones
          Arguments:
            state: available
            filters:
              - name: opt-in-status
                values:
                  - opt-in-not-required
      current:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    Resources

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const example = new aws.apigateway.RestApi("example", {name: "example"});
    const exampleResource = new aws.apigateway.Resource("example", {
        parentId: example.rootResourceId,
        pathPart: "example",
        restApi: example.id,
    });
    const exampleMethod = new aws.apigateway.Method("example", {
        authorization: "NONE",
        httpMethod: "GET",
        resourceId: exampleResource.id,
        restApi: example.id,
    });
    const exampleIntegration = new aws.apigateway.Integration("example", {
        httpMethod: exampleMethod.httpMethod,
        resourceId: exampleResource.id,
        restApi: example.id,
        type: "MOCK",
    });
    const exampleDeployment = new aws.apigateway.Deployment("example", {
        restApi: example.id,
        triggers: {
            redeployment: std.sha1Output({
                input: pulumi.jsonStringify([
                    exampleResource.id,
                    exampleMethod.id,
                    exampleIntegration.id,
                ]),
            }).apply(invoke => invoke.result),
        },
    });
    const exampleStage = new aws.apigateway.Stage("example", {
        deployment: exampleDeployment.id,
        restApi: example.id,
        stageName: "example",
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    import pulumi_std as std
    
    example = aws.apigateway.RestApi("example", name="example")
    example_resource = aws.apigateway.Resource("example",
        parent_id=example.root_resource_id,
        path_part="example",
        rest_api=example.id)
    example_method = aws.apigateway.Method("example",
        authorization="NONE",
        http_method="GET",
        resource_id=example_resource.id,
        rest_api=example.id)
    example_integration = aws.apigateway.Integration("example",
        http_method=example_method.http_method,
        resource_id=example_resource.id,
        rest_api=example.id,
        type="MOCK")
    example_deployment = aws.apigateway.Deployment("example",
        rest_api=example.id,
        triggers={
            "redeployment": std.sha1_output(input=pulumi.Output.json_dumps([
                example_resource.id,
                example_method.id,
                example_integration.id,
            ])).apply(lambda invoke: invoke.result),
        })
    example_stage = aws.apigateway.Stage("example",
        deployment=example_deployment.id,
        rest_api=example.id,
        stage_name="example")
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := apigateway.NewRestApi(ctx, "example", &apigateway.RestApiArgs{
    			Name: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleResource, err := apigateway.NewResource(ctx, "example", &apigateway.ResourceArgs{
    			ParentId: example.RootResourceId,
    			PathPart: pulumi.String("example"),
    			RestApi:  example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMethod, err := apigateway.NewMethod(ctx, "example", &apigateway.MethodArgs{
    			Authorization: pulumi.String("NONE"),
    			HttpMethod:    pulumi.String("GET"),
    			ResourceId:    exampleResource.ID(),
    			RestApi:       example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleIntegration, err := apigateway.NewIntegration(ctx, "example", &apigateway.IntegrationArgs{
    			HttpMethod: exampleMethod.HttpMethod,
    			ResourceId: exampleResource.ID(),
    			RestApi:    example.ID(),
    			Type:       pulumi.String("MOCK"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDeployment, err := apigateway.NewDeployment(ctx, "example", &apigateway.DeploymentArgs{
    			RestApi: example.ID(),
    			Triggers: pulumi.StringMap{
    				"redeployment": std.Sha1Output(ctx, std.Sha1OutputArgs{
    					Input: pulumi.All(exampleResource.ID(), exampleMethod.ID(), exampleIntegration.ID()).ApplyT(func(_args []interface{}) (string, error) {
    						exampleResourceId := _args[0].(string)
    						exampleMethodId := _args[1].(string)
    						exampleIntegrationId := _args[2].(string)
    						var _zero string
    						tmpJSON0, err := json.Marshal([]string{
    							exampleResourceId,
    							exampleMethodId,
    							exampleIntegrationId,
    						})
    						if err != nil {
    							return _zero, err
    						}
    						json0 := string(tmpJSON0)
    						return json0, nil
    					}).(pulumi.StringOutput),
    				}, nil).ApplyT(func(invoke std.Sha1Result) (*string, error) {
    					return invoke.Result, nil
    				}).(pulumi.StringPtrOutput),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewStage(ctx, "example", &apigateway.StageArgs{
    			Deployment: exampleDeployment.ID(),
    			RestApi:    example.ID(),
    			StageName:  pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ApiGateway.RestApi("example", new()
        {
            Name = "example",
        });
    
        var exampleResource = new Aws.ApiGateway.Resource("example", new()
        {
            ParentId = example.RootResourceId,
            PathPart = "example",
            RestApi = example.Id,
        });
    
        var exampleMethod = new Aws.ApiGateway.Method("example", new()
        {
            Authorization = "NONE",
            HttpMethod = "GET",
            ResourceId = exampleResource.Id,
            RestApi = example.Id,
        });
    
        var exampleIntegration = new Aws.ApiGateway.Integration("example", new()
        {
            HttpMethod = exampleMethod.HttpMethod,
            ResourceId = exampleResource.Id,
            RestApi = example.Id,
            Type = "MOCK",
        });
    
        var exampleDeployment = new Aws.ApiGateway.Deployment("example", new()
        {
            RestApi = example.Id,
            Triggers = 
            {
                { "redeployment", Std.Sha1.Invoke(new()
                {
                    Input = Output.JsonSerialize(Output.Create(new[]
                    {
                        exampleResource.Id,
                        exampleMethod.Id,
                        exampleIntegration.Id,
                    })),
                }).Apply(invoke => invoke.Result) },
            },
        });
    
        var exampleStage = new Aws.ApiGateway.Stage("example", new()
        {
            Deployment = exampleDeployment.Id,
            RestApi = example.Id,
            StageName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.Resource;
    import com.pulumi.aws.apigateway.ResourceArgs;
    import com.pulumi.aws.apigateway.Method;
    import com.pulumi.aws.apigateway.MethodArgs;
    import com.pulumi.aws.apigateway.Integration;
    import com.pulumi.aws.apigateway.IntegrationArgs;
    import com.pulumi.aws.apigateway.Deployment;
    import com.pulumi.aws.apigateway.DeploymentArgs;
    import com.pulumi.aws.apigateway.Stage;
    import com.pulumi.aws.apigateway.StageArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RestApi("example", RestApiArgs.builder()        
                .name("example")
                .build());
    
            var exampleResource = new Resource("exampleResource", ResourceArgs.builder()        
                .parentId(example.rootResourceId())
                .pathPart("example")
                .restApi(example.id())
                .build());
    
            var exampleMethod = new Method("exampleMethod", MethodArgs.builder()        
                .authorization("NONE")
                .httpMethod("GET")
                .resourceId(exampleResource.id())
                .restApi(example.id())
                .build());
    
            var exampleIntegration = new Integration("exampleIntegration", IntegrationArgs.builder()        
                .httpMethod(exampleMethod.httpMethod())
                .resourceId(exampleResource.id())
                .restApi(example.id())
                .type("MOCK")
                .build());
    
            var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()        
                .restApi(example.id())
                .triggers(Map.of("redeployment", StdFunctions.sha1().applyValue(invoke -> invoke.result())))
                .build());
    
            var exampleStage = new Stage("exampleStage", StageArgs.builder()        
                .deployment(exampleDeployment.id())
                .restApi(example.id())
                .stageName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:apigateway:RestApi
        properties:
          name: example
      exampleResource:
        type: aws:apigateway:Resource
        name: example
        properties:
          parentId: ${example.rootResourceId}
          pathPart: example
          restApi: ${example.id}
      exampleMethod:
        type: aws:apigateway:Method
        name: example
        properties:
          authorization: NONE
          httpMethod: GET
          resourceId: ${exampleResource.id}
          restApi: ${example.id}
      exampleIntegration:
        type: aws:apigateway:Integration
        name: example
        properties:
          httpMethod: ${exampleMethod.httpMethod}
          resourceId: ${exampleResource.id}
          restApi: ${example.id}
          type: MOCK
      exampleDeployment:
        type: aws:apigateway:Deployment
        name: example
        properties:
          restApi: ${example.id}
          triggers:
            redeployment:
              fn::invoke:
                Function: std:sha1
                Arguments:
                  input:
                    fn::toJSON:
                      - ${exampleResource.id}
                      - ${exampleMethod.id}
                      - ${exampleIntegration.id}
                Return: result
      exampleStage:
        type: aws:apigateway:Stage
        name: example
        properties:
          deployment: ${exampleDeployment.id}
          restApi: ${example.id}
          stageName: example
    

    Create RestApi Resource

    new RestApi(name: string, args?: RestApiArgs, opts?: CustomResourceOptions);
    @overload
    def RestApi(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                api_key_source: Optional[str] = None,
                binary_media_types: Optional[Sequence[str]] = None,
                body: Optional[str] = None,
                description: Optional[str] = None,
                disable_execute_api_endpoint: Optional[bool] = None,
                endpoint_configuration: Optional[RestApiEndpointConfigurationArgs] = None,
                fail_on_warnings: Optional[bool] = None,
                minimum_compression_size: Optional[str] = None,
                name: Optional[str] = None,
                parameters: Optional[Mapping[str, str]] = None,
                policy: Optional[str] = None,
                put_rest_api_mode: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)
    @overload
    def RestApi(resource_name: str,
                args: Optional[RestApiArgs] = None,
                opts: Optional[ResourceOptions] = None)
    func NewRestApi(ctx *Context, name string, args *RestApiArgs, opts ...ResourceOption) (*RestApi, error)
    public RestApi(string name, RestApiArgs? args = null, CustomResourceOptions? opts = null)
    public RestApi(String name, RestApiArgs args)
    public RestApi(String name, RestApiArgs args, CustomResourceOptions options)
    
    type: aws:apigateway:RestApi
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RestApiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RestApiArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RestApiArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RestApiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RestApiArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RestApi Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RestApi resource accepts the following input properties:

    ApiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    BinaryMediaTypes List<string>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    Description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    EndpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    FailOnWarnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    MinimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Parameters Dictionary<string, string>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    Policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    PutRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ApiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    BinaryMediaTypes []string
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    Description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    EndpointConfiguration RestApiEndpointConfigurationArgs
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    FailOnWarnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    MinimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Parameters map[string]string
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    Policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    PutRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    apiKeySource String
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    binaryMediaTypes List<String>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body String
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    description String
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    failOnWarnings Boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize String
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name String
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Map<String,String>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy String
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode String
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    apiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    binaryMediaTypes string[]
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    failOnWarnings boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters {[key: string]: string}
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    api_key_source str
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    binary_media_types Sequence[str]
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body str
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    description str
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disable_execute_api_endpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpoint_configuration RestApiEndpointConfigurationArgs
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    fail_on_warnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimum_compression_size str
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name str
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Mapping[str, str]
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy str
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    put_rest_api_mode str
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    apiKeySource String
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    binaryMediaTypes List<String>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body String
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    description String
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration Property Map
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    failOnWarnings Boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize String
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name String
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Map<String>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy String
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode String
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RestApi resource produces the following output properties:

    Arn string
    ARN
    CreatedDate string
    Creation date of the REST API
    ExecutionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    Id string
    The provider-assigned unique ID for this managed resource.
    RootResourceId string
    Resource ID of the REST API's root
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    ARN
    CreatedDate string
    Creation date of the REST API
    ExecutionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    Id string
    The provider-assigned unique ID for this managed resource.
    RootResourceId string
    Resource ID of the REST API's root
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN
    createdDate String
    Creation date of the REST API
    executionArn String
    Execution ARN part to be used in lambda_permission's source_arn 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.
    id String
    The provider-assigned unique ID for this managed resource.
    rootResourceId String
    Resource ID of the REST API's root
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    ARN
    createdDate string
    Creation date of the REST API
    executionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    id string
    The provider-assigned unique ID for this managed resource.
    rootResourceId string
    Resource ID of the REST API's root
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    ARN
    created_date str
    Creation date of the REST API
    execution_arn str
    Execution ARN part to be used in lambda_permission's source_arn 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.
    id str
    The provider-assigned unique ID for this managed resource.
    root_resource_id str
    Resource ID of the REST API's root
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN
    createdDate String
    Creation date of the REST API
    executionArn String
    Execution ARN part to be used in lambda_permission's source_arn 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.
    id String
    The provider-assigned unique ID for this managed resource.
    rootResourceId String
    Resource ID of the REST API's root
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing RestApi Resource

    Get an existing RestApi resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RestApiState, opts?: CustomResourceOptions): RestApi
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_key_source: Optional[str] = None,
            arn: Optional[str] = None,
            binary_media_types: Optional[Sequence[str]] = None,
            body: Optional[str] = None,
            created_date: Optional[str] = None,
            description: Optional[str] = None,
            disable_execute_api_endpoint: Optional[bool] = None,
            endpoint_configuration: Optional[RestApiEndpointConfigurationArgs] = None,
            execution_arn: Optional[str] = None,
            fail_on_warnings: Optional[bool] = None,
            minimum_compression_size: Optional[str] = None,
            name: Optional[str] = None,
            parameters: Optional[Mapping[str, str]] = None,
            policy: Optional[str] = None,
            put_rest_api_mode: Optional[str] = None,
            root_resource_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> RestApi
    func GetRestApi(ctx *Context, name string, id IDInput, state *RestApiState, opts ...ResourceOption) (*RestApi, error)
    public static RestApi Get(string name, Input<string> id, RestApiState? state, CustomResourceOptions? opts = null)
    public static RestApi get(String name, Output<String> id, RestApiState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Arn string
    ARN
    BinaryMediaTypes List<string>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    CreatedDate string
    Creation date of the REST API
    Description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    EndpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    ExecutionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    FailOnWarnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    MinimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Parameters Dictionary<string, string>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    Policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    PutRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    RootResourceId string
    Resource ID of the REST API's root
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    ApiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Arn string
    ARN
    BinaryMediaTypes []string
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    CreatedDate string
    Creation date of the REST API
    Description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    EndpointConfiguration RestApiEndpointConfigurationArgs
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    ExecutionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    FailOnWarnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    MinimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Parameters map[string]string
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    Policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    PutRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    RootResourceId string
    Resource ID of the REST API's root
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    apiKeySource String
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    arn String
    ARN
    binaryMediaTypes List<String>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body String
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    createdDate String
    Creation date of the REST API
    description String
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    executionArn String
    Execution ARN part to be used in lambda_permission's source_arn 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.
    failOnWarnings Boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize String
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name String
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Map<String,String>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy String
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode String
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    rootResourceId String
    Resource ID of the REST API's root
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    apiKeySource string
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    arn string
    ARN
    binaryMediaTypes string[]
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body string
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    createdDate string
    Creation date of the REST API
    description string
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration RestApiEndpointConfiguration
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    executionArn string
    Execution ARN part to be used in lambda_permission's source_arn 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.
    failOnWarnings boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize string
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name string
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters {[key: string]: string}
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy string
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode string
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    rootResourceId string
    Resource ID of the REST API's root
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    api_key_source str
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    arn str
    ARN
    binary_media_types Sequence[str]
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body str
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    created_date str
    Creation date of the REST API
    description str
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disable_execute_api_endpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpoint_configuration RestApiEndpointConfigurationArgs
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    execution_arn str
    Execution ARN part to be used in lambda_permission's source_arn 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.
    fail_on_warnings bool
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimum_compression_size str
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name str
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Mapping[str, str]
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy str
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    put_rest_api_mode str
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    root_resource_id str
    Resource ID of the REST API's root
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    apiKeySource String
    Source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-api-key-source extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    arn String
    ARN
    binaryMediaTypes List<String>
    List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    body String
    OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. This configuration, and any updates to it, will replace all REST API configuration except values overridden in this resource configuration and other resource updates applied after this resource but before any aws.apigateway.Deployment creation. More information about REST API OpenAPI support can be found in the API Gateway Developer Guide.
    createdDate String
    Creation date of the REST API
    description String
    Description of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.description field. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension disableExecuteApiEndpoint property. If the argument value is true and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    endpointConfiguration Property Map
    Configuration block defining API endpoint configuration including endpoint type. Defined below.
    executionArn String
    Execution ARN part to be used in lambda_permission's source_arn 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.
    failOnWarnings Boolean
    Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
    minimumCompressionSize String
    Minimum response size to compress for the REST API. String containing an integer value between -1 and 10485760 (10MB). -1 will disable an existing compression configuration, and all other values will enable compression with the configured size. New resources can simply omit this argument to disable compression, rather than setting the value to -1. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-minimum-compression-size extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    name String
    Name of the REST API. If importing an OpenAPI specification via the body argument, this corresponds to the info.title field. If the argument value is different than the OpenAPI value, the argument value will override the OpenAPI value.
    parameters Map<String>
    Map of customizations for importing the specification in the body argument. For example, to exclude DocumentationParts from an imported API, set ignore equal to documentation. Additional documentation, including other parameters such as basepath, can be found in the API Gateway Developer Guide.
    policy String
    JSON formatted policy document that controls access to the API Gateway. For more information about building AWS IAM policy documents with Pulumi, see the AWS IAM Policy Document Guide. The provider will only perform drift detection of its value when present in a configuration. We recommend using the aws.apigateway.RestApiPolicy resource instead. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-policy extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    putRestApiMode String
    Mode of the PutRestApi operation when importing an OpenAPI specification via the body argument (create or update operation). Valid values are merge and overwrite. If unspecificed, defaults to overwrite (for backwards compatibility). This corresponds to the x-amazon-apigateway-put-integration-method extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    rootResourceId String
    Resource ID of the REST API's root
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Supporting Types

    RestApiEndpointConfiguration, RestApiEndpointConfigurationArgs

    Types string
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    VpcEndpointIds List<string>
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    Types string
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    VpcEndpointIds []string
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    types String
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    vpcEndpointIds List<String>
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    types string
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    vpcEndpointIds string[]
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    types str
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    vpc_endpoint_ids Sequence[str]
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
    types String
    List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. If set to PRIVATE recommend to set put_rest_api_mode = merge to not cause the endpoints and associated Route53 records to be deleted. Refer to the documentation for more information on the difference between edge-optimized and regional APIs.
    vpcEndpointIds List<String>
    Set of VPC Endpoint identifiers. It is only supported for PRIVATE endpoint type. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-endpoint-configuration extension vpcEndpointIds property. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.

    Import

    Using pulumi import, import aws_api_gateway_rest_api using the REST API ID. For example:

    $ pulumi import aws:apigateway/restApi:RestApi example 12345abcde
    

    ~> NOTE: Resource import does not currently support the body attribute.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi