Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getApiContent

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testApiContent = Oci.ApiGateway.GetApiContent.Invoke(new()
    {
        ApiId = oci_apigateway_api.Test_api.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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: oci_apigateway_api.Test_api.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(oci_apigateway_api.test_api().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_api_content = oci.ApiGateway.get_api_content(api_id=oci_apigateway_api["test_api"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testApiContent = oci.ApiGateway.getApiContent({
    apiId: oci_apigateway_api.test_api.id,
});
variables:
  testApiContent:
    Fn::Invoke:
      Function: oci:ApiGateway:getApiContent
      Arguments:
        apiId: ${oci_apigateway_api.test_api.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)
// Output-based functions aren't available in Java yet
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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.