Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.ApiGateway.getApiContent
Explore with Pulumi AI
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/v2/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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ApiGateway/getApiContent:getApiContent
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Id string - The ocid of the API.
- Api
Id string - The ocid of the API.
- api
Id String - The ocid of the API.
- api
Id string - The ocid of the API.
- api_
id str - The ocid of the API.
- api
Id String - The ocid of the API.
getApiContent Result
The following output properties are available:
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.