Memorystore v1 API - Class MemorystoreClient (1.0.0-beta03)

public abstract class MemorystoreClient

Reference documentation and code samples for the Memorystore v1 API class MemorystoreClient.

Memorystore client wrapper, for convenient use.

Inheritance

object > MemorystoreClient

Derived Types

Namespace

Google.Cloud.Memorystore.V1

Assembly

Google.Cloud.Memorystore.V1.dll

Remarks

Service describing handlers for resources

Properties

BackupInstanceOperationsClient

public virtual OperationsClient BackupInstanceOperationsClient { get; }

The long-running operations client for BackupInstance.

Property Value
Type Description
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Memorystore scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default Memorystore 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

ExportBackupOperationsClient

public virtual OperationsClient ExportBackupOperationsClient { get; }

The long-running operations client for ExportBackup.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Memorystore.MemorystoreClient GrpcClient { get; }

The underlying gRPC Memorystore client

Property Value
Type Description
MemorystoreMemorystoreClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

RescheduleMaintenanceOperationsClient

public virtual OperationsClient RescheduleMaintenanceOperationsClient { get; }

The long-running operations client for RescheduleMaintenance.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateInstanceOperationsClient

public virtual OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
Type Description
OperationsClient

Methods

BackupInstance(BackupInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> BackupInstance(BackupInstanceRequest request, CallSettings callSettings = null)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
request BackupInstanceRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
BackupInstanceRequest request = new BackupInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    Ttl = new Duration(),
    BackupId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.BackupInstance(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 = memorystoreClient.PollOnceBackupInstance(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;
}

BackupInstance(InstanceName, CallSettings)

public virtual Operation<Instance, OperationMetadata> BackupInstance(InstanceName name, CallSettings callSettings = null)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name InstanceName

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.BackupInstance(name);

// 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 = memorystoreClient.PollOnceBackupInstance(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;
}

BackupInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> BackupInstance(string name, CallSettings callSettings = null)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name string

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.BackupInstance(name);

// 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 = memorystoreClient.PollOnceBackupInstance(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;
}

