public abstract class CloudFilestoreManagerClient
Reference documentation and code samples for the Cloud Filestore v1 API class CloudFilestoreManagerClient.
CloudFilestoreManager client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Filestore.V1Assembly
Google.Cloud.Filestore.V1.dll
Remarks
Configures and manages Filestore resources.
Filestore Manager v1.
The file.googleapis.com
service implements the Filestore API and
defines the following resource model for managing instances:
- The service works with a collection of cloud projects, named:
/projects/*
- Each project has a collection of available locations, named:
/locations/*
- Each location has a collection of instances and backups, named:
/instances/*
and/backups/*
respectively. - As such, Filestore instances are resources of the form:
/projects/{project_number}/locations/{location_id}/instances/{instance_id}
and backups are resources of the form:/projects/{project_number}/locations/{location_id}/backup/{backup_id}
Note that location_id must be a Google Cloud zone
for instances, but
a Google Cloud region
for backups; for example:
projects/12345/locations/us-central1-c/instances/my-filestore
projects/12345/locations/us-central1/backups/my-backup
Properties
CreateBackupOperationsClient
public virtual OperationsClient CreateBackupOperationsClient { get; }
The long-running operations client for CreateBackup
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateInstanceOperationsClient
public virtual OperationsClient CreateInstanceOperationsClient { get; }
The long-running operations client for CreateInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateSnapshotOperationsClient
public virtual OperationsClient CreateSnapshotOperationsClient { get; }
The long-running operations client for CreateSnapshot
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the CloudFilestoreManager service, which is a host of "file.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CloudFilestoreManager scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default CloudFilestoreManager scopes are:
DeleteBackupOperationsClient
public virtual OperationsClient DeleteBackupOperationsClient { get; }
The long-running operations client for DeleteBackup
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteInstanceOperationsClient
public virtual OperationsClient DeleteInstanceOperationsClient { get; }
The long-running operations client for DeleteInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteSnapshotOperationsClient
public virtual OperationsClient DeleteSnapshotOperationsClient { get; }
The long-running operations client for DeleteSnapshot
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual CloudFilestoreManager.CloudFilestoreManagerClient GrpcClient { get; }
The underlying gRPC CloudFilestoreManager client
Property Value | |
---|---|
Type | Description |
CloudFilestoreManagerCloudFilestoreManagerClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RestoreInstanceOperationsClient
public virtual OperationsClient RestoreInstanceOperationsClient { get; }
The long-running operations client for RestoreInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
RevertInstanceOperationsClient
public virtual OperationsClient RevertInstanceOperationsClient { get; }
The long-running operations client for RevertInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateBackupOperationsClient
public virtual OperationsClient UpdateBackupOperationsClient { get; }
The long-running operations client for UpdateBackup
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateInstanceOperationsClient
public virtual OperationsClient UpdateInstanceOperationsClient { get; }
The long-running operations client for UpdateInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateSnapshotOperationsClient
public virtual OperationsClient UpdateSnapshotOperationsClient { get; }
The long-running operations client for UpdateSnapshot
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static CloudFilestoreManagerClient Create()
Synchronously creates a CloudFilestoreManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudFilestoreManagerClientBuilder.
Returns | |
---|---|
Type | Description |
CloudFilestoreManagerClient |
The created CloudFilestoreManagerClient. |
CreateAsync(CancellationToken)
public static Task<CloudFilestoreManagerClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a CloudFilestoreManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudFilestoreManagerClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskCloudFilestoreManagerClient |
The task representing the created CloudFilestoreManagerClient. |
CreateBackup(LocationName, Backup, string, CallSettings)
public virtual Operation<Backup, OperationMetadata> CreateBackup(LocationName parent, Backup backup, string backupId, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBackupOperationMetadata |
The RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = cloudFilestoreManagerClient.CreateBackup(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackup(CreateBackupRequest, CallSettings)
public virtual Operation<Backup, OperationMetadata> CreateBackup(CreateBackupRequest request, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
request |
CreateBackupRequest 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 |
OperationBackupOperationMetadata |
The RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Backup = new Backup(),
BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = cloudFilestoreManagerClient.CreateBackup(request);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackup(string, Backup, string, CallSettings)
public virtual Operation<Backup, OperationMetadata> CreateBackup(string parent, Backup backup, string backupId, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBackupOperationMetadata |
The RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = cloudFilestoreManagerClient.CreateBackup(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(LocationName, Backup, string, CallSettings)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(LocationName parent, Backup backup, string backupId, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(LocationName, Backup, string, CancellationToken)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(LocationName parent, Backup backup, string backupId, CancellationToken cancellationToken)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(CreateBackupRequest, CallSettings)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(CreateBackupRequest request, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
request |
CreateBackupRequest 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 |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Backup = new Backup(),
BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(CreateBackupRequest, CancellationToken)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(CreateBackupRequest request, CancellationToken cancellationToken)
Creates a backup.
Parameters | |
---|---|
Name | Description |
request |
CreateBackupRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Backup = new Backup(),
BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(string, Backup, string, CallSettings)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(string parent, Backup backup, string backupId, CallSettings callSettings = null)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(string, Backup, string, CancellationToken)
public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(string parent, Backup backup, string backupId, CancellationToken cancellationToken)
Creates a backup.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The backup's project and location, in the format
|
backup |
Backup Required. A [backup resource][google.cloud.filestore.v1.Backup] |
backupId |
string Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBackupOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await cloudFilestoreManagerClient.CreateBackupAsync(parent, backup, backupId);
// Poll until the returned long-running operation is complete
Operation<Backup, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup 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<Backup, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateInstance(LocationName, Instance, string, CallSettings)
public virtual Operation<Instance, OperationMetadata> CreateInstance(LocationName parent, Instance instance, string instanceId, CallSettings callSettings = null)
Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The instance's project and location, in the format
|
instance |
Instance Required. An [instance resource][google.cloud.filestore.v1.Instance] |
instanceId |
string Required. The name of the instance to create. The name must be unique for the specified project and location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceOperationMetadata |
The RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = cloudFilestoreManagerClient.CreateInstance(parent, instance, instanceId);
// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Instance retrievedResult = retrievedResponse.Result;
}
CreateInstance(CreateInstanceRequest, CallSettings)
public virtual Operation<Instance, OperationMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)
Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Parameters | |
---|---|
Name | Description |
request |
CreateInstanceRequest 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 |
OperationInstanceOperationMetadata |
The RPC response. |
// Create client
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InstanceId = "",
Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudFilestoreManagerClient.CreateInstance(request);
// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Instance retrievedResult = retrievedResponse.Result;
}
CreateInstance(string, Instance, string, CallSettings)
public virtual Operation<Instance, OperationMetadata> CreateInstance(string parent, Instance instance, string instanceId, CallSettings callSettings = null)
Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Parameters | |
---|---|
Name | Description |
parent |
string Required. The instance's project and location, in the format
|
instance |
Instance Required. An [instance resource][google.cloud.filestore.v1.Instance] |
instanceId |
string Required. The name of the instance to create. The name must be unique for the specified project and location. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation |