AWS Native is in preview. AWS Classic is fully supported.
aws-native.apigateway.getRestApi
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
The AWS::ApiGateway::RestApi
resource creates a REST API. For more information, see restapi:create in the Amazon API Gateway REST API Reference.
On January 1, 2016, the Swagger Specification was donated to the OpenAPI initiative, becoming the foundation of the OpenAPI Specification.
Using getRestApi
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRestApi(args: GetRestApiArgs, opts?: InvokeOptions): Promise<GetRestApiResult>
function getRestApiOutput(args: GetRestApiOutputArgs, opts?: InvokeOptions): Output<GetRestApiResult>
def get_rest_api(rest_api_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRestApiResult
def get_rest_api_output(rest_api_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRestApiResult]
func LookupRestApi(ctx *Context, args *LookupRestApiArgs, opts ...InvokeOption) (*LookupRestApiResult, error)
func LookupRestApiOutput(ctx *Context, args *LookupRestApiOutputArgs, opts ...InvokeOption) LookupRestApiResultOutput
> Note: This function is named LookupRestApi
in the Go SDK.
public static class GetRestApi
{
public static Task<GetRestApiResult> InvokeAsync(GetRestApiArgs args, InvokeOptions? opts = null)
public static Output<GetRestApiResult> Invoke(GetRestApiInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRestApiResult> getRestApi(GetRestApiArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:apigateway:getRestApi
arguments:
# arguments dictionary
The following arguments are supported:
- Rest
Api stringId - The string identifier of the associated RestApi.
- Rest
Api stringId - The string identifier of the associated RestApi.
- rest
Api StringId - The string identifier of the associated RestApi.
- rest
Api stringId - The string identifier of the associated RestApi.
- rest_
api_ strid - The string identifier of the associated RestApi.
- rest
Api StringId - The string identifier of the associated RestApi.
getRestApi Result
The following output properties are available:
- Api
Key stringSource Type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - Binary
Media List<string>Types - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- Description string
- The description of the RestApi.
- Disable
Execute boolApi Endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - Endpoint
Configuration Pulumi.Aws Native. Api Gateway. Outputs. Rest Api Endpoint Configuration - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - Minimum
Compression intSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- Name string
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- Policy object
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- Rest
Api stringId - The string identifier of the associated RestApi.
- Root
Resource stringId - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - List<Pulumi.
Aws Native. Outputs. Tag> - The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
- Api
Key stringSource Type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - Binary
Media []stringTypes - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- Description string
- The description of the RestApi.
- Disable
Execute boolApi Endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - Endpoint
Configuration RestApi Endpoint Configuration - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - Minimum
Compression intSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- Name string
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- Policy interface{}
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- Rest
Api stringId - The string identifier of the associated RestApi.
- Root
Resource stringId - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - Tag
- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
- api
Key StringSource Type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - binary
Media List<String>Types - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- description String
- The description of the RestApi.
- disable
Execute BooleanApi Endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - endpoint
Configuration RestApi Endpoint Configuration - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - minimum
Compression IntegerSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- name String
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- policy Object
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- rest
Api StringId - The string identifier of the associated RestApi.
- root
Resource StringId - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - List<Tag>
- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
- api
Key stringSource Type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - binary
Media string[]Types - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- description string
- The description of the RestApi.
- disable
Execute booleanApi Endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - endpoint
Configuration RestApi Endpoint Configuration - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - minimum
Compression numberSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- name string
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- policy any
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- rest
Api stringId - The string identifier of the associated RestApi.
- root
Resource stringId - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - Tag[]
- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
- api_
key_ strsource_ type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - binary_
media_ Sequence[str]types - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- description str
- The description of the RestApi.
- disable_
execute_ boolapi_ endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - endpoint_
configuration RestApi Endpoint Configuration - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - minimum_
compression_ intsize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- name str
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- policy Any
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- rest_
api_ strid - The string identifier of the associated RestApi.
- root_
resource_ strid - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - Sequence[root_Tag]
- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
- api
Key StringSource Type - The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer. - binary
Media List<String>Types - The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
- description String
- The description of the RestApi.
- disable
Execute BooleanApi Endpoint - Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{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 - endpoint
Configuration Property Map - A list of the endpoint types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the
Parameters
property. - minimum
Compression NumberSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
- name String
- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.
- policy Any
A policy document that contains the permissions for the
RestApi
resource. To set the ARN for the policy, use the!Join
intrinsic function with""
as delimiter and values of"execute-api:/"
and"*"
.Search the CloudFormation User Guide for
AWS::ApiGateway::RestApi
for more information about the expected schema for this property.- rest
Api StringId - The string identifier of the associated RestApi.
- root
Resource StringId - The root resource ID for a
RestApi
resource, such asa0bc123d4e
. - List<Property Map>
- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
Supporting Types
RestApiEndpointConfiguration
- Types List<string>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - Vpc
Endpoint List<string>Ids - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
- Types []string
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - Vpc
Endpoint []stringIds - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
- types List<String>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - vpc
Endpoint List<String>Ids - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
- types string[]
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - vpc
Endpoint string[]Ids - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
- types Sequence[str]
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - vpc_
endpoint_ Sequence[str]ids - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
- types List<String>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
. - vpc
Endpoint List<String>Ids - A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for
PRIVATE
endpoint type.
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.