1. Packages
  2. AWS Native
  3. API Docs
  4. apigateway
  5. getRestApi

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.apigateway.getRestApi

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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:

    RestApiId string
    The string identifier of the associated RestApi.
    RestApiId string
    The string identifier of the associated RestApi.
    restApiId String
    The string identifier of the associated RestApi.
    restApiId string
    The string identifier of the associated RestApi.
    rest_api_id str
    The string identifier of the associated RestApi.
    restApiId String
    The string identifier of the associated RestApi.

    getRestApi Result

    The following output properties are available:

    ApiKeySourceType string
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    BinaryMediaTypes List<string>
    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.
    DisableExecuteApiEndpoint bool
    Specifies 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
    EndpointConfiguration Pulumi.AwsNative.ApiGateway.Outputs.RestApiEndpointConfiguration
    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.
    MinimumCompressionSize int
    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.

    RestApiId string
    The string identifier of the associated RestApi.
    RootResourceId string
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    Tags List<Pulumi.AwsNative.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.
    ApiKeySourceType string
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    BinaryMediaTypes []string
    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.
    DisableExecuteApiEndpoint bool
    Specifies 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
    EndpointConfiguration RestApiEndpointConfiguration
    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.
    MinimumCompressionSize int
    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.

    RestApiId string
    The string identifier of the associated RestApi.
    RootResourceId string
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    Tags 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.
    apiKeySourceType String
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    binaryMediaTypes List<String>
    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.
    disableExecuteApiEndpoint Boolean
    Specifies 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
    endpointConfiguration RestApiEndpointConfiguration
    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.
    minimumCompressionSize Integer
    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.

    restApiId String
    The string identifier of the associated RestApi.
    rootResourceId String
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    tags 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.
    apiKeySourceType string
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    binaryMediaTypes string[]
    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.
    disableExecuteApiEndpoint boolean
    Specifies 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
    endpointConfiguration RestApiEndpointConfiguration
    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.
    minimumCompressionSize number
    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.

    restApiId string
    The string identifier of the associated RestApi.
    rootResourceId string
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    tags 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_source_type str
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    binary_media_types Sequence[str]
    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_api_endpoint bool
    Specifies 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
    endpoint_configuration RestApiEndpointConfiguration
    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_size int
    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_id str
    The string identifier of the associated RestApi.
    root_resource_id str
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    tags 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.
    apiKeySourceType String
    The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
    binaryMediaTypes List<String>
    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.
    disableExecuteApiEndpoint Boolean
    Specifies 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
    endpointConfiguration 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.
    minimumCompressionSize Number
    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.

    restApiId String
    The string identifier of the associated RestApi.
    rootResourceId String
    The root resource ID for a RestApi resource, such as a0bc123d4e .
    tags 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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    VpcEndpointIds List<string>
    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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    VpcEndpointIds []string
    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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    vpcEndpointIds List<String>
    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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    vpcEndpointIds string[]
    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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    vpc_endpoint_ids Sequence[str]
    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 is REGIONAL. For a private API, the endpoint type is PRIVATE.
    vpcEndpointIds List<String>
    A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for PRIVATE endpoint type.

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi