5252 RegionalApiEnableAlertManagerRequest ,
5353 RegionalApiEnableManagedAlertsRequest ,
5454 RegionalApiTriggerTestAlertRequest ,
55+ RegionalApiUpdateContactPointRequest ,
5556 RegionalApiUpdateDataSourceRequest ,
5657 Token ,
5758 UsageOverview ,
8788 marshal_RegionalApiEnableAlertManagerRequest ,
8889 marshal_RegionalApiEnableManagedAlertsRequest ,
8990 marshal_RegionalApiTriggerTestAlertRequest ,
91+ marshal_RegionalApiUpdateContactPointRequest ,
9092 marshal_RegionalApiUpdateDataSourceRequest ,
9193)
9294
@@ -1230,6 +1232,7 @@ async def create_contact_point(
12301232 region : Optional [ScwRegion ] = None ,
12311233 project_id : Optional [str ] = None ,
12321234 email : Optional [ContactPointEmail ] = None ,
1235+ receive_resolved_notifications : Optional [bool ] = None ,
12331236 ) -> ContactPoint :
12341237 """
12351238 Create a contact point.
@@ -1240,6 +1243,7 @@ async def create_contact_point(
12401243 :param project_id: ID of the Project to create the contact point in.
12411244 :param email: Email address of the contact point to create.
12421245 One-Of ('configuration'): at most one of 'email' could be set.
1246+ :param receive_resolved_notifications: Send an email notification when an alert is marked as resolved.
12431247 :return: :class:`ContactPoint <ContactPoint>`
12441248
12451249 Usage:
@@ -1259,6 +1263,7 @@ async def create_contact_point(
12591263 RegionalApiCreateContactPointRequest (
12601264 region = region ,
12611265 project_id = project_id ,
1266+ receive_resolved_notifications = receive_resolved_notifications ,
12621267 email = email ,
12631268 ),
12641269 self .client ,
@@ -1343,6 +1348,49 @@ async def list_contact_points_all(
13431348 },
13441349 )
13451350
1351+ async def update_contact_point (
1352+ self ,
1353+ * ,
1354+ region : Optional [ScwRegion ] = None ,
1355+ project_id : Optional [str ] = None ,
1356+ email : Optional [ContactPointEmail ] = None ,
1357+ receive_resolved_notifications : Optional [bool ] = None ,
1358+ ) -> ContactPoint :
1359+ """
1360+ :param region: Region to target. If none is passed will use default region from the config.
1361+ :param project_id: ID of the Project containing the contact point to update.
1362+ :param email: Email address of the contact point to update.
1363+ One-Of ('configuration'): at most one of 'email' could be set.
1364+ :param receive_resolved_notifications: Enable or disable notifications when alert is resolved.
1365+ :return: :class:`ContactPoint <ContactPoint>`
1366+
1367+ Usage:
1368+ ::
1369+
1370+ result = await api.update_contact_point()
1371+ """
1372+
1373+ param_region = validate_path_param (
1374+ "region" , region or self .client .default_region
1375+ )
1376+
1377+ res = self ._request (
1378+ "PATCH" ,
1379+ f"/cockpit/v1/regions/{ param_region } /alert-manager/contact-points" ,
1380+ body = marshal_RegionalApiUpdateContactPointRequest (
1381+ RegionalApiUpdateContactPointRequest (
1382+ region = region ,
1383+ project_id = project_id ,
1384+ receive_resolved_notifications = receive_resolved_notifications ,
1385+ email = email ,
1386+ ),
1387+ self .client ,
1388+ ),
1389+ )
1390+
1391+ self ._throw_on_error (res )
1392+ return unmarshal_ContactPoint (res .json ())
1393+
13461394 async def delete_contact_point (
13471395 self ,
13481396 * ,
0 commit comments