AWS Classic
getExport
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.ApiGateway.GetExport.InvokeAsync(new Aws.ApiGateway.GetExportArgs
{
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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(ApigatewayFunctions.getExport(GetExportArgs.builder()
.restApiId(aws_api_gateway_stage.getExample().getRest_api_id())
.stageName(aws_api_gateway_stage.getExample().getStage_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:
- Export
Type string The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- Rest
Api stringId The identifier of the associated REST API.
- Stage
Name string The name of the Stage that will be exported.
- Accepts string
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- Parameters Dictionary<string, string>
A 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 string The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- Rest
Api stringId The identifier of the associated REST API.
- Stage
Name string The name of the Stage that will be exported.
- Accepts string
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- Parameters map[string]string
A 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 String The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- rest
Api StringId The identifier of the associated REST API.
- stage
Name String The name of the Stage that will be exported.
- accepts String
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- parameters
Map
A 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 string The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- rest
Api stringId The identifier of the associated REST API.
- stage
Name string The name of the Stage that will be exported.
- accepts string
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- parameters {[key: string]: string}
A 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 The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- rest_
api_ strid The identifier of the associated REST API.
- stage_
name str The name of the Stage that will be exported.
- accepts str
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- parameters Mapping[str, str]
A 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 String The type of export. Acceptable values are
oas30
for OpenAPI 3.0.x andswagger
for Swagger/OpenAPI 2.0.- rest
Api StringId The identifier of the associated REST API.
- stage
Name String The name of the Stage that will be exported.
- accepts String
The content-type of the export. Valid values are
application/json
andapplication/yaml
are supported forexport_type
ofoas30
andswagger
.- parameters
Map
A 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
The API Spec.
- Content
Disposition string The content-disposition header value in the HTTP response.
- Content
Type string The content-type header value in the HTTP response.
- Export
Type string - Id string
The provider-assigned unique ID for this managed resource.
- Rest
Api stringId - Stage
Name string - Accepts string
- Parameters Dictionary<string, string>
- Body string
The API Spec.
- Content
Disposition string The content-disposition header value in the HTTP response.
- Content
Type string The content-type header value in the HTTP response.
- Export
Type string - Id string
The provider-assigned unique ID for this managed resource.
- Rest
Api stringId - Stage
Name string - Accepts string
- Parameters map[string]string
- body String
The API Spec.
- content
Disposition String The content-disposition header value in the HTTP response.
- content
Type String The content-type header value in the HTTP response.
- export
Type String - id String
The provider-assigned unique ID for this managed resource.
- rest
Api StringId - stage
Name String - accepts String
- parameters
Map
- body string
The API Spec.
- content
Disposition string The content-disposition header value in the HTTP response.
- content
Type string The content-type header value in the HTTP response.
- export
Type string - id string
The provider-assigned unique ID for this managed resource.
- rest
Api stringId - stage
Name string - accepts string
- parameters {[key: string]: string}
- body str
The API Spec.
- content_
disposition str The content-disposition header value in the HTTP response.
- content_
type str The 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
The API Spec.
- content
Disposition String The content-disposition header value in the HTTP response.
- content
Type String The content-type header value in the HTTP response.
- export
Type String - id String
The provider-assigned unique ID for this managed resource.
- rest
Api StringId - stage
Name String - accepts String
- parameters
Map
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.