# StageKeyProperty

Struct · External

`StageKey` is a property of the [AWS::ApiGateway::ApiKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html) resource that specifies the stage to associate with the API key. This association allows only clients with the key to make requests to methods in that stage.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const stageKeyProperty: apigateway.CfnApiKey.StageKeyProperty = {
  restApiId: 'restApiId',
  stageName: 'stageName',
};
```

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_apigateway as apigateway

stage_key_property = apigateway.CfnApiKey.StageKeyProperty(
    rest_api_id="restApiId",
    stage_name="stageName"
)
```

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

StageKeyProperty stageKeyProperty = StageKeyProperty.builder()
        .restApiId("restApiId")
        .stageName("stageName")
        .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.APIGateway;

var stageKeyProperty = new StageKeyProperty {
    RestApiId = "restApiId",
    StageName = "stageName"
};
```

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"

stageKeyProperty := &StageKeyProperty{
	RestApiId: jsii.String("restApiId"),
	StageName: jsii.String("stageName"),
}
```

## Properties

- `restApiId`: string — The string identifier of the associated RestApi.

- `stageName`: string — The stage name associated with the stage key.
