From 3bf2caa3612754702db91dd84c739f4e9d722f0b Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 2 Sep 2025 14:56:09 +0000 Subject: [PATCH 1/2] Generate observability --- .../src/stackit/observability/__init__.py | 24 + .../stackit/observability/api/default_api.py | 3634 ++++++++++++----- .../stackit/observability/models/__init__.py | 14 + .../models/cert_check_child_response.py | 83 + .../models/cert_check_response.py | 103 + .../models/create_cert_check_payload.py | 82 + .../models/create_http_check_payload.py | 82 + .../models/http_check_child_response.py | 83 + .../models/http_check_response.py | 103 + 9 files changed, 3168 insertions(+), 1040 deletions(-) create mode 100644 services/observability/src/stackit/observability/models/cert_check_child_response.py create mode 100644 services/observability/src/stackit/observability/models/cert_check_response.py create mode 100644 services/observability/src/stackit/observability/models/create_cert_check_payload.py create mode 100644 services/observability/src/stackit/observability/models/create_http_check_payload.py create mode 100644 services/observability/src/stackit/observability/models/http_check_child_response.py create mode 100644 services/observability/src/stackit/observability/models/http_check_response.py diff --git a/services/observability/src/stackit/observability/__init__.py b/services/observability/src/stackit/observability/__init__.py index 0be81cbb..c1d2ea08 100644 --- a/services/observability/src/stackit/observability/__init__.py +++ b/services/observability/src/stackit/observability/__init__.py @@ -39,6 +39,8 @@ "AlertRuleRecord", "AlertRulesResponse", "BasicAuth", + "CertCheckChildResponse", + "CertCheckResponse", "CreateAlertConfigReceiverPayload", "CreateAlertConfigReceiverPayloadEmailConfigsInner", "CreateAlertConfigReceiverPayloadOpsgenieConfigsInner", @@ -47,8 +49,10 @@ "CreateAlertConfigRoutePayloadRoutesInner", "CreateAlertgroupsPayload", "CreateAlertrulesPayload", + "CreateCertCheckPayload", "CreateCredentialsPayload", "CreateCredentialsResponse", + "CreateHttpCheckPayload", "CreateInstancePayload", "CreateInstanceResponse", "CreateLogsAlertgroupsPayload", @@ -73,6 +77,8 @@ "GrafanaConfigs", "GrafanaOauth", "HTTPServiceSD", + "HttpCheckChildResponse", + "HttpCheckResponse", "InhibitRules", "Instance", "InstanceResponse", @@ -167,6 +173,12 @@ AlertRulesResponse as AlertRulesResponse, ) from stackit.observability.models.basic_auth import BasicAuth as BasicAuth +from stackit.observability.models.cert_check_child_response import ( + CertCheckChildResponse as CertCheckChildResponse, +) +from stackit.observability.models.cert_check_response import ( + CertCheckResponse as CertCheckResponse, +) from stackit.observability.models.create_alert_config_receiver_payload import ( CreateAlertConfigReceiverPayload as CreateAlertConfigReceiverPayload, ) @@ -191,12 +203,18 @@ from stackit.observability.models.create_alertrules_payload import ( CreateAlertrulesPayload as CreateAlertrulesPayload, ) +from stackit.observability.models.create_cert_check_payload import ( + CreateCertCheckPayload as CreateCertCheckPayload, +) from stackit.observability.models.create_credentials_payload import ( CreateCredentialsPayload as CreateCredentialsPayload, ) from stackit.observability.models.create_credentials_response import ( CreateCredentialsResponse as CreateCredentialsResponse, ) +from stackit.observability.models.create_http_check_payload import ( + CreateHttpCheckPayload as CreateHttpCheckPayload, +) from stackit.observability.models.create_instance_payload import ( CreateInstancePayload as CreateInstancePayload, ) @@ -258,6 +276,12 @@ GrafanaConfigs as GrafanaConfigs, ) from stackit.observability.models.grafana_oauth import GrafanaOauth as GrafanaOauth +from stackit.observability.models.http_check_child_response import ( + HttpCheckChildResponse as HttpCheckChildResponse, +) +from stackit.observability.models.http_check_response import ( + HttpCheckResponse as HttpCheckResponse, +) from stackit.observability.models.http_service_sd import HTTPServiceSD as HTTPServiceSD from stackit.observability.models.inhibit_rules import InhibitRules as InhibitRules from stackit.observability.models.instance import Instance as Instance diff --git a/services/observability/src/stackit/observability/api/default_api.py b/services/observability/src/stackit/observability/api/default_api.py index 97239012..05ea694c 100644 --- a/services/observability/src/stackit/observability/api/default_api.py +++ b/services/observability/src/stackit/observability/api/default_api.py @@ -29,6 +29,7 @@ from stackit.observability.models.alert_group_response import AlertGroupResponse from stackit.observability.models.alert_groups_response import AlertGroupsResponse from stackit.observability.models.alert_rules_response import AlertRulesResponse +from stackit.observability.models.cert_check_response import CertCheckResponse from stackit.observability.models.create_alert_config_receiver_payload import ( CreateAlertConfigReceiverPayload, ) @@ -41,12 +42,18 @@ from stackit.observability.models.create_alertrules_payload import ( CreateAlertrulesPayload, ) +from stackit.observability.models.create_cert_check_payload import ( + CreateCertCheckPayload, +) from stackit.observability.models.create_credentials_payload import ( CreateCredentialsPayload, ) from stackit.observability.models.create_credentials_response import ( CreateCredentialsResponse, ) +from stackit.observability.models.create_http_check_payload import ( + CreateHttpCheckPayload, +) from stackit.observability.models.create_instance_payload import CreateInstancePayload from stackit.observability.models.create_instance_response import CreateInstanceResponse from stackit.observability.models.create_logs_alertgroups_payload import ( @@ -76,6 +83,7 @@ GetScrapeConfigResponse, ) from stackit.observability.models.grafana_configs import GrafanaConfigs +from stackit.observability.models.http_check_response import HttpCheckResponse from stackit.observability.models.instance_response import InstanceResponse from stackit.observability.models.list_acl_response import ListACLResponse from stackit.observability.models.list_credentials_response import ( @@ -1247,11 +1255,11 @@ def _create_alertrules_serialize( ) @validate_call - def create_credentials( + def create_cert_check( self, instance_id: StrictStr, project_id: StrictStr, - create_credentials_payload: Optional[CreateCredentialsPayload] = None, + create_cert_check_payload: CreateCertCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1261,17 +1269,17 @@ def create_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateCredentialsResponse: - """create_credentials + ) -> CertCheckResponse: + """create_cert_check - Create technical user credentials. + Create cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_credentials_payload: - :type create_credentials_payload: CreateCredentialsPayload + :param create_cert_check_payload: (required) + :type create_cert_check_payload: CreateCertCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1294,10 +1302,10 @@ def create_credentials( :return: Returns the result object. """ # noqa: E501 - _param = self._create_credentials_serialize( + _param = self._create_cert_check_serialize( instance_id=instance_id, project_id=project_id, - create_credentials_payload=create_credentials_payload, + create_cert_check_payload=create_cert_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1305,8 +1313,7 @@ def create_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateCredentialsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1317,11 +1324,11 @@ def create_credentials( ).data @validate_call - def create_credentials_with_http_info( + def create_cert_check_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - create_credentials_payload: Optional[CreateCredentialsPayload] = None, + create_cert_check_payload: CreateCertCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1331,17 +1338,17 @@ def create_credentials_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateCredentialsResponse]: - """create_credentials + ) -> ApiResponse[CertCheckResponse]: + """create_cert_check - Create technical user credentials. + Create cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_credentials_payload: - :type create_credentials_payload: CreateCredentialsPayload + :param create_cert_check_payload: (required) + :type create_cert_check_payload: CreateCertCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1364,10 +1371,10 @@ def create_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_credentials_serialize( + _param = self._create_cert_check_serialize( instance_id=instance_id, project_id=project_id, - create_credentials_payload=create_credentials_payload, + create_cert_check_payload=create_cert_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1375,8 +1382,7 @@ def create_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateCredentialsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1387,11 +1393,11 @@ def create_credentials_with_http_info( ) @validate_call - def create_credentials_without_preload_content( + def create_cert_check_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - create_credentials_payload: Optional[CreateCredentialsPayload] = None, + create_cert_check_payload: CreateCertCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1402,16 +1408,16 @@ def create_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_credentials + """create_cert_check - Create technical user credentials. + Create cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_credentials_payload: - :type create_credentials_payload: CreateCredentialsPayload + :param create_cert_check_payload: (required) + :type create_cert_check_payload: CreateCertCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1434,10 +1440,10 @@ def create_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_credentials_serialize( + _param = self._create_cert_check_serialize( instance_id=instance_id, project_id=project_id, - create_credentials_payload=create_credentials_payload, + create_cert_check_payload=create_cert_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1445,18 +1451,17 @@ def create_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "CreateCredentialsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_credentials_serialize( + def _create_cert_check_serialize( self, instance_id, project_id, - create_credentials_payload, + create_cert_check_payload, _request_auth, _content_type, _headers, @@ -1483,8 +1488,8 @@ def _create_credentials_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_credentials_payload is not None: - _body_params = create_credentials_payload + if create_cert_check_payload is not None: + _body_params = create_cert_check_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -1503,7 +1508,7 @@ def _create_credentials_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/cert-checks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1517,10 +1522,11 @@ def _create_credentials_serialize( ) @validate_call - def create_instance( + def create_credentials( self, + instance_id: StrictStr, project_id: StrictStr, - create_instance_payload: CreateInstancePayload, + create_credentials_payload: Optional[CreateCredentialsPayload] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1530,15 +1536,17 @@ def create_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateInstanceResponse: - """create_instance + ) -> CreateCredentialsResponse: + """create_credentials - Create new instance. + Create technical user credentials. + :param instance_id: (required) + :type instance_id: str :param project_id: (required) :type project_id: str - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param create_credentials_payload: + :type create_credentials_payload: CreateCredentialsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1561,9 +1569,10 @@ def create_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_credentials_serialize( + instance_id=instance_id, project_id=project_id, - create_instance_payload=create_instance_payload, + create_credentials_payload=create_credentials_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1571,7 +1580,7 @@ def create_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "201": "CreateCredentialsResponse", "400": "Error", "403": "PermissionDenied", } @@ -1583,10 +1592,11 @@ def create_instance( ).data @validate_call - def create_instance_with_http_info( + def create_credentials_with_http_info( self, + instance_id: StrictStr, project_id: StrictStr, - create_instance_payload: CreateInstancePayload, + create_credentials_payload: Optional[CreateCredentialsPayload] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1596,15 +1606,17 @@ def create_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateInstanceResponse]: - """create_instance + ) -> ApiResponse[CreateCredentialsResponse]: + """create_credentials - Create new instance. + Create technical user credentials. + :param instance_id: (required) + :type instance_id: str :param project_id: (required) :type project_id: str - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param create_credentials_payload: + :type create_credentials_payload: CreateCredentialsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1627,9 +1639,10 @@ def create_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_credentials_serialize( + instance_id=instance_id, project_id=project_id, - create_instance_payload=create_instance_payload, + create_credentials_payload=create_credentials_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1637,7 +1650,7 @@ def create_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "201": "CreateCredentialsResponse", "400": "Error", "403": "PermissionDenied", } @@ -1649,10 +1662,11 @@ def create_instance_with_http_info( ) @validate_call - def create_instance_without_preload_content( + def create_credentials_without_preload_content( self, + instance_id: StrictStr, project_id: StrictStr, - create_instance_payload: CreateInstancePayload, + create_credentials_payload: Optional[CreateCredentialsPayload] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1663,14 +1677,16 @@ def create_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_instance + """create_credentials - Create new instance. + Create technical user credentials. + :param instance_id: (required) + :type instance_id: str :param project_id: (required) :type project_id: str - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param create_credentials_payload: + :type create_credentials_payload: CreateCredentialsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1693,9 +1709,10 @@ def create_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_credentials_serialize( + instance_id=instance_id, project_id=project_id, - create_instance_payload=create_instance_payload, + create_credentials_payload=create_credentials_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1703,17 +1720,18 @@ def create_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "201": "CreateCredentialsResponse", "400": "Error", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_instance_serialize( + def _create_credentials_serialize( self, + instance_id, project_id, - create_instance_payload, + create_credentials_payload, _request_auth, _content_type, _headers, @@ -1732,14 +1750,16 @@ def _create_instance_serialize( _body_params: Optional[bytes] = None # process the path parameters + if instance_id is not None: + _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_instance_payload is not None: - _body_params = create_instance_payload + if create_credentials_payload is not None: + _body_params = create_credentials_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -1758,7 +1778,7 @@ def _create_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1772,11 +1792,11 @@ def _create_instance_serialize( ) @validate_call - def create_logs_alertgroups( + def create_http_check( self, instance_id: StrictStr, project_id: StrictStr, - create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, + create_http_check_payload: CreateHttpCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1786,17 +1806,17 @@ def create_logs_alertgroups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupsResponse: - """create_logs_alertgroups + ) -> HttpCheckResponse: + """create_http_check - Create logs alert group config. + Create http check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_logs_alertgroups_payload: (required) - :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload + :param create_http_check_payload: (required) + :type create_http_check_payload: CreateHttpCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1819,10 +1839,10 @@ def create_logs_alertgroups( :return: Returns the result object. """ # noqa: E501 - _param = self._create_logs_alertgroups_serialize( + _param = self._create_http_check_serialize( instance_id=instance_id, project_id=project_id, - create_logs_alertgroups_payload=create_logs_alertgroups_payload, + create_http_check_payload=create_http_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1830,8 +1850,7 @@ def create_logs_alertgroups( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Error", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1842,11 +1861,11 @@ def create_logs_alertgroups( ).data @validate_call - def create_logs_alertgroups_with_http_info( + def create_http_check_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, + create_http_check_payload: CreateHttpCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1856,17 +1875,17 @@ def create_logs_alertgroups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupsResponse]: - """create_logs_alertgroups + ) -> ApiResponse[HttpCheckResponse]: + """create_http_check - Create logs alert group config. + Create http check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_logs_alertgroups_payload: (required) - :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload + :param create_http_check_payload: (required) + :type create_http_check_payload: CreateHttpCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1889,10 +1908,10 @@ def create_logs_alertgroups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_logs_alertgroups_serialize( + _param = self._create_http_check_serialize( instance_id=instance_id, project_id=project_id, - create_logs_alertgroups_payload=create_logs_alertgroups_payload, + create_http_check_payload=create_http_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1900,8 +1919,7 @@ def create_logs_alertgroups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Error", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1912,11 +1930,11 @@ def create_logs_alertgroups_with_http_info( ) @validate_call - def create_logs_alertgroups_without_preload_content( + def create_http_check_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, + create_http_check_payload: CreateHttpCheckPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1927,16 +1945,16 @@ def create_logs_alertgroups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_logs_alertgroups + """create_http_check - Create logs alert group config. + Create http check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param create_logs_alertgroups_payload: (required) - :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload + :param create_http_check_payload: (required) + :type create_http_check_payload: CreateHttpCheckPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1959,10 +1977,10 @@ def create_logs_alertgroups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_logs_alertgroups_serialize( + _param = self._create_http_check_serialize( instance_id=instance_id, project_id=project_id, - create_logs_alertgroups_payload=create_logs_alertgroups_payload, + create_http_check_payload=create_http_check_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1970,18 +1988,17 @@ def create_logs_alertgroups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Error", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_logs_alertgroups_serialize( + def _create_http_check_serialize( self, instance_id, project_id, - create_logs_alertgroups_payload, + create_http_check_payload, _request_auth, _content_type, _headers, @@ -2008,8 +2025,8 @@ def _create_logs_alertgroups_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_logs_alertgroups_payload is not None: - _body_params = create_logs_alertgroups_payload + if create_http_check_payload is not None: + _body_params = create_http_check_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -2028,7 +2045,7 @@ def _create_logs_alertgroups_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/http-checks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2042,11 +2059,10 @@ def _create_logs_alertgroups_serialize( ) @validate_call - def create_scrape_config( + def create_instance( self, - instance_id: StrictStr, project_id: StrictStr, - create_scrape_config_payload: CreateScrapeConfigPayload, + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2056,17 +2072,15 @@ def create_scrape_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ScrapeConfigsResponse: - """create_scrape_config + ) -> CreateInstanceResponse: + """create_instance - Create scrape config. + Create new instance. - :param instance_id: (required) - :type instance_id: str :param project_id: (required) :type project_id: str - :param create_scrape_config_payload: (required) - :type create_scrape_config_payload: CreateScrapeConfigPayload + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2089,10 +2103,9 @@ def create_scrape_config( :return: Returns the result object. """ # noqa: E501 - _param = self._create_scrape_config_serialize( - instance_id=instance_id, + _param = self._create_instance_serialize( project_id=project_id, - create_scrape_config_payload=create_scrape_config_payload, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2100,7 +2113,7 @@ def create_scrape_config( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "ScrapeConfigsResponse", + "202": "CreateInstanceResponse", "400": "Error", "403": "PermissionDenied", } @@ -2112,11 +2125,10 @@ def create_scrape_config( ).data @validate_call - def create_scrape_config_with_http_info( + def create_instance_with_http_info( self, - instance_id: StrictStr, project_id: StrictStr, - create_scrape_config_payload: CreateScrapeConfigPayload, + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2126,17 +2138,15 @@ def create_scrape_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ScrapeConfigsResponse]: - """create_scrape_config + ) -> ApiResponse[CreateInstanceResponse]: + """create_instance - Create scrape config. + Create new instance. - :param instance_id: (required) - :type instance_id: str :param project_id: (required) :type project_id: str - :param create_scrape_config_payload: (required) - :type create_scrape_config_payload: CreateScrapeConfigPayload + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2159,10 +2169,9 @@ def create_scrape_config_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_scrape_config_serialize( - instance_id=instance_id, + _param = self._create_instance_serialize( project_id=project_id, - create_scrape_config_payload=create_scrape_config_payload, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2170,7 +2179,7 @@ def create_scrape_config_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "ScrapeConfigsResponse", + "202": "CreateInstanceResponse", "400": "Error", "403": "PermissionDenied", } @@ -2182,11 +2191,10 @@ def create_scrape_config_with_http_info( ) @validate_call - def create_scrape_config_without_preload_content( + def create_instance_without_preload_content( self, - instance_id: StrictStr, project_id: StrictStr, - create_scrape_config_payload: CreateScrapeConfigPayload, + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2197,16 +2205,14 @@ def create_scrape_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_scrape_config + """create_instance - Create scrape config. + Create new instance. - :param instance_id: (required) - :type instance_id: str :param project_id: (required) :type project_id: str - :param create_scrape_config_payload: (required) - :type create_scrape_config_payload: CreateScrapeConfigPayload + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2229,10 +2235,9 @@ def create_scrape_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_scrape_config_serialize( - instance_id=instance_id, + _param = self._create_instance_serialize( project_id=project_id, - create_scrape_config_payload=create_scrape_config_payload, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2240,18 +2245,17 @@ def create_scrape_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "ScrapeConfigsResponse", + "202": "CreateInstanceResponse", "400": "Error", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_scrape_config_serialize( + def _create_instance_serialize( self, - instance_id, project_id, - create_scrape_config_payload, + create_instance_payload, _request_auth, _content_type, _headers, @@ -2270,16 +2274,14 @@ def _create_scrape_config_serialize( _body_params: Optional[bytes] = None # process the path parameters - if instance_id is not None: - _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_scrape_config_payload is not None: - _body_params = create_scrape_config_payload + if create_instance_payload is not None: + _body_params = create_instance_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -2298,7 +2300,7 @@ def _create_scrape_config_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs", + resource_path="/v1/projects/{projectId}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2312,11 +2314,11 @@ def _create_scrape_config_serialize( ) @validate_call - def delete_alert_config_receiver( + def create_logs_alertgroups( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2326,17 +2328,17 @@ def delete_alert_config_receiver( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertConfigReceiversResponse: - """delete_alert_config_receiver + ) -> AlertGroupsResponse: + """create_logs_alertgroups - Delete alert config receiver. + Create logs alert group config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param create_logs_alertgroups_payload: (required) + :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2359,10 +2361,10 @@ def delete_alert_config_receiver( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_receiver_serialize( + _param = self._create_logs_alertgroups_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + create_logs_alertgroups_payload=create_logs_alertgroups_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2370,9 +2372,9 @@ def delete_alert_config_receiver( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigReceiversResponse", + "202": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2382,11 +2384,11 @@ def delete_alert_config_receiver( ).data @validate_call - def delete_alert_config_receiver_with_http_info( + def create_logs_alertgroups_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2396,17 +2398,17 @@ def delete_alert_config_receiver_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertConfigReceiversResponse]: - """delete_alert_config_receiver + ) -> ApiResponse[AlertGroupsResponse]: + """create_logs_alertgroups - Delete alert config receiver. + Create logs alert group config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param create_logs_alertgroups_payload: (required) + :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2429,10 +2431,10 @@ def delete_alert_config_receiver_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_receiver_serialize( + _param = self._create_logs_alertgroups_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + create_logs_alertgroups_payload=create_logs_alertgroups_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2440,9 +2442,9 @@ def delete_alert_config_receiver_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigReceiversResponse", + "202": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2452,11 +2454,11 @@ def delete_alert_config_receiver_with_http_info( ) @validate_call - def delete_alert_config_receiver_without_preload_content( + def create_logs_alertgroups_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2467,16 +2469,16 @@ def delete_alert_config_receiver_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alert_config_receiver + """create_logs_alertgroups - Delete alert config receiver. + Create logs alert group config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param create_logs_alertgroups_payload: (required) + :type create_logs_alertgroups_payload: CreateLogsAlertgroupsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2499,10 +2501,10 @@ def delete_alert_config_receiver_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_receiver_serialize( + _param = self._create_logs_alertgroups_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + create_logs_alertgroups_payload=create_logs_alertgroups_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2510,18 +2512,18 @@ def delete_alert_config_receiver_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigReceiversResponse", + "202": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_alert_config_receiver_serialize( + def _create_logs_alertgroups_serialize( self, instance_id, project_id, - receiver, + create_logs_alertgroups_payload, _request_auth, _content_type, _headers, @@ -2544,12 +2546,1620 @@ def _delete_alert_config_receiver_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if receiver is not None: - _path_params["receiver"] = receiver # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if create_logs_alertgroups_payload is not None: + _body_params = create_logs_alertgroups_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_scrape_config( + self, + instance_id: StrictStr, + project_id: StrictStr, + create_scrape_config_payload: CreateScrapeConfigPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScrapeConfigsResponse: + """create_scrape_config + + Create scrape config. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param create_scrape_config_payload: (required) + :type create_scrape_config_payload: CreateScrapeConfigPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_scrape_config_serialize( + instance_id=instance_id, + project_id=project_id, + create_scrape_config_payload=create_scrape_config_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "ScrapeConfigsResponse", + "400": "Error", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_scrape_config_with_http_info( + self, + instance_id: StrictStr, + project_id: StrictStr, + create_scrape_config_payload: CreateScrapeConfigPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScrapeConfigsResponse]: + """create_scrape_config + + Create scrape config. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param create_scrape_config_payload: (required) + :type create_scrape_config_payload: CreateScrapeConfigPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_scrape_config_serialize( + instance_id=instance_id, + project_id=project_id, + create_scrape_config_payload=create_scrape_config_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "ScrapeConfigsResponse", + "400": "Error", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_scrape_config_without_preload_content( + self, + instance_id: StrictStr, + project_id: StrictStr, + create_scrape_config_payload: CreateScrapeConfigPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_scrape_config + + Create scrape config. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param create_scrape_config_payload: (required) + :type create_scrape_config_payload: CreateScrapeConfigPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_scrape_config_serialize( + instance_id=instance_id, + project_id=project_id, + create_scrape_config_payload=create_scrape_config_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "ScrapeConfigsResponse", + "400": "Error", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_scrape_config_serialize( + self, + instance_id, + project_id, + create_scrape_config_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_scrape_config_payload is not None: + _body_params = create_scrape_config_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_alert_config_receiver( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertConfigReceiversResponse: + """delete_alert_config_receiver + + Delete alert config receiver. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_receiver_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigReceiversResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_alert_config_receiver_with_http_info( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertConfigReceiversResponse]: + """delete_alert_config_receiver + + Delete alert config receiver. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_receiver_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigReceiversResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_alert_config_receiver_without_preload_content( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_alert_config_receiver + + Delete alert config receiver. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_receiver_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigReceiversResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_alert_config_receiver_serialize( + self, + instance_id, + project_id, + receiver, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + if receiver is not None: + _path_params["receiver"] = receiver + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_alert_config_route( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertConfigRouteResponse: + """delete_alert_config_route + + Delete alert receiver for route. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_route_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigRouteResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_alert_config_route_with_http_info( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertConfigRouteResponse]: + """delete_alert_config_route + + Delete alert receiver for route. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_route_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigRouteResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_alert_config_route_without_preload_content( + self, + instance_id: StrictStr, + project_id: StrictStr, + receiver: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_alert_config_route + + Delete alert receiver for route. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param receiver: (required) + :type receiver: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alert_config_route_serialize( + instance_id=instance_id, + project_id=project_id, + receiver=receiver, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertConfigRouteResponse", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_alert_config_route_serialize( + self, + instance_id, + project_id, + receiver, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + if receiver is not None: + _path_params["receiver"] = receiver + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_alertgroup( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertGroupsResponse: + """delete_alertgroup + + Delete alert group config. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroup_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "400": "Message", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_alertgroup_with_http_info( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertGroupsResponse]: + """delete_alertgroup + + Delete alert group config. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroup_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "400": "Message", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_alertgroup_without_preload_content( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_alertgroup + + Delete alert group config. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroup_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "400": "Message", + "403": "PermissionDenied", + "404": "Message", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_alertgroup_serialize( + self, + group_name, + instance_id, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_alertgroups( + self, + instance_id: StrictStr, + project_id: StrictStr, + group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertGroupsResponse: + """delete_alertgroups + + Delete alert groups. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param group_name: Name of the groups that should be deleted (required) + :type group_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroups_serialize( + instance_id=instance_id, + project_id=project_id, + group_name=group_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_alertgroups_with_http_info( + self, + instance_id: StrictStr, + project_id: StrictStr, + group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertGroupsResponse]: + """delete_alertgroups + + Delete alert groups. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param group_name: Name of the groups that should be deleted (required) + :type group_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroups_serialize( + instance_id=instance_id, + project_id=project_id, + group_name=group_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_alertgroups_without_preload_content( + self, + instance_id: StrictStr, + project_id: StrictStr, + group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_alertgroups + + Delete alert groups. + + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param group_name: Name of the groups that should be deleted (required) + :type group_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertgroups_serialize( + instance_id=instance_id, + project_id=project_id, + group_name=group_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertGroupsResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_alertgroups_serialize( + self, + instance_id, + project_id, + group_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + "groupName": "csv", + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + if group_name is not None: + + _query_params.append(("groupName", group_name)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_alertrules( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertRulesResponse: + """delete_alertrules + + Delete alert rules. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param alert_name: Name of the alert rules that should be deleted (required) + :type alert_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertrules_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + alert_name=alert_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertRulesResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_alertrules_with_http_info( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertRulesResponse]: + """delete_alertrules + + Delete alert rules. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param alert_name: Name of the alert rules that should be deleted (required) + :type alert_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertrules_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + alert_name=alert_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertRulesResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_alertrules_without_preload_content( + self, + group_name: StrictStr, + instance_id: StrictStr, + project_id: StrictStr, + alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_alertrules + + Delete alert rules. + + :param group_name: (required) + :type group_name: str + :param instance_id: (required) + :type instance_id: str + :param project_id: (required) + :type project_id: str + :param alert_name: Name of the alert rules that should be deleted (required) + :type alert_name: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alertrules_serialize( + group_name=group_name, + instance_id=instance_id, + project_id=project_id, + alert_name=alert_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "AlertRulesResponse", + "403": "PermissionDenied", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_alertrules_serialize( + self, + group_name, + instance_id, + project_id, + alert_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + "alertName": "csv", + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name + if instance_id is not None: + _path_params["instanceId"] = instance_id + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + if alert_name is not None: + + _query_params.append(("alertName", alert_name)) + + # process the header parameters + # process the form parameters + # process the body parameter # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -2560,7 +4170,7 @@ def _delete_alert_config_receiver_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2574,11 +4184,11 @@ def _delete_alert_config_receiver_serialize( ) @validate_call - def delete_alert_config_route( + def delete_cert_check( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2588,17 +4198,17 @@ def delete_alert_config_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertConfigRouteResponse: - """delete_alert_config_route + ) -> CertCheckResponse: + """delete_cert_check - Delete alert receiver for route. + Delete cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2621,10 +4231,10 @@ def delete_alert_config_route( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_route_serialize( + _param = self._delete_cert_check_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2632,7 +4242,7 @@ def delete_alert_config_route( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigRouteResponse", + "200": "CertCheckResponse", "403": "PermissionDenied", "404": "Message", } @@ -2644,11 +4254,11 @@ def delete_alert_config_route( ).data @validate_call - def delete_alert_config_route_with_http_info( + def delete_cert_check_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2658,17 +4268,17 @@ def delete_alert_config_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertConfigRouteResponse]: - """delete_alert_config_route + ) -> ApiResponse[CertCheckResponse]: + """delete_cert_check - Delete alert receiver for route. + Delete cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2691,10 +4301,10 @@ def delete_alert_config_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_route_serialize( + _param = self._delete_cert_check_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2702,7 +4312,7 @@ def delete_alert_config_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigRouteResponse", + "200": "CertCheckResponse", "403": "PermissionDenied", "404": "Message", } @@ -2714,11 +4324,11 @@ def delete_alert_config_route_with_http_info( ) @validate_call - def delete_alert_config_route_without_preload_content( + def delete_cert_check_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2729,16 +4339,16 @@ def delete_alert_config_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alert_config_route + """delete_cert_check - Delete alert receiver for route. + Delete cert check. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2761,10 +4371,10 @@ def delete_alert_config_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alert_config_route_serialize( + _param = self._delete_cert_check_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2772,18 +4382,18 @@ def delete_alert_config_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertConfigRouteResponse", + "200": "CertCheckResponse", "403": "PermissionDenied", "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_alert_config_route_serialize( + def _delete_cert_check_serialize( self, instance_id, project_id, - receiver, + id, _request_auth, _content_type, _headers, @@ -2806,8 +4416,8 @@ def _delete_alert_config_route_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if receiver is not None: - _path_params["receiver"] = receiver + if id is not None: + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -2822,7 +4432,7 @@ def _delete_alert_config_route_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/cert-checks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2836,11 +4446,11 @@ def _delete_alert_config_route_serialize( ) @validate_call - def delete_alertgroup( + def delete_credentials( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2850,17 +4460,17 @@ def delete_alertgroup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupsResponse: - """delete_alertgroup + ) -> Message: + """delete_credentials - Delete alert group config. + Delete technical credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2883,10 +4493,10 @@ def delete_alertgroup( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroup_serialize( - group_name=group_name, + _param = self._delete_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2894,10 +4504,10 @@ def delete_alertgroup( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Message", "403": "PermissionDenied", "404": "Message", + "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2907,11 +4517,11 @@ def delete_alertgroup( ).data @validate_call - def delete_alertgroup_with_http_info( + def delete_credentials_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2921,17 +4531,17 @@ def delete_alertgroup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupsResponse]: - """delete_alertgroup + ) -> ApiResponse[Message]: + """delete_credentials - Delete alert group config. + Delete technical credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2954,10 +4564,10 @@ def delete_alertgroup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroup_serialize( - group_name=group_name, + _param = self._delete_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2965,10 +4575,10 @@ def delete_alertgroup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Message", "403": "PermissionDenied", "404": "Message", + "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -2978,11 +4588,11 @@ def delete_alertgroup_with_http_info( ) @validate_call - def delete_alertgroup_without_preload_content( + def delete_credentials_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2993,16 +4603,16 @@ def delete_alertgroup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alertgroup + """delete_credentials - Delete alert group config. + Delete technical credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3025,10 +4635,10 @@ def delete_alertgroup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroup_serialize( - group_name=group_name, + _param = self._delete_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3036,19 +4646,19 @@ def delete_alertgroup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Message", "403": "PermissionDenied", "404": "Message", + "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_alertgroup_serialize( + def _delete_credentials_serialize( self, - group_name, instance_id, project_id, + username, _request_auth, _content_type, _headers, @@ -3067,12 +4677,12 @@ def _delete_alertgroup_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id + if username is not None: + _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -3087,7 +4697,7 @@ def _delete_alertgroup_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3101,11 +4711,11 @@ def _delete_alertgroup_serialize( ) @validate_call - def delete_alertgroups( + def delete_credentials_remote_write_config( self, instance_id: StrictStr, project_id: StrictStr, - group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3115,17 +4725,17 @@ def delete_alertgroups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupsResponse: - """delete_alertgroups + ) -> CredentialsRemoteWriteDeleteResponse: + """delete_credentials_remote_write_config - Delete alert groups. + Delete remote write config for credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param group_name: Name of the groups that should be deleted (required) - :type group_name: List[str] + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3148,10 +4758,10 @@ def delete_alertgroups( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroups_serialize( + _param = self._delete_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, - group_name=group_name, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3159,8 +4769,11 @@ def delete_alertgroups( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", + "200": "CredentialsRemoteWriteDeleteResponse", + "400": "Error", "403": "PermissionDenied", + "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3170,11 +4783,11 @@ def delete_alertgroups( ).data @validate_call - def delete_alertgroups_with_http_info( + def delete_credentials_remote_write_config_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3184,17 +4797,17 @@ def delete_alertgroups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupsResponse]: - """delete_alertgroups + ) -> ApiResponse[CredentialsRemoteWriteDeleteResponse]: + """delete_credentials_remote_write_config - Delete alert groups. + Delete remote write config for credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param group_name: Name of the groups that should be deleted (required) - :type group_name: List[str] + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3217,10 +4830,10 @@ def delete_alertgroups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroups_serialize( + _param = self._delete_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, - group_name=group_name, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3228,8 +4841,11 @@ def delete_alertgroups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", + "200": "CredentialsRemoteWriteDeleteResponse", + "400": "Error", "403": "PermissionDenied", + "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3239,11 +4855,11 @@ def delete_alertgroups_with_http_info( ) @validate_call - def delete_alertgroups_without_preload_content( + def delete_credentials_remote_write_config_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - group_name: Annotated[List[StrictStr], Field(description="Name of the groups that should be deleted")], + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3254,16 +4870,16 @@ def delete_alertgroups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alertgroups + """delete_credentials_remote_write_config - Delete alert groups. + Delete remote write config for credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param group_name: Name of the groups that should be deleted (required) - :type group_name: List[str] + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3286,10 +4902,10 @@ def delete_alertgroups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertgroups_serialize( + _param = self._delete_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, - group_name=group_name, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3297,17 +4913,20 @@ def delete_alertgroups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", + "200": "CredentialsRemoteWriteDeleteResponse", + "400": "Error", "403": "PermissionDenied", + "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_alertgroups_serialize( + def _delete_credentials_remote_write_config_serialize( self, instance_id, project_id, - group_name, + username, _request_auth, _content_type, _headers, @@ -3316,9 +4935,7 @@ def _delete_alertgroups_serialize( _host = None - _collection_formats: Dict[str, str] = { - "groupName": "csv", - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3332,11 +4949,9 @@ def _delete_alertgroups_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id + if username is not None: + _path_params["username"] = username # process the query parameters - if group_name is not None: - - _query_params.append(("groupName", group_name)) - # process the header parameters # process the form parameters # process the body parameter @@ -3350,7 +4965,7 @@ def _delete_alertgroups_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3364,12 +4979,11 @@ def _delete_alertgroups_serialize( ) @validate_call - def delete_alertrules( + def delete_http_check( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3379,19 +4993,17 @@ def delete_alertrules( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertRulesResponse: - """delete_alertrules + ) -> HttpCheckResponse: + """delete_http_check - Delete alert rules. + Delete http check. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param alert_name: Name of the alert rules that should be deleted (required) - :type alert_name: List[str] + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3414,11 +5026,10 @@ def delete_alertrules( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertrules_serialize( - group_name=group_name, + _param = self._delete_http_check_serialize( instance_id=instance_id, project_id=project_id, - alert_name=alert_name, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3426,8 +5037,9 @@ def delete_alertrules( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertRulesResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3437,12 +5049,11 @@ def delete_alertrules( ).data @validate_call - def delete_alertrules_with_http_info( + def delete_http_check_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3452,19 +5063,17 @@ def delete_alertrules_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertRulesResponse]: - """delete_alertrules + ) -> ApiResponse[HttpCheckResponse]: + """delete_http_check - Delete alert rules. + Delete http check. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param alert_name: Name of the alert rules that should be deleted (required) - :type alert_name: List[str] + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3487,11 +5096,10 @@ def delete_alertrules_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertrules_serialize( - group_name=group_name, + _param = self._delete_http_check_serialize( instance_id=instance_id, project_id=project_id, - alert_name=alert_name, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3499,8 +5107,9 @@ def delete_alertrules_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertRulesResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3510,12 +5119,11 @@ def delete_alertrules_with_http_info( ) @validate_call - def delete_alertrules_without_preload_content( + def delete_http_check_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - alert_name: Annotated[List[StrictStr], Field(description="Name of the alert rules that should be deleted")], + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3526,18 +5134,16 @@ def delete_alertrules_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alertrules + """delete_http_check - Delete alert rules. + Delete http check. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param alert_name: Name of the alert rules that should be deleted (required) - :type alert_name: List[str] + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3560,11 +5166,10 @@ def delete_alertrules_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_alertrules_serialize( - group_name=group_name, + _param = self._delete_http_check_serialize( instance_id=instance_id, project_id=project_id, - alert_name=alert_name, + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3572,18 +5177,18 @@ def delete_alertrules_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertRulesResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_alertrules_serialize( + def _delete_http_check_serialize( self, - group_name, instance_id, project_id, - alert_name, + id, _request_auth, _content_type, _headers, @@ -3592,9 +5197,7 @@ def _delete_alertrules_serialize( _host = None - _collection_formats: Dict[str, str] = { - "alertName": "csv", - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3604,17 +5207,13 @@ def _delete_alertrules_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: - _path_params["projectId"] = project_id - # process the query parameters - if alert_name is not None: - - _query_params.append(("alertName", alert_name)) - + _path_params["projectId"] = project_id + if id is not None: + _path_params["id"] = id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -3628,7 +5227,7 @@ def _delete_alertrules_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/http-checks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3642,11 +5241,10 @@ def _delete_alertrules_serialize( ) @validate_call - def delete_credentials( + def delete_instance( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3656,17 +5254,15 @@ def delete_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Message: - """delete_credentials + ) -> InstanceResponse: + """delete_instance - Delete technical credentials. + Delete instance. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3689,10 +5285,9 @@ def delete_credentials( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_serialize( + _param = self._delete_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3700,10 +5295,8 @@ def delete_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Message", + "202": "InstanceResponse", "403": "PermissionDenied", - "404": "Message", - "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3713,11 +5306,10 @@ def delete_credentials( ).data @validate_call - def delete_credentials_with_http_info( + def delete_instance_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3727,17 +5319,15 @@ def delete_credentials_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Message]: - """delete_credentials + ) -> ApiResponse[InstanceResponse]: + """delete_instance - Delete technical credentials. + Delete instance. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3760,10 +5350,9 @@ def delete_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_serialize( + _param = self._delete_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3771,10 +5360,8 @@ def delete_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Message", + "202": "InstanceResponse", "403": "PermissionDenied", - "404": "Message", - "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3784,11 +5371,10 @@ def delete_credentials_with_http_info( ) @validate_call - def delete_credentials_without_preload_content( + def delete_instance_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3799,16 +5385,14 @@ def delete_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_credentials + """delete_instance - Delete technical credentials. + Delete instance. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3831,10 +5415,9 @@ def delete_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_serialize( + _param = self._delete_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3842,19 +5425,16 @@ def delete_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Message", + "202": "InstanceResponse", "403": "PermissionDenied", - "404": "Message", - "500": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_credentials_serialize( + def _delete_instance_serialize( self, instance_id, project_id, - username, _request_auth, _content_type, _headers, @@ -3877,8 +5457,6 @@ def _delete_credentials_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if username is not None: - _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -3893,7 +5471,7 @@ def _delete_credentials_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3907,11 +5485,11 @@ def _delete_credentials_serialize( ) @validate_call - def delete_credentials_remote_write_config( + def delete_logs_alertgroup( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3921,17 +5499,17 @@ def delete_credentials_remote_write_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CredentialsRemoteWriteDeleteResponse: - """delete_credentials_remote_write_config + ) -> AlertGroupsResponse: + """delete_logs_alertgroup - Delete remote write config for credentials. + Delete logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3954,10 +5532,10 @@ def delete_credentials_remote_write_config( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_remote_write_config_serialize( + _param = self._delete_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3965,11 +5543,10 @@ def delete_credentials_remote_write_config( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteDeleteResponse", - "400": "Error", + "202": "AlertGroupsResponse", + "400": "Message", "403": "PermissionDenied", "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -3979,11 +5556,11 @@ def delete_credentials_remote_write_config( ).data @validate_call - def delete_credentials_remote_write_config_with_http_info( + def delete_logs_alertgroup_with_http_info( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3993,17 +5570,17 @@ def delete_credentials_remote_write_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CredentialsRemoteWriteDeleteResponse]: - """delete_credentials_remote_write_config + ) -> ApiResponse[AlertGroupsResponse]: + """delete_logs_alertgroup - Delete remote write config for credentials. + Delete logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4026,10 +5603,10 @@ def delete_credentials_remote_write_config_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_remote_write_config_serialize( + _param = self._delete_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4037,11 +5614,10 @@ def delete_credentials_remote_write_config_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteDeleteResponse", - "400": "Error", + "202": "AlertGroupsResponse", + "400": "Message", "403": "PermissionDenied", "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4051,11 +5627,11 @@ def delete_credentials_remote_write_config_with_http_info( ) @validate_call - def delete_credentials_remote_write_config_without_preload_content( + def delete_logs_alertgroup_without_preload_content( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4066,16 +5642,16 @@ def delete_credentials_remote_write_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_credentials_remote_write_config + """delete_logs_alertgroup - Delete remote write config for credentials. + Delete logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4098,10 +5674,10 @@ def delete_credentials_remote_write_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_credentials_remote_write_config_serialize( + _param = self._delete_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4109,20 +5685,19 @@ def delete_credentials_remote_write_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteDeleteResponse", - "400": "Error", + "202": "AlertGroupsResponse", + "400": "Message", "403": "PermissionDenied", "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_credentials_remote_write_config_serialize( + def _delete_logs_alertgroup_serialize( self, + group_name, instance_id, project_id, - username, _request_auth, _content_type, _headers, @@ -4141,12 +5716,12 @@ def _delete_credentials_remote_write_config_serialize( _body_params: Optional[bytes] = None # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if username is not None: - _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -4161,7 +5736,7 @@ def _delete_credentials_remote_write_config_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups/{groupName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4175,9 +5750,10 @@ def _delete_credentials_remote_write_config_serialize( ) @validate_call - def delete_instance( + def delete_scrape_config( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -4188,13 +5764,15 @@ def delete_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> InstanceResponse: - """delete_instance + ) -> DeleteScrapeConfigResponse: + """delete_scrape_config - Delete instance. + Delete scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -4219,8 +5797,9 @@ def delete_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._delete_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4229,8 +5808,9 @@ def delete_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "InstanceResponse", + "202": "DeleteScrapeConfigResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4240,9 +5820,10 @@ def delete_instance( ).data @validate_call - def delete_instance_with_http_info( + def delete_scrape_config_with_http_info( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -4253,13 +5834,15 @@ def delete_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[InstanceResponse]: - """delete_instance + ) -> ApiResponse[DeleteScrapeConfigResponse]: + """delete_scrape_config - Delete instance. + Delete scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -4284,8 +5867,9 @@ def delete_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._delete_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4294,8 +5878,9 @@ def delete_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "InstanceResponse", + "202": "DeleteScrapeConfigResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4305,9 +5890,10 @@ def delete_instance_with_http_info( ) @validate_call - def delete_instance_without_preload_content( + def delete_scrape_config_without_preload_content( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -4319,12 +5905,14 @@ def delete_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_instance + """delete_scrape_config - Delete instance. + Delete scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -4349,8 +5937,9 @@ def delete_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._delete_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4359,15 +5948,17 @@ def delete_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "InstanceResponse", + "202": "DeleteScrapeConfigResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_instance_serialize( + def _delete_scrape_config_serialize( self, instance_id, + job_name, project_id, _request_auth, _content_type, @@ -4389,6 +5980,8 @@ def _delete_instance_serialize( # process the path parameters if instance_id is not None: _path_params["instanceId"] = instance_id + if job_name is not None: + _path_params["jobName"] = job_name if project_id is not None: _path_params["projectId"] = project_id # process the query parameters @@ -4405,7 +5998,7 @@ def _delete_instance_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4419,11 +6012,11 @@ def _delete_instance_serialize( ) @validate_call - def delete_logs_alertgroup( + def get_alert_config_receiver( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4433,17 +6026,17 @@ def delete_logs_alertgroup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupsResponse: - """delete_logs_alertgroup + ) -> Receiver: + """get_alert_config_receiver - Delete logs alert group config. + Get alert config receivers. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4466,10 +6059,10 @@ def delete_logs_alertgroup( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_alert_config_receiver_serialize( instance_id=instance_id, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4477,8 +6070,7 @@ def delete_logs_alertgroup( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Receiver", "403": "PermissionDenied", "404": "Message", } @@ -4490,11 +6082,11 @@ def delete_logs_alertgroup( ).data @validate_call - def delete_logs_alertgroup_with_http_info( + def get_alert_config_receiver_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4504,17 +6096,17 @@ def delete_logs_alertgroup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupsResponse]: - """delete_logs_alertgroup + ) -> ApiResponse[Receiver]: + """get_alert_config_receiver - Delete logs alert group config. + Get alert config receivers. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4537,10 +6129,10 @@ def delete_logs_alertgroup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_alert_config_receiver_serialize( instance_id=instance_id, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4548,8 +6140,7 @@ def delete_logs_alertgroup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Receiver", "403": "PermissionDenied", "404": "Message", } @@ -4561,11 +6152,11 @@ def delete_logs_alertgroup_with_http_info( ) @validate_call - def delete_logs_alertgroup_without_preload_content( + def get_alert_config_receiver_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4576,16 +6167,16 @@ def delete_logs_alertgroup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_logs_alertgroup + """get_alert_config_receiver - Delete logs alert group config. + Get alert config receivers. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4608,10 +6199,10 @@ def delete_logs_alertgroup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_alert_config_receiver_serialize( instance_id=instance_id, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4619,19 +6210,18 @@ def delete_logs_alertgroup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "AlertGroupsResponse", - "400": "Message", + "200": "Receiver", "403": "PermissionDenied", "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_logs_alertgroup_serialize( + def _get_alert_config_receiver_serialize( self, - group_name, instance_id, project_id, + receiver, _request_auth, _content_type, _headers, @@ -4650,12 +6240,12 @@ def _delete_logs_alertgroup_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id + if receiver is not None: + _path_params["receiver"] = receiver # process the query parameters # process the header parameters # process the form parameters @@ -4669,8 +6259,8 @@ def _delete_logs_alertgroup_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups/{groupName}", + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4684,11 +6274,11 @@ def _delete_logs_alertgroup_serialize( ) @validate_call - def delete_scrape_config( + def get_alert_config_route( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4698,17 +6288,17 @@ def delete_scrape_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeleteScrapeConfigResponse: - """delete_scrape_config + ) -> AlertConfigRouteResponse: + """get_alert_config_route - Delete scrape config. + Get alert receiver for route. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4731,10 +6321,10 @@ def delete_scrape_config( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_scrape_config_serialize( + _param = self._get_alert_config_route_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4742,9 +6332,8 @@ def delete_scrape_config( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "DeleteScrapeConfigResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4754,11 +6343,11 @@ def delete_scrape_config( ).data @validate_call - def delete_scrape_config_with_http_info( + def get_alert_config_route_with_http_info( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4768,17 +6357,17 @@ def delete_scrape_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeleteScrapeConfigResponse]: - """delete_scrape_config + ) -> ApiResponse[AlertConfigRouteResponse]: + """get_alert_config_route - Delete scrape config. + Get alert receiver for route. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4801,10 +6390,10 @@ def delete_scrape_config_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_scrape_config_serialize( + _param = self._get_alert_config_route_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4812,9 +6401,8 @@ def delete_scrape_config_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "DeleteScrapeConfigResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4824,11 +6412,11 @@ def delete_scrape_config_with_http_info( ) @validate_call - def delete_scrape_config_without_preload_content( + def get_alert_config_route_without_preload_content( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, + receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4839,16 +6427,16 @@ def delete_scrape_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_scrape_config + """get_alert_config_route - Delete scrape config. + Get alert receiver for route. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str + :param receiver: (required) + :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4871,10 +6459,10 @@ def delete_scrape_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_scrape_config_serialize( + _param = self._get_alert_config_route_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, + receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4882,18 +6470,17 @@ def delete_scrape_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "DeleteScrapeConfigResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_scrape_config_serialize( + def _get_alert_config_route_serialize( self, instance_id, - job_name, project_id, + receiver, _request_auth, _content_type, _headers, @@ -4914,10 +6501,10 @@ def _delete_scrape_config_serialize( # process the path parameters if instance_id is not None: _path_params["instanceId"] = instance_id - if job_name is not None: - _path_params["jobName"] = job_name if project_id is not None: _path_params["projectId"] = project_id + if receiver is not None: + _path_params["receiver"] = receiver # process the query parameters # process the header parameters # process the form parameters @@ -4931,8 +6518,8 @@ def _delete_scrape_config_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}", + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4946,11 +6533,10 @@ def _delete_scrape_config_serialize( ) @validate_call - def get_alert_config_receiver( + def get_alert_configs( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4960,17 +6546,15 @@ def get_alert_config_receiver( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Receiver: - """get_alert_config_receiver + ) -> GetAlertConfigsResponse: + """get_alert_configs - Get alert config receivers. + Get alert config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4993,10 +6577,9 @@ def get_alert_config_receiver( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_receiver_serialize( + _param = self._get_alert_configs_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5004,9 +6587,8 @@ def get_alert_config_receiver( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Receiver", + "200": "GetAlertConfigsResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5016,11 +6598,10 @@ def get_alert_config_receiver( ).data @validate_call - def get_alert_config_receiver_with_http_info( + def get_alert_configs_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5030,17 +6611,15 @@ def get_alert_config_receiver_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Receiver]: - """get_alert_config_receiver + ) -> ApiResponse[GetAlertConfigsResponse]: + """get_alert_configs - Get alert config receivers. + Get alert config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5063,10 +6642,9 @@ def get_alert_config_receiver_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_receiver_serialize( + _param = self._get_alert_configs_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5074,9 +6652,8 @@ def get_alert_config_receiver_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Receiver", + "200": "GetAlertConfigsResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5086,11 +6663,10 @@ def get_alert_config_receiver_with_http_info( ) @validate_call - def get_alert_config_receiver_without_preload_content( + def get_alert_configs_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5101,16 +6677,14 @@ def get_alert_config_receiver_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_alert_config_receiver + """get_alert_configs - Get alert config receivers. + Get alert config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5133,10 +6707,9 @@ def get_alert_config_receiver_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_receiver_serialize( + _param = self._get_alert_configs_serialize( instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5144,18 +6717,16 @@ def get_alert_config_receiver_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Receiver", + "200": "GetAlertConfigsResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_alert_config_receiver_serialize( + def _get_alert_configs_serialize( self, instance_id, project_id, - receiver, _request_auth, _content_type, _headers, @@ -5178,8 +6749,6 @@ def _get_alert_config_receiver_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if receiver is not None: - _path_params["receiver"] = receiver # process the query parameters # process the header parameters # process the form parameters @@ -5194,7 +6763,7 @@ def _get_alert_config_receiver_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5208,11 +6777,11 @@ def _get_alert_config_receiver_serialize( ) @validate_call - def get_alert_config_route( + def get_alertgroup( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5222,17 +6791,17 @@ def get_alert_config_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertConfigRouteResponse: - """get_alert_config_route + ) -> AlertGroupResponse: + """get_alertgroup - Get alert receiver for route. + Get alert group. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5255,10 +6824,10 @@ def get_alert_config_route( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_route_serialize( + _param = self._get_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5266,8 +6835,10 @@ def get_alert_config_route( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5277,11 +6848,11 @@ def get_alert_config_route( ).data @validate_call - def get_alert_config_route_with_http_info( + def get_alertgroup_with_http_info( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5291,17 +6862,17 @@ def get_alert_config_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertConfigRouteResponse]: - """get_alert_config_route + ) -> ApiResponse[AlertGroupResponse]: + """get_alertgroup - Get alert receiver for route. + Get alert group. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5324,10 +6895,10 @@ def get_alert_config_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_route_serialize( + _param = self._get_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5335,8 +6906,10 @@ def get_alert_config_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5346,11 +6919,11 @@ def get_alert_config_route_with_http_info( ) @validate_call - def get_alert_config_route_without_preload_content( + def get_alertgroup_without_preload_content( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, - receiver: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5361,16 +6934,16 @@ def get_alert_config_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_alert_config_route + """get_alertgroup - Get alert receiver for route. + Get alert group. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param receiver: (required) - :type receiver: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5393,10 +6966,10 @@ def get_alert_config_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_config_route_serialize( + _param = self._get_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, - receiver=receiver, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5404,17 +6977,19 @@ def get_alert_config_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_alert_config_route_serialize( + def _get_alertgroup_serialize( self, + group_name, instance_id, project_id, - receiver, _request_auth, _content_type, _headers, @@ -5433,12 +7008,12 @@ def _get_alert_config_route_serialize( _body_params: Optional[bytes] = None # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if receiver is not None: - _path_params["receiver"] = receiver # process the query parameters # process the header parameters # process the form parameters @@ -5453,7 +7028,7 @@ def _get_alert_config_route_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5467,10 +7042,11 @@ def _get_alert_config_route_serialize( ) @validate_call - def get_alert_configs( + def get_credentials( self, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5480,15 +7056,17 @@ def get_alert_configs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAlertConfigsResponse: - """get_alert_configs + ) -> GetCredentialsResponse: + """get_credentials - Get alert config. + Get single technical credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5511,9 +7089,10 @@ def get_alert_configs( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_configs_serialize( + _param = self._get_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5521,8 +7100,9 @@ def get_alert_configs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAlertConfigsResponse", + "200": "GetCredentialsResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5532,10 +7112,11 @@ def get_alert_configs( ).data @validate_call - def get_alert_configs_with_http_info( + def get_credentials_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5545,15 +7126,17 @@ def get_alert_configs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAlertConfigsResponse]: - """get_alert_configs + ) -> ApiResponse[GetCredentialsResponse]: + """get_credentials - Get alert config. + Get single technical credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5576,9 +7159,10 @@ def get_alert_configs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_configs_serialize( + _param = self._get_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5586,8 +7170,9 @@ def get_alert_configs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAlertConfigsResponse", + "200": "GetCredentialsResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5597,10 +7182,11 @@ def get_alert_configs_with_http_info( ) @validate_call - def get_alert_configs_without_preload_content( + def get_credentials_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5611,14 +7197,16 @@ def get_alert_configs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_alert_configs + """get_credentials - Get alert config. + Get single technical credentials. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5641,9 +7229,10 @@ def get_alert_configs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_configs_serialize( + _param = self._get_credentials_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5651,16 +7240,18 @@ def get_alert_configs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAlertConfigsResponse", + "200": "GetCredentialsResponse", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_alert_configs_serialize( + def _get_credentials_serialize( self, instance_id, project_id, + username, _request_auth, _content_type, _headers, @@ -5683,6 +7274,8 @@ def _get_alert_configs_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id + if username is not None: + _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -5697,7 +7290,7 @@ def _get_alert_configs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5711,11 +7304,11 @@ def _get_alert_configs_serialize( ) @validate_call - def get_alertgroup( + def get_credentials_remote_write_config( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5725,17 +7318,17 @@ def get_alertgroup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupResponse: - """get_alertgroup + ) -> CredentialsRemoteWriteConfig: + """get_credentials_remote_write_config - Get alert group. + Get remote write config. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5758,10 +7351,10 @@ def get_alertgroup( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alertgroup_serialize( - group_name=group_name, + _param = self._get_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5769,10 +7362,10 @@ def get_alertgroup( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "CredentialsRemoteWriteConfig", "403": "PermissionDenied", "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5782,11 +7375,11 @@ def get_alertgroup( ).data @validate_call - def get_alertgroup_with_http_info( + def get_credentials_remote_write_config_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5796,17 +7389,17 @@ def get_alertgroup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupResponse]: - """get_alertgroup + ) -> ApiResponse[CredentialsRemoteWriteConfig]: + """get_credentials_remote_write_config - Get alert group. + Get remote write config. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5829,10 +7422,10 @@ def get_alertgroup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alertgroup_serialize( - group_name=group_name, + _param = self._get_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5840,10 +7433,10 @@ def get_alertgroup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "CredentialsRemoteWriteConfig", "403": "PermissionDenied", "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -5853,11 +7446,11 @@ def get_alertgroup_with_http_info( ) @validate_call - def get_alertgroup_without_preload_content( + def get_credentials_remote_write_config_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, + username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5868,16 +7461,16 @@ def get_alertgroup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_alertgroup + """get_credentials_remote_write_config - Get alert group. + Get remote write config. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str + :param username: (required) + :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5900,10 +7493,10 @@ def get_alertgroup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_alertgroup_serialize( - group_name=group_name, + _param = self._get_credentials_remote_write_config_serialize( instance_id=instance_id, project_id=project_id, + username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5911,19 +7504,19 @@ def get_alertgroup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "CredentialsRemoteWriteConfig", "403": "PermissionDenied", "404": "Message", + "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_alertgroup_serialize( + def _get_credentials_remote_write_config_serialize( self, - group_name, instance_id, project_id, + username, _request_auth, _content_type, _headers, @@ -5942,12 +7535,12 @@ def _get_alertgroup_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id + if username is not None: + _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -5962,7 +7555,7 @@ def _get_alertgroup_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5976,11 +7569,10 @@ def _get_alertgroup_serialize( ) @validate_call - def get_credentials( + def get_grafana_configs( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5990,17 +7582,15 @@ def get_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetCredentialsResponse: - """get_credentials + ) -> GrafanaConfigs: + """get_grafana_configs - Get single technical credentials. + Get grafana config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6023,10 +7613,9 @@ def get_credentials( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_serialize( + _param = self._get_grafana_configs_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6034,9 +7623,8 @@ def get_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialsResponse", + "200": "GrafanaConfigs", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6046,11 +7634,10 @@ def get_credentials( ).data @validate_call - def get_credentials_with_http_info( + def get_grafana_configs_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6060,17 +7647,15 @@ def get_credentials_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetCredentialsResponse]: - """get_credentials + ) -> ApiResponse[GrafanaConfigs]: + """get_grafana_configs - Get single technical credentials. + Get grafana config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6093,10 +7678,9 @@ def get_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_serialize( + _param = self._get_grafana_configs_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6104,9 +7688,8 @@ def get_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialsResponse", + "200": "GrafanaConfigs", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6116,11 +7699,10 @@ def get_credentials_with_http_info( ) @validate_call - def get_credentials_without_preload_content( + def get_grafana_configs_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6131,16 +7713,14 @@ def get_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_credentials + """get_grafana_configs - Get single technical credentials. + Get grafana config. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6163,10 +7743,9 @@ def get_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_serialize( + _param = self._get_grafana_configs_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6174,18 +7753,16 @@ def get_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialsResponse", + "200": "GrafanaConfigs", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_credentials_serialize( + def _get_grafana_configs_serialize( self, instance_id, project_id, - username, _request_auth, _content_type, _headers, @@ -6208,8 +7785,6 @@ def _get_credentials_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if username is not None: - _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -6224,7 +7799,7 @@ def _get_credentials_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/grafana-configs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6238,11 +7813,10 @@ def _get_credentials_serialize( ) @validate_call - def get_credentials_remote_write_config( + def get_instance( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6252,17 +7826,15 @@ def get_credentials_remote_write_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CredentialsRemoteWriteConfig: - """get_credentials_remote_write_config + ) -> GetInstanceResponse: + """get_instance - Get remote write config. + Get instance information. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6285,10 +7857,9 @@ def get_credentials_remote_write_config( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_remote_write_config_serialize( + _param = self._get_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6296,10 +7867,8 @@ def get_credentials_remote_write_config( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteConfig", + "200": "GetInstanceResponse", "403": "PermissionDenied", - "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6309,11 +7878,10 @@ def get_credentials_remote_write_config( ).data @validate_call - def get_credentials_remote_write_config_with_http_info( + def get_instance_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6323,17 +7891,15 @@ def get_credentials_remote_write_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CredentialsRemoteWriteConfig]: - """get_credentials_remote_write_config + ) -> ApiResponse[GetInstanceResponse]: + """get_instance - Get remote write config. + Get instance information. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6356,10 +7922,9 @@ def get_credentials_remote_write_config_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_remote_write_config_serialize( + _param = self._get_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6367,10 +7932,8 @@ def get_credentials_remote_write_config_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteConfig", + "200": "GetInstanceResponse", "403": "PermissionDenied", - "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6380,11 +7943,10 @@ def get_credentials_remote_write_config_with_http_info( ) @validate_call - def get_credentials_remote_write_config_without_preload_content( + def get_instance_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, - username: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6395,16 +7957,14 @@ def get_credentials_remote_write_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_credentials_remote_write_config + """get_instance - Get remote write config. + Get instance information. :param instance_id: (required) :type instance_id: str :param project_id: (required) :type project_id: str - :param username: (required) - :type username: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6427,10 +7987,9 @@ def get_credentials_remote_write_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_credentials_remote_write_config_serialize( + _param = self._get_instance_serialize( instance_id=instance_id, project_id=project_id, - username=username, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6438,19 +7997,16 @@ def get_credentials_remote_write_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CredentialsRemoteWriteConfig", + "200": "GetInstanceResponse", "403": "PermissionDenied", - "404": "Message", - "502": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_credentials_remote_write_config_serialize( + def _get_instance_serialize( self, instance_id, project_id, - username, _request_auth, _content_type, _headers, @@ -6473,8 +8029,6 @@ def _get_credentials_remote_write_config_serialize( _path_params["instanceId"] = instance_id if project_id is not None: _path_params["projectId"] = project_id - if username is not None: - _path_params["username"] = username # process the query parameters # process the header parameters # process the form parameters @@ -6489,7 +8043,7 @@ def _get_credentials_remote_write_config_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits", + resource_path="/v1/projects/{projectId}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6503,8 +8057,9 @@ def _get_credentials_remote_write_config_serialize( ) @validate_call - def get_grafana_configs( + def get_logs_alertgroup( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -6516,11 +8071,13 @@ def get_grafana_configs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GrafanaConfigs: - """get_grafana_configs + ) -> AlertGroupResponse: + """get_logs_alertgroup - Get grafana config. + Get logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -6547,7 +8104,8 @@ def get_grafana_configs( :return: Returns the result object. """ # noqa: E501 - _param = self._get_grafana_configs_serialize( + _param = self._get_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6557,8 +8115,10 @@ def get_grafana_configs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GrafanaConfigs", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6568,8 +8128,9 @@ def get_grafana_configs( ).data @validate_call - def get_grafana_configs_with_http_info( + def get_logs_alertgroup_with_http_info( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -6581,11 +8142,13 @@ def get_grafana_configs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GrafanaConfigs]: - """get_grafana_configs + ) -> ApiResponse[AlertGroupResponse]: + """get_logs_alertgroup - Get grafana config. + Get logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -6612,7 +8175,8 @@ def get_grafana_configs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_grafana_configs_serialize( + _param = self._get_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6622,8 +8186,10 @@ def get_grafana_configs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GrafanaConfigs", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -6633,8 +8199,9 @@ def get_grafana_configs_with_http_info( ) @validate_call - def get_grafana_configs_without_preload_content( + def get_logs_alertgroup_without_preload_content( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -6647,10 +8214,12 @@ def get_grafana_configs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_grafana_configs + """get_logs_alertgroup - Get grafana config. + Get logs alert group config. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -6677,7 +8246,8 @@ def get_grafana_configs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_grafana_configs_serialize( + _param = self._get_logs_alertgroup_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6687,14 +8257,17 @@ def get_grafana_configs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GrafanaConfigs", + "200": "AlertGroupResponse", + "400": "Message", "403": "PermissionDenied", + "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_grafana_configs_serialize( + def _get_logs_alertgroup_serialize( self, + group_name, instance_id, project_id, _request_auth, @@ -6715,6 +8288,8 @@ def _get_grafana_configs_serialize( _body_params: Optional[bytes] = None # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: @@ -6733,7 +8308,7 @@ def _get_grafana_configs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/grafana-configs", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups/{groupName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6747,7 +8322,7 @@ def _get_grafana_configs_serialize( ) @validate_call - def get_instance( + def get_logs_configs( self, instance_id: StrictStr, project_id: StrictStr, @@ -6760,10 +8335,10 @@ def get_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetInstanceResponse: - """get_instance + ) -> LogsConfigResponse: + """get_logs_configs - Get instance information. + Get logs configuration. :param instance_id: (required) :type instance_id: str @@ -6791,7 +8366,7 @@ def get_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._get_logs_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6801,7 +8376,7 @@ def get_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "LogsConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -6812,7 +8387,7 @@ def get_instance( ).data @validate_call - def get_instance_with_http_info( + def get_logs_configs_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -6825,10 +8400,10 @@ def get_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetInstanceResponse]: - """get_instance + ) -> ApiResponse[LogsConfigResponse]: + """get_logs_configs - Get instance information. + Get logs configuration. :param instance_id: (required) :type instance_id: str @@ -6856,7 +8431,7 @@ def get_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._get_logs_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6866,7 +8441,7 @@ def get_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "LogsConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -6877,7 +8452,7 @@ def get_instance_with_http_info( ) @validate_call - def get_instance_without_preload_content( + def get_logs_configs_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -6891,9 +8466,9 @@ def get_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_instance + """get_logs_configs - Get instance information. + Get logs configuration. :param instance_id: (required) :type instance_id: str @@ -6921,7 +8496,7 @@ def get_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._get_logs_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -6931,13 +8506,13 @@ def get_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "LogsConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_instance_serialize( + def _get_logs_configs_serialize( self, instance_id, project_id, @@ -6977,7 +8552,7 @@ def _get_instance_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-configs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6991,9 +8566,8 @@ def _get_instance_serialize( ) @validate_call - def get_logs_alertgroup( + def get_metrics_storage_retention( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -7005,13 +8579,11 @@ def get_logs_alertgroup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupResponse: - """get_logs_alertgroup + ) -> GetMetricsStorageRetentionResponse: + """get_metrics_storage_retention - Get logs alert group config. + Get metric storage retention time. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -7038,8 +8610,7 @@ def get_logs_alertgroup( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_metrics_storage_retention_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7049,10 +8620,8 @@ def get_logs_alertgroup( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "GetMetricsStorageRetentionResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7062,9 +8631,8 @@ def get_logs_alertgroup( ).data @validate_call - def get_logs_alertgroup_with_http_info( + def get_metrics_storage_retention_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -7076,13 +8644,11 @@ def get_logs_alertgroup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupResponse]: - """get_logs_alertgroup + ) -> ApiResponse[GetMetricsStorageRetentionResponse]: + """get_metrics_storage_retention - Get logs alert group config. + Get metric storage retention time. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -7109,8 +8675,7 @@ def get_logs_alertgroup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_metrics_storage_retention_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7120,10 +8685,8 @@ def get_logs_alertgroup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "GetMetricsStorageRetentionResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -7133,9 +8696,8 @@ def get_logs_alertgroup_with_http_info( ) @validate_call - def get_logs_alertgroup_without_preload_content( + def get_metrics_storage_retention_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -7148,12 +8710,10 @@ def get_logs_alertgroup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_logs_alertgroup + """get_metrics_storage_retention - Get logs alert group config. + Get metric storage retention time. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -7180,8 +8740,7 @@ def get_logs_alertgroup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_alertgroup_serialize( - group_name=group_name, + _param = self._get_metrics_storage_retention_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7191,17 +8750,14 @@ def get_logs_alertgroup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupResponse", - "400": "Message", + "200": "GetMetricsStorageRetentionResponse", "403": "PermissionDenied", - "404": "Message", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_alertgroup_serialize( + def _get_metrics_storage_retention_serialize( self, - group_name, instance_id, project_id, _request_auth, @@ -7222,8 +8778,6 @@ def _get_logs_alertgroup_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: @@ -7242,7 +8796,7 @@ def _get_logs_alertgroup_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-alertgroups/{groupName}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7256,9 +8810,10 @@ def _get_logs_alertgroup_serialize( ) @validate_call - def get_logs_configs( + def get_scrape_config( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7269,13 +8824,15 @@ def get_logs_configs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LogsConfigResponse: - """get_logs_configs + ) -> GetScrapeConfigResponse: + """get_scrape_config - Get logs configuration. + Get scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7300,8 +8857,9 @@ def get_logs_configs( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_configs_serialize( + _param = self._get_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7310,7 +8868,7 @@ def get_logs_configs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LogsConfigResponse", + "200": "GetScrapeConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7321,9 +8879,10 @@ def get_logs_configs( ).data @validate_call - def get_logs_configs_with_http_info( + def get_scrape_config_with_http_info( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7334,13 +8893,15 @@ def get_logs_configs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LogsConfigResponse]: - """get_logs_configs + ) -> ApiResponse[GetScrapeConfigResponse]: + """get_scrape_config - Get logs configuration. + Get scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7365,8 +8926,9 @@ def get_logs_configs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_configs_serialize( + _param = self._get_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7375,7 +8937,7 @@ def get_logs_configs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LogsConfigResponse", + "200": "GetScrapeConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7386,9 +8948,10 @@ def get_logs_configs_with_http_info( ) @validate_call - def get_logs_configs_without_preload_content( + def get_scrape_config_without_preload_content( self, instance_id: StrictStr, + job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7400,12 +8963,14 @@ def get_logs_configs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_logs_configs + """get_scrape_config - Get logs configuration. + Get scrape config. :param instance_id: (required) :type instance_id: str + :param job_name: (required) + :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7430,8 +8995,9 @@ def get_logs_configs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_logs_configs_serialize( + _param = self._get_scrape_config_serialize( instance_id=instance_id, + job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7440,15 +9006,16 @@ def get_logs_configs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LogsConfigResponse", + "200": "GetScrapeConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_logs_configs_serialize( + def _get_scrape_config_serialize( self, instance_id, + job_name, project_id, _request_auth, _content_type, @@ -7470,6 +9037,8 @@ def _get_logs_configs_serialize( # process the path parameters if instance_id is not None: _path_params["instanceId"] = instance_id + if job_name is not None: + _path_params["jobName"] = job_name if project_id is not None: _path_params["projectId"] = project_id # process the query parameters @@ -7486,7 +9055,7 @@ def _get_logs_configs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/logs-configs", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7500,7 +9069,7 @@ def _get_logs_configs_serialize( ) @validate_call - def get_metrics_storage_retention( + def get_traces_configs( self, instance_id: StrictStr, project_id: StrictStr, @@ -7513,10 +9082,10 @@ def get_metrics_storage_retention( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetMetricsStorageRetentionResponse: - """get_metrics_storage_retention + ) -> TracesConfigResponse: + """get_traces_configs - Get metric storage retention time. + Get traces config. :param instance_id: (required) :type instance_id: str @@ -7544,7 +9113,7 @@ def get_metrics_storage_retention( :return: Returns the result object. """ # noqa: E501 - _param = self._get_metrics_storage_retention_serialize( + _param = self._get_traces_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7554,7 +9123,7 @@ def get_metrics_storage_retention( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsStorageRetentionResponse", + "200": "TracesConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7565,7 +9134,7 @@ def get_metrics_storage_retention( ).data @validate_call - def get_metrics_storage_retention_with_http_info( + def get_traces_configs_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -7578,10 +9147,10 @@ def get_metrics_storage_retention_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetMetricsStorageRetentionResponse]: - """get_metrics_storage_retention + ) -> ApiResponse[TracesConfigResponse]: + """get_traces_configs - Get metric storage retention time. + Get traces config. :param instance_id: (required) :type instance_id: str @@ -7609,7 +9178,7 @@ def get_metrics_storage_retention_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_metrics_storage_retention_serialize( + _param = self._get_traces_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7619,7 +9188,7 @@ def get_metrics_storage_retention_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsStorageRetentionResponse", + "200": "TracesConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7630,7 +9199,7 @@ def get_metrics_storage_retention_with_http_info( ) @validate_call - def get_metrics_storage_retention_without_preload_content( + def get_traces_configs_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -7644,9 +9213,9 @@ def get_metrics_storage_retention_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_metrics_storage_retention + """get_traces_configs - Get metric storage retention time. + Get traces config. :param instance_id: (required) :type instance_id: str @@ -7674,7 +9243,7 @@ def get_metrics_storage_retention_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_metrics_storage_retention_serialize( + _param = self._get_traces_configs_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -7684,13 +9253,13 @@ def get_metrics_storage_retention_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsStorageRetentionResponse", + "200": "TracesConfigResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_metrics_storage_retention_serialize( + def _get_traces_configs_serialize( self, instance_id, project_id, @@ -7730,7 +9299,7 @@ def _get_metrics_storage_retention_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/traces-configs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7744,10 +9313,9 @@ def _get_metrics_storage_retention_serialize( ) @validate_call - def get_scrape_config( + def list_acl( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7758,15 +9326,13 @@ def get_scrape_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetScrapeConfigResponse: - """get_scrape_config + ) -> ListACLResponse: + """list_acl - Get scrape config. + Get acl for instance. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7791,9 +9357,8 @@ def get_scrape_config( :return: Returns the result object. """ # noqa: E501 - _param = self._get_scrape_config_serialize( + _param = self._list_acl_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7802,7 +9367,7 @@ def get_scrape_config( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetScrapeConfigResponse", + "200": "ListACLResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7813,10 +9378,9 @@ def get_scrape_config( ).data @validate_call - def get_scrape_config_with_http_info( + def list_acl_with_http_info( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7827,15 +9391,13 @@ def get_scrape_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetScrapeConfigResponse]: - """get_scrape_config + ) -> ApiResponse[ListACLResponse]: + """list_acl - Get scrape config. + Get acl for instance. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7860,9 +9422,8 @@ def get_scrape_config_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_scrape_config_serialize( + _param = self._list_acl_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7871,7 +9432,7 @@ def get_scrape_config_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetScrapeConfigResponse", + "200": "ListACLResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7882,10 +9443,9 @@ def get_scrape_config_with_http_info( ) @validate_call - def get_scrape_config_without_preload_content( + def list_acl_without_preload_content( self, instance_id: StrictStr, - job_name: StrictStr, project_id: StrictStr, _request_timeout: Union[ None, @@ -7897,14 +9457,12 @@ def get_scrape_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_scrape_config + """list_acl - Get scrape config. + Get acl for instance. :param instance_id: (required) :type instance_id: str - :param job_name: (required) - :type job_name: str :param project_id: (required) :type project_id: str :param _request_timeout: timeout setting for this request. If one @@ -7929,9 +9487,8 @@ def get_scrape_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_scrape_config_serialize( + _param = self._list_acl_serialize( instance_id=instance_id, - job_name=job_name, project_id=project_id, _request_auth=_request_auth, _content_type=_content_type, @@ -7940,16 +9497,15 @@ def get_scrape_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetScrapeConfigResponse", + "200": "ListACLResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_scrape_config_serialize( + def _list_acl_serialize( self, instance_id, - job_name, project_id, _request_auth, _content_type, @@ -7971,8 +9527,6 @@ def _get_scrape_config_serialize( # process the path parameters if instance_id is not None: _path_params["instanceId"] = instance_id - if job_name is not None: - _path_params["jobName"] = job_name if project_id is not None: _path_params["projectId"] = project_id # process the query parameters @@ -7989,7 +9543,7 @@ def _get_scrape_config_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acl", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8003,7 +9557,7 @@ def _get_scrape_config_serialize( ) @validate_call - def get_traces_configs( + def list_alert_config_receivers( self, instance_id: StrictStr, project_id: StrictStr, @@ -8016,10 +9570,10 @@ def get_traces_configs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TracesConfigResponse: - """get_traces_configs + ) -> AlertConfigReceiversResponse: + """list_alert_config_receivers - Get traces config. + Get alert config receivers. :param instance_id: (required) :type instance_id: str @@ -8047,7 +9601,7 @@ def get_traces_configs( :return: Returns the result object. """ # noqa: E501 - _param = self._get_traces_configs_serialize( + _param = self._list_alert_config_receivers_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8057,7 +9611,7 @@ def get_traces_configs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TracesConfigResponse", + "200": "AlertConfigReceiversResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8068,7 +9622,7 @@ def get_traces_configs( ).data @validate_call - def get_traces_configs_with_http_info( + def list_alert_config_receivers_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -8081,10 +9635,10 @@ def get_traces_configs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TracesConfigResponse]: - """get_traces_configs + ) -> ApiResponse[AlertConfigReceiversResponse]: + """list_alert_config_receivers - Get traces config. + Get alert config receivers. :param instance_id: (required) :type instance_id: str @@ -8112,7 +9666,7 @@ def get_traces_configs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_traces_configs_serialize( + _param = self._list_alert_config_receivers_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8122,7 +9676,7 @@ def get_traces_configs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TracesConfigResponse", + "200": "AlertConfigReceiversResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8133,7 +9687,7 @@ def get_traces_configs_with_http_info( ) @validate_call - def get_traces_configs_without_preload_content( + def list_alert_config_receivers_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -8147,9 +9701,9 @@ def get_traces_configs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_traces_configs + """list_alert_config_receivers - Get traces config. + Get alert config receivers. :param instance_id: (required) :type instance_id: str @@ -8177,7 +9731,7 @@ def get_traces_configs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_traces_configs_serialize( + _param = self._list_alert_config_receivers_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8187,13 +9741,13 @@ def get_traces_configs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TracesConfigResponse", + "200": "AlertConfigReceiversResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_traces_configs_serialize( + def _list_alert_config_receivers_serialize( self, instance_id, project_id, @@ -8233,7 +9787,7 @@ def _get_traces_configs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/traces-configs", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8247,7 +9801,7 @@ def _get_traces_configs_serialize( ) @validate_call - def list_acl( + def list_alert_config_routes( self, instance_id: StrictStr, project_id: StrictStr, @@ -8260,10 +9814,10 @@ def list_acl( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListACLResponse: - """list_acl + ) -> AlertConfigRouteResponse: + """list_alert_config_routes - Get acl for instance. + Get alert config route. :param instance_id: (required) :type instance_id: str @@ -8291,7 +9845,7 @@ def list_acl( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acl_serialize( + _param = self._list_alert_config_routes_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8301,7 +9855,7 @@ def list_acl( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8312,7 +9866,7 @@ def list_acl( ).data @validate_call - def list_acl_with_http_info( + def list_alert_config_routes_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -8325,10 +9879,10 @@ def list_acl_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListACLResponse]: - """list_acl + ) -> ApiResponse[AlertConfigRouteResponse]: + """list_alert_config_routes - Get acl for instance. + Get alert config route. :param instance_id: (required) :type instance_id: str @@ -8356,7 +9910,7 @@ def list_acl_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acl_serialize( + _param = self._list_alert_config_routes_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8366,7 +9920,7 @@ def list_acl_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8377,7 +9931,7 @@ def list_acl_with_http_info( ) @validate_call - def list_acl_without_preload_content( + def list_alert_config_routes_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -8391,9 +9945,9 @@ def list_acl_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_acl + """list_alert_config_routes - Get acl for instance. + Get alert config route. :param instance_id: (required) :type instance_id: str @@ -8421,7 +9975,7 @@ def list_acl_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acl_serialize( + _param = self._list_alert_config_routes_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8431,13 +9985,13 @@ def list_acl_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLResponse", + "200": "AlertConfigRouteResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_acl_serialize( + def _list_alert_config_routes_serialize( self, instance_id, project_id, @@ -8477,7 +10031,7 @@ def _list_acl_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acl", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8491,7 +10045,7 @@ def _list_acl_serialize( ) @validate_call - def list_alert_config_receivers( + def list_alertgroups( self, instance_id: StrictStr, project_id: StrictStr, @@ -8504,10 +10058,10 @@ def list_alert_config_receivers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertConfigReceiversResponse: - """list_alert_config_receivers + ) -> AlertGroupsResponse: + """list_alertgroups - Get alert config receivers. + Get alert groups. :param instance_id: (required) :type instance_id: str @@ -8535,7 +10089,7 @@ def list_alert_config_receivers( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_receivers_serialize( + _param = self._list_alertgroups_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8545,7 +10099,8 @@ def list_alert_config_receivers( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigReceiversResponse", + "200": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8556,7 +10111,7 @@ def list_alert_config_receivers( ).data @validate_call - def list_alert_config_receivers_with_http_info( + def list_alertgroups_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -8569,10 +10124,10 @@ def list_alert_config_receivers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertConfigReceiversResponse]: - """list_alert_config_receivers + ) -> ApiResponse[AlertGroupsResponse]: + """list_alertgroups - Get alert config receivers. + Get alert groups. :param instance_id: (required) :type instance_id: str @@ -8600,7 +10155,7 @@ def list_alert_config_receivers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_receivers_serialize( + _param = self._list_alertgroups_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8610,7 +10165,8 @@ def list_alert_config_receivers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigReceiversResponse", + "200": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8621,7 +10177,7 @@ def list_alert_config_receivers_with_http_info( ) @validate_call - def list_alert_config_receivers_without_preload_content( + def list_alertgroups_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -8635,9 +10191,9 @@ def list_alert_config_receivers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_alert_config_receivers + """list_alertgroups - Get alert config receivers. + Get alert groups. :param instance_id: (required) :type instance_id: str @@ -8665,7 +10221,7 @@ def list_alert_config_receivers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_receivers_serialize( + _param = self._list_alertgroups_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8675,13 +10231,14 @@ def list_alert_config_receivers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigReceiversResponse", + "200": "AlertGroupsResponse", + "400": "Error", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_alert_config_receivers_serialize( + def _list_alertgroups_serialize( self, instance_id, project_id, @@ -8721,7 +10278,7 @@ def _list_alert_config_receivers_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8735,8 +10292,9 @@ def _list_alert_config_receivers_serialize( ) @validate_call - def list_alert_config_routes( + def list_alertrules( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -8748,11 +10306,13 @@ def list_alert_config_routes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertConfigRouteResponse: - """list_alert_config_routes + ) -> AlertRulesResponse: + """list_alertrules - Get alert config route. + Get alert rules. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -8779,7 +10339,8 @@ def list_alert_config_routes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_routes_serialize( + _param = self._list_alertrules_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8789,7 +10350,7 @@ def list_alert_config_routes( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertRulesResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8800,8 +10361,9 @@ def list_alert_config_routes( ).data @validate_call - def list_alert_config_routes_with_http_info( + def list_alertrules_with_http_info( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -8813,11 +10375,13 @@ def list_alert_config_routes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertConfigRouteResponse]: - """list_alert_config_routes + ) -> ApiResponse[AlertRulesResponse]: + """list_alertrules - Get alert config route. + Get alert rules. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -8844,7 +10408,8 @@ def list_alert_config_routes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_routes_serialize( + _param = self._list_alertrules_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8854,7 +10419,7 @@ def list_alert_config_routes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertRulesResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8865,8 +10430,9 @@ def list_alert_config_routes_with_http_info( ) @validate_call - def list_alert_config_routes_without_preload_content( + def list_alertrules_without_preload_content( self, + group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -8879,10 +10445,12 @@ def list_alert_config_routes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_alert_config_routes + """list_alertrules - Get alert config route. + Get alert rules. + :param group_name: (required) + :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -8909,7 +10477,8 @@ def list_alert_config_routes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alert_config_routes_serialize( + _param = self._list_alertrules_serialize( + group_name=group_name, instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -8919,14 +10488,15 @@ def list_alert_config_routes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertConfigRouteResponse", + "200": "AlertRulesResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_alert_config_routes_serialize( + def _list_alertrules_serialize( self, + group_name, instance_id, project_id, _request_auth, @@ -8947,6 +10517,8 @@ def _list_alert_config_routes_serialize( _body_params: Optional[bytes] = None # process the path parameters + if group_name is not None: + _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: @@ -8965,7 +10537,7 @@ def _list_alert_config_routes_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8979,7 +10551,7 @@ def _list_alert_config_routes_serialize( ) @validate_call - def list_alertgroups( + def list_cert_checks( self, instance_id: StrictStr, project_id: StrictStr, @@ -8992,10 +10564,10 @@ def list_alertgroups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertGroupsResponse: - """list_alertgroups + ) -> CertCheckResponse: + """list_cert_checks - Get alert groups. + Get all cert checks configured. :param instance_id: (required) :type instance_id: str @@ -9023,7 +10595,7 @@ def list_alertgroups( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertgroups_serialize( + _param = self._list_cert_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9033,8 +10605,7 @@ def list_alertgroups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9045,7 +10616,7 @@ def list_alertgroups( ).data @validate_call - def list_alertgroups_with_http_info( + def list_cert_checks_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -9058,10 +10629,10 @@ def list_alertgroups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertGroupsResponse]: - """list_alertgroups + ) -> ApiResponse[CertCheckResponse]: + """list_cert_checks - Get alert groups. + Get all cert checks configured. :param instance_id: (required) :type instance_id: str @@ -9089,7 +10660,7 @@ def list_alertgroups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertgroups_serialize( + _param = self._list_cert_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9099,8 +10670,7 @@ def list_alertgroups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9111,7 +10681,7 @@ def list_alertgroups_with_http_info( ) @validate_call - def list_alertgroups_without_preload_content( + def list_cert_checks_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -9125,9 +10695,9 @@ def list_alertgroups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_alertgroups + """list_cert_checks - Get alert groups. + Get all cert checks configured. :param instance_id: (required) :type instance_id: str @@ -9155,7 +10725,7 @@ def list_alertgroups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertgroups_serialize( + _param = self._list_cert_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9165,14 +10735,13 @@ def list_alertgroups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertGroupsResponse", - "400": "Error", + "200": "CertCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_alertgroups_serialize( + def _list_cert_checks_serialize( self, instance_id, project_id, @@ -9212,7 +10781,7 @@ def _list_alertgroups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/cert-checks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9226,9 +10795,8 @@ def _list_alertgroups_serialize( ) @validate_call - def list_alertrules( + def list_credentials( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -9240,13 +10808,11 @@ def list_alertrules( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlertRulesResponse: - """list_alertrules + ) -> ListCredentialsResponse: + """list_credentials - Get alert rules. + Get all technical user credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -9273,8 +10839,7 @@ def list_alertrules( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertrules_serialize( - group_name=group_name, + _param = self._list_credentials_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9284,7 +10849,7 @@ def list_alertrules( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertRulesResponse", + "201": "ListCredentialsResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9295,9 +10860,8 @@ def list_alertrules( ).data @validate_call - def list_alertrules_with_http_info( + def list_credentials_with_http_info( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -9309,13 +10873,11 @@ def list_alertrules_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlertRulesResponse]: - """list_alertrules + ) -> ApiResponse[ListCredentialsResponse]: + """list_credentials - Get alert rules. + Get all technical user credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -9342,8 +10904,7 @@ def list_alertrules_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertrules_serialize( - group_name=group_name, + _param = self._list_credentials_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9353,7 +10914,7 @@ def list_alertrules_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertRulesResponse", + "201": "ListCredentialsResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9364,9 +10925,8 @@ def list_alertrules_with_http_info( ) @validate_call - def list_alertrules_without_preload_content( + def list_credentials_without_preload_content( self, - group_name: StrictStr, instance_id: StrictStr, project_id: StrictStr, _request_timeout: Union[ @@ -9379,12 +10939,10 @@ def list_alertrules_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_alertrules + """list_credentials - Get alert rules. + Get all technical user credentials. - :param group_name: (required) - :type group_name: str :param instance_id: (required) :type instance_id: str :param project_id: (required) @@ -9411,8 +10969,7 @@ def list_alertrules_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_alertrules_serialize( - group_name=group_name, + _param = self._list_credentials_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9422,15 +10979,14 @@ def list_alertrules_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AlertRulesResponse", + "201": "ListCredentialsResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_alertrules_serialize( + def _list_credentials_serialize( self, - group_name, instance_id, project_id, _request_auth, @@ -9451,8 +11007,6 @@ def _list_alertrules_serialize( _body_params: Optional[bytes] = None # process the path parameters - if group_name is not None: - _path_params["groupName"] = group_name if instance_id is not None: _path_params["instanceId"] = instance_id if project_id is not None: @@ -9471,7 +11025,7 @@ def _list_alertrules_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/alertgroups/{groupName}/alertrules", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9485,7 +11039,7 @@ def _list_alertrules_serialize( ) @validate_call - def list_credentials( + def list_http_checks( self, instance_id: StrictStr, project_id: StrictStr, @@ -9498,10 +11052,10 @@ def list_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListCredentialsResponse: - """list_credentials + ) -> HttpCheckResponse: + """list_http_checks - Get all technical user credentials. + Get all http checks configured. :param instance_id: (required) :type instance_id: str @@ -9529,7 +11083,7 @@ def list_credentials( :return: Returns the result object. """ # noqa: E501 - _param = self._list_credentials_serialize( + _param = self._list_http_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9539,7 +11093,7 @@ def list_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ListCredentialsResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9550,7 +11104,7 @@ def list_credentials( ).data @validate_call - def list_credentials_with_http_info( + def list_http_checks_with_http_info( self, instance_id: StrictStr, project_id: StrictStr, @@ -9563,10 +11117,10 @@ def list_credentials_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListCredentialsResponse]: - """list_credentials + ) -> ApiResponse[HttpCheckResponse]: + """list_http_checks - Get all technical user credentials. + Get all http checks configured. :param instance_id: (required) :type instance_id: str @@ -9594,7 +11148,7 @@ def list_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_credentials_serialize( + _param = self._list_http_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9604,7 +11158,7 @@ def list_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ListCredentialsResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -9615,7 +11169,7 @@ def list_credentials_with_http_info( ) @validate_call - def list_credentials_without_preload_content( + def list_http_checks_without_preload_content( self, instance_id: StrictStr, project_id: StrictStr, @@ -9629,9 +11183,9 @@ def list_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_credentials + """list_http_checks - Get all technical user credentials. + Get all http checks configured. :param instance_id: (required) :type instance_id: str @@ -9659,7 +11213,7 @@ def list_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_credentials_serialize( + _param = self._list_http_checks_serialize( instance_id=instance_id, project_id=project_id, _request_auth=_request_auth, @@ -9669,13 +11223,13 @@ def list_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ListCredentialsResponse", + "200": "HttpCheckResponse", "403": "PermissionDenied", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_credentials_serialize( + def _list_http_checks_serialize( self, instance_id, project_id, @@ -9715,7 +11269,7 @@ def _list_credentials_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/credentials", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/http-checks", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/observability/src/stackit/observability/models/__init__.py b/services/observability/src/stackit/observability/models/__init__.py index 3b086777..726b7070 100644 --- a/services/observability/src/stackit/observability/models/__init__.py +++ b/services/observability/src/stackit/observability/models/__init__.py @@ -29,6 +29,10 @@ from stackit.observability.models.alert_rule_record import AlertRuleRecord from stackit.observability.models.alert_rules_response import AlertRulesResponse from stackit.observability.models.basic_auth import BasicAuth +from stackit.observability.models.cert_check_child_response import ( + CertCheckChildResponse, +) +from stackit.observability.models.cert_check_response import CertCheckResponse from stackit.observability.models.create_alert_config_receiver_payload import ( CreateAlertConfigReceiverPayload, ) @@ -53,12 +57,18 @@ from stackit.observability.models.create_alertrules_payload import ( CreateAlertrulesPayload, ) +from stackit.observability.models.create_cert_check_payload import ( + CreateCertCheckPayload, +) from stackit.observability.models.create_credentials_payload import ( CreateCredentialsPayload, ) from stackit.observability.models.create_credentials_response import ( CreateCredentialsResponse, ) +from stackit.observability.models.create_http_check_payload import ( + CreateHttpCheckPayload, +) from stackit.observability.models.create_instance_payload import CreateInstancePayload from stackit.observability.models.create_instance_response import CreateInstanceResponse from stackit.observability.models.create_logs_alertgroups_payload import ( @@ -110,6 +120,10 @@ ) from stackit.observability.models.grafana_configs import GrafanaConfigs from stackit.observability.models.grafana_oauth import GrafanaOauth +from stackit.observability.models.http_check_child_response import ( + HttpCheckChildResponse, +) +from stackit.observability.models.http_check_response import HttpCheckResponse from stackit.observability.models.http_service_sd import HTTPServiceSD from stackit.observability.models.inhibit_rules import InhibitRules from stackit.observability.models.instance import Instance diff --git a/services/observability/src/stackit/observability/models/cert_check_child_response.py b/services/observability/src/stackit/observability/models/cert_check_child_response.py new file mode 100644 index 00000000..5f6f5635 --- /dev/null +++ b/services/observability/src/stackit/observability/models/cert_check_child_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class CertCheckChildResponse(BaseModel): + """ + CertCheckChildResponse + """ # noqa: E501 + + id: Annotated[str, Field(min_length=1, strict=True)] + source: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["id", "source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CertCheckChildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CertCheckChildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "source": obj.get("source")}) + return _obj diff --git a/services/observability/src/stackit/observability/models/cert_check_response.py b/services/observability/src/stackit/observability/models/cert_check_response.py new file mode 100644 index 00000000..a9afeef6 --- /dev/null +++ b/services/observability/src/stackit/observability/models/cert_check_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + +from stackit.observability.models.cert_check_child_response import ( + CertCheckChildResponse, +) + + +class CertCheckResponse(BaseModel): + """ + CertCheckResponse + """ # noqa: E501 + + cert_checks: Annotated[List[CertCheckChildResponse], Field(max_length=100)] = Field(alias="certChecks") + message: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["certChecks", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CertCheckResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in cert_checks (list) + _items = [] + if self.cert_checks: + for _item in self.cert_checks: + if _item: + _items.append(_item.to_dict()) + _dict["certChecks"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CertCheckResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "certChecks": ( + [CertCheckChildResponse.from_dict(_item) for _item in obj["certChecks"]] + if obj.get("certChecks") is not None + else None + ), + "message": obj.get("message"), + } + ) + return _obj diff --git a/services/observability/src/stackit/observability/models/create_cert_check_payload.py b/services/observability/src/stackit/observability/models/create_cert_check_payload.py new file mode 100644 index 00000000..d7b9228e --- /dev/null +++ b/services/observability/src/stackit/observability/models/create_cert_check_payload.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class CreateCertCheckPayload(BaseModel): + """ + Cert check body. + """ # noqa: E501 + + source: Annotated[str, Field(strict=True, max_length=270)] = Field(description="cert to check") + __properties: ClassVar[List[str]] = ["source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCertCheckPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCertCheckPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"source": obj.get("source")}) + return _obj diff --git a/services/observability/src/stackit/observability/models/create_http_check_payload.py b/services/observability/src/stackit/observability/models/create_http_check_payload.py new file mode 100644 index 00000000..be4441e9 --- /dev/null +++ b/services/observability/src/stackit/observability/models/create_http_check_payload.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class CreateHttpCheckPayload(BaseModel): + """ + Http check body. + """ # noqa: E501 + + url: Annotated[str, Field(strict=True, max_length=400)] = Field(description="url to check") + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateHttpCheckPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateHttpCheckPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"url": obj.get("url")}) + return _obj diff --git a/services/observability/src/stackit/observability/models/http_check_child_response.py b/services/observability/src/stackit/observability/models/http_check_child_response.py new file mode 100644 index 00000000..92270922 --- /dev/null +++ b/services/observability/src/stackit/observability/models/http_check_child_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class HttpCheckChildResponse(BaseModel): + """ + HttpCheckChildResponse + """ # noqa: E501 + + id: Annotated[str, Field(min_length=1, strict=True)] + url: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["id", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpCheckChildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpCheckChildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "url": obj.get("url")}) + return _obj diff --git a/services/observability/src/stackit/observability/models/http_check_response.py b/services/observability/src/stackit/observability/models/http_check_response.py new file mode 100644 index 00000000..b6258d74 --- /dev/null +++ b/services/observability/src/stackit/observability/models/http_check_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + STACKIT Observability API + + API endpoints for Observability on STACKIT + + The version of the OpenAPI document: 1.1.1 + Contact: stackit-argus@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + +from stackit.observability.models.http_check_child_response import ( + HttpCheckChildResponse, +) + + +class HttpCheckResponse(BaseModel): + """ + HttpCheckResponse + """ # noqa: E501 + + http_checks: Annotated[List[HttpCheckChildResponse], Field(max_length=100)] = Field(alias="httpChecks") + message: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["httpChecks", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpCheckResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in http_checks (list) + _items = [] + if self.http_checks: + for _item in self.http_checks: + if _item: + _items.append(_item.to_dict()) + _dict["httpChecks"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpCheckResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "httpChecks": ( + [HttpCheckChildResponse.from_dict(_item) for _item in obj["httpChecks"]] + if obj.get("httpChecks") is not None + else None + ), + "message": obj.get("message"), + } + ) + return _obj From bbaa3e69911579f757d6bd10e33505ec5b9bc16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20H=C3=B6nle?= Date: Wed, 3 Sep 2025 07:27:12 +0200 Subject: [PATCH 2/2] add changelog entries --- CHANGELOG.md | 7 +++++-- services/observability/CHANGELOG.md | 3 +++ services/observability/pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cb5b8c2..49403c85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Release (2025-MM-DD) -- `observability`: [v0.9.2](services/observability/CHANGELOG.md#v092) - - **Feature:** Add `metrics_endpoint_url` attribute to `InstanceSensitiveData` model +- `observability`: + - [v0.10.0](services/observability/CHANGELOG.md#v0100) + - **Feature:** Add support for HTTP checks and cert checks + - [v0.9.2](services/observability/CHANGELOG.md#v092) + - **Feature:** Add `metrics_endpoint_url` attribute to `InstanceSensitiveData` model - `kms`: [v0.4.0](services/kms/CHANGELOG.md#v040) - Switch to API version `v1` of STACKIT KMS service (previously `v1beta`) - **Breaking Change:** Removal of deprecated `Backend` model diff --git a/services/observability/CHANGELOG.md b/services/observability/CHANGELOG.md index 0abd33b9..03fe44eb 100644 --- a/services/observability/CHANGELOG.md +++ b/services/observability/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.10.0 +- **Feature:** Add support for HTTP checks and cert checks + ## v0.9.2 - **Feature:** Add `metrics_endpoint_url` attribute to `InstanceSensitiveData` model diff --git a/services/observability/pyproject.toml b/services/observability/pyproject.toml index aae61497..69037e6d 100644 --- a/services/observability/pyproject.toml +++ b/services/observability/pyproject.toml @@ -3,7 +3,7 @@ name = "stackit-observability" [tool.poetry] name = "stackit-observability" -version = "v0.9.2" +version = "v0.10.0" authors = [ "STACKIT Developer Tools ", ]