# CfnBasePathMappingProps

Properties for defining a `CfnBasePathMapping`.

Used as props by: [CfnBasePathMapping](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.CfnBasePathMapping.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const cfnBasePathMappingProps: apigateway.CfnBasePathMappingProps = {
  domainName: 'domainName',

  // the properties below are optional
  basePath: 'basePath',
  id: 'id',
  restApiId: 'restApiId',
  stage: 'stage',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway

cfn_base_path_mapping_props = apigateway.CfnBasePathMappingProps(
    domain_name="domainName",

    # the properties below are optional
    base_path="basePath",
    id="id",
    rest_api_id="restApiId",
    stage="stage"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;

CfnBasePathMappingProps cfnBasePathMappingProps = CfnBasePathMappingProps.builder()
        .domainName("domainName")

        // the properties below are optional
        .basePath("basePath")
        .id("id")
        .restApiId("restApiId")
        .stage("stage")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;

var cfnBasePathMappingProps = new CfnBasePathMappingProps {
    DomainName = "domainName",

    // the properties below are optional
    BasePath = "basePath",
    Id = "id",
    RestApiId = "restApiId",
    Stage = "stage"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnBasePathMappingProps := &CfnBasePathMappingProps{
	DomainName: jsii.String("domainName"),

	// the properties below are optional
	BasePath: jsii.String("basePath"),
	Id: jsii.String("id"),
	RestApiId: jsii.String("restApiId"),
	Stage: jsii.String("stage"),
}
```

## Properties

- `basePath`: string — The base path name that callers of the API must provide as part of the URL after the domain name.

- `domainName`: string | [IDomainNameRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_apigateway.IDomainNameRef.html) (required) — The domain name of the BasePathMapping resource to be described.

- `id`: string

- `restApiId`: string | [IRestApiRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_apigateway.IRestApiRef.html) — The string identifier of the associated RestApi.

- `stage`: string | [IStageRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_apigateway.IStageRef.html) — The name of the associated stage.
