class ProjectsLocationsEnvironments extends Resource (View source)

The "environments" collection of methods.

Typical usage is:

 $composerService = new Google\Service\CloudComposer(...);
 $environments = $composerService->projects_locations_environments;

Methods

checkUpgrade(string $environment, CheckUpgradeRequest $postBody, array $optParams = [])

Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.

create(string $parent, Environment $postBody, array $optParams = [])

Create a new environment. (environments.create)

databaseFailover(string $environment, DatabaseFailoverRequest $postBody, array $optParams = [])

Triggers database failover (only for highly resilient environments).

delete(string $name, array $optParams = [])

Delete an environment. (environments.delete)

executeAirflowCommand(string $environment, ExecuteAirflowCommandRequest $postBody, array $optParams = [])

Executes Airflow CLI command. (environments.executeAirflowCommand)

fetchDatabaseProperties(string $environment, array $optParams = [])

Fetches database properties. (environments.fetchDatabaseProperties)

get(string $name, array $optParams = [])

Get an existing environment. (environments.get)

listProjectsLocationsEnvironments(string $parent, array $optParams = [])

List environments. (environments.listProjectsLocationsEnvironments)

loadSnapshot(string $environment, LoadSnapshotRequest $postBody, array $optParams = [])

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. (environments.loadSnapshot)

patch(string $name, Environment $postBody, array $optParams = [])

Update an environment. (environments.patch)

pollAirflowCommand(string $environment, PollAirflowCommandRequest $postBody, array $optParams = [])

Polls Airflow CLI command execution and fetches logs.

saveSnapshot(string $environment, SaveSnapshotRequest $postBody, array $optParams = [])

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. (environments.saveSnapshot)

stopAirflowCommand(string $environment, StopAirflowCommandRequest $postBody, array $optParams = [])

Stops Airflow CLI command execution. (environments.stopAirflowCommand)

Details

Operation checkUpgrade(string $environment, CheckUpgradeRequest $postBody, array $optParams = [])

Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.

(environments.checkUpgrade)

Parameters

string $environment

Required. The resource name of the environment to check upgrade for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

CheckUpgradeRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation create(string $parent, Environment $postBody, array $optParams = [])

Create a new environment. (environments.create)

Parameters

string $parent

The parent must be of the form "projects/{projectId}/locations/{locationId}".

Environment $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation databaseFailover(string $environment, DatabaseFailoverRequest $postBody, array $optParams = [])

Triggers database failover (only for highly resilient environments).

(environments.databaseFailover)

Parameters

string $environment

Target environment: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

DatabaseFailoverRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

Delete an environment. (environments.delete)

Parameters

string $name

The environment to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ExecuteAirflowCommandResponse executeAirflowCommand(string $environment, ExecuteAirflowCommandRequest $postBody, array $optParams = [])

Executes Airflow CLI command. (environments.executeAirflowCommand)

Parameters

string $environment

The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}".

ExecuteAirflowCommandRequest $postBody
array $optParams

Optional parameters.

Return Value

ExecuteAirflowCommandResponse

Exceptions

Exception

FetchDatabasePropertiesResponse fetchDatabaseProperties(string $environment, array $optParams = [])

Fetches database properties. (environments.fetchDatabaseProperties)

Parameters

string $environment

Required. The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

array $optParams

Optional parameters.

Return Value

FetchDatabasePropertiesResponse

Exceptions

Exception

Environment get(string $name, array $optParams = [])

Get an existing environment. (environments.get)

Parameters

string $name

The resource name of the environment to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

array $optParams

Optional parameters.

Return Value

Environment

Exceptions

Exception

ListEnvironmentsResponse listProjectsLocationsEnvironments(string $parent, array $optParams = [])

List environments. (environments.listProjectsLocationsEnvironments)

Parameters

string $parent

List environments in the given project and location, in the form: "projects/{projectId}/locations/{locationId}"

array $optParams

Optional parameters.

Return Value

ListEnvironmentsResponse

Exceptions

Exception

Operation loadSnapshot(string $environment, LoadSnapshotRequest $postBody, array $optParams = [])

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. (environments.loadSnapshot)

Parameters

string $environment

The resource name of the target environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

LoadSnapshotRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation patch(string $name, Environment $postBody, array $optParams = [])

Update an environment. (environments.patch)

Parameters

string $name

The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

Environment $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

PollAirflowCommandResponse pollAirflowCommand(string $environment, PollAirflowCommandRequest $postBody, array $optParams = [])

Polls Airflow CLI command execution and fetches logs.

(environments.pollAirflowCommand)

Parameters

string $environment

The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

PollAirflowCommandRequest $postBody
array $optParams

Optional parameters.

Return Value

PollAirflowCommandResponse

Exceptions

Exception

Operation saveSnapshot(string $environment, SaveSnapshotRequest $postBody, array $optParams = [])

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. (environments.saveSnapshot)

Parameters

string $environment

The resource name of the source environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

SaveSnapshotRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

StopAirflowCommandResponse stopAirflowCommand(string $environment, StopAirflowCommandRequest $postBody, array $optParams = [])

Stops Airflow CLI command execution. (environments.stopAirflowCommand)

Parameters

string $environment

The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}".

StopAirflowCommandRequest $postBody
array $optParams

Optional parameters.

Return Value

StopAirflowCommandResponse

Exceptions

Exception