aws.apigateway.RestApi
Explore with Pulumi AI
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
Create RestApi Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RestApi(name: string, args?: RestApiArgs, opts?: CustomResourceOptions);@overload
def RestApi(resource_name: str,
            args: Optional[RestApiArgs] = None,
            opts: Optional[ResourceOptions] = None)
@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)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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var restApiResource = new Aws.ApiGateway.RestApi("restApiResource", new()
{
    ApiKeySource = "string",
    BinaryMediaTypes = new[]
    {
        "string",
    },
    Body = "string",
    Description = "string",
    DisableExecuteApiEndpoint = false,
    EndpointConfiguration = new Aws.ApiGateway.Inputs.RestApiEndpointConfigurationArgs
    {
        Types = "string",
        VpcEndpointIds = new[]
        {
            "string",
        },
    },
    FailOnWarnings = false,
    MinimumCompressionSize = "string",
    Name = "string",
    Parameters = 
    {
        { "string", "string" },
    },
    Policy = "string",
    PutRestApiMode = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := apigateway.NewRestApi(ctx, "restApiResource", &apigateway.RestApiArgs{
	ApiKeySource: pulumi.String("string"),
	BinaryMediaTypes: pulumi.StringArray{
		pulumi.String("string"),
	},
	Body:                      pulumi.String("string"),
	Description:               pulumi.String("string"),
	DisableExecuteApiEndpoint: pulumi.Bool(false),
	EndpointConfiguration: &apigateway.RestApiEndpointConfigurationArgs{
		Types: pulumi.String("string"),
		VpcEndpointIds: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	FailOnWarnings:         pulumi.Bool(false),
	MinimumCompressionSize: pulumi.String("string"),
	Name:                   pulumi.String("string"),
	Parameters: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Policy:         pulumi.String("string"),
	PutRestApiMode: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var restApiResource = new RestApi("restApiResource", RestApiArgs.builder()
    .apiKeySource("string")
    .binaryMediaTypes("string")
    .body("string")
    .description("string")
    .disableExecuteApiEndpoint(false)
    .endpointConfiguration(RestApiEndpointConfigurationArgs.builder()
        .types("string")
        .vpcEndpointIds("string")
        .build())
    .failOnWarnings(false)
    .minimumCompressionSize("string")
    .name("string")
    .parameters(Map.of("string", "string"))
    .policy("string")
    .putRestApiMode("string")
    .tags(Map.of("string", "string"))
    .build());
rest_api_resource = aws.apigateway.RestApi("restApiResource",
    api_key_source="string",
    binary_media_types=["string"],
    body="string",
    description="string",
    disable_execute_api_endpoint=False,
    endpoint_configuration={
        "types": "string",
        "vpc_endpoint_ids": ["string"],
    },
    fail_on_warnings=False,
    minimum_compression_size="string",
    name="string",
    parameters={
        "string": "string",
    },
    policy="string",
    put_rest_api_mode="string",
    tags={
        "string": "string",
    })
const restApiResource = new aws.apigateway.RestApi("restApiResource", {
    apiKeySource: "string",
    binaryMediaTypes: ["string"],
    body: "string",
    description: "string",
    disableExecuteApiEndpoint: false,
    endpointConfiguration: {
        types: "string",
        vpcEndpointIds: ["string"],
    },
    failOnWarnings: false,
    minimumCompressionSize: "string",
    name: "string",
    parameters: {
        string: "string",
    },
    policy: "string",
    putRestApiMode: "string",
    tags: {
        string: "string",
    },
});
type: aws:apigateway:RestApi
properties:
    apiKeySource: string
    binaryMediaTypes:
        - string
    body: string
    description: string
    disableExecuteApiEndpoint: false
    endpointConfiguration:
        types: string
        vpcEndpointIds:
            - string
    failOnWarnings: false
    minimumCompressionSize: string
    name: string
    parameters:
        string: string
    policy: string
    putRestApiMode: string
    tags:
        string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RestApi resource accepts the following input properties:
- ApiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- BinaryMedia List<string>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- DisableExecute boolApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- EndpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- FailOn boolWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- MinimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- PutRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- ApiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- BinaryMedia []stringTypes 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- DisableExecute boolApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- EndpointConfiguration RestApi Endpoint Configuration Args 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- FailOn boolWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- MinimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- PutRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- apiKey StringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- binaryMedia List<String>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute BooleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- failOn BooleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression StringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest StringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- apiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- binaryMedia string[]Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute booleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- failOn booleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- api_key_ strsource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- binary_media_ Sequence[str]types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disable_execute_ boolapi_ endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpoint_configuration RestApi Endpoint Configuration Args 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- fail_on_ boolwarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimum_compression_ strsize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- put_rest_ strapi_ mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- apiKey StringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- binaryMedia List<String>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute BooleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand 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.
- failOn BooleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression StringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest StringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration 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'ssource_arnwhen 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.
- RootResource stringId 
- Resource ID of the REST API's root
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Arn string
- ARN
- CreatedDate string
- Creation date of the REST API
- ExecutionArn string
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- RootResource stringId 
- Resource ID of the REST API's root
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- ARN
- createdDate String
- Creation date of the REST API
- executionArn String
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- rootResource StringId 
- Resource ID of the REST API's root
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn string
- ARN
- createdDate string
- Creation date of the REST API
- executionArn string
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- rootResource stringId 
- Resource ID of the REST API's root
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn str
- ARN
- created_date str
- Creation date of the REST API
- execution_arn str
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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_ strid 
- Resource ID of the REST API's root
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- ARN
- createdDate String
- Creation date of the REST API
- executionArn String
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- rootResource StringId 
- Resource ID of the REST API's root
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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) -> RestApifunc 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)resources:  _:    type: aws:apigateway:RestApi    get:      id: ${id}- 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.
- ApiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Arn string
- ARN
- BinaryMedia List<string>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- DisableExecute boolApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- EndpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- ExecutionArn string
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- FailOn boolWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- MinimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- PutRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- RootResource stringId 
- Resource ID of the REST API's root
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ApiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Arn string
- ARN
- BinaryMedia []stringTypes 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- DisableExecute boolApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- EndpointConfiguration RestApi Endpoint Configuration Args 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- ExecutionArn string
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- FailOn boolWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- MinimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- PutRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- RootResource stringId 
- Resource ID of the REST API's root
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- apiKey StringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- arn String
- ARN
- binaryMedia List<String>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute BooleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- executionArn String
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- failOn BooleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression StringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest StringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- rootResource StringId 
- Resource ID of the REST API's root
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- apiKey stringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- arn string
- ARN
- binaryMedia string[]Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute booleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpointConfiguration RestApi Endpoint Configuration 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- executionArn string
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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.
- failOn booleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression stringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest stringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- rootResource stringId 
- Resource ID of the REST API's root
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- api_key_ strsource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. 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_ Sequence[str]types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disable_execute_ boolapi_ endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand is different than the OpenAPI value, the argument value will override the OpenAPI value.
- endpoint_configuration RestApi Endpoint Configuration Args 
- Configuration block defining API endpoint configuration including endpoint type. Defined below.
- execution_arn str
- Execution ARN part to be used in lambda_permission'ssource_arnwhen 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_ boolwarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimum_compression_ strsize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- put_rest_ strapi_ mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- root_resource_ strid 
- Resource ID of the REST API's root
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- apiKey StringSource 
- Source of the API key for requests. Valid values are HEADER(default) andAUTHORIZER. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-api-key-sourceextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- arn String
- ARN
- binaryMedia List<String>Types 
- 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 bodyargument, this corresponds to thex-amazon-apigateway-binary-media-typesextension. 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.Deploymentcreation. 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 bodyargument, this corresponds to theinfo.descriptionfield. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- disableExecute BooleanApi Endpoint 
- 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 thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensiondisableExecuteApiEndpointproperty. If the argument value istrueand 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'ssource_arnwhen 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.
- failOn BooleanWarnings 
- Whether warnings while API Gateway is creating or updating the resource should return an error or not. Defaults to false
- minimumCompression StringSize 
- Minimum response size to compress for the REST API. String containing an integer value between -1and10485760(10MB).-1will 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 thebodyargument, this corresponds to thex-amazon-apigateway-minimum-compression-sizeextension. 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 bodyargument, this corresponds to theinfo.titlefield. 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 bodyargument. For example, to exclude DocumentationParts from an imported API, setignoreequal todocumentation. Additional documentation, including other parameters such asbasepath, 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.RestApiPolicyresource instead. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-policyextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- putRest StringApi Mode 
- Mode of the PutRestApi operation when importing an OpenAPI specification via the bodyargument (create or update operation). Valid values aremergeandoverwrite. If unspecificed, defaults tooverwrite(for backwards compatibility). This corresponds to thex-amazon-apigateway-put-integration-methodextension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- rootResource StringId 
- Resource ID of the REST API's root
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
Supporting Types
RestApiEndpointConfiguration, RestApiEndpointConfigurationArgs        
- Types string
- List of endpoint types. This resource currently only supports managing a single value. Valid values: EDGE,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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.
- VpcEndpoint List<string>Ids 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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.
- VpcEndpoint []stringIds 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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.
- vpcEndpoint List<String>Ids 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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.
- vpcEndpoint string[]Ids 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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_ Sequence[str]ids 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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,REGIONALorPRIVATE. If unspecified, defaults toEDGE. If set toPRIVATErecommend to setput_rest_api_mode=mergeto 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.
- vpcEndpoint List<String>Ids 
- Set of VPC Endpoint identifiers. It is only supported for PRIVATEendpoint type. If importing an OpenAPI specification via thebodyargument, this corresponds to thex-amazon-apigateway-endpoint-configurationextensionvpcEndpointIdsproperty. 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.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.