草庐IT

ParameterNotFound

全部标签

python - 如何导入 boto3 ssm ParameterNotFound 异常?

我想导入exception当boto3ssm参数没有找到获取参数。我正在尝试向moto库添加一些额外的ssm功能,但此时我感到很困惑。>>>importboto3>>>ssm=boto3.client('ssm')>>>try:ssm.get_parameter(Name='not_found')exceptExceptionase:print(type(e))>>>frombotocore.errorfactoryimportParameterNotFoundImportError:cannotimportname'ParameterNotFound'>>>importbotocor