|
9 | 9 | from datadog_api_client.configuration import Configuration |
10 | 10 | from datadog_api_client.v2.model.deployment_gate_response import DeploymentGateResponse |
11 | 11 | from datadog_api_client.v2.model.create_deployment_gate_params import CreateDeploymentGateParams |
| 12 | +from datadog_api_client.v2.model.deployment_gate_rules_response import DeploymentGateRulesResponse |
12 | 13 | from datadog_api_client.v2.model.deployment_rule_response import DeploymentRuleResponse |
13 | 14 | from datadog_api_client.v2.model.create_deployment_rule_params import CreateDeploymentRuleParams |
14 | 15 | from datadog_api_client.v2.model.update_deployment_rule_params import UpdateDeploymentRuleParams |
@@ -146,6 +147,29 @@ def __init__(self, api_client=None): |
146 | 147 | api_client=api_client, |
147 | 148 | ) |
148 | 149 |
|
| 150 | + self._get_deployment_gate_rules_endpoint = _Endpoint( |
| 151 | + settings={ |
| 152 | + "response_type": (DeploymentGateRulesResponse,), |
| 153 | + "auth": ["apiKeyAuth", "appKeyAuth"], |
| 154 | + "endpoint_path": "/api/v2/deployment_gates/{gate_id}/rules", |
| 155 | + "operation_id": "get_deployment_gate_rules", |
| 156 | + "http_method": "GET", |
| 157 | + "version": "v2", |
| 158 | + }, |
| 159 | + params_map={ |
| 160 | + "gate_id": { |
| 161 | + "required": True, |
| 162 | + "openapi_types": (str,), |
| 163 | + "attribute": "gate_id", |
| 164 | + "location": "path", |
| 165 | + }, |
| 166 | + }, |
| 167 | + headers_map={ |
| 168 | + "accept": ["application/json"], |
| 169 | + }, |
| 170 | + api_client=api_client, |
| 171 | + ) |
| 172 | + |
149 | 173 | self._get_deployment_rule_endpoint = _Endpoint( |
150 | 174 | settings={ |
151 | 175 | "response_type": (DeploymentRuleResponse,), |
@@ -326,6 +350,23 @@ def get_deployment_gate( |
326 | 350 |
|
327 | 351 | return self._get_deployment_gate_endpoint.call_with_http_info(**kwargs) |
328 | 352 |
|
| 353 | + def get_deployment_gate_rules( |
| 354 | + self, |
| 355 | + gate_id: str, |
| 356 | + ) -> DeploymentGateRulesResponse: |
| 357 | + """Get rules for a deployment gate. |
| 358 | +
|
| 359 | + Endpoint to get rules for a deployment gate. |
| 360 | +
|
| 361 | + :param gate_id: The ID of the deployment gate. |
| 362 | + :type gate_id: str |
| 363 | + :rtype: DeploymentGateRulesResponse |
| 364 | + """ |
| 365 | + kwargs: Dict[str, Any] = {} |
| 366 | + kwargs["gate_id"] = gate_id |
| 367 | + |
| 368 | + return self._get_deployment_gate_rules_endpoint.call_with_http_info(**kwargs) |
| 369 | + |
329 | 370 | def get_deployment_rule( |
330 | 371 | self, |
331 | 372 | gate_id: str, |
|
0 commit comments