StageAttributes Struct
The attributes of an imported Stage.
| Source | aws-apigateway/lib/stage.ts |
|---|---|
| Type last changed |
Example
ts
declare const restApi: apigateway.IRestApi;
const importedStage = apigateway.Stage.fromStageAttributes(this, 'imported-stage', {
stageName: 'myStageName',
restApi,
});
importedStage.addApiKey('MyApiKey');
python
# rest_api: apigateway.IRestApi
imported_stage = apigateway.Stage.from_stage_attributes(self, "imported-stage",
stage_name="myStageName",
rest_api=rest_api
)
imported_stage.add_api_key("MyApiKey")
java
IRestApi restApi;
IStage importedStage = Stage.fromStageAttributes(this, "imported-stage", StageAttributes.builder()
.stageName("myStageName")
.restApi(restApi)
.build());
importedStage.addApiKey("MyApiKey");
csharp
// Install: dotnet add package Amazon.CDK.Lib
IRestApi restApi;
var importedStage = Stage.FromStageAttributes(this, "imported-stage", new StageAttributes {
StageName = "myStageName",
RestApi = restApi
});
importedStage.AddApiKey("MyApiKey");