# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetApiContentResult',
    'AwaitableGetApiContentResult',
    'get_api_content',
]

@pulumi.output_type
class GetApiContentResult:
    """
    A collection of values returned by getApiContent.
    """
    def __init__(__self__, api_id=None, content=None, id=None):
        if api_id and not isinstance(api_id, str):
            raise TypeError("Expected argument 'api_id' to be a str")
        pulumi.set(__self__, "api_id", api_id)
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter(name="apiId")
    def api_id(self) -> str:
        return pulumi.get(self, "api_id")

    @property
    @pulumi.getter
    def content(self) -> str:
        return pulumi.get(self, "content")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")


class AwaitableGetApiContentResult(GetApiContentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetApiContentResult(
            api_id=self.api_id,
            content=self.content,
            id=self.id)


def get_api_content(api_id: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApiContentResult:
    """
    This data source provides details about a specific Api Content resource in Oracle Cloud Infrastructure API Gateway service.

    Get the raw API content.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_api_content = oci.apigateway.get_api_content(api_id=oci_apigateway_api["test_api"]["id"])
    ```


    :param str api_id: The ocid of the API.
    """
    __args__ = dict()
    __args__['apiId'] = api_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('oci:apigateway/getApiContent:getApiContent', __args__, opts=opts, typ=GetApiContentResult).value

    return AwaitableGetApiContentResult(
        api_id=__ret__.api_id,
        content=__ret__.content,
        id=__ret__.id)
