public final ListAlertPoliciesPagedResponse listAlertPolicies(ProjectName name) {
    ListAlertPoliciesRequest request =
        ListAlertPoliciesRequest.newBuilder()
            .setName(name == null ? null : name.toString())
            .build();
    return listAlertPolicies(request);
  }
public final ListAlertPoliciesPagedResponse listAlertPolicies ( ProjectName name ) { ListAlertPoliciesRequest request = ListAlertPoliciesRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return listAlertPolicies ( request ) ; }
Lists the existing alerting policies for the project.

<p>Sample code:

<pre><code>
try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
ProjectName name = ProjectName.of("[PROJECT]");
for (AlertPolicy element : alertPolicyServiceClient.listAlertPolicies(name).iterateAll()) {
// doThingsWith(element);
}
}
</code></pre>

@param name The project whose alert policies are to be listed. The format is
<p>projects/[PROJECT_ID]
<p>Note that this field names the parent container in which the alerting policies to be
listed are stored. To retrieve a single alerting policy by name, use the
[GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] operation,
instead.
@throws com.google.api.gax.rpc.ApiException if the remote call fails