Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
Idgoogle.apigee.environments

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. Name of the environment. Values must match the regular expression ^[.\\p{Alnum}-_]{1,255}$
apiProxyTypestringOptional. API Proxy type supported by the environment. The type can be set when creating the Environment and cannot be changed.
clientIpResolutionConfigobjectOptional. The algorithm to resolve IP. This will affect Analytics, API Security, and other features that use the client ip. To remove a client ip resolution config, update the field to an empty value. Example: '{ "clientIpResolutionConfig" = {} }' For more information, see: https://cloud.google.com/apigee/docs/api-platform/system-administration/client-ip-resolution. (id: GoogleCloudApigeeV1EnvironmentClientIPResolutionConfig)
createdAtstring (int64)Output 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
descriptionstringOptional. Description of the environment.
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 only supported scheme is "http". 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
lastModifiedAtstring (int64)Output only. Last modification time of this environment as milliseconds since epoch.
nodeConfigobjectOptional. NodeConfig of the environment. (id: GoogleCloudApigeeV1NodeConfig)
propertiesobjectOptional. Key-value pairs that may be used for customizing the environment. (id: GoogleCloudApigeeV1Properties)
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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_getselectorganizationsId, environmentsIdGets environment details.
organizations_security_profiles_environments_createinsertorganizationsId, securityProfilesIdCreateSecurityProfileEnvironmentAssociation creates profile environment association i.e. attaches environment to security profile.
organizations_environments_createinsertorganizationsIdnameCreates an environment in an organization.
organizations_environments_update_environmentupdateorganizationsId, environmentsIdUpdates 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_updatereplaceorganizationsId, environmentsIdUpdates 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_security_profiles_environments_deletedeleteorganizationsId, securityProfilesId, environmentsIdDeleteSecurityProfileEnvironmentAssociation removes profile environment association i.e. detaches environment from security profile.
organizations_environments_deletedeleteorganizationsId, environmentsIdDeletes 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_environments_modify_environmentexecorganizationsId, environmentsIdupdateMaskUpdates properties for an Apigee environment with patch semantics using a field mask. Note: Not supported for Apigee hybrid.
organizations_environments_subscribeexecorganizationsId, environmentsIdCreates 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_unsubscribeexecorganizationsId, environmentsIdDeletes a subscription for the environment's Pub/Sub topic.
organizations_security_profiles_environments_compute_environment_scoresexecorganizationsId, securityProfilesId, environmentsIdComputeEnvironmentScores calculates scores for requested time range for the specified security profile and environment.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
organizationsIdstring
securityProfilesIdstring
namestring
updateMaskstring (google-fieldmask)

SELECT examples

Gets environment details.

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

INSERT examples

CreateSecurityProfileEnvironmentAssociation creates profile environment association i.e. attaches environment to security profile.

INSERT INTO google.apigee.environments (
data__name,
data__securityProfileRevisionId,
organizationsId,
securityProfilesId
)
SELECT
'{{ name }}',
'{{ securityProfileRevisionId }}',
'{{ organizationsId }}',
'{{ securityProfilesId }}'
RETURNING
name,
attachTime,
securityProfileRevisionId
;

UPDATE examples

Updates 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.

UPDATE google.apigee.environments
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__properties = '{{ properties }}',
data__displayName = '{{ displayName }}',
data__deploymentType = '{{ deploymentType }}',
data__apiProxyType = '{{ apiProxyType }}',
data__nodeConfig = '{{ nodeConfig }}',
data__forwardProxyUri = '{{ forwardProxyUri }}',
data__type = '{{ type }}',
data__hasAttachedFlowHooks = {{ hasAttachedFlowHooks }},
data__clientIpResolutionConfig = '{{ clientIpResolutionConfig }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
RETURNING
name,
apiProxyType,
clientIpResolutionConfig,
createdAt,
deploymentType,
description,
displayName,
forwardProxyUri,
hasAttachedFlowHooks,
lastModifiedAt,
nodeConfig,
properties,
state,
type;

REPLACE examples

Updates 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.

REPLACE google.apigee.environments
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__properties = '{{ properties }}',
data__displayName = '{{ displayName }}',
data__deploymentType = '{{ deploymentType }}',
data__apiProxyType = '{{ apiProxyType }}',
data__nodeConfig = '{{ nodeConfig }}',
data__forwardProxyUri = '{{ forwardProxyUri }}',
data__type = '{{ type }}',
data__hasAttachedFlowHooks = {{ hasAttachedFlowHooks }},
data__clientIpResolutionConfig = '{{ clientIpResolutionConfig }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
RETURNING
name,
apiProxyType,
clientIpResolutionConfig,
createdAt,
deploymentType,
description,
displayName,
forwardProxyUri,
hasAttachedFlowHooks,
lastModifiedAt,
nodeConfig,
properties,
state,
type;

DELETE examples

DeleteSecurityProfileEnvironmentAssociation removes profile environment association i.e. detaches environment from security profile.

DELETE FROM google.apigee.environments
WHERE organizationsId = '{{ organizationsId }}' --required
AND securityProfilesId = '{{ securityProfilesId }}' --required
AND environmentsId = '{{ environmentsId }}' --required;

Lifecycle Methods

Updates properties for an Apigee environment with patch semantics using a field mask. Note: Not supported for Apigee hybrid.

EXEC google.apigee.environments.organizations_environments_modify_environment 
@organizationsId='{{ organizationsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@updateMask='{{ updateMask }}'
@@json=
'{
"name": "{{ name }}",
"description": "{{ description }}",
"properties": "{{ properties }}",
"displayName": "{{ displayName }}",
"deploymentType": "{{ deploymentType }}",
"apiProxyType": "{{ apiProxyType }}",
"nodeConfig": "{{ nodeConfig }}",
"forwardProxyUri": "{{ forwardProxyUri }}",
"type": "{{ type }}",
"hasAttachedFlowHooks": {{ hasAttachedFlowHooks }},
"clientIpResolutionConfig": "{{ clientIpResolutionConfig }}"
}';