public abstract class EnvironmentsClient
Reference documentation and code samples for the Cloud Composer v1 API class EnvironmentsClient.
Environments client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Orchestration.Airflow.Service.V1Assembly
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Environments scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Environments scopes are:
DeleteEnvironmentOperationsClient
public virtual OperationsClient DeleteEnvironmentOperationsClient { get; }
The long-running operations client for DeleteEnvironment
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Environments.EnvironmentsClient GrpcClient { get; }
The underlying gRPC Environments client
Property Value | |
---|---|
Type | Description |
EnvironmentsEnvironmentsClient |
LoadSnapshotOperationsClient
public virtual OperationsClient LoadSnapshotOperationsClient { get; }
The long-running operations client for LoadSnapshot
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SaveSnapshotOperationsClient
public virtual OperationsClient SaveSnapshotOperationsClient { get; }
The long-running operations client for SaveSnapshot
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateEnvironmentOperationsClient
public virtual OperationsClient UpdateEnvironmentOperationsClient { get; }
The long-running operations client for UpdateEnvironment
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | CreateEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEnvironmentOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string The parent must be of the form "projects/{projectId}/locations/{locationId}". |
environment | Environment The environment to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEnvironmentOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateEnvironmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string The parent must be of the form "projects/{projectId}/locations/{locationId}". |
environment | Environment The environment to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string The parent must be of the form "projects/{projectId}/locations/{locationId}". |
environment | Environment The environment to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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;
}
DeleteEnvironment(DeleteEnvironmentRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteEnvironment(DeleteEnvironmentRequest request, CallSettings callSettings = null)
Delete an environment.
Parameters | |
---|---|
Name | Description |
request | DeleteEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The environment to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteEnvironmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The environment to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The environment to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata | A Task containing the RPC response. |
// 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;
}
GetEnvironment(GetEnvironmentRequest, CallSettings)
public virtual Environment GetEnvironment(GetEnvironmentRequest request, CallSettings callSettings = null)
Get an existing environment.
Parameters | |
---|---|
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Environment | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The resource name of the environment to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Environment | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskEnvironment | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskEnvironment | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The resource name of the environment to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskEnvironment | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The resource name of the environment to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskEnvironment | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | ListEnvironmentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListEnvironmentsResponseEnvironment | A pageable sequence of Environment resources. |
// 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 | |
---|---|
Name | Description |
parent | string List environments in the given project and location, in the form: "projects/{projectId}/locations/{locationId}" |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListEnvironmentsResponseEnvironment | A pageable sequence of Environment resources. |
// 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 | |
---|---|
Name | Description |
request | ListEnvironmentsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListEnvironmentsResponseEnvironment | A pageable asynchronous sequence of Environment resources. |
// 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 | |
---|---|
Name | Description |
parent | string List environments in the given project and location, in the form: "projects/{projectId}/locations/{locationId}" |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListEnvironmentsResponseEnvironment | A pageable asynchronous sequence of Environment resources. |
// 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 | |
---|---|
Name | Description |
request | LoadSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationLoadSnapshotResponseOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | LoadSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationLoadSnapshotResponseOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | LoadSnapshotRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationLoadSnapshotResponseOperationMetadata | A Task containing the RPC response. |
// 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;
}
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | 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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | SaveSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationSaveSnapshotResponseOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | SaveSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationSaveSnapshotResponseOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | SaveSnapshotRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationSaveSnapshotResponseOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.
UpdateEnvironment(UpdateEnvironmentRequest, CallSettings)
public virtual Operation<Environment, OperationMetadata> UpdateEnvironment(UpdateEnvironmentRequest request, CallSettings callSettings = null)
Update an environment.
Parameters | |
---|---|
Name | Description |
request | UpdateEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEnvironmentOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
environment | Environment A patch environment. Fields specified by the |
updateMask | FieldMask Required. A comma-separated list of paths, relative to { "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 { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not
included in the It is also possible to replace an entire map field by providing the
map field's path in the { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } Note: Only the following fields can be updated:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEnvironmentOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateEnvironmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
environment | Environment A patch environment. Fields specified by the |
updateMask | FieldMask Required. A comma-separated list of paths, relative to { "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 { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not
included in the It is also possible to replace an entire map field by providing the
map field's path in the { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } Note: Only the following fields can be updated:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" |
environment | Environment A patch environment. Fields specified by the |
updateMask | FieldMask Required. A comma-separated list of paths, relative to { "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 { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not
included in the It is also possible to replace an entire map field by providing the
map field's path in the { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } Note: Only the following fields can be updated:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEnvironmentOperationMetadata | A Task containing the RPC response. |
// 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;
}