code: public EnvironmentInner createOrUpdate(String resourceGroupName, String labAccountName, String labName, String environmentSettingName, String environmentName, EnvironmentInner environment) {
          return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, environment).toBlocking().single().body();
      }
docs: Create or replace an existing Environment.
  
  @param resourceGroupName The name of the resource group.
  @param labAccountName The name of the lab Account.
  @param labName The name of the lab.
  @param environmentSettingName The name of the environment Setting.
  @param environmentName The name of the environment.
  @param environment Represents an environment instance
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the EnvironmentInner object if successful.