use of org.pmiops.workbench.firecloud.api.BillingApi in project workbench by all-of-us.
the class FireCloudServiceImpl method grantGoogleRoleToUser.
@Override
public void grantGoogleRoleToUser(String projectName, String role, String email) throws ApiException {
BillingApi billingApi = billingApiProvider.get();
billingApi.grantGoogleRoleToUser(projectName, role, email);
}
use of org.pmiops.workbench.firecloud.api.BillingApi in project workbench by all-of-us.
the class FireCloudServiceImpl method createAllOfUsBillingProject.
@Override
public void createAllOfUsBillingProject(String projectName) throws ApiException {
BillingApi billingApi = billingApiProvider.get();
CreateRawlsBillingProjectFullRequest request = new CreateRawlsBillingProjectFullRequest();
request.setBillingAccount("billingAccounts/" + configProvider.get().firecloud.billingAccountId);
request.setProjectName(projectName);
billingApi.createBillingProjectFull(request);
}
use of org.pmiops.workbench.firecloud.api.BillingApi in project workbench by all-of-us.
the class FireCloudConfig method billingApi.
@Bean
@RequestScope(proxyMode = ScopedProxyMode.DEFAULT)
public BillingApi billingApi(@Qualifier(ALL_OF_US_API_CLIENT) ApiClient apiClient) {
// Billing calls are made by the AllOfUs service account, rather than using the end user's
// credentials.
BillingApi api = new BillingApi();
api.setApiClient(apiClient);
return api;
}
use of org.pmiops.workbench.firecloud.api.BillingApi in project workbench by all-of-us.
the class FireCloudServiceImpl method addUserToBillingProject.
@Override
public void addUserToBillingProject(String email, String projectName) throws ApiException {
BillingApi billingApi = billingApiProvider.get();
billingApi.addUserToBillingProject(projectName, USER_FC_ROLE, email);
}
Aggregations