StageAttributes Struct
The attributes of an imported Stage.
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");