public async execute()

in src/tasks/SecretsManagerCreateOrUpdateSecret/TaskOperations.ts [18:34]


    public async execute(): Promise<void> {
        try {
            await this.updateSecret()
            console.log(tl.loc('UpdateSecretCompleted'))
        } catch (err) {
            if (err !== undefined && err.code === 'ResourceNotFoundException') {
                if (this.taskParameters.autoCreateSecret) {
                    await this.createSecret()
                    console.log(tl.loc('CreateSecretCompleted'))
                } else {
                    throw new Error(tl.loc('SecretNotFound'))
                }
            } else {
                throw new Error(tl.loc('SecretUpdateFailed', err))
            }
        }
    }