@@ -490,7 +490,10 @@ export abstract class RestApiBase extends Resource implements IRestApi {
490490 ignore ( deployment ) ;
491491 }
492492
493- protected configureCloudWatchRole ( apiResource : CfnRestApi ) {
493+ /**
494+ * @internal
495+ */
496+ protected _configureCloudWatchRole ( apiResource : CfnRestApi ) {
494497 const role = new iam . Role ( this , 'CloudWatchRole' , {
495498 assumedBy : new iam . ServicePrincipal ( 'apigateway.amazonaws.com' ) ,
496499 managedPolicies : [ iam . ManagedPolicy . fromAwsManagedPolicyName ( 'service-role/AmazonAPIGatewayPushToCloudWatchLogs' ) ] ,
@@ -503,7 +506,24 @@ export abstract class RestApiBase extends Resource implements IRestApi {
503506 resource . node . addDependency ( apiResource ) ;
504507 }
505508
506- protected configureDeployment ( props : RestApiOptions ) {
509+ /**
510+ * @deprecated This method will be made internal. No replacement
511+ */
512+ protected configureCloudWatchRole ( apiResource : CfnRestApi ) {
513+ this . _configureCloudWatchRole ( apiResource ) ;
514+ }
515+
516+ /**
517+ * @deprecated This method will be made internal. No replacement
518+ */
519+ protected configureDeployment ( props : RestApiBaseProps ) {
520+ this . _configureDeployment ( props ) ;
521+ }
522+
523+ /**
524+ * @internal
525+ */
526+ protected _configureDeployment ( props : RestApiBaseProps ) {
507527 const deploy = props . deploy ?? true ;
508528 if ( deploy ) {
509529
@@ -603,14 +623,14 @@ export class SpecRestApi extends RestApiBase {
603623 this . restApiRootResourceId = resource . attrRootResourceId ;
604624 this . root = new RootResource ( this , { } , this . restApiRootResourceId ) ;
605625
606- this . configureDeployment ( props ) ;
626+ this . _configureDeployment ( props ) ;
607627 if ( props . domainName ) {
608628 this . addDomainName ( 'CustomDomain' , props . domainName ) ;
609629 }
610630
611631 const cloudWatchRole = props . cloudWatchRole ?? true ;
612632 if ( cloudWatchRole ) {
613- this . configureCloudWatchRole ( resource ) ;
633+ this . _configureCloudWatchRole ( resource ) ;
614634 }
615635 }
616636}
@@ -708,10 +728,10 @@ export class RestApi extends RestApiBase {
708728
709729 const cloudWatchRole = props . cloudWatchRole ?? true ;
710730 if ( cloudWatchRole ) {
711- this . configureCloudWatchRole ( resource ) ;
731+ this . _configureCloudWatchRole ( resource ) ;
712732 }
713733
714- this . configureDeployment ( props ) ;
734+ this . _configureDeployment ( props ) ;
715735 if ( props . domainName ) {
716736 this . addDomainName ( 'CustomDomain' , props . domainName ) ;
717737 }
0 commit comments