project.protectedenvironments.create({
'name': env,
'deploy_access_levels': [{"access_level": gitlab.MAINTAINER_ACCESS}]
})
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 59, in __getattr__
return self.__dict__["_updated_attrs"][name]
KeyError: 'protectedenvironments'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 62, in __getattr__
value = self.__dict__["_attrs"][name]
KeyError: 'protectedenvironments'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 82, in __getattr__
return self.__dict__["_parent_attrs"][name]
KeyError: 'protectedenvironments'
Description of the problem, including code/CLI snippet
Per API: https://docs.gitlab.com/ee/api/protected_environments.html we should be able to create protected environment but the code fails as it isn't supported
Expected Behavior
should create the protected environment
Actual Behavior
Doesn't work
Specifications