# ApiKeyReference

A reference to a ApiKey resource.

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 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 interfaces_appsync } from 'aws-cdk-lib/interfaces';
const apiKeyReference: interfaces_appsync.ApiKeyReference = {
  apiId: 'apiId',
  apiKeyArn: 'apiKeyArn',
  apiKeyId: 'apiKeyId',
};
```

Python:

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

api_key_reference = interfaces_appsync.ApiKeyReference(
    api_id="apiId",
    api_key_arn="apiKeyArn",
    api_key_id="apiKeyId"
)
```

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

ApiKeyReference apiKeyReference = ApiKeyReference.builder()
        .apiId("apiId")
        .apiKeyArn("apiKeyArn")
        .apiKeyId("apiKeyId")
        .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.Interfaces.AppSync;

var apiKeyReference = new ApiKeyReference {
    ApiId = "apiId",
    ApiKeyArn = "apiKeyArn",
    ApiKeyId = "apiKeyId"
};
```

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"

apiKeyReference := &ApiKeyReference{
	ApiId: jsii.String("apiId"),
	ApiKeyArn: jsii.String("apiKeyArn"),
	ApiKeyId: jsii.String("apiKeyId"),
}
```

## Properties

- `apiId`: string (required) — The ApiId of the ApiKey resource.

- `apiKeyArn`: string (required) — The ARN of the ApiKey resource.

- `apiKeyId`: string (required) — The ApiKeyId of the ApiKey resource.
