1. Packages
  2. AWS
  3. API Docs
  4. apigateway
  5. getExport
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.apigateway.getExport

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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)
    // 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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi