# APIKeyReference

A reference to a APIKey resource.

- Source: Generated at build time
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_location as interfaces_location } from 'aws-cdk-lib/interfaces';
const aPIKeyReference: interfaces_location.APIKeyReference = {
  apiKeyArn: 'apiKeyArn',
  keyName: 'keyName',
};
```

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_location as interfaces_location

a_pi_key_reference = interfaces_location.APIKeyReference(
    api_key_arn="apiKeyArn",
    key_name="keyName"
)
```

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

APIKeyReference aPIKeyReference = APIKeyReference.builder()
        .apiKeyArn("apiKeyArn")
        .keyName("keyName")
        .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.Location;

var aPIKeyReference = new APIKeyReference {
    ApiKeyArn = "apiKeyArn",
    KeyName = "keyName"
};
```

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{
	ApiKeyArn: jsii.String("apiKeyArn"),
	KeyName: jsii.String("keyName"),
}
```

## Properties

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

- `keyName`: string (required) — The KeyName of the APIKey resource.
