aws logo
AWS Classic v5.32.0, Mar 17 23

aws.apigatewayv2.getExport

Exports a definition of an API in a particular output format and specification.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var test = Aws.ApiGatewayV2.GetExport.Invoke(new()
    {
        ApiId = aws_apigatewayv2_route.Test.Api_id,
        Specification = "OAS30",
        OutputType = "JSON",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/apigatewayv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigatewayv2.GetExport(ctx, &apigatewayv2.GetExportArgs{
			ApiId:         aws_apigatewayv2_route.Test.Api_id,
			Specification: "OAS30",
			OutputType:    "JSON",
		}, 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.aws.apigatewayv2.Apigatewayv2Functions;
import com.pulumi.aws.apigatewayv2.inputs.GetExportArgs;
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 test = Apigatewayv2Functions.getExport(GetExportArgs.builder()
            .apiId(aws_apigatewayv2_route.test().api_id())
            .specification("OAS30")
            .outputType("JSON")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test = aws.apigatewayv2.get_export(api_id=aws_apigatewayv2_route["test"]["api_id"],
    specification="OAS30",
    output_type="JSON")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = aws.apigatewayv2.getExport({
    apiId: aws_apigatewayv2_route.test.api_id,
    specification: "OAS30",
    outputType: "JSON",
});
variables:
  test:
    fn::invoke:
      Function: aws:apigatewayv2:getExport
      Arguments:
        apiId: ${aws_apigatewayv2_route.test.api_id}
        specification: OAS30
        outputType: JSON

Using getExport

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 getExport(args: GetExportArgs, opts?: InvokeOptions): Promise<GetExportResult>
function getExportOutput(args: GetExportOutputArgs, opts?: InvokeOptions): Output<GetExportResult>
def get_export(api_id: Optional[str] = None,
               export_version: Optional[str] = None,
               include_extensions: Optional[bool] = None,
               output_type: Optional[str] = None,
               specification: Optional[str] = None,
               stage_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetExportResult
def get_export_output(api_id: Optional[pulumi.Input[str]] = None,
               export_version: Optional[pulumi.Input[str]] = None,
               include_extensions: Optional[pulumi.Input[bool]] = None,
               output_type: Optional[pulumi.Input[str]] = None,
               specification: Optional[pulumi.Input[str]] = None,
               stage_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetExportResult]
func GetExport(ctx *Context, args *GetExportArgs, opts ...InvokeOption) (*GetExportResult, error)
func GetExportOutput(ctx *Context, args *GetExportOutputArgs, opts ...InvokeOption) GetExportResultOutput

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

public static class GetExport 
{
    public static Task<GetExportResult> InvokeAsync(GetExportArgs args, InvokeOptions? opts = null)
    public static Output<GetExportResult> Invoke(GetExportInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetExportResult> getExport(GetExportArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:apigatewayv2/getExport:getExport
  arguments:
    # arguments dictionary

The following arguments are supported:

ApiId string

API identifier.

OutputType string

Output type of the exported definition file. Valid values are JSON and YAML.

Specification string

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

ExportVersion string

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

IncludeExtensions bool

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

StageName string

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

ApiId string

API identifier.

OutputType string

Output type of the exported definition file. Valid values are JSON and YAML.

Specification string

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

ExportVersion string

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

IncludeExtensions bool

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

StageName string

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

apiId String

API identifier.

outputType String

Output type of the exported definition file. Valid values are JSON and YAML.

specification String

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

exportVersion String

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

includeExtensions Boolean

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

stageName String

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

apiId string

API identifier.

outputType string

Output type of the exported definition file. Valid values are JSON and YAML.

specification string

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

exportVersion string

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

includeExtensions boolean

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

stageName string

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

api_id str

API identifier.

output_type str

Output type of the exported definition file. Valid values are JSON and YAML.

specification str

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

export_version str

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

include_extensions bool

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

stage_name str

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

apiId String

API identifier.

outputType String

Output type of the exported definition file. Valid values are JSON and YAML.

specification String

Version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

exportVersion String

Version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

includeExtensions Boolean

Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.

stageName String

Name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

getExport Result

The following output properties are available:

ApiId string
Body string

ID of the API.

Id string

The provider-assigned unique ID for this managed resource.

OutputType string
Specification string
ExportVersion string
IncludeExtensions bool
StageName string
ApiId string
Body string

ID of the API.

Id string

The provider-assigned unique ID for this managed resource.

OutputType string
Specification string
ExportVersion string
IncludeExtensions bool
StageName string
apiId String
body String

ID of the API.

id String

The provider-assigned unique ID for this managed resource.

outputType String
specification String
exportVersion String
includeExtensions Boolean
stageName String
apiId string
body string

ID of the API.

id string

The provider-assigned unique ID for this managed resource.

outputType string
specification string
exportVersion string
includeExtensions boolean
stageName string
api_id str
body str

ID of the API.

id str

The provider-assigned unique ID for this managed resource.

output_type str
specification str
export_version str
include_extensions bool
stage_name str
apiId String
body String

ID of the API.

id String

The provider-assigned unique ID for this managed resource.

outputType String
specification String
exportVersion String
includeExtensions Boolean
stageName String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.