public final void deleteAlertPolicy(String name) {

    DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest.newBuilder().setName(name).build();
    deleteAlertPolicy(request);
  }
public final void deleteAlertPolicy ( String name ) { DeleteAlertPolicyRequest request = DeleteAlertPolicyRequest . newBuilder ( ) . setName ( name ) . build ( ) ; deleteAlertPolicy ( request ) ; }
Deletes an alerting policy.

<p>Sample code:

<pre><code>
try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
AlertPolicyName name = AlertPolicyName.of("[PROJECT]", "[ALERT_POLICY]");
alertPolicyServiceClient.deleteAlertPolicy(name.toString());
}
</code></pre>

@param name The alerting policy to delete. The format is:
<p>projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
<p>For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy].
@throws com.google.api.gax.rpc.ApiException if the remote call fails