Search in sources :

Example 1 with ManagedGroupRef

use of org.pmiops.workbench.firecloud.model.ManagedGroupRef in project workbench by all-of-us.

the class FireCloudServiceImpl method createWorkspace.

@Override
public void createWorkspace(String projectName, String workspaceName) throws ApiException {
    WorkspacesApi workspacesApi = workspacesApiProvider.get();
    WorkspaceIngest workspaceIngest = new WorkspaceIngest();
    workspaceIngest.setName(workspaceName);
    workspaceIngest.setNamespace(projectName);
    // TODO: add concept of controlled auth domain.
    if (configProvider.get().firecloud.enforceRegistered) {
        ArrayList<ManagedGroupRef> authDomain = new ArrayList<ManagedGroupRef>();
        ManagedGroupRef registeredDomain = new ManagedGroupRef();
        registeredDomain.setMembersGroupName(configProvider.get().firecloud.registeredDomainName);
        authDomain.add(registeredDomain);
        workspaceIngest.setAuthorizationDomain(authDomain);
    }
    workspacesApi.createWorkspace(workspaceIngest);
}
Also used : WorkspaceIngest(org.pmiops.workbench.firecloud.model.WorkspaceIngest) ManagedGroupRef(org.pmiops.workbench.firecloud.model.ManagedGroupRef) WorkspacesApi(org.pmiops.workbench.firecloud.api.WorkspacesApi) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 WorkspacesApi (org.pmiops.workbench.firecloud.api.WorkspacesApi)1 ManagedGroupRef (org.pmiops.workbench.firecloud.model.ManagedGroupRef)1 WorkspaceIngest (org.pmiops.workbench.firecloud.model.WorkspaceIngest)1