code: public Observable<ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerSecurityAlertPolicyInner parameters) {
          return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerSecurityAlertPolicyInner>, ServerSecurityAlertPolicyInner>() {
              @Override
              public ServerSecurityAlertPolicyInner call(ServiceResponse<ServerSecurityAlertPolicyInner> response) {
                  return response.body();
              }
          });
      }
docs: Creates or updates a threat detection policy.
  
  @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  @param serverName The name of the server.
  @param parameters The server security alert policy.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the ServerSecurityAlertPolicyInner object