environments
Creates, updates, deletes, gets or lists a environments
resource.
Overview
Name | environments |
Type | Resource |
Id | google.composer.environments |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. |
config | object | Configuration information for an environment. |
createTime | string | Output only. The time at which this environment was created. |
labels | object | Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
state | string | The current state of the environment. |
storageConfig | object | The configuration for data storage in the environment. |
updateTime | string | Output only. The time at which this environment was last modified. |
uuid | string | Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | environmentsId, locationsId, projectsId | Get an existing environment. |
list | SELECT | locationsId, projectsId | List environments. |
create | INSERT | locationsId, projectsId | Create a new environment. |
delete | DELETE | environmentsId, locationsId, projectsId | Delete an environment. |
patch | UPDATE | environmentsId, locationsId, projectsId | Update an environment. |
check_upgrade | EXEC | environmentsId, locationsId, projectsId | Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation. |
database_failover | EXEC | environmentsId, locationsId, projectsId | Triggers database failover (only for highly resilient environments). |
execute_airflow_command | EXEC | environmentsId, locationsId, projectsId | Executes Airflow CLI command. |
load_snapshot | EXEC | environmentsId, locationsId, projectsId | Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment. |
poll_airflow_command | EXEC | environmentsId, locationsId, projectsId | Polls Airflow CLI command execution and fetches logs. |
save_snapshot | EXEC | environmentsId, locationsId, projectsId | Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest. |
stop_airflow_command | EXEC | environmentsId, locationsId, projectsId | Stops Airflow CLI command execution. |
SELECT
examples
List environments.
SELECT
name,
config,
createTime,
labels,
satisfiesPzi,
satisfiesPzs,
state,
storageConfig,
updateTime,
uuid
FROM google.composer.environments
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new environments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.composer.environments (
locationsId,
projectsId,
name,
config,
uuid,
state,
labels,
storageConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ config }}',
'{{ uuid }}',
'{{ state }}',
'{{ labels }}',
'{{ storageConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: config
value:
- name: gkeCluster
value: string
- name: dagGcsPrefix
value: string
- name: nodeCount
value: integer
- name: softwareConfig
value:
- name: imageVersion
value: string
- name: airflowConfigOverrides
value: object
- name: pypiPackages
value: object
- name: envVariables
value: object
- name: pythonVersion
value: string
- name: schedulerCount
value: integer
- name: cloudDataLineageIntegration
value:
- name: enabled
value: boolean
- name: webServerPluginsMode
value: string
- name: nodeConfig
value:
- name: location
value: string
- name: machineType
value: string
- name: network
value: string
- name: subnetwork
value: string
- name: diskSizeGb
value: integer
- name: oauthScopes
value:
- string
- name: serviceAccount
value: string
- name: tags
value:
- string
- name: ipAllocationPolicy
value:
- name: useIpAliases
value: boolean
- name: clusterSecondaryRangeName
value: string
- name: clusterIpv4CidrBlock
value: string
- name: servicesSecondaryRangeName
value: string
- name: servicesIpv4CidrBlock
value: string
- name: enableIpMasqAgent
value: boolean
- name: composerNetworkAttachment
value: string
- name: composerInternalIpv4CidrBlock
value: string
- name: privateEnvironmentConfig
value:
- name: enablePrivateEnvironment
value: boolean
- name: enablePrivateBuildsOnly
value: boolean
- name: privateClusterConfig
value:
- name: enablePrivateEndpoint
value: boolean
- name: masterIpv4CidrBlock
value: string
- name: masterIpv4ReservedRange
value: string
- name: webServerIpv4CidrBlock
value: string
- name: cloudSqlIpv4CidrBlock
value: string
- name: webServerIpv4ReservedRange
value: string
- name: cloudComposerNetworkIpv4CidrBlock
value: string
- name: cloudComposerNetworkIpv4ReservedRange
value: string
- name: enablePrivatelyUsedPublicIps
value: boolean
- name: cloudComposerConnectionSubnetwork
value: string
- name: networkingConfig
value:
- name: connectionType
value: string
- name: webServerNetworkAccessControl
value:
- name: allowedIpRanges
value:
- - name: value
value: string
- name: description
value: string
- name: databaseConfig
value:
- name: machineType
value: string
- name: zone
value: string
- name: webServerConfig
value:
- name: machineType
value: string
- name: encryptionConfig
value:
- name: kmsKeyName
value: string
- name: maintenanceWindow
value:
- name: startTime
value: string
- name: endTime
value: string
- name: recurrence
value: string
- name: workloadsConfig
value:
- name: scheduler
value:
- name: cpu
value: number
- name: memoryGb
value: number
- name: storageGb
value: number
- name: count
value: integer
- name: webServer
value:
- name: cpu
value: number
- name: memoryGb
value: number
- name: storageGb
value: number
- name: worker
value:
- name: cpu
value: number
- name: memoryGb
value: number
- name: storageGb
value: number
- name: minCount
value: integer
- name: maxCount
value: integer
- name: triggerer
value:
- name: count
value: integer
- name: cpu
value: number
- name: memoryGb
value: number
- name: dagProcessor
value:
- name: cpu
value: number
- name: memoryGb
value: number
- name: storageGb
value: number
- name: count
value: integer
- name: environmentSize
value: string
- name: airflowUri
value: string
- name: airflowByoidUri
value: string
- name: masterAuthorizedNetworksConfig
value:
- name: enabled
value: boolean
- name: cidrBlocks
value:
- - name: displayName
value: string
- name: cidrBlock
value: string
- name: recoveryConfig
value:
- name: scheduledSnapshotsConfig
value:
- name: enabled
value: boolean
- name: snapshotLocation
value: string
- name: snapshotCreationSchedule
value: string
- name: timeZone
value: string
- name: resilienceMode
value: string
- name: dataRetentionConfig
value:
- name: airflowMetadataRetentionConfig
value:
- name: retentionMode
value: string
- name: retentionDays
value: integer
- name: taskLogsRetentionConfig
value:
- name: storageMode
value: string
- name: uuid
value: string
- name: state
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: satisfiesPzs
value: boolean
- name: satisfiesPzi
value: boolean
- name: storageConfig
value:
- name: bucket
value: string
UPDATE
example
Updates a environments
resource.
/*+ update */
UPDATE google.composer.environments
SET
name = '{{ name }}',
config = '{{ config }}',
uuid = '{{ uuid }}',
state = '{{ state }}',
labels = '{{ labels }}',
storageConfig = '{{ storageConfig }}'
WHERE
environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified environments
resource.
/*+ delete */
DELETE FROM google.composer.environments
WHERE environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';