Skip to content
v2.278.0

StageKeyProperty Struct ​

StageKey is a property of the AWS::ApiGateway::ApiKey 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.

Example ​

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
# 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
// 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();
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
// 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 ​

restApiIdoptionalstringrest_api_idoptionalstrrestApiIdoptionalStringRestApiIdoptionalstringRestApiIdoptional*string #
The string identifier of the associated RestApi.
stageNameoptionalstringstage_nameoptionalstrstageNameoptionalStringStageNameoptionalstringStageNameoptional*string #
The stage name associated with the stage key.