AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.apigateway.getExport
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.apigateway.getExport({
    restApiId: exampleAwsApiGatewayStage.restApiId,
    stageName: exampleAwsApiGatewayStage.stageName,
    exportType: "oas30",
});
import pulumi
import pulumi_aws as aws
example = aws.apigateway.get_export(rest_api_id=example_aws_api_gateway_stage["restApiId"],
    stage_name=example_aws_api_gateway_stage["stageName"],
    export_type="oas30")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.GetExport(ctx, &apigateway.GetExportArgs{
			RestApiId:  exampleAwsApiGatewayStage.RestApiId,
			StageName:  exampleAwsApiGatewayStage.StageName,
			ExportType: "oas30",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.ApiGateway.GetExport.Invoke(new()
    {
        RestApiId = exampleAwsApiGatewayStage.RestApiId,
        StageName = exampleAwsApiGatewayStage.StageName,
        ExportType = "oas30",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApigatewayFunctions;
import com.pulumi.aws.apigateway.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 example = ApigatewayFunctions.getExport(GetExportArgs.builder()
            .restApiId(exampleAwsApiGatewayStage.restApiId())
            .stageName(exampleAwsApiGatewayStage.stageName())
            .exportType("oas30")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:apigateway:getExport
      arguments:
        restApiId: ${exampleAwsApiGatewayStage.restApiId}
        stageName: ${exampleAwsApiGatewayStage.stageName}
        exportType: oas30
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(accepts: Optional[str] = None,
               export_type: Optional[str] = None,
               parameters: Optional[Mapping[str, str]] = None,
               rest_api_id: Optional[str] = None,
               stage_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetExportResult
def get_export_output(accepts: Optional[pulumi.Input[str]] = None,
               export_type: Optional[pulumi.Input[str]] = None,
               parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
               rest_api_id: 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)
public static Output<GetExportResult> getExport(GetExportArgs args, InvokeOptions options)
fn::invoke:
  function: aws:apigateway/getExport:getExport
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ExportType string
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- RestApi stringId 
- Identifier of the associated REST API.
- StageName string
- Name of the Stage that will be exported.
- Accepts string
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- Parameters Dictionary<string, string>
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
- ExportType string
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- RestApi stringId 
- Identifier of the associated REST API.
- StageName string
- Name of the Stage that will be exported.
- Accepts string
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- Parameters map[string]string
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
- exportType String
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- restApi StringId 
- Identifier of the associated REST API.
- stageName String
- Name of the Stage that will be exported.
- accepts String
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- parameters Map<String,String>
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
- exportType string
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- restApi stringId 
- Identifier of the associated REST API.
- stageName string
- Name of the Stage that will be exported.
- accepts string
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- parameters {[key: string]: string}
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
- export_type str
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- rest_api_ strid 
- Identifier of the associated REST API.
- stage_name str
- Name of the Stage that will be exported.
- accepts str
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- parameters Mapping[str, str]
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
- exportType String
- Type of export. Acceptable values are oas30for OpenAPI 3.0.x andswaggerfor Swagger/OpenAPI 2.0.
- restApi StringId 
- Identifier of the associated REST API.
- stageName String
- Name of the Stage that will be exported.
- accepts String
- Content-type of the export. Valid values are application/jsonandapplication/yamlare supported forexport_typeofoas30andswagger.
- parameters Map<String>
- Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations'orextensions='apigateway'will export the API with x-amazon-apigateway-integration extensions.extensions='authorizers'will export the API with x-amazon-apigateway-authorizer extensions.
getExport Result
The following output properties are available:
- Body string
- API Spec.
- ContentDisposition string
- Content-disposition header value in the HTTP response.
- ContentType string
- Content-type header value in the HTTP response.
- ExportType string
- Id string
- The provider-assigned unique ID for this managed resource.
- RestApi stringId 
- StageName string
- Accepts string
- Parameters Dictionary<string, string>
- Body string
- API Spec.
- ContentDisposition string
- Content-disposition header value in the HTTP response.
- ContentType string
- Content-type header value in the HTTP response.
- ExportType string
- Id string
- The provider-assigned unique ID for this managed resource.
- RestApi stringId 
- StageName string
- Accepts string
- Parameters map[string]string
- body String
- API Spec.
- contentDisposition String
- Content-disposition header value in the HTTP response.
- contentType String
- Content-type header value in the HTTP response.
- exportType String
- id String
- The provider-assigned unique ID for this managed resource.
- restApi StringId 
- stageName String
- accepts String
- parameters Map<String,String>
- body string
- API Spec.
- contentDisposition string
- Content-disposition header value in the HTTP response.
- contentType string
- Content-type header value in the HTTP response.
- exportType string
- id string
- The provider-assigned unique ID for this managed resource.
- restApi stringId 
- stageName string
- accepts string
- parameters {[key: string]: string}
- body str
- API Spec.
- content_disposition str
- Content-disposition header value in the HTTP response.
- content_type str
- Content-type header value in the HTTP response.
- export_type str
- id str
- The provider-assigned unique ID for this managed resource.
- rest_api_ strid 
- stage_name str
- accepts str
- parameters Mapping[str, str]
- body String
- API Spec.
- contentDisposition String
- Content-disposition header value in the HTTP response.
- contentType String
- Content-type header value in the HTTP response.
- exportType String
- id String
- The provider-assigned unique ID for this managed resource.
- restApi StringId 
- stageName String
- accepts String
- parameters Map<String>
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.