This page applies to Apigee, but not to Apigee hybrid.
View
Apigee Edge documentation.
Apigee's Pay-as-you-go pricing attributes are based in part upon the environment types you attach to your Apigee instance. You can choose to add Base, Intermediate, or Comprehensive environments to your Pay-as-you-go organization at any time, tailoring a pricing scheme based on your feature and capacity needs. This topic explains how to upgrade or downgrade the type of an existing environment to add or remove feature capabilities and manage your Apigee Pay-as-you-go billing and resource usage.
Required roles and permissions
To get the permissions that you need to update a Pay-as-you-go environment type, ask your administrator to grant you the following IAM roles on the project:
-
Apigee Organization Admin (
apigee.organization.admin
) -
Apigee Environment Admin (
apigee.environment.admin
)
For more information about granting roles, see Manage access.
You might also be able to get the required permissions through custom roles or other predefined roles.
Update your environment type
You can update the type of an existing Pay-as-you-go environment using the Apigee UI in the Google Cloud console or using the API, as described in the following sections.
Apigee in Cloud console
To update the type of an existing Pay-as-you-go environment using the Apigee UI in the Google Cloud console:
- Open the Apigee page in the console.
- Select the project with the Pay-as-you-go organization and environments you want to update.
- Select Management > Environments to open the Environments list page.
- In the row for the environment you want to edit, click Actions and select Edit.
- In the Edit environment dialog, choose an option under Select environment type.
- Click Update to save your changes.
- To confirm the change in environment type, refresh the Environments list page.
Apigee API
To update the type of an existing Pay-as-you-go environment using the Apigee API, use the following command:
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME/environments/ENV_NAME?updateMask=type" \ -H "Authorization: Bearer $token" \ -X PATCH \ -H 'Content-Type: application/json' \ -d '{"type":"ENV_TYPE"}'
Where:
- ORG_NAME is the name of your Apigee Pay-as-you-go organization.
- ENV_NAME is the name of the Apigee environment to update.
- ENV_TYPE is the updated environment type. Options are
BASE
,INTERMEDIATE
, orCOMPREHENSIVE
.
For example, to upgrade a Base environment named test-env
to Comprehensive,
use the following command:
curl "https://apigee.googleapis.com/v1/organizations/my-org/environments/test-env?updateMask=type" \ -H "Authorization: Bearer $token" \ -X PATCH \ -H 'Content-Type: application/json' \ -d '{"type":"COMPREHENSIVE"}'
After the operation completes, use the following command to confirm the change in environment type:
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME/environments/ENV_NAME" -H "Authorization: Bearer $token"
This command returns the environment resource object, which includes the selected environment type.
Error reference
When upgrading or downgrading environment type, the operation will fail if the existing environment contains resources that are incompatible with the newly selected environment type. For more information on available features and limitations by environment type, see Comparison of environment types.
If the operation fails, you will see an error with the following format:
{ "error": { "code": "FAILED_PRECONDITION", "message": "environment type update invalid: ...<detailed message here >... :failed precondition", "status": "FAILED_PRECONDITION" } }
The following table summarizes possible error messages and potential steps you can take to resolve the issue and upgrade or downgrade the environment type:
Failure condition | Error message | Steps to resolve |
---|---|---|
Maximum number of environments per organization exceeded | cannot transfer active environments to INTERMEDIATE, will exceed limit
|
Delete one or more environments from your organization. |
Extensible proxy deployed in the environment | existing environment has an extensible API |
Undeploy the extensible proxy from the environment. |
Shared flow deployed in the environment | existing environment has a shared flow |
Undeploy the shared flow from the environment. |
Maximum number of proxy deployment units per environment per region | pdu count, 50, cannot exceed 20
|
Undeploy and delete shared flows or proxies from the environment. |
Add-ons enabled in the environment | Existing environment has an addon enabled |
Disable the add-ons in the environment. |
Multi-region support enabled in the environment | instance attachment count, 2, cannot exceed 1 for BASE environment
|
Delete the second instance attachment for the environment. |