Managed Apache Airflow Environments.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
EnvironmentsClient(EnvironmentsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EnvironmentsClient const &
|
EnvironmentsClient(EnvironmentsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EnvironmentsClient &&
|
EnvironmentsClient(std::shared_ptr< EnvironmentsConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< EnvironmentsConnection >
|
opts |
Options
|
Operators
operator=(EnvironmentsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EnvironmentsClient const &
|
Returns | |
---|---|
Type | Description |
EnvironmentsClient & |
operator=(EnvironmentsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EnvironmentsClient &&
|
Returns | |
---|---|
Type | Description |
EnvironmentsClient & |
Functions
CreateEnvironment(std::string const &, google::cloud::orchestration::airflow::service::v1::Environment const &, Options)
Create a new environment.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
The parent must be of the form "projects/{projectId}/locations/{locationId}". |
environment |
google::cloud::orchestration::airflow::service::v1::Environment const &
The environment to create. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > > | A |
CreateEnvironment(google::cloud::orchestration::airflow::service::v1::CreateEnvironmentRequest const &, Options)
Create a new environment.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::CreateEnvironmentRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > > | A |
GetEnvironment(std::string const &, Options)
Get an existing environment.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
The resource name of the environment to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.Environment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetEnvironment(google::cloud::orchestration::airflow::service::v1::GetEnvironmentRequest const &, Options)
Get an existing environment.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::GetEnvironmentRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.Environment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListEnvironments(std::string const &, Options)
List environments.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
List environments in the given project and location, in the form: "projects/{projectId}/locations/{locationId}" |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::orchestration::airflow::service::v1::Environment > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListEnvironments(google::cloud::orchestration::airflow::service::v1::ListEnvironmentsRequest, Options)
List environments.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::ListEnvironmentsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::orchestration::airflow::service::v1::Environment > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
UpdateEnvironment(std::string const &, google::cloud::orchestration::airflow::service::v1::Environment const &, google::protobuf::FieldMask const &, Options)
Update an environment.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
environment |
google::cloud::orchestration::airflow::service::v1::Environment const &
A patch environment. Fields specified by the |
update_mask |
google::protobuf::FieldMask const &
Required. A comma-separated list of paths, relative to |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > > | A |
UpdateEnvironment(google::cloud::orchestration::airflow::service::v1::UpdateEnvironmentRequest const &, Options)
Update an environment.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::UpdateEnvironmentRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::Environment > > | A |
DeleteEnvironment(std::string const &, Options)
Delete an environment.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
The environment to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::OperationMetadata > > | A |
DeleteEnvironment(google::cloud::orchestration::airflow::service::v1::DeleteEnvironmentRequest const &, Options)
Delete an environment.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::DeleteEnvironmentRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::OperationMetadata > > | A |
ExecuteAirflowCommand(google::cloud::orchestration::airflow::service::v1::ExecuteAirflowCommandRequest const &, Options)
Executes Airflow CLI command.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::ExecuteAirflowCommandRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::ExecuteAirflowCommandResponse > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
StopAirflowCommand(google::cloud::orchestration::airflow::service::v1::StopAirflowCommandRequest const &, Options)
Stops Airflow CLI command execution.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::StopAirflowCommandRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::StopAirflowCommandResponse > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
PollAirflowCommand(google::cloud::orchestration::airflow::service::v1::PollAirflowCommandRequest const &, Options)
Polls Airflow CLI command execution and fetches logs.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::PollAirflowCommandRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::PollAirflowCommandResponse > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
SaveSnapshot(google::cloud::orchestration::airflow::service::v1::SaveSnapshotRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::SaveSnapshotRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::SaveSnapshotResponse > > | A |
LoadSnapshot(google::cloud::orchestration::airflow::service::v1::LoadSnapshotRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::LoadSnapshotRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::LoadSnapshotResponse > > | A |
DatabaseFailover(google::cloud::orchestration::airflow::service::v1::DatabaseFailoverRequest const &, Options)
Triggers database failover (only for highly resilient environments).
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::DatabaseFailoverRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::orchestration::airflow::service::v1::DatabaseFailoverResponse > > | A |
FetchDatabaseProperties(google::cloud::orchestration::airflow::service::v1::FetchDatabasePropertiesRequest const &, Options)
Fetches database properties.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::orchestration::airflow::service::v1::FetchDatabasePropertiesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::orchestration::airflow::service::v1::FetchDatabasePropertiesResponse > | the result of the RPC. The response message type (google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |