public CMARole create(String spaceId, CMARole role) {
    assertNotNull(spaceId, "spaceId");
    assertNotNull(role, "role");

    final CMASystem sys = role.getSystem();
    role.setSystem(null);

    try {
      return service.create(spaceId, role).blockingFirst();
    } finally {
      role.setSystem(sys);
    }
  }
public CMARole create ( String spaceId , CMARole role ) { assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( role , "role" ) ; final CMASystem sys = role . getSystem ( ) ; role . setSystem ( null ) ; try { return service . create ( spaceId , role ) . blockingFirst ( ) ; } finally { role . setSystem ( sys ) ; } }
Create a new role.
<p>
This method will override the configuration specified through
{@link CMAClient.Builder#setSpaceId(String)} and will ignore
{@link CMAClient.Builder#setEnvironmentId(String)}.

@param spaceId the space id to host the role.
@param role    the new role to be created.
@return the newly created role.
@throws IllegalArgumentException if space id is null.
@throws IllegalArgumentException if role is null.