IRestApi Interface
Properties
deploymentStageStagedeployment_stageStagedeploymentStageStageDeploymentStageStageDeploymentStageStage#envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironment#notes
For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.
latestDeploymentmay be undefinedDeploymentlatest_deploymentmay be undefinedDeploymentlatestDeploymentmay be undefinedDeploymentLatestDeploymentmay be undefinedDeploymentLatestDeploymentmay be undefinedDeployment#This resource will be automatically updated every time the REST API model changes. undefined when no deployment is configured.
restApiRefRestApiReferencerest_api_refRestApiReferencerestApiRefRestApiReferenceRestApiRefRestApiReferenceRestApiRefRestApiReference#restApiRootResourceIdstringrest_api_root_resource_idstrrestApiRootResourceIdStringRestApiRootResourceIdstringRestApiRootResourceId*string#api.root.addMethod('ANY', redirectToHomePage); // "ANY /" api.root.addResource('friends').addMethod('GET', getFriendsHandler); // "GET /friends"
Methods
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).
arnForExecuteApi(method?: string, path?: string, stage?: string): stringdef arn_for_execute_api(self, method: typing.Optional[str] = None, path: typing.Optional[str] = None, stage: typing.Optional[str] = None) -> strpublic String arnForExecuteApi(String method, String path, String stage)public string ArnForExecuteApi(string? method = null, string? path = null, string? stage = null)func ArnForExecuteApi(Method *string, Path *string, Stage *string) *string#3 parameters · returns
Parameters
methodmethodmethodmethodMethod— The method (default*).pathpathpathpathPath— The resource path.stagestagestagestageStage— The stage (default*).
Returns: The "execute-api" ARN.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining