# ApiMappingAttributes

Struct · Stable

The attributes used to import existing ApiMapping.

Used as argument in: [ApiMapping.fromApiMappingAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.ApiMapping.html#fromapimappingattributes)

- Source: [`aws-apigatewayv2/lib/common/api-mapping.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/common/api-mapping.ts#L59)
- Type last changed: v2.235.0 · 15 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_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
const apiMappingAttributes: apigatewayv2.ApiMappingAttributes = {
  apiMappingId: 'apiMappingId',

  // the properties below are optional
  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_apigatewayv2 as apigatewayv2

api_mapping_attributes = apigatewayv2.ApiMappingAttributes(
    api_mapping_id="apiMappingId",

    # the properties below are optional
    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.apigatewayv2.*;

ApiMappingAttributes apiMappingAttributes = ApiMappingAttributes.builder()
        .apiMappingId("apiMappingId")

        // the properties below are optional
        .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.Apigatewayv2;

var apiMappingAttributes = new ApiMappingAttributes {
    ApiMappingId = "apiMappingId",

    // the properties below are optional
    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"

apiMappingAttributes := &ApiMappingAttributes{
	ApiMappingId: jsii.String("apiMappingId"),

	// the properties below are optional
	DomainName: jsii.String("domainName"),
}
```

## Properties

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

- `domainName`: string — Domain name.

  **Default:** Certain operations on the referenced object may fail if not supplied
