Os atributos de preços do modelo de pagamento por uso da Apigee são baseados, em parte, nos tipos de ambiente que você anexa à instância da Apigee. É possível adicionar a qualquer momento ambientes básicos, intermediários ou abrangentes à sua organização de pagamento por uso, adaptando um esquema de preços com base nas suas necessidades de recursos e capacidade. Neste tópico, explicamos como fazer upgrade ou downgrade do tipo de um ambiente que já existe para adicionar ou remover capabilities de recursos e gerenciar o faturamento e o uso de recursos do pagamento por uso.
Papéis e permissões necessárias
Para ter as permissões necessárias para atualizar um tipo de ambiente de pagamento por uso, peça ao administrador para conceder a você os seguintes papéis do IAM no projeto:
Administrador da organização da Apigee (apigee.organization.admin)
Administrador do ambiente Apigee (apigee.environment.admin)
É possível atualizar o tipo de um ambiente de pagamento por uso atual usando a IU da Apigee no console do Google Cloud
ou a API, conforme descrito nas seções a seguir.
Apigee no console do Cloud
Para atualizar o tipo de um ambiente de pagamento por uso atual usando a IU da Apigee no console do Google Cloud:
Ao fazer upgrade ou downgrade do tipo de ambiente, a operação falhará se o ambiente que já existe tiver recursos incompatíveis com o tipo de ambiente recém-selecionado. Para mais informações sobre recursos e limitações disponíveis por tipo de ambiente, consulte Comparação de tipos de ambiente.
Se a operação falhar, você verá um erro com o seguinte formato:
{
"error": {
"code": "FAILED_PRECONDITION",
"message": "environment type update invalid: ...<detailed message here >... :failed precondition",
"status": "FAILED_PRECONDITION"
}
}
A tabela a seguir resume as possíveis mensagens de erro e etapas que você pode seguir para resolver o problema e fazer upgrade ou downgrade do tipo de ambiente:
Condição de falha
Mensagem de erro
Etapas de resolução
Número máximo de ambientes por organização excedido
cannot transfer active environments to INTERMEDIATE, will exceed limit
cannot transfer active environments to BASE, will exceed limit
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eThis guide explains how to modify the type of an existing environment within Apigee's Pay-as-you-go pricing model to adjust features, capabilities, and resource usage.\u003c/p\u003e\n"],["\u003cp\u003eUpdating an environment type to Base, Intermediate, or Comprehensive can be done via the Apigee UI in the Google Cloud console or using the Apigee API.\u003c/p\u003e\n"],["\u003cp\u003eThe roles Apigee Organization Admin and Apigee Environment Admin are required to update environment types.\u003c/p\u003e\n"],["\u003cp\u003eErrors can occur during environment type changes if the environment has incompatible resources, such as extensible proxies, shared flows, or add-ons, which must be addressed prior to the environment type change.\u003c/p\u003e\n"],["\u003cp\u003eThis page applies to Apigee and not Apigee hybrid.\u003c/p\u003e\n"]]],[],null,["# Update Pay-as-you-go environment types\n\n*This page\napplies to **Apigee** , but not to **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nApigee's Pay-as-you-go pricing attributes are based in part upon the\n[environment types](/apigee/docs/api-platform/reference/pay-as-you-go-environment-types)\nyou attach to your [Apigee instance](/apigee/docs/api-platform/fundamentals/environments-working-with#environments-and-instances). You can choose to add [Base,](/apigee/docs/api-platform/reference/pay-as-you-go-environment-types#base-env) [Intermediate](/apigee/docs/api-platform/reference/pay-as-you-go-environment-types#int-env),\nor [Comprehensive](/apigee/docs/api-platform/reference/pay-as-you-go-environment-types#comp-env)\nenvironments to your Pay-as-you-go organization at any time, tailoring a pricing scheme based\non your feature and capacity needs. This topic explains how to upgrade or downgrade the *type* of an *existing* environment\nto add or remove feature capabilities and manage your Apigee Pay-as-you-go billing and resource usage.\n\nRequired roles and permissions\n------------------------------\n\n\nTo get the permissions that\nyou need to update a Pay-as-you-go environment type,\n\nask your administrator to grant you the\nfollowing IAM roles on the project:\n\n- Apigee Organization Admin (`apigee.organization.admin`)\n- Apigee Environment Admin (`apigee.environment.admin`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nUpdate your environment type\n----------------------------\n\nYou can update the type of an existing Pay-as-you-go environment using the Apigee UI in the Google Cloud console\nor using the API, as described in the following sections. \n\n### Apigee in Cloud console\n\nTo update the type of an existing Pay-as-you-go environment using the Apigee UI in the Google Cloud console:\n\n1. Open the **Apigee** page in the console.\n\n [Go to Apigee](https://cloud.google.com/console/apigee)\n2. Select the project with the Pay-as-you-go organization and environments you want to update.\n3. Select **Management \\\u003e Environments** to open the **Environments** list page.\n4. In the row for the environment you want to edit, click **Actions** more_vert and select **Edit**.\n5. In the **Edit environment** dialog, choose an option under **Select environment type**.\n6. Click **Update** to save your changes.\n7. To confirm the change in environment type, refresh the **Environments** list page.\n\n### Apigee API\n\nTo update the type of an existing Pay-as-you-go environment using the Apigee API,\nuse the following command: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME/environments/ENV_NAME?updateMask=type\" \\\n -H \"Authorization: Bearer $token\" \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -d '{\"type\":\"ENV_TYPE\"}'\n \n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003eORG_NAME\u003c/var\u003e is the name of your Apigee Pay-as-you-go organization.\n- \u003cvar translate=\"no\"\u003eENV_NAME\u003c/var\u003e is the name of the Apigee environment to update.\n- \u003cvar translate=\"no\"\u003eENV_TYPE\u003c/var\u003e is the updated environment type. Options are `BASE`, `INTERMEDIATE`, or `COMPREHENSIVE`.\n\nFor example, to upgrade a *Base* environment named `test-env` to *Comprehensive*,\nuse the following command: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/my-org/environments/test-env?updateMask=type\" \\\n -H \"Authorization: Bearer $token\" \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -d '{\"type\":\"COMPREHENSIVE\"}'\n \n```\n\nAfter the operation completes, use the following command to confirm the change in environment type: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG_NAME/environments/ENV_NAME\" -H \"Authorization: Bearer $token\"\n```\n\nThis command returns the [environment\nresource object](/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments#resource:-environment), which includes the selected environment type.\n\nError reference\n---------------\n\nWhen upgrading or downgrading environment type, the operation will fail if the existing environment\ncontains resources that are incompatible with the newly selected environment type. For more information\non available features and limitations by environment type, see [Comparison of environment types](/apigee/docs/api-platform/reference/pay-as-you-go-environment-types#compare-env-table).\n\nIf the operation fails, you will see an error with the following format: \n\n```\n {\n \"error\": {\n \"code\": \"FAILED_PRECONDITION\",\n \"message\": \"environment type update invalid: ...\u003cdetailed message here \u003e... :failed precondition\",\n \"status\": \"FAILED_PRECONDITION\"\n }\n }\n```\n\nThe following table summarizes possible error messages and potential steps you can take to resolve the issue\nand upgrade or downgrade the environment type:"]]