卓:createLogGroup 操作是幂等的吗?

AWS: Is createLogGroup operation idempotent?

我正在使用 Node SDK for AWS, I have a question regarding the createLogGroup and createLogStream 操作,这些操作是幂等的吗?即我可以多次调用创建而不必担心重复或错误。

有人试过这个吗?感谢您的帮助。

不,它们不是幂等的。使用相同的名称再次调用它们将导致错误。例如,如果您按照 link 一直到 the underlying CreateLogGroup API reference, you can see one of the possible error responses 是:

ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400