wallaroo.wallaroo_ml_ops_api_client.api.misc.status_get_deployment
1from typing import Any, Dict, Optional, Union 2 3import httpx 4 5from ...client import Client 6from ...models.status_get_deployment_json_body import \ 7 StatusGetDeploymentJsonBody 8from ...models.status_get_deployment_response_200 import \ 9 StatusGetDeploymentResponse200 10from ...models.status_get_deployment_response_400 import \ 11 StatusGetDeploymentResponse400 12from ...models.status_get_deployment_response_401 import \ 13 StatusGetDeploymentResponse401 14from ...models.status_get_deployment_response_500 import \ 15 StatusGetDeploymentResponse500 16from ...types import Response 17 18 19def _get_kwargs( 20 *, 21 client: Client, 22 json_body: StatusGetDeploymentJsonBody, 23 24) -> Dict[str, Any]: 25 url = "{}/v1/api/status/get_deployment".format( 26 client.base_url) 27 28 headers: Dict[str, str] = client.get_headers() 29 cookies: Dict[str, Any] = client.get_cookies() 30 31 32 33 34 35 36 37 json_json_body = json_body.to_dict() 38 39 40 41 42 43 return { 44 "method": "post", 45 "url": url, 46 "headers": headers, 47 "cookies": cookies, 48 "timeout": client.get_timeout(), 49 "json": json_json_body, 50 } 51 52 53def _parse_response(*, response: httpx.Response) -> Optional[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 54 if response.status_code == 500: 55 response_500 = StatusGetDeploymentResponse500.from_dict(response.json()) 56 57 58 59 return response_500 60 if response.status_code == 400: 61 response_400 = StatusGetDeploymentResponse400.from_dict(response.json()) 62 63 64 65 return response_400 66 if response.status_code == 401: 67 response_401 = StatusGetDeploymentResponse401.from_dict(response.json()) 68 69 70 71 return response_401 72 if response.status_code == 200: 73 response_200 = StatusGetDeploymentResponse200.from_dict(response.json()) 74 75 76 77 return response_200 78 return None 79 80 81def _build_response(*, response: httpx.Response) -> Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 82 return Response( 83 status_code=response.status_code, 84 content=response.content, 85 headers=response.headers, 86 parsed=_parse_response(response=response), 87 ) 88 89 90def sync_detailed( 91 *, 92 client: Client, 93 json_body: StatusGetDeploymentJsonBody, 94 95) -> Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 96 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 97 each of the running engines 98 99 Gets the full status of a deployment. 100 101 Args: 102 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 103 104 Returns: 105 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 106 """ 107 108 109 kwargs = _get_kwargs( 110 client=client, 111json_body=json_body, 112 113 ) 114 115 response = httpx.request( 116 verify=client.verify_ssl, 117 **kwargs, 118 ) 119 120 return _build_response(response=response) 121 122def sync( 123 *, 124 client: Client, 125 json_body: StatusGetDeploymentJsonBody, 126 127) -> Optional[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 128 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 129 each of the running engines 130 131 Gets the full status of a deployment. 132 133 Args: 134 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 135 136 Returns: 137 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 138 """ 139 140 141 return sync_detailed( 142 client=client, 143json_body=json_body, 144 145 ).parsed 146 147async def asyncio_detailed( 148 *, 149 client: Client, 150 json_body: StatusGetDeploymentJsonBody, 151 152) -> Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 153 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 154 each of the running engines 155 156 Gets the full status of a deployment. 157 158 Args: 159 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 160 161 Returns: 162 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 163 """ 164 165 166 kwargs = _get_kwargs( 167 client=client, 168json_body=json_body, 169 170 ) 171 172 async with httpx.AsyncClient(verify=client.verify_ssl) as _client: 173 response = await _client.request( 174 **kwargs 175 ) 176 177 return _build_response(response=response) 178 179async def asyncio( 180 *, 181 client: Client, 182 json_body: StatusGetDeploymentJsonBody, 183 184) -> Optional[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 185 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 186 each of the running engines 187 188 Gets the full status of a deployment. 189 190 Args: 191 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 192 193 Returns: 194 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 195 """ 196 197 198 return (await asyncio_detailed( 199 client=client, 200json_body=json_body, 201 202 )).parsed
91def sync_detailed( 92 *, 93 client: Client, 94 json_body: StatusGetDeploymentJsonBody, 95 96) -> Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 97 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 98 each of the running engines 99 100 Gets the full status of a deployment. 101 102 Args: 103 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 104 105 Returns: 106 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 107 """ 108 109 110 kwargs = _get_kwargs( 111 client=client, 112json_body=json_body, 113 114 ) 115 116 response = httpx.request( 117 verify=client.verify_ssl, 118 **kwargs, 119 ) 120 121 return _build_response(response=response)
Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in each of the running engines
Gets the full status of a deployment.
Args: json_body (StatusGetDeploymentJsonBody): Request for deployment status.
Returns: Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]
123def sync( 124 *, 125 client: Client, 126 json_body: StatusGetDeploymentJsonBody, 127 128) -> Optional[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 129 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 130 each of the running engines 131 132 Gets the full status of a deployment. 133 134 Args: 135 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 136 137 Returns: 138 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 139 """ 140 141 142 return sync_detailed( 143 client=client, 144json_body=json_body, 145 146 ).parsed
Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in each of the running engines
Gets the full status of a deployment.
Args: json_body (StatusGetDeploymentJsonBody): Request for deployment status.
Returns: Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]
148async def asyncio_detailed( 149 *, 150 client: Client, 151 json_body: StatusGetDeploymentJsonBody, 152 153) -> Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 154 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 155 each of the running engines 156 157 Gets the full status of a deployment. 158 159 Args: 160 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 161 162 Returns: 163 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 164 """ 165 166 167 kwargs = _get_kwargs( 168 client=client, 169json_body=json_body, 170 171 ) 172 173 async with httpx.AsyncClient(verify=client.verify_ssl) as _client: 174 response = await _client.request( 175 **kwargs 176 ) 177 178 return _build_response(response=response)
Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in each of the running engines
Gets the full status of a deployment.
Args: json_body (StatusGetDeploymentJsonBody): Request for deployment status.
Returns: Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]
180async def asyncio( 181 *, 182 client: Client, 183 json_body: StatusGetDeploymentJsonBody, 184 185) -> Optional[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]: 186 """Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in 187 each of the running engines 188 189 Gets the full status of a deployment. 190 191 Args: 192 json_body (StatusGetDeploymentJsonBody): Request for deployment status. 193 194 Returns: 195 Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]] 196 """ 197 198 199 return (await asyncio_detailed( 200 client=client, 201json_body=json_body, 202 203 )).parsed
Deployment statuses are made up of the engine pods and the statuses of the pipelines and models in each of the running engines
Gets the full status of a deployment.
Args: json_body (StatusGetDeploymentJsonBody): Request for deployment status.
Returns: Response[Union[StatusGetDeploymentResponse200, StatusGetDeploymentResponse400, StatusGetDeploymentResponse401, StatusGetDeploymentResponse500]]