AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.apigatewayv2.getExport
Explore with Pulumi AI
Exports a definition of an API in a particular output format and specification.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.apigatewayv2.getExport({
apiId: testAwsApigatewayv2Route.apiId,
specification: "OAS30",
outputType: "JSON",
});
import pulumi
import pulumi_aws as aws
test = aws.apigatewayv2.get_export(api_id=test_aws_apigatewayv2_route["apiId"],
specification="OAS30",
output_type="JSON")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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: testAwsApigatewayv2Route.ApiId,
Specification: "OAS30",
OutputType: "JSON",
}, 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 test = Aws.ApiGatewayV2.GetExport.Invoke(new()
{
ApiId = testAwsApigatewayv2Route.ApiId,
Specification = "OAS30",
OutputType = "JSON",
});
});
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(testAwsApigatewayv2Route.apiId())
.specification("OAS30")
.outputType("JSON")
.build());
}
}
variables:
test:
fn::invoke:
Function: aws:apigatewayv2:getExport
Arguments:
apiId: ${testAwsApigatewayv2Route.apiId}
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:
- Api
Id string - API identifier.
- Output
Type string - Output type of the exported definition file. Valid values are
JSON
andYAML
. - Specification string
- Version of the API specification to use.
OAS30
, for OpenAPI 3.0, is the only supported value. - Export
Version string - 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 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 string - API identifier.
- Output
Type string - Output type of the exported definition file. Valid values are
JSON
andYAML
. - Specification string
- Version of the API specification to use.
OAS30
, for OpenAPI 3.0, is the only supported value. - Export
Version string - 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 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 String - API identifier.
- output
Type String - Output type of the exported definition file. Valid values are
JSON
andYAML
. - specification String
- Version of the API specification to use.
OAS30
, for OpenAPI 3.0, is the only supported value. - export
Version String - 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 Boolean - Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.
- stage
Name 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 string - API identifier.
- output
Type string - Output type of the exported definition file. Valid values are
JSON
andYAML
. - specification string
- Version of the API specification to use.
OAS30
, for OpenAPI 3.0, is the only supported value. - export
Version string - 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 boolean - Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.
- stage
Name 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
andYAML
. - 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.
- api
Id String - API identifier.
- output
Type String - Output type of the exported definition file. Valid values are
JSON
andYAML
. - specification String
- Version of the API specification to use.
OAS30
, for OpenAPI 3.0, is the only supported value. - export
Version String - 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 Boolean - Whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.
- stage
Name 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:
- Api
Id string - Body string
- ID of the API.
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
Type string - Specification string
- Export
Version string - Include
Extensions bool - Stage
Name string
- Api
Id string - Body string
- ID of the API.
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
Type string - Specification string
- Export
Version string - Include
Extensions bool - Stage
Name string
- api
Id String - body String
- ID of the API.
- id String
- The provider-assigned unique ID for this managed resource.
- output
Type String - specification String
- export
Version String - include
Extensions Boolean - stage
Name String
- api
Id string - body string
- ID of the API.
- id string
- The provider-assigned unique ID for this managed resource.
- output
Type string - specification string
- export
Version string - include
Extensions boolean - stage
Name 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
- api
Id String - body String
- ID of the API.
- id String
- The provider-assigned unique ID for this managed resource.
- output
Type String - specification String
- export
Version String - include
Extensions Boolean - stage
Name String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.