## 6.2.1  Org Management Using the SAP BTP Command Line Interface (btp CLI)
The Cloud Foundry environment allows you to create polyglot cloud applications in Cloud Foundry. To manage the lifecycle of an org in the Cloud Foundry environment, use the accounts/environment-instance command in the btp CLI.
## Available Plans
To create a Cloud Foundry org in a subaccount, you use the Cloud Foundry Runtime service. The Cloud Foundry Runtime service offers the following plans for this purpose:
| Plan Name   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| standard    | This is an enterprise-grade plan that allows you to create an org in your Cloud Foundry environment to start developing polyglot cloud-native applications. By default, a Cloud Foundry org that is created with this plan does not have any application runtime. To assign application runtime, the global account admin must assign the Cloud Foundry Runtime service with the MEMORY plan to the subac- count so that the org has memory for its applications.                                                                                             |
| free        | Use this plan to try out the Cloud Foundry environment with- out an additional charge before switching to the standard plan that supports enterprise-grade productivity. By default, a Cloud Foundry org that is created with this plan is given a fixed application-runtime quota. There is no need to assign the Cloud Foundry Runtime service with the MEMORY plan to the subaccount as it will have no effect on the org quota. For more information about the free tier model for SAP BTP and its availability, see Using Free Service Plans [page 108]. |
| trial       | Use this plan to utilize your trial period.  Note                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
For more information, about the features that each plan offers, see Cloud Foundry Runtime on SAP Discovery Center.
## Command Reference for CRUD Operations
The btp CLI offers the following environment instance command actions to manage Cloud Foundry orgs in SAP BTP:
| Action   | Command                                                                   | Description                                                                          | Parameters                                                                                     | Additional Info   |
|----------|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-------------------|
| list     | btp list accounts/ environment- instance -- subaccount <SUBACCOUNT_ID>    | List all the Cloud Foundry orgs and other environment in- stances in a subac- count. | SUBACCOUNT_ID : The ID of the subac- count.                                                    |                   |
| get      | btp get accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> | Get the details of a specific Cloud Foundry org in a subaccount.                     | ID : The ID of the en- vironment instance to view. SUBACCOUNT_ID : The ID of the subac- count. |                   |
| Action   | Command                                                                                                                                                                                                                                                   | Description                                   | Parameters                                                                                                                                                                                                                                                                                                                                 | Additional Info                                                                                                                                                                       |
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| create   | btp create accounts/ environment- instance -- subaccount <SUBACCOUNT_ID> --display-name <DISPLAY_NAME> --service <SERVICE> -- plan <PLAN> -- environment cloudfoundry -- parameters "{\"instance_na me\":\"<ORG_NAM E>\"}"                                | Create a Cloud Foundry org in a sub- account. | SUBACCOUNT_ID : The ID of the subac- count in which to cre- ate the Cloud Foundry org. DISPLAY_NAME : The SAP BTP name of the environment instance. PLAN : Specify either standard or free as the value. ORG_NAME : The name of the org in the Cloud Foundry environment. Spaces are not allowed in the org name. Once the org is created, | For examples that show how to pass JSON parameters in the command line with different operat- ing systems and shells, see the Passing JSON Parameters on the CommandLine [page 2410]. |
|          |  Note If the logged-in region has mul- tiple landscapes, then you must specify the name of the landscape using the -- landscape pa- rameter in the command. You can obtain the valid values using the btp list accounts/ available- environment command. |                                               | you cannot change its name.                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                       |
| Action   | Command                                                                                    | Description                                           | Parameters                                                                                                                                           | Additional Info                                                                                                                                                                                                                                                             |
|----------|--------------------------------------------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| update   | btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> --plan <PLAN> | Update an existing Cloud Foundry org in a subaccount. | ID : The ID of the en- vironment instance to update SUBACCOUNT_ID : The ID of the subac- count. PLAN : Specify either standard or free as the value. | For the Cloud Foundry environment, you can use this command to change only the plan of an existing Cloud Foundry envi- ronment instance. In other words, update an org created with the free plan of the Cloud Foundry Runtime to the standard plan (not vice versa).      |
| update   | btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> --plan <PLAN> | Update an existing Cloud Foundry org in a subaccount. | ID : The ID of the en- vironment instance to update SUBACCOUNT_ID : The ID of the subac- count. PLAN : Specify either standard or free as the value. | Note Before updating the plan to standard , make sure that the MEMORY plan for the Cloud Foundry Runtime entitle- ment is assigned to your subac- count, and that you've assigned sufficient applica- tion runtime quota to cover the cur- rent workload in the subaccount. |
| delete   | btp delete accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID>               | Delete a Cloud Foundry org created in a subaccount.   | ID : The ID of the en- vironment instance to delete. SUBACCOUNT_ID : The ID of the subac- count where the envi- ronment instance ex- ists.           | The Cloud Foundry org and all its data will be lost.                                                                                                                                                                                                                        |
##  Note
You can obtain the subaccount ID by running btp list accounts/subaccount . Y ou can also target the subaccount using btp target --subaccount &lt;ID&gt; , and then omit the subaccount parameter from the rest of the commands.
## Adding and Removing Org Managers
You can also use the btp CLI to add or remove org managers.
| Action   | Command                                                                                                                                                                                                                                                                                                                                | Description                                                                                                                                                                             | Parameters                                                                                                                                                                  | Additional Info                                                                                                                                                                       |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| update   | For the default identity provider: btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> --plan <PLAN> --parameters "{\"usersToAdd\ ": [{\"id\":\"myUs erID\",\"email\ ":\"name@exampl e.com\"}]}" For a custom identity provider: btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> | Add one or more org managers to a Cloud Foundry org in a sub- account. usersToAdd adds the OrgManager role to the user, and, if it doesn't exist yet, it cre- ates the user in the org. | ID : The ID of the en- vironment instance for which to add org man- agers. SUBACCOUNT_ID : The ID of the subac- count. PLAN : Specify either standard or free as the value. | For examples that show how to pass JSON parameters in the command line with different operat- ing systems and shells, see the Passing JSON Parameters on the CommandLine [page 2410]. |
| Action   | Command                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Description                                                                                                                                                                         | Parameters                                                                                                                                                                   | Additional Info                                                                                                                                          |
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| update   | For the default identity provider: btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> --plan <PLAN> --parameters "{\"usersToRemo ve\": [{\"id\":\"myUs erID\",\"email\ ":\"name@exampl e.com\"}]}" For a custom identity provider: btp update accounts/ environment- instance <ID> --subaccount <SUBACCOUNT_ID> --plan <PLAN> --parameters "{\"usersToRemo ve\": [{\"id\":\"myUs erID\",\"email\ ":\"name@exampl e.com\",\"origi n\":\"<your | Remove one or more org managers from a Cloud Foundry org in a subaccount. usersToRemove re- moves the OrgMan- ager role from the user, but it doesn't remove the user from the org. | ID : The ID of the en- vironment instance for which to remove org managers. SUBACCOUNT_ID : The ID of the subac- count. PLAN : Specify either standard or free as the value. | To learn how to re- move a user from the Cloud Foundry org and the subaccount, see About User Man- agement in the Cloud Foundry Environment [page 2509]. |
## Related Information
Account Administration Using the SAP BTP Command Line Interface (btp CLI) [page 2401] About Roles in the Cloud Foundry Environment [page 2510] Org Administration Using the Cockpit [page 2512]
Managing Spaces [page 2519] About User Management in the Cloud Foundry Environment [page 2509]