# SecurityPolicy

Enum · Stable

The minimum version of the SSL protocol that you want API Gateway to use for HTTPS connections.

- Source: [`aws-apigateway/lib/domain-name.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigateway/lib/domain-name.ts#L39)
- Type last changed: v2.242.0 · 10 Mar 2026

## Example

TypeScript:

```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
});
```

Python:

```python
# acm_certificate_for_example_com: Any

apigateway.DomainName(self, "custom-domain",
    domain_name="example.com",
    certificate=acm_certificate_for_example_com,
    endpoint_type=apigateway.EndpointType.EDGE,  # default is REGIONAL
    security_policy=apigateway.SecurityPolicy.TLS_1_2
)
```

Java:

```java
Object acmCertificateForExampleCom;

DomainName.Builder.create(this, "custom-domain")
        .domainName("example.com")
        .certificate(acmCertificateForExampleCom)
        .endpointType(EndpointType.EDGE) // default is REGIONAL
        .securityPolicy(SecurityPolicy.TLS_1_2)
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var acmCertificateForExampleCom;

new DomainName(this, "custom-domain", new DomainNameProps {
    DomainName = "example.com",
    Certificate = acmCertificateForExampleCom,
    EndpointType = EndpointType.EDGE,  // default is REGIONAL
    SecurityPolicy = SecurityPolicy.TLS_1_2
});
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var acmCertificateForExampleCom interface{}

apigateway.NewDomainName(this, jsii.String("custom-domain"), &DomainNameProps{
	DomainName: jsii.String("example.com"),
	Certificate: acmCertificateForExampleCom,
	EndpointType: apigateway.EndpointType_EDGE,
	 // default is REGIONAL
	SecurityPolicy: apigateway.SecurityPolicy_TLS_1_2,
})
```

## Members

| Member | Description |
| --- | --- |
| `TLS_1_0` | Cipher suite TLS 1.0. |
| `TLS_1_2` | Cipher suite TLS 1.2. |
| `TLS13_1_3_2025_09` | Cipher suite TLS 1.3 for regional/private endpoints. |
| `TLS13_1_3_FIPS_2025_09` | Cipher suite TLS 1.3 (FIPS compliant) for regional/private endpoints. |
| `TLS13_1_2_PQ_2025_09` | Cipher suite TLS 1.3 and TLS 1.2 with post-quantum cryptography for regional/private endpoints. |
| `TLS13_1_2_PFS_PQ_2025_09` | Cipher suite TLS 1.3 and TLS 1.2 with Perfect Forward Secrecy and post-quantum cryptography for regional/private endpoints. |
| `TLS13_2025_EDGE` | Cipher suite TLS 1.3 for edge-optimized endpoints. |
| `TLS12_PFS_2025_EDGE` | Cipher suite TLS 1.2 with Perfect Forward Secrecy for edge-optimized endpoints. |
| `TLS12_2018_EDGE` | Cipher suite TLS 1.2 for edge-optimized endpoints (legacy). |

## Referenced by

- [`DomainNameOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.DomainNameOptions.html).securityPolicy
