AWS Classic

v5.16.2 published on Tuesday, Oct 4, 2022 by Pulumi

getExport

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var example = Aws.ApiGateway.GetExport.Invoke(new()
    {
        RestApiId = aws_api_gateway_stage.Example.Rest_api_id,
        StageName = aws_api_gateway_stage.Example.Stage_name,
        ExportType = "oas30",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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:  aws_api_gateway_stage.Example.Rest_api_id,
			StageName:  aws_api_gateway_stage.Example.Stage_name,
			ExportType: "oas30",
		}, 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.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(aws_api_gateway_stage.example().rest_api_id())
            .stageName(aws_api_gateway_stage.example().stage_name())
            .exportType("oas30")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.apigateway.get_export(rest_api_id=aws_api_gateway_stage["example"]["rest_api_id"],
    stage_name=aws_api_gateway_stage["example"]["stage_name"],
    export_type="oas30")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.apigateway.getExport({
    restApiId: aws_api_gateway_stage.example.rest_api_id,
    stageName: aws_api_gateway_stage.example.stage_name,
    exportType: "oas30",
});
variables:
  example:
    Fn::Invoke:
      Function: aws:apigateway:getExport
      Arguments:
        restApiId: ${aws_api_gateway_stage.example.rest_api_id}
        stageName: ${aws_api_gateway_stage.example.stage_name}
        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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:apigateway/getExport:getExport
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ExportType string

Type of export. Acceptable values are oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

RestApiId string

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/json and application/yaml are supported for export_type ofoas30 and swagger.

Parameters Dictionary<string, string>

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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 oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

RestApiId string

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/json and application/yaml are supported for export_type ofoas30 and swagger.

Parameters map[string]string

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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 oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

restApiId String

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/json and application/yaml are supported for export_type ofoas30 and swagger.

parameters Map<String,String>

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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 oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

restApiId string

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/json and application/yaml are supported for export_type ofoas30 and swagger.

parameters {[key: string]: string}

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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 oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

rest_api_id str

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/json and application/yaml are supported for export_type ofoas30 and swagger.

parameters Mapping[str, str]

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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 oas30 for OpenAPI 3.0.x and swagger for Swagger/OpenAPI 2.0.

restApiId String

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/json and application/yaml are supported for export_type ofoas30 and swagger.

parameters Map<String>

Key-value map of query string parameters that specify properties of the export. the following parameters are supported: extensions='integrations' or extensions='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.

RestApiId string
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.

RestApiId string
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.

restApiId String
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.

restApiId string
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_id str
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.

restApiId String
stageName String
accepts String
parameters Map<String>

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.