Skip to main content

environments

Creates, updates, deletes, gets or lists a environments resource.

Overview

Nameenvironments
TypeResource
Idgoogle.apigee.environments

Fields

NameDatatypeDescription
namestringRequired. Name of the environment. Values must match the regular expression ^[.\\p{Alnum}-_]{1,255}$
descriptionstringOptional. Description of the environment.
apiProxyTypestringOptional. API Proxy type supported by the environment. The type can be set when creating the Environment and cannot be changed.
createdAtstringOutput only. Creation time of this environment as milliseconds since epoch.
deploymentTypestringOptional. Deployment type supported by the environment. The deployment type can be set when creating the environment and cannot be changed. When you enable archive deployment, you will be prevented from performing a subset of actions within the environment, including: Managing the deployment of API proxy or shared flow revisions Creating, updating, or deleting resource files * Creating, updating, or deleting target servers
displayNamestringOptional. Display name for this environment.
forwardProxyUristringOptional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied. To remove a forward proxy setting, update the field to an empty value. Note: At this time, PUT operations to add forwardProxyUri to an existing environment fail if the environment has nodeConfig set up. To successfully add the forwardProxyUri setting in this case, include the NodeConfig details with the request.
hasAttachedFlowHooksboolean
lastModifiedAtstringOutput only. Last modification time of this environment as milliseconds since epoch.
nodeConfigobjectNodeConfig for setting the min/max number of nodes associated with the environment.
propertiesobjectMessage for compatibility with legacy Edge specification for Java Properties object in JSON.
statestringOutput only. State of the environment. Values other than ACTIVE means the resource is not ready to use.
typestringOptional. EnvironmentType selected for the environment.

Methods

NameAccessible byRequired ParamsDescription
organizations_environments_getSELECTenvironmentsId, organizationsIdGets environment details.
organizations_environments_createINSERTorganizationsIdCreates an environment in an organization.
organizations_security_profiles_environments_createINSERTorganizationsId, securityProfilesIdCreateSecurityProfileEnvironmentAssociation creates profile environment association i.e. attaches environment to security profile.
organizations_environments_deleteDELETEenvironmentsId, organizationsIdDeletes an environment from an organization. Warning: You must delete all key value maps and key value entries before you delete an environment. Otherwise, if you re-create the environment the key value map entry operations will encounter encryption/decryption discrepancies.
organizations_security_profiles_environments_deleteDELETEenvironmentsId, organizationsId, securityProfilesIdDeleteSecurityProfileEnvironmentAssociation removes profile environment association i.e. detaches environment from security profile.
organizations_environments_updateREPLACEenvironmentsId, organizationsIdUpdates an existing environment. When updating properties, you must pass all existing properties to the API, even if they are not being changed. If you omit properties from the payload, the properties are removed. To get the current list of properties for the environment, use the Get Environment API. Note: Both PUT and POST methods are supported for updating an existing environment.
organizations_environments_modify_environmentEXECenvironmentsId, organizationsIdUpdates properties for an Apigee environment with patch semantics using a field mask. Note: Not supported for Apigee hybrid.
organizations_environments_subscribeEXECenvironmentsId, organizationsIdCreates a subscription for the environment's Pub/Sub topic. The server will assign a random name for this subscription. The "name" and "push_config" must not be specified.
organizations_environments_unsubscribeEXECenvironmentsId, organizationsIdDeletes a subscription for the environment's Pub/Sub topic.
organizations_security_profiles_environments_compute_environment_scoresEXECenvironmentsId, organizationsId, securityProfilesIdComputeEnvironmentScores calculates scores for requested time range for the specified security profile and environment.

SELECT examples

Gets environment details.

SELECT
name,
description,
apiProxyType,
createdAt,
deploymentType,
displayName,
forwardProxyUri,
hasAttachedFlowHooks,
lastModifiedAt,
nodeConfig,
properties,
state,
type
FROM google.apigee.environments
WHERE environmentsId = '{{ environmentsId }}'
AND organizationsId = '{{ organizationsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new environments resource.

/*+ create */
INSERT INTO google.apigee.environments (
organizationsId,
nodeConfig,
displayName,
description,
properties,
hasAttachedFlowHooks,
apiProxyType,
name,
deploymentType,
forwardProxyUri,
type
)
SELECT
'{{ organizationsId }}',
'{{ nodeConfig }}',
'{{ displayName }}',
'{{ description }}',
'{{ properties }}',
{{ hasAttachedFlowHooks }},
'{{ apiProxyType }}',
'{{ name }}',
'{{ deploymentType }}',
'{{ forwardProxyUri }}',
'{{ type }}'
;

REPLACE example

Replaces all fields in the specified environments resource.

/*+ update */
REPLACE google.apigee.environments
SET
nodeConfig = '{{ nodeConfig }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
properties = '{{ properties }}',
hasAttachedFlowHooks = true|false,
apiProxyType = '{{ apiProxyType }}',
name = '{{ name }}',
deploymentType = '{{ deploymentType }}',
forwardProxyUri = '{{ forwardProxyUri }}',
type = '{{ type }}'
WHERE
environmentsId = '{{ environmentsId }}'
AND organizationsId = '{{ organizationsId }}';

DELETE example

Deletes the specified environments resource.

/*+ delete */
DELETE FROM google.apigee.environments
WHERE environmentsId = '{{ environmentsId }}'
AND organizationsId = '{{ organizationsId }}';