- 3.11.0 (latest)
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
public abstract class PersistentResourceServiceClient
Reference documentation and code samples for the Cloud AI Platform v1 API class PersistentResourceServiceClient.
PersistentResourceService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Assembly
Google.Cloud.AIPlatform.V1.dll
Remarks
A service for managing Vertex AI's machine learning PersistentResource.
Properties
CreatePersistentResourceOperationsClient
public virtual OperationsClient CreatePersistentResourceOperationsClient { get; }
The long-running operations client for CreatePersistentResource
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the PersistentResourceService service, which is a host of "aiplatform.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default PersistentResourceService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default PersistentResourceService scopes are:
DeletePersistentResourceOperationsClient
public virtual OperationsClient DeletePersistentResourceOperationsClient { get; }
The long-running operations client for DeletePersistentResource
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual PersistentResourceService.PersistentResourceServiceClient GrpcClient { get; }
The underlying gRPC PersistentResourceService client
Property Value | |
---|---|
Type | Description |
PersistentResourceServicePersistentResourceServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RebootPersistentResourceOperationsClient
public virtual OperationsClient RebootPersistentResourceOperationsClient { get; }
The long-running operations client for RebootPersistentResource
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdatePersistentResourceOperationsClient
public virtual OperationsClient UpdatePersistentResourceOperationsClient { get; }
The long-running operations client for UpdatePersistentResource
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static PersistentResourceServiceClient Create()
Synchronously creates a PersistentResourceServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PersistentResourceServiceClientBuilder.
Returns | |
---|---|
Type | Description |
PersistentResourceServiceClient |
The created PersistentResourceServiceClient. |
CreateAsync(CancellationToken)
public static Task<PersistentResourceServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a PersistentResourceServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PersistentResourceServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskPersistentResourceServiceClient |
The task representing the created PersistentResourceServiceClient. |
CreatePersistentResource(LocationName, PersistentResource, string, CallSettings)
public virtual Operation<PersistentResource, CreatePersistentResourceOperationMetadata> CreatePersistentResource(LocationName parent, PersistentResource persistentResource, string persistentResourceId, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationPersistentResourceCreatePersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = persistentResourceServiceClient.CreatePersistentResource(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceCreatePersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResource(CreatePersistentResourceRequest, CallSettings)
public virtual Operation<PersistentResource, CreatePersistentResourceOperationMetadata> CreatePersistentResource(CreatePersistentResourceRequest request, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
CreatePersistentResourceRequest 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 |
OperationPersistentResourceCreatePersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
CreatePersistentResourceRequest request = new CreatePersistentResourceRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
PersistentResource = new PersistentResource(),
PersistentResourceId = "",
};
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = persistentResourceServiceClient.CreatePersistentResource(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceCreatePersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResource(string, PersistentResource, string, CallSettings)
public virtual Operation<PersistentResource, CreatePersistentResourceOperationMetadata> CreatePersistentResource(string parent, PersistentResource persistentResource, string persistentResourceId, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationPersistentResourceCreatePersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = persistentResourceServiceClient.CreatePersistentResource(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceCreatePersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(LocationName, PersistentResource, string, CallSettings)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(LocationName parent, PersistentResource persistentResource, string persistentResourceId, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(LocationName, PersistentResource, string, CancellationToken)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(LocationName parent, PersistentResource persistentResource, string persistentResourceId, CancellationToken cancellationToken)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(CreatePersistentResourceRequest, CallSettings)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(CreatePersistentResourceRequest request, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
CreatePersistentResourceRequest 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 |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePersistentResourceRequest request = new CreatePersistentResourceRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
PersistentResource = new PersistentResource(),
PersistentResourceId = "",
};
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(CreatePersistentResourceRequest, CancellationToken)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(CreatePersistentResourceRequest request, CancellationToken cancellationToken)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
CreatePersistentResourceRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePersistentResourceRequest request = new CreatePersistentResourceRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
PersistentResource = new PersistentResource(),
PersistentResourceId = "",
};
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(string, PersistentResource, string, CallSettings)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(string parent, PersistentResource persistentResource, string persistentResourceId, CallSettings callSettings = null)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
CreatePersistentResourceAsync(string, PersistentResource, string, CancellationToken)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> CreatePersistentResourceAsync(string parent, PersistentResource persistentResource, string persistentResourceId, CancellationToken cancellationToken)
Creates a PersistentResource.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the
PersistentResource in. Format: |
persistentResource |
PersistentResource Required. The PersistentResource to create. |
persistentResourceId |
string Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters
are |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PersistentResource persistentResource = new PersistentResource();
string persistentResourceId = "";
// Make the request
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.CreatePersistentResourceAsync(parent, persistentResource, persistentResourceId);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, CreatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, CreatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceCreatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
DeletePersistentResource(DeletePersistentResourceRequest, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeletePersistentResource(DeletePersistentResourceRequest request, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
DeletePersistentResourceRequest 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 |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
DeletePersistentResourceRequest request = new DeletePersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = persistentResourceServiceClient.DeletePersistentResource(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceDeletePersistentResource(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;
}
DeletePersistentResource(PersistentResourceName, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeletePersistentResource(PersistentResourceName name, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = persistentResourceServiceClient.DeletePersistentResource(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceDeletePersistentResource(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;
}
DeletePersistentResource(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeletePersistentResource(string name, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = persistentResourceServiceClient.DeletePersistentResource(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceDeletePersistentResource(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;
}
DeletePersistentResourceAsync(DeletePersistentResourceRequest, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(DeletePersistentResourceRequest request, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
DeletePersistentResourceRequest 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 |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePersistentResourceRequest request = new DeletePersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
DeletePersistentResourceAsync(DeletePersistentResourceRequest, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(DeletePersistentResourceRequest request, CancellationToken cancellationToken)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
DeletePersistentResourceRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePersistentResourceRequest request = new DeletePersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
DeletePersistentResourceAsync(PersistentResourceName, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(PersistentResourceName name, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
DeletePersistentResourceAsync(PersistentResourceName, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(PersistentResourceName name, CancellationToken cancellationToken)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
DeletePersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(string name, CallSettings callSettings = null)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
DeletePersistentResourceAsync(string, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeletePersistentResourceAsync(string name, CancellationToken cancellationToken)
Deletes a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await persistentResourceServiceClient.DeletePersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceDeletePersistentResourceAsync(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;
}
GetPersistentResource(GetPersistentResourceRequest, CallSettings)
public virtual PersistentResource GetPersistentResource(GetPersistentResourceRequest request, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
GetPersistentResourceRequest 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 |
PersistentResource |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
GetPersistentResourceRequest request = new GetPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
PersistentResource response = persistentResourceServiceClient.GetPersistentResource(request);
GetPersistentResource(PersistentResourceName, CallSettings)
public virtual PersistentResource GetPersistentResource(PersistentResourceName name, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PersistentResource |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
PersistentResource response = persistentResourceServiceClient.GetPersistentResource(name);
GetPersistentResource(string, CallSettings)
public virtual PersistentResource GetPersistentResource(string name, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PersistentResource |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
PersistentResource response = persistentResourceServiceClient.GetPersistentResource(name);
GetPersistentResourceAsync(GetPersistentResourceRequest, CallSettings)
public virtual Task<PersistentResource> GetPersistentResourceAsync(GetPersistentResourceRequest request, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
GetPersistentResourceRequest 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 |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
GetPersistentResourceRequest request = new GetPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(request);
GetPersistentResourceAsync(GetPersistentResourceRequest, CancellationToken)
public virtual Task<PersistentResource> GetPersistentResourceAsync(GetPersistentResourceRequest request, CancellationToken cancellationToken)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
GetPersistentResourceRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
GetPersistentResourceRequest request = new GetPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(request);
GetPersistentResourceAsync(PersistentResourceName, CallSettings)
public virtual Task<PersistentResource> GetPersistentResourceAsync(PersistentResourceName name, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(name);
GetPersistentResourceAsync(PersistentResourceName, CancellationToken)
public virtual Task<PersistentResource> GetPersistentResourceAsync(PersistentResourceName name, CancellationToken cancellationToken)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(name);
GetPersistentResourceAsync(string, CallSettings)
public virtual Task<PersistentResource> GetPersistentResourceAsync(string name, CallSettings callSettings = null)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(name);
GetPersistentResourceAsync(string, CancellationToken)
public virtual Task<PersistentResource> GetPersistentResourceAsync(string name, CancellationToken cancellationToken)
Gets a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPersistentResource |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
PersistentResource response = await persistentResourceServiceClient.GetPersistentResourceAsync(name);
ListPersistentResources(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResources(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to list the PersistentResources
from. Format: |
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 |
PagedEnumerableListPersistentResourcesResponsePersistentResource |
A pageable sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResources(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (PersistentResource 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 (ListPersistentResourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
ListPersistentResources(ListPersistentResourcesRequest, CallSettings)
public virtual PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResources(ListPersistentResourcesRequest request, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListPersistentResourcesRequest 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 |
PagedEnumerableListPersistentResourcesResponsePersistentResource |
A pageable sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
ListPersistentResourcesRequest request = new ListPersistentResourcesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResources(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (PersistentResource 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 (ListPersistentResourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
ListPersistentResources(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResources(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to list the PersistentResources
from. Format: |
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 |
PagedEnumerableListPersistentResourcesResponsePersistentResource |
A pageable sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResources(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (PersistentResource 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 (ListPersistentResourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
ListPersistentResourcesAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResourcesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to list the PersistentResources
from. Format: |
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 |
PagedAsyncEnumerableListPersistentResourcesResponsePersistentResource |
A pageable asynchronous sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResourcesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PersistentResource 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((ListPersistentResourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
ListPersistentResourcesAsync(ListPersistentResourcesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResourcesAsync(ListPersistentResourcesRequest request, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListPersistentResourcesRequest 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 |
PagedAsyncEnumerableListPersistentResourcesResponsePersistentResource |
A pageable asynchronous sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
ListPersistentResourcesRequest request = new ListPersistentResourcesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResourcesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PersistentResource 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((ListPersistentResourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
ListPersistentResourcesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> ListPersistentResourcesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists PersistentResources in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to list the PersistentResources
from. Format: |
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 |
PagedAsyncEnumerableListPersistentResourcesResponsePersistentResource |
A pageable asynchronous sequence of PersistentResource resources. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListPersistentResourcesResponse, PersistentResource> response = persistentResourceServiceClient.ListPersistentResourcesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PersistentResource 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((ListPersistentResourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PersistentResource 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<PersistentResource> 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 (PersistentResource 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;
PollOnceCreatePersistentResource(string, CallSettings)
public virtual Operation<PersistentResource, CreatePersistentResourceOperationMetadata> PollOnceCreatePersistentResource(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
CreatePersistentResource
.
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 |
OperationPersistentResourceCreatePersistentResourceOperationMetadata |
The result of polling the operation. |
PollOnceCreatePersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<PersistentResource, CreatePersistentResourceOperationMetadata>> PollOnceCreatePersistentResourceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreatePersistentResource
.
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 |
TaskOperationPersistentResourceCreatePersistentResourceOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeletePersistentResource(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeletePersistentResource(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
DeletePersistentResource
.
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 |
OperationEmptyDeleteOperationMetadata |
The result of polling the operation. |
PollOnceDeletePersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeletePersistentResourceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeletePersistentResource
.
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 |
TaskOperationEmptyDeleteOperationMetadata |
A task representing the result of polling the operation. |
PollOnceRebootPersistentResource(string, CallSettings)
public virtual Operation<PersistentResource, RebootPersistentResourceOperationMetadata> PollOnceRebootPersistentResource(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
RebootPersistentResource
.
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 |
OperationPersistentResourceRebootPersistentResourceOperationMetadata |
The result of polling the operation. |
PollOnceRebootPersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> PollOnceRebootPersistentResourceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RebootPersistentResource
.
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 |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A task representing the result of polling the operation. |
PollOnceUpdatePersistentResource(string, CallSettings)
public virtual Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> PollOnceUpdatePersistentResource(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
UpdatePersistentResource
.
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 |
OperationPersistentResourceUpdatePersistentResourceOperationMetadata |
The result of polling the operation. |
PollOnceUpdatePersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<PersistentResource, UpdatePersistentResourceOperationMetadata>> PollOnceUpdatePersistentResourceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdatePersistentResource
.
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 |
TaskOperationPersistentResourceUpdatePersistentResourceOperationMetadata |
A task representing the result of polling the operation. |
RebootPersistentResource(PersistentResourceName, CallSettings)
public virtual Operation<PersistentResource, RebootPersistentResourceOperationMetadata> RebootPersistentResource(PersistentResourceName name, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationPersistentResourceRebootPersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = persistentResourceServiceClient.RebootPersistentResource(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceRebootPersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResource(RebootPersistentResourceRequest, CallSettings)
public virtual Operation<PersistentResource, RebootPersistentResourceOperationMetadata> RebootPersistentResource(RebootPersistentResourceRequest request, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
RebootPersistentResourceRequest 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 |
OperationPersistentResourceRebootPersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
RebootPersistentResourceRequest request = new RebootPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = persistentResourceServiceClient.RebootPersistentResource(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceRebootPersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResource(string, CallSettings)
public virtual Operation<PersistentResource, RebootPersistentResourceOperationMetadata> RebootPersistentResource(string name, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationPersistentResourceRebootPersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = persistentResourceServiceClient.RebootPersistentResource(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceRebootPersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(PersistentResourceName, CallSettings)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(PersistentResourceName name, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(PersistentResourceName, CancellationToken)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(PersistentResourceName name, CancellationToken cancellationToken)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
PersistentResourceName Required. The name of the PersistentResource resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResourceName name = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(RebootPersistentResourceRequest, CallSettings)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(RebootPersistentResourceRequest request, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
RebootPersistentResourceRequest 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 |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
RebootPersistentResourceRequest request = new RebootPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(RebootPersistentResourceRequest, CancellationToken)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(RebootPersistentResourceRequest request, CancellationToken cancellationToken)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
RebootPersistentResourceRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
RebootPersistentResourceRequest request = new RebootPersistentResourceRequest
{
PersistentResourceName = PersistentResourceName.FromProjectLocationPersistentResource("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"),
};
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(string, CallSettings)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(string name, CallSettings callSettings = null)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
RebootPersistentResourceAsync(string, CancellationToken)
public virtual Task<Operation<PersistentResource, RebootPersistentResourceOperationMetadata>> RebootPersistentResourceAsync(string name, CancellationToken cancellationToken)
Reboots a PersistentResource.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the PersistentResource resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceRebootPersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
// Make the request
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> response = await persistentResourceServiceClient.RebootPersistentResourceAsync(name);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, RebootPersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, RebootPersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceRebootPersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource 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.
UpdatePersistentResource(PersistentResource, FieldMask, CallSettings)
public virtual Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> UpdatePersistentResource(PersistentResource persistentResource, FieldMask updateMask, CallSettings callSettings = null)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
persistentResource |
PersistentResource Required. The PersistentResource to update. The PersistentResource's |
updateMask |
FieldMask Required. Specify the fields to be overwritten in the PersistentResource by the update method. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationPersistentResourceUpdatePersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
PersistentResource persistentResource = new PersistentResource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = persistentResourceServiceClient.UpdatePersistentResource(persistentResource, updateMask);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceUpdatePersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
UpdatePersistentResource(UpdatePersistentResourceRequest, CallSettings)
public virtual Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> UpdatePersistentResource(UpdatePersistentResourceRequest request, CallSettings callSettings = null)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
UpdatePersistentResourceRequest 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 |
OperationPersistentResourceUpdatePersistentResourceOperationMetadata |
The RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
// Initialize request argument(s)
UpdatePersistentResourceRequest request = new UpdatePersistentResourceRequest
{
PersistentResource = new PersistentResource(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = persistentResourceServiceClient.UpdatePersistentResource(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = persistentResourceServiceClient.PollOnceUpdatePersistentResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
UpdatePersistentResourceAsync(PersistentResource, FieldMask, CallSettings)
public virtual Task<Operation<PersistentResource, UpdatePersistentResourceOperationMetadata>> UpdatePersistentResourceAsync(PersistentResource persistentResource, FieldMask updateMask, CallSettings callSettings = null)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
persistentResource |
PersistentResource Required. The PersistentResource to update. The PersistentResource's |
updateMask |
FieldMask Required. Specify the fields to be overwritten in the PersistentResource by the update method. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceUpdatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResource persistentResource = new PersistentResource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.UpdatePersistentResourceAsync(persistentResource, updateMask);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceUpdatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
UpdatePersistentResourceAsync(PersistentResource, FieldMask, CancellationToken)
public virtual Task<Operation<PersistentResource, UpdatePersistentResourceOperationMetadata>> UpdatePersistentResourceAsync(PersistentResource persistentResource, FieldMask updateMask, CancellationToken cancellationToken)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
persistentResource |
PersistentResource Required. The PersistentResource to update. The PersistentResource's |
updateMask |
FieldMask Required. Specify the fields to be overwritten in the PersistentResource by the update method. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceUpdatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
PersistentResource persistentResource = new PersistentResource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.UpdatePersistentResourceAsync(persistentResource, updateMask);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceUpdatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
UpdatePersistentResourceAsync(UpdatePersistentResourceRequest, CallSettings)
public virtual Task<Operation<PersistentResource, UpdatePersistentResourceOperationMetadata>> UpdatePersistentResourceAsync(UpdatePersistentResourceRequest request, CallSettings callSettings = null)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
UpdatePersistentResourceRequest 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 |
TaskOperationPersistentResourceUpdatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
UpdatePersistentResourceRequest request = new UpdatePersistentResourceRequest
{
PersistentResource = new PersistentResource(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.UpdatePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceUpdatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}
UpdatePersistentResourceAsync(UpdatePersistentResourceRequest, CancellationToken)
public virtual Task<Operation<PersistentResource, UpdatePersistentResourceOperationMetadata>> UpdatePersistentResourceAsync(UpdatePersistentResourceRequest request, CancellationToken cancellationToken)
Updates a PersistentResource.
Parameters | |
---|---|
Name | Description |
request |
UpdatePersistentResourceRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationPersistentResourceUpdatePersistentResourceOperationMetadata |
A Task containing the RPC response. |
// Create client
PersistentResourceServiceClient persistentResourceServiceClient = await PersistentResourceServiceClient.CreateAsync();
// Initialize request argument(s)
UpdatePersistentResourceRequest request = new UpdatePersistentResourceRequest
{
PersistentResource = new PersistentResource(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> response = await persistentResourceServiceClient.UpdatePersistentResourceAsync(request);
// Poll until the returned long-running operation is complete
Operation<PersistentResource, UpdatePersistentResourceOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PersistentResource 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<PersistentResource, UpdatePersistentResourceOperationMetadata> retrievedResponse = await persistentResourceServiceClient.PollOnceUpdatePersistentResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
PersistentResource retrievedResult = retrievedResponse.Result;
}