From 64196ea2d314ea3886e912e2b461352652b7c7e7 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 30 Jun 2024 00:55:23 +0900 Subject: [PATCH] update funcname --- .../aws-codedeploy/lib/base-deployment-config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index d47071c9db6a0..212eb119a8ed3 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -180,10 +180,10 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl if (props?.zonalConfig) { if (props.zonalConfig.monitorDuration) { - this.validateDurationLessThanOneSecond(props.zonalConfig.monitorDuration, 'monitorDuration'); + this.validateMinimumDuration(props.zonalConfig.monitorDuration, 'monitorDuration'); } if (props.zonalConfig.firstZoneMonitorDuration) { - this.validateDurationLessThanOneSecond(props.zonalConfig.firstZoneMonitorDuration, 'firstZoneMonitorDuration'); + this.validateMinimumDuration(props.zonalConfig.firstZoneMonitorDuration, 'firstZoneMonitorDuration'); } } @@ -210,7 +210,7 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl this.node.addValidation({ validate: () => validateName('Deployment config', this.physicalName) }); } - private validateDurationLessThanOneSecond(duration: Duration, name: string) { + private validateMinimumDuration(duration: Duration, name: string) { const milliseconds = duration.toMilliseconds(); if (milliseconds > 0 && milliseconds < 1000) { throw new Error(`${name} must be greater than or equal to 1 second or 0, got ${milliseconds}ms`);