Cloud Composer v1 API - Class EnvironmentsClient (2.4.0)

public abstract class EnvironmentsClient

Reference documentation and code samples for the Cloud Composer v1 API class EnvironmentsClient.

Environments client wrapper, for convenient use.

Inheritance

object > EnvironmentsClient

Derived Types

Namespace

Google.Cloud.Orchestration.Airflow.Service.V1

Assembly

Google.Cloud.Orchestration.Airflow.Service.V1.dll

Remarks

Managed Apache Airflow Environments.

Properties

CreateEnvironmentOperationsClient

public virtual OperationsClient CreateEnvironmentOperationsClient { get; }

The long-running operations client for CreateEnvironment.

Property Value
TypeDescription
OperationsClient

DatabaseFailoverOperationsClient

public virtual OperationsClient DatabaseFailoverOperationsClient { get; }

The long-running operations client for DatabaseFailover.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Environments service, which is a host of "composer.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Environments scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Environments scopes are:

DeleteEnvironmentOperationsClient

public virtual OperationsClient DeleteEnvironmentOperationsClient { get; }

The long-running operations client for DeleteEnvironment.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Environments.EnvironmentsClient GrpcClient { get; }

The underlying gRPC Environments client

Property Value
TypeDescription
EnvironmentsEnvironmentsClient

LoadSnapshotOperationsClient

public virtual OperationsClient LoadSnapshotOperationsClient { get; }

The long-running operations client for LoadSnapshot.

Property Value
TypeDescription
OperationsClient

SaveSnapshotOperationsClient

public virtual OperationsClient SaveSnapshotOperationsClient { get; }

The long-running operations client for SaveSnapshot.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateEnvironmentOperationsClient

public virtual OperationsClient UpdateEnvironmentOperationsClient { get; }

The long-running operations client for UpdateEnvironment.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static EnvironmentsClient Create()

Synchronously creates a EnvironmentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EnvironmentsClientBuilder.

Returns
TypeDescription
EnvironmentsClient

The created EnvironmentsClient.

CreateAsync(CancellationToken)

public static Task<EnvironmentsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a EnvironmentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EnvironmentsClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskEnvironmentsClient

The task representing the created EnvironmentsClient.

CreateEnvironment(CreateEnvironmentRequest, CallSettings)

public virtual Operation<Environment, OperationMetadata> CreateEnvironment(CreateEnvironmentRequest request, CallSettings callSettings = null)

