# CfnDomainNameApiAssociationProps

Struct · External

Properties for defining a `CfnDomainNameApiAssociation`.

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

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

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

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_appsync as appsync

cfn_domain_name_api_association_props = appsync.CfnDomainNameApiAssociationProps(
    api_id="apiId",
    domain_name="domainName"
)
```

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.appsync.*;

CfnDomainNameApiAssociationProps cfnDomainNameApiAssociationProps = CfnDomainNameApiAssociationProps.builder()
        .apiId("apiId")
        .domainName("domainName")
        .build();
```

C#:

```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.AppSync;

var cfnDomainNameApiAssociationProps = new CfnDomainNameApiAssociationProps {
    ApiId = "apiId",
    DomainName = "domainName"
};
```

Go:

```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"

cfnDomainNameApiAssociationProps := &CfnDomainNameApiAssociationProps{
	ApiId: jsii.String("apiId"),
	DomainName: jsii.String("domainName"),
}
```

## Properties

- `apiId`: string (required) — The API ID.

- `domainName`: string | [IDomainNameRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_appsync.IDomainNameRef.html) (required) — The domain name.
