# DomainNameProps

Extends: DomainNameProps
Extends: DomainNameOptions
Used as props by: DomainName

- Source: [`aws-apigateway/lib/domain-name.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigateway/lib/domain-name.ts#L168)

## Example

```ts
declare const acmCertificateForExampleCom: any;

new apigateway.DomainName(this, 'custom-domain', {
  domainName: 'example.com',
  certificate: acmCertificateForExampleCom,
  endpointType: apigateway.EndpointType.EDGE, // default is REGIONAL
  securityPolicy: apigateway.SecurityPolicy.TLS_1_2
});
```

## Properties

- `basePath`: string — The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.

  **Default:** map requests from the domain root (e.g. `example.com`).

- `certificate`: [ICertificateRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_certificatemanager.ICertificateRef.html) (required) — The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.

  For "EDGE" domain names, the certificate
  needs to be in the US East (N. Virginia) region.

- `domainName`: string (required) — The custom domain name for your API.

  Uppercase letters are not supported.

- `endpointAccessMode`: [EndpointAccessMode](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.EndpointAccessMode.html) — The endpoint access mode for this domain name.

  **Default:** No endpoint access mode is configured. Required for enhanced security policies.

  When using enhanced security policies (those starting with `SecurityPolicy_`),
  you must specify this property. STRICT is recommended for production workloads,
  but BASIC may be needed during migration or for certain application architectures.

- `endpointType`: [EndpointType](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.EndpointType.html) = REGIONAL — The type of endpoint for this DomainName.

- `mapping`: [IRestApi](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IRestApi.html) — If specified, all requests to this domain will be mapped to the production deployment of this API.

  **Default:** you will have to call `addBasePathMapping` to map this domain to API endpoints.

  If you wish to map this domain to multiple APIs
  with different base paths, use `addBasePathMapping` or `addApiMapping`.

- `mtls`: [MTLSConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MTLSConfig.html) — The mutual TLS authentication configuration for a custom domain name.

  **Default:** mTLS is not configured.

- `securityPolicy`: [SecurityPolicy](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.SecurityPolicy.html) = SecurityPolicy.TLS_1_2 — The Transport Layer Security (TLS) version + cipher suite for this domain name.
