Show / Hide Table of Contents

Class BasePathMapping

Connects a custom domain name registered via aws.apigateway.DomainName with a deployed API so that its methods can be called via the custom domain name.

Example Usage

using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var exampleDeployment = new Aws.ApiGateway.Deployment("exampleDeployment", new Aws.ApiGateway.DeploymentArgs
    {
        RestApi = aws_api_gateway_rest_api.MyDemoAPI.Id,
        StageName = "live",
    });
    var exampleDomainName = new Aws.ApiGateway.DomainName("exampleDomainName", new Aws.ApiGateway.DomainNameArgs
    {
        CertificateBody = File.ReadAllText($"{path.Module}/example.com/example.crt"),
        CertificateChain = File.ReadAllText($"{path.Module}/example.com/ca.crt"),
        CertificateName = "example-api",
        CertificatePrivateKey = File.ReadAllText($"{path.Module}/example.com/example.key"),
        DomainName = "example.com",
    });
    var test = new Aws.ApiGateway.BasePathMapping("test", new Aws.ApiGateway.BasePathMappingArgs
    {
        RestApi = aws_api_gateway_rest_api.MyDemoAPI.Id,
        DomainName = exampleDomainName.Domain,
        StageName = exampleDeployment.StageName,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BasePathMapping
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class BasePathMapping : CustomResource

Constructors

View Source

BasePathMapping(String, BasePathMappingArgs, CustomResourceOptions)

Create a BasePathMapping resource with the given unique name, arguments, and options.

Declaration
public BasePathMapping(string name, BasePathMappingArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

BasePathMappingArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BasePath

Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.

Declaration
public Output<string> BasePath { get; }
Property Value
Type Description
Output<System.String>
View Source

DomainName

The already-registered domain name to connect the API to.

Declaration
public Output<string> DomainName { get; }
Property Value
Type Description
Output<System.String>
View Source

RestApi

The id of the API to connect.

Declaration
public Output<string> RestApi { get; }
Property Value
Type Description
Output<System.String>
View Source

StageName

The name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.

Declaration
public Output<string> StageName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, BasePathMappingState, CustomResourceOptions)

Get an existing BasePathMapping resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static BasePathMapping Get(string name, Input<string> id, BasePathMappingState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

BasePathMappingState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
BasePathMapping
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.