BackupInstanceAsync(BackupInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> BackupInstanceAsync(BackupInstanceRequest request, CallSettings callSettings = null)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
request BackupInstanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupInstanceRequest request = new BackupInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    Ttl = new Duration(),
    BackupId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

BackupInstanceAsync(BackupInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> BackupInstanceAsync(BackupInstanceRequest request, CancellationToken cancellationToken)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
request BackupInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupInstanceRequest request = new BackupInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    Ttl = new Duration(),
    BackupId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

BackupInstanceAsync(InstanceName, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> BackupInstanceAsync(InstanceName name, CallSettings callSettings = null)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name InstanceName

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

BackupInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> BackupInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name InstanceName

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

BackupInstanceAsync(string, CallSettings)

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

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name string

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

BackupInstanceAsync(string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> BackupInstanceAsync(string name, CancellationToken cancellationToken)

Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Parameters
Name Description
name string

Required. Instance resource name using the form: projects/{project_id}/locations/{location_id}/instances/{instance_id} where location_id refers to a Google Cloud region.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.BackupInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceBackupInstanceAsync(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;
}

Create()

public static MemorystoreClient Create()

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

Returns
Type Description
MemorystoreClient

The created MemorystoreClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskMemorystoreClient

The task representing the created MemorystoreClient.

CreateInstance(LocationName, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(LocationName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.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 = memorystoreClient.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 a new Instance in a given project and location.

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.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.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 = memorystoreClient.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 a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.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 = memorystoreClient.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;
}

CreateInstanceAsync(LocationName, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

CreateInstanceAsync(LocationName, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
request CreateInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

CreateInstanceAsync(string, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

CreateInstanceAsync(string, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource where this instance will be created. Format: projects/{project}/locations/{location}

instance Instance

Required. The instance to create.

instanceId string

Required. The ID to use for the instance, which will become the final component of the instance's resource name.

This value is subject to the following restrictions:

  • Must be 4-63 characters in length
  • Must begin with a letter or digit
  • Must contain only lowercase letters, digits, and hyphens
  • Must not end with a hyphen
  • Must be unique within a location
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceCreateInstanceAsync(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;
}

DeleteBackup(BackupName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackup(BackupName name, CallSettings callSettings = null)

Deletes a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteBackup(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteBackup(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;
}

DeleteBackup(DeleteBackupRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackup(DeleteBackupRequest request, CallSettings callSettings = null)

Deletes a specific backup.

Parameters
Name Description
request DeleteBackupRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteBackup(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteBackup(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;
}

DeleteBackup(string, CallSettings)

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

Deletes a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteBackup(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteBackup(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;
}

DeleteBackupAsync(BackupName, CallSettings)

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

Deletes a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(BackupName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupAsync(BackupName name, CancellationToken cancellationToken)

Deletes a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CallSettings)

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

Deletes a specific backup.

Parameters
Name Description
request DeleteBackupRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupAsync(DeleteBackupRequest request, CancellationToken cancellationToken)

Deletes a specific backup.

Parameters
Name Description
request DeleteBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CallSettings)

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

Deletes a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CancellationToken)

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

Deletes a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteBackupAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteBackupAsync(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;
}

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteInstance(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteInstance(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;
}

DeleteInstance(InstanceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteInstance(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteInstance(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;
}

DeleteInstance(string, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = memorystoreClient.DeleteInstance(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = memorystoreClient.PollOnceDeleteInstance(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(string, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(string, CancellationToken)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await memorystoreClient.DeleteInstanceAsync(name);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(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;
}

ExportBackup(ExportBackupRequest, CallSettings)

public virtual Operation<Backup, OperationMetadata> ExportBackup(ExportBackupRequest request, CallSettings callSettings = null)

Exports a specific backup to a customer target Cloud Storage URI.

Parameters
Name Description
request ExportBackupRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
ExportBackupRequest request = new ExportBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    GcsBucket = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = memorystoreClient.ExportBackup(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 = memorystoreClient.PollOnceExportBackup(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;
}

ExportBackupAsync(ExportBackupRequest, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> ExportBackupAsync(ExportBackupRequest request, CallSettings callSettings = null)

Exports a specific backup to a customer target Cloud Storage URI.

Parameters
Name Description
request ExportBackupRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
ExportBackupRequest request = new ExportBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    GcsBucket = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await memorystoreClient.ExportBackupAsync(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 memorystoreClient.PollOnceExportBackupAsync(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;
}

ExportBackupAsync(ExportBackupRequest, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> ExportBackupAsync(ExportBackupRequest request, CancellationToken cancellationToken)

Exports a specific backup to a customer target Cloud Storage URI.

Parameters
Name Description
request ExportBackupRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
ExportBackupRequest request = new ExportBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
    GcsBucket = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await memorystoreClient.ExportBackupAsync(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 memorystoreClient.PollOnceExportBackupAsync(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;
}

GetBackup(BackupName, CallSettings)

public virtual Backup GetBackup(BackupName name, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Backup

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Backup response = memorystoreClient.GetBackup(name);

GetBackup(GetBackupRequest, CallSettings)

public virtual Backup GetBackup(GetBackupRequest request, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
request GetBackupRequest

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
Backup

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
};
// Make the request
Backup response = memorystoreClient.GetBackup(request);

GetBackup(string, CallSettings)

public virtual Backup GetBackup(string name, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Backup

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Backup response = memorystoreClient.GetBackup(name);

GetBackupAsync(BackupName, CallSettings)

public virtual Task<Backup> GetBackupAsync(BackupName name, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(name);

GetBackupAsync(BackupName, CancellationToken)

public virtual Task<Backup> GetBackupAsync(BackupName name, CancellationToken cancellationToken)

Gets the details of a specific backup.

Parameters
Name Description
name BackupName

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(name);

GetBackupAsync(GetBackupRequest, CallSettings)

public virtual Task<Backup> GetBackupAsync(GetBackupRequest request, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
request GetBackupRequest

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
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
};
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(request);

GetBackupAsync(GetBackupRequest, CancellationToken)

public virtual Task<Backup> GetBackupAsync(GetBackupRequest request, CancellationToken cancellationToken)

Gets the details of a specific backup.

Parameters
Name Description
request GetBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupCollectionBackup("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]"),
};
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(request);

GetBackupAsync(string, CallSettings)

public virtual Task<Backup> GetBackupAsync(string name, CallSettings callSettings = null)

Gets the details of a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(name);

GetBackupAsync(string, CancellationToken)

public virtual Task<Backup> GetBackupAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific backup.

Parameters
Name Description
name string

Required. Instance backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]/backups/[BACKUP]";
// Make the request
Backup response = await memorystoreClient.GetBackupAsync(name);

GetBackupCollection(BackupCollectionName, CallSettings)

public virtual BackupCollection GetBackupCollection(BackupCollectionName name, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
name BackupCollectionName

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupCollection

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
BackupCollectionName name = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
// Make the request
BackupCollection response = memorystoreClient.GetBackupCollection(name);

GetBackupCollection(GetBackupCollectionRequest, CallSettings)

public virtual BackupCollection GetBackupCollection(GetBackupCollectionRequest request, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
request GetBackupCollectionRequest

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
BackupCollection

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
GetBackupCollectionRequest request = new GetBackupCollectionRequest
{
    BackupCollectionName = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]"),
};
// Make the request
BackupCollection response = memorystoreClient.GetBackupCollection(request);

GetBackupCollection(string, CallSettings)

public virtual BackupCollection GetBackupCollection(string name, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
name string

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupCollection

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]";
// Make the request
BackupCollection response = memorystoreClient.GetBackupCollection(name);

GetBackupCollectionAsync(BackupCollectionName, CallSettings)

public virtual Task<BackupCollection> GetBackupCollectionAsync(BackupCollectionName name, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
name BackupCollectionName

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupCollectionName name = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(name);

GetBackupCollectionAsync(BackupCollectionName, CancellationToken)

public virtual Task<BackupCollection> GetBackupCollectionAsync(BackupCollectionName name, CancellationToken cancellationToken)

Get a backup collection.

Parameters
Name Description
name BackupCollectionName

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupCollectionName name = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(name);

GetBackupCollectionAsync(GetBackupCollectionRequest, CallSettings)

public virtual Task<BackupCollection> GetBackupCollectionAsync(GetBackupCollectionRequest request, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
request GetBackupCollectionRequest

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
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetBackupCollectionRequest request = new GetBackupCollectionRequest
{
    BackupCollectionName = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]"),
};
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(request);

GetBackupCollectionAsync(GetBackupCollectionRequest, CancellationToken)

public virtual Task<BackupCollection> GetBackupCollectionAsync(GetBackupCollectionRequest request, CancellationToken cancellationToken)

Get a backup collection.

Parameters
Name Description
request GetBackupCollectionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetBackupCollectionRequest request = new GetBackupCollectionRequest
{
    BackupCollectionName = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]"),
};
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(request);

GetBackupCollectionAsync(string, CallSettings)

public virtual Task<BackupCollection> GetBackupCollectionAsync(string name, CallSettings callSettings = null)

Get a backup collection.

Parameters
Name Description
name string

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]";
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(name);

GetBackupCollectionAsync(string, CancellationToken)

public virtual Task<BackupCollection> GetBackupCollectionAsync(string name, CancellationToken cancellationToken)

Get a backup collection.

Parameters
Name Description
name string

Required. Instance backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a Google Cloud region.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupCollection

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]";
// Make the request
BackupCollection response = await memorystoreClient.GetBackupCollectionAsync(name);

GetCertificateAuthority(GetCertificateAuthorityRequest, CallSettings)

public virtual CertificateAuthority GetCertificateAuthority(GetCertificateAuthorityRequest request, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
request GetCertificateAuthorityRequest

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
CertificateAuthority

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
CertificateAuthority response = memorystoreClient.GetCertificateAuthority(request);

GetCertificateAuthority(InstanceName, CallSettings)

public virtual CertificateAuthority GetCertificateAuthority(InstanceName name, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name InstanceName

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CertificateAuthority

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name);

GetCertificateAuthority(string, CallSettings)

public virtual CertificateAuthority GetCertificateAuthority(string name, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name string

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CertificateAuthority

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name);

GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CallSettings)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
request GetCertificateAuthorityRequest

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
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request);

GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CancellationToken)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, CancellationToken cancellationToken)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
request GetCertificateAuthorityRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request);

GetCertificateAuthorityAsync(InstanceName, CallSettings)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(InstanceName name, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name InstanceName

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name);

GetCertificateAuthorityAsync(InstanceName, CancellationToken)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(InstanceName name, CancellationToken cancellationToken)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name InstanceName

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name);

GetCertificateAuthorityAsync(string, CallSettings)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(string name, CallSettings callSettings = null)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name string

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name);

GetCertificateAuthorityAsync(string, CancellationToken)

public virtual Task<CertificateAuthority> GetCertificateAuthorityAsync(string name, CancellationToken cancellationToken)

Gets details about the certificate authority for an Instance.

Parameters
Name Description
name string

Required. The name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name);

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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
Instance

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = memorystoreClient.GetInstance(request);

GetInstance(InstanceName, CallSettings)

public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = memorystoreClient.GetInstance(name);

GetInstance(string, CallSettings)

public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = memorystoreClient.GetInstance(name);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(request);

GetInstanceAsync(InstanceName, CallSettings)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(name);

GetInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(name);

GetInstanceAsync(string, CallSettings)

public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(name);

GetInstanceAsync(string, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await memorystoreClient.GetInstanceAsync(name);

ListBackupCollections(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollections(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
parent LocationName

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupCollectionsResponseBackupCollection

A pageable sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollections(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupCollection 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 (ListBackupCollectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackupCollections(ListBackupCollectionsRequest, CallSettings)

public virtual PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollections(ListBackupCollectionsRequest request, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
request ListBackupCollectionsRequest

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
PagedEnumerableListBackupCollectionsResponseBackupCollection

A pageable sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
ListBackupCollectionsRequest request = new ListBackupCollectionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollections(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupCollection 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 (ListBackupCollectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackupCollections(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollections(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
parent string

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupCollectionsResponseBackupCollection

A pageable sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollections(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupCollection 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 (ListBackupCollectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackupCollectionsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollectionsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
parent LocationName

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupCollectionsResponseBackupCollection

A pageable asynchronous sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollectionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupCollection 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((ListBackupCollectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackupCollectionsAsync(ListBackupCollectionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollectionsAsync(ListBackupCollectionsRequest request, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
request ListBackupCollectionsRequest

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
PagedAsyncEnumerableListBackupCollectionsResponseBackupCollection

A pageable asynchronous sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
ListBackupCollectionsRequest request = new ListBackupCollectionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollectionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupCollection 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((ListBackupCollectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackupCollectionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> ListBackupCollectionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Parameters
Name Description
parent string

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupCollectionsResponseBackupCollection

A pageable asynchronous sequence of BackupCollection resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListBackupCollectionsResponse, BackupCollection> response = memorystoreClient.ListBackupCollectionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupCollection 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((ListBackupCollectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupCollection 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<BackupCollection> 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 (BackupCollection 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;

ListBackups(BackupCollectionName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(BackupCollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
parent BackupCollectionName

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
BackupCollectionName parent = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackups(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup 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 (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListBackups(ListBackupsRequest, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(ListBackupsRequest request, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
request ListBackupsRequest

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
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsBackupCollectionName = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]"),
};
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackups(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup 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 (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListBackups(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
parent string

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]";
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackups(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup 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 (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListBackupsAsync(BackupCollectionName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(BackupCollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
parent BackupCollectionName

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
BackupCollectionName parent = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackupsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup 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((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListBackupsAsync(ListBackupsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(ListBackupsRequest request, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
request ListBackupsRequest

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
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsBackupCollectionName = BackupCollectionName.FromProjectLocationBackupCollection("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]"),
};
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackupsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup 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((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListBackupsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all backups owned by a backup collection.

Parameters
Name Description
parent string

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupCollections/[BACKUP_COLLECTION]";
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = memorystoreClient.ListBackupsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup 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((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup 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<Backup> 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 (Backup 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;

ListInstances(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent to list instances from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstances(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstances(ListInstancesRequest, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ListInstancesRequest request, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
request ListInstancesRequest

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
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstances(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstances(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
parent string

Required. The parent to list instances from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstances(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent to list instances from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstancesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(ListInstancesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ListInstancesRequest request, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
request ListInstancesRequest

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
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstancesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Instances in a given project and location.

Parameters
Name Description
parent string

Required. The parent to list instances from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = memorystoreClient.ListInstancesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

PollOnceBackupInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceBackupInstance(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The result of polling the operation.

PollOnceBackupInstanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The result of polling the operation.

PollOnceCreateInstanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBackup(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteBackupAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteInstance(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteInstanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceExportBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> PollOnceExportBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The result of polling the operation.

PollOnceExportBackupAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A task representing the result of polling the operation.

PollOnceRescheduleMaintenance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceRescheduleMaintenance(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The result of polling the operation.

PollOnceRescheduleMaintenanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceUpdateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The result of polling the operation.

PollOnceUpdateInstanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A task representing the result of polling the operation.

RescheduleMaintenance(InstanceName, RescheduleType, Timestamp, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
name InstanceName

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.RescheduleMaintenance(name, rescheduleType, scheduleTime);

// 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 = memorystoreClient.PollOnceRescheduleMaintenance(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;
}

RescheduleMaintenance(RescheduleMaintenanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(RescheduleMaintenanceRequest request, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
request RescheduleMaintenanceRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.RescheduleMaintenance(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 = memorystoreClient.PollOnceRescheduleMaintenance(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;
}

RescheduleMaintenance(string, RescheduleType, Timestamp, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
name string

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.RescheduleMaintenance(name, rescheduleType, scheduleTime);

// 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 = memorystoreClient.PollOnceRescheduleMaintenance(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;
}

RescheduleMaintenanceAsync(InstanceName, RescheduleType, Timestamp, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
name InstanceName

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

RescheduleMaintenanceAsync(InstanceName, RescheduleType, Timestamp, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CancellationToken cancellationToken)

Reschedules upcoming maintenance event.

Parameters
Name Description
name InstanceName

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(RescheduleMaintenanceRequest request, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
request RescheduleMaintenanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(RescheduleMaintenanceRequest request, CancellationToken cancellationToken)

Reschedules upcoming maintenance event.

Parameters
Name Description
request RescheduleMaintenanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

RescheduleMaintenanceAsync(string, RescheduleType, Timestamp, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedules upcoming maintenance event.

Parameters
Name Description
name string

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

RescheduleMaintenanceAsync(string, RescheduleType, Timestamp, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CancellationToken cancellationToken)

Reschedules upcoming maintenance event.

Parameters
Name Description
name string

Required. Name of the instance to reschedule maintenance for: projects/{project}/locations/{location_id}/instances/{instance}

rescheduleType RescheduleMaintenanceRequestTypesRescheduleType

Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format. Example: 2012-11-15T16:19:00.094Z.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceRescheduleMaintenanceAsync(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;
}

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.

Remarks

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

UpdateInstance(Instance, FieldMask, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpdateInstance(Instance instance, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Instance.

Parameters
Name Description
instance Instance

Required. The instance to update.

updateMask FieldMask

Optional. The list of fields to be updated on the instance. At least one field must be specified.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.UpdateInstance(instance, updateMask);

// 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 = memorystoreClient.PollOnceUpdateInstance(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;
}

UpdateInstance(UpdateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpdateInstance(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates the parameters of a single Instance.

Parameters
Name Description
request UpdateInstanceRequest

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.

Example
// Create client
MemorystoreClient memorystoreClient = MemorystoreClient.Create();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = memorystoreClient.UpdateInstance(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 = memorystoreClient.PollOnceUpdateInstance(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;
}

UpdateInstanceAsync(Instance, FieldMask, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(Instance instance, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Instance.

Parameters
Name Description
instance Instance

Required. The instance to update.

updateMask FieldMask

Optional. The list of fields to be updated on the instance. At least one field must be specified.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceUpdateInstanceAsync(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;
}

UpdateInstanceAsync(Instance, FieldMask, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(Instance instance, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a single Instance.

Parameters
Name Description
instance Instance

Required. The instance to update.

updateMask FieldMask

Optional. The list of fields to be updated on the instance. At least one field must be specified.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceUpdateInstanceAsync(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;
}

UpdateInstanceAsync(UpdateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates the parameters of a single Instance.

Parameters
Name Description
request UpdateInstanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceUpdateInstanceAsync(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;
}

UpdateInstanceAsync(UpdateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CancellationToken cancellationToken)

Updates the parameters of a single Instance.

Parameters
Name Description
request UpdateInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
    RequestId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await memorystoreClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// 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 = await memorystoreClient.PollOnceUpdateInstanceAsync(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;
}