Search in sources :

Example 1 with BillingApi

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);
}
Also used : BillingApi(org.pmiops.workbench.firecloud.api.BillingApi)

Example 2 with BillingApi

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);
}
Also used : CreateRawlsBillingProjectFullRequest(org.pmiops.workbench.firecloud.model.CreateRawlsBillingProjectFullRequest) BillingApi(org.pmiops.workbench.firecloud.api.BillingApi)

Example 3 with BillingApi

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;
}
Also used : BillingApi(org.pmiops.workbench.firecloud.api.BillingApi) RequestScope(org.springframework.web.context.annotation.RequestScope) Bean(org.springframework.context.annotation.Bean)

Example 4 with BillingApi

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);
}
Also used : BillingApi(org.pmiops.workbench.firecloud.api.BillingApi)

Aggregations

BillingApi (org.pmiops.workbench.firecloud.api.BillingApi)4 CreateRawlsBillingProjectFullRequest (org.pmiops.workbench.firecloud.model.CreateRawlsBillingProjectFullRequest)1 Bean (org.springframework.context.annotation.Bean)1 RequestScope (org.springframework.web.context.annotation.RequestScope)1