1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ApiGateway
  5. getApiContent
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

oci.ApiGateway.getApiContent

Start a Neo task
Explain and create an oci.ApiGateway.getApiContent resource
oci logo
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testApiContent = oci.ApiGateway.getApiContent({
        apiId: testApi.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_api_content = oci.ApiGateway.get_api_content(api_id=test_api["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/apigateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apigateway.GetApiContent(ctx, &apigateway.GetApiContentArgs{
    			ApiId: testApi.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testApiContent = Oci.ApiGateway.GetApiContent.Invoke(new()
        {
            ApiId = testApi.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ApiGateway.ApiGatewayFunctions;
    import com.pulumi.oci.ApiGateway.inputs.GetApiContentArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testApiContent = ApiGatewayFunctions.getApiContent(GetApiContentArgs.builder()
                .apiId(testApi.id())
                .build());
    
        }
    }
    
    variables:
      testApiContent:
        fn::invoke:
          function: oci:ApiGateway:getApiContent
          arguments:
            apiId: ${testApi.id}
    

    Using getApiContent

    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 getApiContent(args: GetApiContentArgs, opts?: InvokeOptions): Promise<GetApiContentResult>
    function getApiContentOutput(args: GetApiContentOutputArgs, opts?: InvokeOptions): Output<GetApiContentResult>
    def get_api_content(api_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetApiContentResult
    def get_api_content_output(api_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetApiContentResult]
    func GetApiContent(ctx *Context, args *GetApiContentArgs, opts ...InvokeOption) (*GetApiContentResult, error)
    func GetApiContentOutput(ctx *Context, args *GetApiContentOutputArgs, opts ...InvokeOption) GetApiContentResultOutput

    > Note: This function is named GetApiContent in the Go SDK.

    public static class GetApiContent 
    {
        public static Task<GetApiContentResult> InvokeAsync(GetApiContentArgs args, InvokeOptions? opts = null)
        public static Output<GetApiContentResult> Invoke(GetApiContentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiContentResult> getApiContent(GetApiContentArgs args, InvokeOptions options)
    public static Output<GetApiContentResult> getApiContent(GetApiContentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:ApiGateway/getApiContent:getApiContent
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApiId string
    The ocid of the API.
    ApiId string
    The ocid of the API.
    apiId String
    The ocid of the API.
    apiId string
    The ocid of the API.
    api_id str
    The ocid of the API.
    apiId String
    The ocid of the API.

    getApiContent Result

    The following output properties are available:

    ApiId string
    Content string
    Id string
    The provider-assigned unique ID for this managed resource.
    ApiId string
    Content string
    Id string
    The provider-assigned unique ID for this managed resource.
    apiId String
    content String
    id String
    The provider-assigned unique ID for this managed resource.
    apiId string
    content string
    id string
    The provider-assigned unique ID for this managed resource.
    api_id str
    content str
    id str
    The provider-assigned unique ID for this managed resource.
    apiId String
    content String
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate