addAssociation method

Inserts an association for the specified security policy.

This has billing implications. Projects in the hierarchy with effective hierarchical security policies will be automatically enrolled into Cloud Armor Enterprise if not already enrolled.

Use this API to modify Cloud Armor policies. Previously, alpha and beta versions of this API were used to modify firewall policies. This usage is now disabled for most organizations. Use firewallPolicies.addAssociation instead.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Operation> addAssociation(
  AddAssociationOrganizationSecurityPolicyRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_addAssociation case final addAssociation?) {
    return addAssociation(request);
  }
  throw UnsupportedError('addAssociation');
}