Create a new environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::CreateEnvironmentRequest request = new gcoasv::CreateEnvironmentRequest
{
    Parent = "",
    Environment = new gcoasv::Environment(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = environmentsClient.CreateEnvironment(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceCreateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

CreateEnvironment(string, Environment, CallSettings)

public virtual Operation<Environment, OperationMetadata> CreateEnvironment(string parent, Environment environment, CallSettings callSettings = null)

Create a new environment.

Parameters
NameDescription
parentstring

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

environmentEnvironment

The environment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
string parent = "";
gcoasv::Environment environment = new gcoasv::Environment();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = environmentsClient.CreateEnvironment(parent, environment);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceCreateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

CreateEnvironmentAsync(CreateEnvironmentRequest, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(CreateEnvironmentRequest request, CallSettings callSettings = null)

Create a new environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::CreateEnvironmentRequest request = new gcoasv::CreateEnvironmentRequest
{
    Parent = "",
    Environment = new gcoasv::Environment(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

CreateEnvironmentAsync(CreateEnvironmentRequest, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(CreateEnvironmentRequest request, CancellationToken cancellationToken)

Create a new environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::CreateEnvironmentRequest request = new gcoasv::CreateEnvironmentRequest
{
    Parent = "",
    Environment = new gcoasv::Environment(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

CreateEnvironmentAsync(string, Environment, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(string parent, Environment environment, CallSettings callSettings = null)

Create a new environment.

Parameters
NameDescription
parentstring

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

environmentEnvironment

The environment to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gcoasv::Environment environment = new gcoasv::Environment();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(parent, environment);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

CreateEnvironmentAsync(string, Environment, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(string parent, Environment environment, CancellationToken cancellationToken)

Create a new environment.

Parameters
NameDescription
parentstring

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

environmentEnvironment

The environment to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
gcoasv::Environment environment = new gcoasv::Environment();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.CreateEnvironmentAsync(parent, environment);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceCreateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

DatabaseFailover(DatabaseFailoverRequest, CallSettings)

public virtual Operation<DatabaseFailoverResponse, OperationMetadata> DatabaseFailover(DatabaseFailoverRequest request, CallSettings callSettings = null)

Triggers database failover (only for highly resilient environments).

Parameters
NameDescription
requestDatabaseFailoverRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatabaseFailoverResponseOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::DatabaseFailoverRequest request = new gcoasv::DatabaseFailoverRequest { Environment = "", };
// Make the request
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> response = environmentsClient.DatabaseFailover(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::DatabaseFailoverResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceDatabaseFailover(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::DatabaseFailoverResponse retrievedResult = retrievedResponse.Result;
}

DatabaseFailoverAsync(DatabaseFailoverRequest, CallSettings)

public virtual Task<Operation<DatabaseFailoverResponse, OperationMetadata>> DatabaseFailoverAsync(DatabaseFailoverRequest request, CallSettings callSettings = null)

Triggers database failover (only for highly resilient environments).

Parameters
NameDescription
requestDatabaseFailoverRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatabaseFailoverResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::DatabaseFailoverRequest request = new gcoasv::DatabaseFailoverRequest { Environment = "", };
// Make the request
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> response = await environmentsClient.DatabaseFailoverAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::DatabaseFailoverResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDatabaseFailoverAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::DatabaseFailoverResponse retrievedResult = retrievedResponse.Result;
}

DatabaseFailoverAsync(DatabaseFailoverRequest, CancellationToken)

public virtual Task<Operation<DatabaseFailoverResponse, OperationMetadata>> DatabaseFailoverAsync(DatabaseFailoverRequest request, CancellationToken cancellationToken)

Triggers database failover (only for highly resilient environments).

Parameters
NameDescription
requestDatabaseFailoverRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationDatabaseFailoverResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::DatabaseFailoverRequest request = new gcoasv::DatabaseFailoverRequest { Environment = "", };
// Make the request
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> response = await environmentsClient.DatabaseFailoverAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::DatabaseFailoverResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::DatabaseFailoverResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDatabaseFailoverAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::DatabaseFailoverResponse retrievedResult = retrievedResponse.Result;
}

DeleteEnvironment(DeleteEnvironmentRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEnvironment(DeleteEnvironmentRequest request, CallSettings callSettings = null)

Delete an environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::DeleteEnvironmentRequest request = new gcoasv::DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = environmentsClient.DeleteEnvironment(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceDeleteEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEnvironment(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEnvironment(string name, CallSettings callSettings = null)

Delete an environment.

Parameters
NameDescription
namestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = environmentsClient.DeleteEnvironment(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceDeleteEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEnvironmentAsync(DeleteEnvironmentRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEnvironmentAsync(DeleteEnvironmentRequest request, CallSettings callSettings = null)

Delete an environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::DeleteEnvironmentRequest request = new gcoasv::DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = await environmentsClient.DeleteEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDeleteEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEnvironmentAsync(DeleteEnvironmentRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEnvironmentAsync(DeleteEnvironmentRequest request, CancellationToken cancellationToken)

Delete an environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::DeleteEnvironmentRequest request = new gcoasv::DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = await environmentsClient.DeleteEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDeleteEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEnvironmentAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEnvironmentAsync(string name, CallSettings callSettings = null)

Delete an environment.

Parameters
NameDescription
namestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = await environmentsClient.DeleteEnvironmentAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDeleteEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEnvironmentAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEnvironmentAsync(string name, CancellationToken cancellationToken)

Delete an environment.

Parameters
NameDescription
namestring

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcoasv::OperationMetadata> response = await environmentsClient.DeleteEnvironmentAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceDeleteEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

ExecuteAirflowCommand(ExecuteAirflowCommandRequest, CallSettings)

public virtual ExecuteAirflowCommandResponse ExecuteAirflowCommand(ExecuteAirflowCommandRequest request, CallSettings callSettings = null)

Executes Airflow CLI command.

Parameters
NameDescription
requestExecuteAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ExecuteAirflowCommandResponse

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::ExecuteAirflowCommandRequest request = new gcoasv::ExecuteAirflowCommandRequest
{
    Environment = "",
    Command = "",
    Subcommand = "",
    Parameters = { "", },
};
// Make the request
gcoasv::ExecuteAirflowCommandResponse response = environmentsClient.ExecuteAirflowCommand(request);

ExecuteAirflowCommandAsync(ExecuteAirflowCommandRequest, CallSettings)

public virtual Task<ExecuteAirflowCommandResponse> ExecuteAirflowCommandAsync(ExecuteAirflowCommandRequest request, CallSettings callSettings = null)

Executes Airflow CLI command.

Parameters
NameDescription
requestExecuteAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskExecuteAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::ExecuteAirflowCommandRequest request = new gcoasv::ExecuteAirflowCommandRequest
{
    Environment = "",
    Command = "",
    Subcommand = "",
    Parameters = { "", },
};
// Make the request
gcoasv::ExecuteAirflowCommandResponse response = await environmentsClient.ExecuteAirflowCommandAsync(request);

ExecuteAirflowCommandAsync(ExecuteAirflowCommandRequest, CancellationToken)

public virtual Task<ExecuteAirflowCommandResponse> ExecuteAirflowCommandAsync(ExecuteAirflowCommandRequest request, CancellationToken cancellationToken)

Executes Airflow CLI command.

Parameters
NameDescription
requestExecuteAirflowCommandRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskExecuteAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::ExecuteAirflowCommandRequest request = new gcoasv::ExecuteAirflowCommandRequest
{
    Environment = "",
    Command = "",
    Subcommand = "",
    Parameters = { "", },
};
// Make the request
gcoasv::ExecuteAirflowCommandResponse response = await environmentsClient.ExecuteAirflowCommandAsync(request);

FetchDatabaseProperties(FetchDatabasePropertiesRequest, CallSettings)

public virtual FetchDatabasePropertiesResponse FetchDatabaseProperties(FetchDatabasePropertiesRequest request, CallSettings callSettings = null)

Fetches database properties.

Parameters
NameDescription
requestFetchDatabasePropertiesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FetchDatabasePropertiesResponse

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::FetchDatabasePropertiesRequest request = new gcoasv::FetchDatabasePropertiesRequest
{
    EnvironmentAsEnvironmentName = gcoasv::EnvironmentName.FromProjectLocationEnvironment("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]"),
};
// Make the request
gcoasv::FetchDatabasePropertiesResponse response = environmentsClient.FetchDatabaseProperties(request);

FetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest, CallSettings)

public virtual Task<FetchDatabasePropertiesResponse> FetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest request, CallSettings callSettings = null)

Fetches database properties.

Parameters
NameDescription
requestFetchDatabasePropertiesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFetchDatabasePropertiesResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::FetchDatabasePropertiesRequest request = new gcoasv::FetchDatabasePropertiesRequest
{
    EnvironmentAsEnvironmentName = gcoasv::EnvironmentName.FromProjectLocationEnvironment("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]"),
};
// Make the request
gcoasv::FetchDatabasePropertiesResponse response = await environmentsClient.FetchDatabasePropertiesAsync(request);

FetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest, CancellationToken)

public virtual Task<FetchDatabasePropertiesResponse> FetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest request, CancellationToken cancellationToken)

Fetches database properties.

Parameters
NameDescription
requestFetchDatabasePropertiesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFetchDatabasePropertiesResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::FetchDatabasePropertiesRequest request = new gcoasv::FetchDatabasePropertiesRequest
{
    EnvironmentAsEnvironmentName = gcoasv::EnvironmentName.FromProjectLocationEnvironment("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]"),
};
// Make the request
gcoasv::FetchDatabasePropertiesResponse response = await environmentsClient.FetchDatabasePropertiesAsync(request);

GetEnvironment(GetEnvironmentRequest, CallSettings)

public virtual Environment GetEnvironment(GetEnvironmentRequest request, CallSettings callSettings = null)

Get an existing environment.

Parameters
NameDescription
requestGetEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Environment

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::GetEnvironmentRequest request = new gcoasv::GetEnvironmentRequest { Name = "", };
// Make the request
gcoasv::Environment response = environmentsClient.GetEnvironment(request);

GetEnvironment(string, CallSettings)

public virtual Environment GetEnvironment(string name, CallSettings callSettings = null)

Get an existing environment.

Parameters
NameDescription
namestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Environment

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
gcoasv::Environment response = environmentsClient.GetEnvironment(name);

GetEnvironmentAsync(GetEnvironmentRequest, CallSettings)

public virtual Task<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CallSettings callSettings = null)

Get an existing environment.

Parameters
NameDescription
requestGetEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskEnvironment

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::GetEnvironmentRequest request = new gcoasv::GetEnvironmentRequest { Name = "", };
// Make the request
gcoasv::Environment response = await environmentsClient.GetEnvironmentAsync(request);

GetEnvironmentAsync(GetEnvironmentRequest, CancellationToken)

public virtual Task<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CancellationToken cancellationToken)

Get an existing environment.

Parameters
NameDescription
requestGetEnvironmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskEnvironment

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::GetEnvironmentRequest request = new gcoasv::GetEnvironmentRequest { Name = "", };
// Make the request
gcoasv::Environment response = await environmentsClient.GetEnvironmentAsync(request);

GetEnvironmentAsync(string, CallSettings)

public virtual Task<Environment> GetEnvironmentAsync(string name, CallSettings callSettings = null)

Get an existing environment.

Parameters
NameDescription
namestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskEnvironment

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
gcoasv::Environment response = await environmentsClient.GetEnvironmentAsync(name);

GetEnvironmentAsync(string, CancellationToken)

public virtual Task<Environment> GetEnvironmentAsync(string name, CancellationToken cancellationToken)

Get an existing environment.

Parameters
NameDescription
namestring

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskEnvironment

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
gcoasv::Environment response = await environmentsClient.GetEnvironmentAsync(name);

ListEnvironments(ListEnvironmentsRequest, CallSettings)

public virtual PagedEnumerable<ListEnvironmentsResponse, Environment> ListEnvironments(ListEnvironmentsRequest request, CallSettings callSettings = null)

List environments.

Parameters
NameDescription
requestListEnvironmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEnvironmentsResponseEnvironment

A pageable sequence of Environment resources.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::ListEnvironmentsRequest request = new gcoasv::ListEnvironmentsRequest { Parent = "", };
// Make the request
PagedEnumerable<gcoasv::ListEnvironmentsResponse, gcoasv::Environment> response = environmentsClient.ListEnvironments(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (gcoasv::Environment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcoasv::ListEnvironmentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcoasv::Environment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcoasv::Environment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcoasv::Environment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEnvironments(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEnvironmentsResponse, Environment> ListEnvironments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List environments.

Parameters
NameDescription
parentstring

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

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEnvironmentsResponseEnvironment

A pageable sequence of Environment resources.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<gcoasv::ListEnvironmentsResponse, gcoasv::Environment> response = environmentsClient.ListEnvironments(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (gcoasv::Environment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (gcoasv::ListEnvironmentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcoasv::Environment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcoasv::Environment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcoasv::Environment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEnvironmentsAsync(ListEnvironmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEnvironmentsResponse, Environment> ListEnvironmentsAsync(ListEnvironmentsRequest request, CallSettings callSettings = null)

List environments.

Parameters
NameDescription
requestListEnvironmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEnvironmentsResponseEnvironment

A pageable asynchronous sequence of Environment resources.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::ListEnvironmentsRequest request = new gcoasv::ListEnvironmentsRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<gcoasv::ListEnvironmentsResponse, gcoasv::Environment> response = environmentsClient.ListEnvironmentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcoasv::Environment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcoasv::ListEnvironmentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcoasv::Environment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcoasv::Environment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcoasv::Environment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEnvironmentsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEnvironmentsResponse, Environment> ListEnvironmentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List environments.

Parameters
NameDescription
parentstring

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

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEnvironmentsResponseEnvironment

A pageable asynchronous sequence of Environment resources.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<gcoasv::ListEnvironmentsResponse, gcoasv::Environment> response = environmentsClient.ListEnvironmentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcoasv::Environment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((gcoasv::ListEnvironmentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcoasv::Environment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcoasv::Environment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcoasv::Environment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

LoadSnapshot(LoadSnapshotRequest, CallSettings)

public virtual Operation<LoadSnapshotResponse, OperationMetadata> LoadSnapshot(LoadSnapshotRequest request, CallSettings callSettings = null)

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
NameDescription
requestLoadSnapshotRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationLoadSnapshotResponseOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::LoadSnapshotRequest request = new gcoasv::LoadSnapshotRequest
{
    Environment = "",
    SnapshotPath = "",
    SkipPypiPackagesInstallation = false,
    SkipEnvironmentVariablesSetting = false,
    SkipAirflowOverridesSetting = false,
    SkipGcsDataCopying = false,
};
// Make the request
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> response = environmentsClient.LoadSnapshot(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::LoadSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceLoadSnapshot(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::LoadSnapshotResponse retrievedResult = retrievedResponse.Result;
}

LoadSnapshotAsync(LoadSnapshotRequest, CallSettings)

public virtual Task<Operation<LoadSnapshotResponse, OperationMetadata>> LoadSnapshotAsync(LoadSnapshotRequest request, CallSettings callSettings = null)

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
NameDescription
requestLoadSnapshotRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationLoadSnapshotResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::LoadSnapshotRequest request = new gcoasv::LoadSnapshotRequest
{
    Environment = "",
    SnapshotPath = "",
    SkipPypiPackagesInstallation = false,
    SkipEnvironmentVariablesSetting = false,
    SkipAirflowOverridesSetting = false,
    SkipGcsDataCopying = false,
};
// Make the request
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> response = await environmentsClient.LoadSnapshotAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::LoadSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceLoadSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::LoadSnapshotResponse retrievedResult = retrievedResponse.Result;
}

LoadSnapshotAsync(LoadSnapshotRequest, CancellationToken)

public virtual Task<Operation<LoadSnapshotResponse, OperationMetadata>> LoadSnapshotAsync(LoadSnapshotRequest request, CancellationToken cancellationToken)

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
NameDescription
requestLoadSnapshotRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationLoadSnapshotResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::LoadSnapshotRequest request = new gcoasv::LoadSnapshotRequest
{
    Environment = "",
    SnapshotPath = "",
    SkipPypiPackagesInstallation = false,
    SkipEnvironmentVariablesSetting = false,
    SkipAirflowOverridesSetting = false,
    SkipGcsDataCopying = false,
};
// Make the request
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> response = await environmentsClient.LoadSnapshotAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::LoadSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::LoadSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceLoadSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::LoadSnapshotResponse retrievedResult = retrievedResponse.Result;
}

PollAirflowCommand(PollAirflowCommandRequest, CallSettings)

public virtual PollAirflowCommandResponse PollAirflowCommand(PollAirflowCommandRequest request, CallSettings callSettings = null)

Polls Airflow CLI command execution and fetches logs.

Parameters
NameDescription
requestPollAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PollAirflowCommandResponse

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::PollAirflowCommandRequest request = new gcoasv::PollAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    NextLineNumber = 0,
};
// Make the request
gcoasv::PollAirflowCommandResponse response = environmentsClient.PollAirflowCommand(request);

PollAirflowCommandAsync(PollAirflowCommandRequest, CallSettings)

public virtual Task<PollAirflowCommandResponse> PollAirflowCommandAsync(PollAirflowCommandRequest request, CallSettings callSettings = null)

Polls Airflow CLI command execution and fetches logs.

Parameters
NameDescription
requestPollAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPollAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::PollAirflowCommandRequest request = new gcoasv::PollAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    NextLineNumber = 0,
};
// Make the request
gcoasv::PollAirflowCommandResponse response = await environmentsClient.PollAirflowCommandAsync(request);

PollAirflowCommandAsync(PollAirflowCommandRequest, CancellationToken)

public virtual Task<PollAirflowCommandResponse> PollAirflowCommandAsync(PollAirflowCommandRequest request, CancellationToken cancellationToken)

Polls Airflow CLI command execution and fetches logs.

Parameters
NameDescription
requestPollAirflowCommandRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPollAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::PollAirflowCommandRequest request = new gcoasv::PollAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    NextLineNumber = 0,
};
// Make the request
gcoasv::PollAirflowCommandResponse response = await environmentsClient.PollAirflowCommandAsync(request);

PollOnceCreateEnvironment(string, CallSettings)

public virtual Operation<Environment, OperationMetadata> PollOnceCreateEnvironment(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateEnvironment .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The result of polling the operation.

PollOnceCreateEnvironmentAsync(string, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> PollOnceCreateEnvironmentAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateEnvironment.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A task representing the result of polling the operation.

PollOnceDatabaseFailover(string, CallSettings)

public virtual Operation<DatabaseFailoverResponse, OperationMetadata> PollOnceDatabaseFailover(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DatabaseFailover.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatabaseFailoverResponseOperationMetadata

The result of polling the operation.

PollOnceDatabaseFailoverAsync(string, CallSettings)

public virtual Task<Operation<DatabaseFailoverResponse, OperationMetadata>> PollOnceDatabaseFailoverAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DatabaseFailover.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatabaseFailoverResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteEnvironment(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteEnvironment(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteEnvironment .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteEnvironmentAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteEnvironmentAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteEnvironment.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceLoadSnapshot(string, CallSettings)

public virtual Operation<LoadSnapshotResponse, OperationMetadata> PollOnceLoadSnapshot(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of LoadSnapshot.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationLoadSnapshotResponseOperationMetadata

The result of polling the operation.

PollOnceLoadSnapshotAsync(string, CallSettings)

public virtual Task<Operation<LoadSnapshotResponse, OperationMetadata>> PollOnceLoadSnapshotAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of LoadSnapshot.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationLoadSnapshotResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceSaveSnapshot(string, CallSettings)

public virtual Operation<SaveSnapshotResponse, OperationMetadata> PollOnceSaveSnapshot(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SaveSnapshot.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSaveSnapshotResponseOperationMetadata

The result of polling the operation.

PollOnceSaveSnapshotAsync(string, CallSettings)

public virtual Task<Operation<SaveSnapshotResponse, OperationMetadata>> PollOnceSaveSnapshotAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SaveSnapshot.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSaveSnapshotResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateEnvironment(string, CallSettings)

public virtual Operation<Environment, OperationMetadata> PollOnceUpdateEnvironment(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateEnvironment .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The result of polling the operation.

PollOnceUpdateEnvironmentAsync(string, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> PollOnceUpdateEnvironmentAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateEnvironment.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A task representing the result of polling the operation.

SaveSnapshot(SaveSnapshotRequest, CallSettings)

public virtual Operation<SaveSnapshotResponse, OperationMetadata> SaveSnapshot(SaveSnapshotRequest request, CallSettings callSettings = null)

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
NameDescription
requestSaveSnapshotRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSaveSnapshotResponseOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::SaveSnapshotRequest request = new gcoasv::SaveSnapshotRequest
{
    Environment = "",
    SnapshotLocation = "",
};
// Make the request
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> response = environmentsClient.SaveSnapshot(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::SaveSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceSaveSnapshot(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::SaveSnapshotResponse retrievedResult = retrievedResponse.Result;
}

SaveSnapshotAsync(SaveSnapshotRequest, CallSettings)

public virtual Task<Operation<SaveSnapshotResponse, OperationMetadata>> SaveSnapshotAsync(SaveSnapshotRequest request, CallSettings callSettings = null)

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
NameDescription
requestSaveSnapshotRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSaveSnapshotResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::SaveSnapshotRequest request = new gcoasv::SaveSnapshotRequest
{
    Environment = "",
    SnapshotLocation = "",
};
// Make the request
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> response = await environmentsClient.SaveSnapshotAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::SaveSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceSaveSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::SaveSnapshotResponse retrievedResult = retrievedResponse.Result;
}

SaveSnapshotAsync(SaveSnapshotRequest, CancellationToken)

public virtual Task<Operation<SaveSnapshotResponse, OperationMetadata>> SaveSnapshotAsync(SaveSnapshotRequest request, CancellationToken cancellationToken)

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
NameDescription
requestSaveSnapshotRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSaveSnapshotResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::SaveSnapshotRequest request = new gcoasv::SaveSnapshotRequest
{
    Environment = "",
    SnapshotLocation = "",
};
// Make the request
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> response = await environmentsClient.SaveSnapshotAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::SaveSnapshotResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::SaveSnapshotResponse, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceSaveSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::SaveSnapshotResponse retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

StopAirflowCommand(StopAirflowCommandRequest, CallSettings)

public virtual StopAirflowCommandResponse StopAirflowCommand(StopAirflowCommandRequest request, CallSettings callSettings = null)

Stops Airflow CLI command execution.

Parameters
NameDescription
requestStopAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
StopAirflowCommandResponse

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::StopAirflowCommandRequest request = new gcoasv::StopAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    Force = false,
};
// Make the request
gcoasv::StopAirflowCommandResponse response = environmentsClient.StopAirflowCommand(request);

StopAirflowCommandAsync(StopAirflowCommandRequest, CallSettings)

public virtual Task<StopAirflowCommandResponse> StopAirflowCommandAsync(StopAirflowCommandRequest request, CallSettings callSettings = null)

Stops Airflow CLI command execution.

Parameters
NameDescription
requestStopAirflowCommandRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskStopAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::StopAirflowCommandRequest request = new gcoasv::StopAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    Force = false,
};
// Make the request
gcoasv::StopAirflowCommandResponse response = await environmentsClient.StopAirflowCommandAsync(request);

StopAirflowCommandAsync(StopAirflowCommandRequest, CancellationToken)

public virtual Task<StopAirflowCommandResponse> StopAirflowCommandAsync(StopAirflowCommandRequest request, CancellationToken cancellationToken)

Stops Airflow CLI command execution.

Parameters
NameDescription
requestStopAirflowCommandRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskStopAirflowCommandResponse

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::StopAirflowCommandRequest request = new gcoasv::StopAirflowCommandRequest
{
    Environment = "",
    ExecutionId = "",
    Pod = "",
    PodNamespace = "",
    Force = false,
};
// Make the request
gcoasv::StopAirflowCommandResponse response = await environmentsClient.StopAirflowCommandAsync(request);

UpdateEnvironment(UpdateEnvironmentRequest, CallSettings)

public virtual Operation<Environment, OperationMetadata> UpdateEnvironment(UpdateEnvironmentRequest request, CallSettings callSettings = null)

Update an environment.

Parameters
NameDescription
requestUpdateEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
gcoasv::UpdateEnvironmentRequest request = new gcoasv::UpdateEnvironmentRequest
{
    Environment = new gcoasv::Environment(),
    Name = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = environmentsClient.UpdateEnvironment(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceUpdateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

UpdateEnvironment(string, Environment, FieldMask, CallSettings)

public virtual Operation<Environment, OperationMetadata> UpdateEnvironment(string name, Environment environment, FieldMask updateMask, CallSettings callSettings = null)

Update an environment.

Parameters
NameDescription
namestring

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

environmentEnvironment

A patch environment. Fields specified by the updateMask will be copied from the patch environment into the environment under update.

updateMaskFieldMask

Required. A comma-separated list of paths, relative to Environment, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the updateMask parameter would include the following two paths values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the scikit-learn version as follows:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } }

Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected.

Only one update type may be included in a single request's updateMask. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows:

{ "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } }

Note that in the above example, any existing labels that are not included in the updateMask will be unaffected.

It is also possible to replace an entire map field by providing the map field's path in the updateMask. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the updateMask would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } }

Note: Only the following fields can be updated:

  • config.softwareConfig.pypiPackages
  • Replace all custom custom PyPI packages. If a replacement package map is not included in environment, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package.
  • config.softwareConfig.pypiPackages.packagename
  • Update the custom PyPI package packagename, preserving other packages. To delete the package, include it in updateMask, and omit the mapping for it in environment.config.softwareConfig.pypiPackages. It is an error to provide both a mask of this form and the config.softwareConfig.pypiPackages mask.
  • labels
  • Replace all environment labels. If a replacement labels map is not included in environment, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels.
  • labels.labelName
  • Set the label named labelName, while preserving other labels. To delete the label, include it in updateMask and omit its mapping in environment.labels. It is an error to provide both a mask of this form and the labels mask.
  • config.nodeCount
  • Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the config.nodeCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerNetworkAccessControl
  • Replace the environment's current WebServerNetworkAccessControl.
  • config.softwareConfig.airflowConfigOverrides
  • Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in environment, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides.
  • config.softwareConfig.airflowConfigOverrides.section-name
  • Override the Apache Airflow config property name in the section named section, preserving other properties. To delete the property override, include it in updateMask and omit its mapping in environment.config.softwareConfig.airflowConfigOverrides. It is an error to provide both a mask of this form and the config.softwareConfig.airflowConfigOverrides mask.
  • config.softwareConfig.envVariables
  • Replace all environment variables. If a replacement environment variable map is not included in environment, all custom environment variables are cleared.
  • config.softwareConfig.schedulerCount
  • Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the config.softwareConfig.schedulerCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-2...
  • config.databaseConfig.machineType
  • Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerConfig.machineType
  • Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEnvironmentOperationMetadata

The RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = gcoasv::EnvironmentsClient.Create();
// Initialize request argument(s)
string name = "";
gcoasv::Environment environment = new gcoasv::Environment();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = environmentsClient.UpdateEnvironment(name, environment, updateMask);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = environmentsClient.PollOnceUpdateEnvironment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

UpdateEnvironmentAsync(UpdateEnvironmentRequest, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> UpdateEnvironmentAsync(UpdateEnvironmentRequest request, CallSettings callSettings = null)

Update an environment.

Parameters
NameDescription
requestUpdateEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::UpdateEnvironmentRequest request = new gcoasv::UpdateEnvironmentRequest
{
    Environment = new gcoasv::Environment(),
    Name = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.UpdateEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceUpdateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

UpdateEnvironmentAsync(UpdateEnvironmentRequest, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> UpdateEnvironmentAsync(UpdateEnvironmentRequest request, CancellationToken cancellationToken)

Update an environment.

Parameters
NameDescription
requestUpdateEnvironmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
gcoasv::UpdateEnvironmentRequest request = new gcoasv::UpdateEnvironmentRequest
{
    Environment = new gcoasv::Environment(),
    Name = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.UpdateEnvironmentAsync(request);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceUpdateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

UpdateEnvironmentAsync(string, Environment, FieldMask, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> UpdateEnvironmentAsync(string name, Environment environment, FieldMask updateMask, CallSettings callSettings = null)

Update an environment.

Parameters
NameDescription
namestring

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

environmentEnvironment

A patch environment. Fields specified by the updateMask will be copied from the patch environment into the environment under update.

updateMaskFieldMask

Required. A comma-separated list of paths, relative to Environment, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the updateMask parameter would include the following two paths values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the scikit-learn version as follows:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } }

Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected.

Only one update type may be included in a single request's updateMask. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows:

{ "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } }

Note that in the above example, any existing labels that are not included in the updateMask will be unaffected.

It is also possible to replace an entire map field by providing the map field's path in the updateMask. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the updateMask would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } }

Note: Only the following fields can be updated:

  • config.softwareConfig.pypiPackages
  • Replace all custom custom PyPI packages. If a replacement package map is not included in environment, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package.
  • config.softwareConfig.pypiPackages.packagename
  • Update the custom PyPI package packagename, preserving other packages. To delete the package, include it in updateMask, and omit the mapping for it in environment.config.softwareConfig.pypiPackages. It is an error to provide both a mask of this form and the config.softwareConfig.pypiPackages mask.
  • labels
  • Replace all environment labels. If a replacement labels map is not included in environment, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels.
  • labels.labelName
  • Set the label named labelName, while preserving other labels. To delete the label, include it in updateMask and omit its mapping in environment.labels. It is an error to provide both a mask of this form and the labels mask.
  • config.nodeCount
  • Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the config.nodeCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerNetworkAccessControl
  • Replace the environment's current WebServerNetworkAccessControl.
  • config.softwareConfig.airflowConfigOverrides
  • Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in environment, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides.
  • config.softwareConfig.airflowConfigOverrides.section-name
  • Override the Apache Airflow config property name in the section named section, preserving other properties. To delete the property override, include it in updateMask and omit its mapping in environment.config.softwareConfig.airflowConfigOverrides. It is an error to provide both a mask of this form and the config.softwareConfig.airflowConfigOverrides mask.
  • config.softwareConfig.envVariables
  • Replace all environment variables. If a replacement environment variable map is not included in environment, all custom environment variables are cleared.
  • config.softwareConfig.schedulerCount
  • Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the config.softwareConfig.schedulerCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-2...
  • config.databaseConfig.machineType
  • Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerConfig.machineType
  • Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
gcoasv::Environment environment = new gcoasv::Environment();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.UpdateEnvironmentAsync(name, environment, updateMask);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceUpdateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}

UpdateEnvironmentAsync(string, Environment, FieldMask, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> UpdateEnvironmentAsync(string name, Environment environment, FieldMask updateMask, CancellationToken cancellationToken)

Update an environment.

Parameters
NameDescription
namestring

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

environmentEnvironment

A patch environment. Fields specified by the updateMask will be copied from the patch environment into the environment under update.

updateMaskFieldMask

Required. A comma-separated list of paths, relative to Environment, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the updateMask parameter would include the following two paths values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the scikit-learn version as follows:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } }

Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected.

Only one update type may be included in a single request's updateMask. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows:

{ "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } }

Note that in the above example, any existing labels that are not included in the updateMask will be unaffected.

It is also possible to replace an entire map field by providing the map field's path in the updateMask. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the updateMask would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following:

{ "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } }

Note: Only the following fields can be updated:

  • config.softwareConfig.pypiPackages
  • Replace all custom custom PyPI packages. If a replacement package map is not included in environment, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package.
  • config.softwareConfig.pypiPackages.packagename
  • Update the custom PyPI package packagename, preserving other packages. To delete the package, include it in updateMask, and omit the mapping for it in environment.config.softwareConfig.pypiPackages. It is an error to provide both a mask of this form and the config.softwareConfig.pypiPackages mask.
  • labels
  • Replace all environment labels. If a replacement labels map is not included in environment, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels.
  • labels.labelName
  • Set the label named labelName, while preserving other labels. To delete the label, include it in updateMask and omit its mapping in environment.labels. It is an error to provide both a mask of this form and the labels mask.
  • config.nodeCount
  • Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the config.nodeCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerNetworkAccessControl
  • Replace the environment's current WebServerNetworkAccessControl.
  • config.softwareConfig.airflowConfigOverrides
  • Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in environment, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides.
  • config.softwareConfig.airflowConfigOverrides.section-name
  • Override the Apache Airflow config property name in the section named section, preserving other properties. To delete the property override, include it in updateMask and omit its mapping in environment.config.softwareConfig.airflowConfigOverrides. It is an error to provide both a mask of this form and the config.softwareConfig.airflowConfigOverrides mask.
  • config.softwareConfig.envVariables
  • Replace all environment variables. If a replacement environment variable map is not included in environment, all custom environment variables are cleared.
  • config.softwareConfig.schedulerCount
  • Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the config.softwareConfig.schedulerCount field. Supported for Cloud Composer environments in versions composer-1..-airflow-2...
  • config.databaseConfig.machineType
  • Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
  • config.webServerConfig.machineType
  • Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1..-airflow-..*.
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEnvironmentOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcoasv::EnvironmentsClient environmentsClient = await gcoasv::EnvironmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
gcoasv::Environment environment = new gcoasv::Environment();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcoasv::Environment, gcoasv::OperationMetadata> response = await environmentsClient.UpdateEnvironmentAsync(name, environment, updateMask);

// Poll until the returned long-running operation is complete
Operation<gcoasv::Environment, gcoasv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcoasv::Environment result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcoasv::Environment, gcoasv::OperationMetadata> retrievedResponse = await environmentsClient.PollOnceUpdateEnvironmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    gcoasv::Environment retrievedResult = retrievedResponse.Result;
}