Skip to content

Commit 36ea10f

Browse files
committed
gh dss integration added govern check policy when creating api deployer infra
1 parent 8041263 commit 36ea10f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dataikuapi/dss/apideployer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,21 @@ def list_infras(self, as_objects=True):
8181
else:
8282
return l
8383

84-
def create_infra(self, infra_id, stage, type):
84+
def create_infra(self, infra_id, stage, type, govern_check_policy="NO_CHECK"):
8585
"""
8686
Creates a new infrastructure on the API Deployer and returns the handle to interact with it.
8787
8888
:param str infra_id: Unique Identifier of the infra to create
8989
:param str stage: Infrastructure stage. Stages are configurable on each API Deployer
9090
:param str type: STATIC or KUBERNETES
91+
:param str govern_check_policy: PREVENT, WARN, or NO_CHECK depending if the deployer will check wether the saved model versions deployed on this infrastructure has to be managed and approved in Dataiku Govern
9192
:rtype: :class:`DSSAPIDeployerInfra`
9293
"""
9394
settings = {
9495
"id": infra_id,
9596
"stage": stage,
9697
"type": type,
98+
"govern_check_policy": govern_check_policy,
9799
}
98100
self.client._perform_json("POST", "/api-deployer/infras", body=settings)
99101
return self.get_infra(infra_id)

0 commit comments

Comments
 (0)