Compute Engine v1 API - Class RegionInstantSnapshotsClient (2.15.0)

public abstract class RegionInstantSnapshotsClient

Reference documentation and code samples for the Compute Engine v1 API class RegionInstantSnapshotsClient.

RegionInstantSnapshots client wrapper, for convenient use.

Inheritance

object > RegionInstantSnapshotsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The RegionInstantSnapshots API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default RegionInstantSnapshots scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual RegionInstantSnapshots.RegionInstantSnapshotsClient GrpcClient { get; }

The underlying gRPC RegionInstantSnapshots client

Property Value
TypeDescription
RegionInstantSnapshotsRegionInstantSnapshotsClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static RegionInstantSnapshotsClient Create()

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

Returns
TypeDescription
RegionInstantSnapshotsClient

The created RegionInstantSnapshotsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskRegionInstantSnapshotsClient

The task representing the created RegionInstantSnapshotsClient.

Delete(DeleteRegionInstantSnapshotRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
requestDeleteRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
DeleteRegionInstantSnapshotRequest request = new DeleteRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(string, string, string, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string region, string instantSnapshot, CallSettings callSettings = null)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.Delete(project, region, instantSnapshot);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRegionInstantSnapshotRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
requestDeleteRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
DeleteRegionInstantSnapshotRequest request = new DeleteRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
requestDeleteRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
DeleteRegionInstantSnapshotRequest request = new DeleteRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string instantSnapshot, CallSettings callSettings = null)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.DeleteAsync(project, region, instantSnapshot);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string instantSnapshot, CancellationToken cancellationToken)

Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.DeleteAsync(project, region, instantSnapshot);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetRegionInstantSnapshotRequest, CallSettings)

public virtual InstantSnapshot Get(GetRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
requestGetRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstantSnapshot

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
GetRegionInstantSnapshotRequest request = new GetRegionInstantSnapshotRequest
{
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
InstantSnapshot response = regionInstantSnapshotsClient.Get(request);

Get(string, string, string, CallSettings)

public virtual InstantSnapshot Get(string project, string region, string instantSnapshot, CallSettings callSettings = null)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstantSnapshot

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
InstantSnapshot response = regionInstantSnapshotsClient.Get(project, region, instantSnapshot);

GetAsync(GetRegionInstantSnapshotRequest, CallSettings)

public virtual Task<InstantSnapshot> GetAsync(GetRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
requestGetRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInstantSnapshot

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetRegionInstantSnapshotRequest request = new GetRegionInstantSnapshotRequest
{
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
InstantSnapshot response = await regionInstantSnapshotsClient.GetAsync(request);

GetAsync(GetRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<InstantSnapshot> GetAsync(GetRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
requestGetRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInstantSnapshot

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetRegionInstantSnapshotRequest request = new GetRegionInstantSnapshotRequest
{
    Region = "",
    Project = "",
    InstantSnapshot = "",
};
// Make the request
InstantSnapshot response = await regionInstantSnapshotsClient.GetAsync(request);

GetAsync(string, string, string, CallSettings)

public virtual Task<InstantSnapshot> GetAsync(string project, string region, string instantSnapshot, CallSettings callSettings = null)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInstantSnapshot

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
InstantSnapshot response = await regionInstantSnapshotsClient.GetAsync(project, region, instantSnapshot);

GetAsync(string, string, string, CancellationToken)

public virtual Task<InstantSnapshot> GetAsync(string project, string region, string instantSnapshot, CancellationToken cancellationToken)

Returns the specified InstantSnapshot resource in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

instantSnapshotstring

Name of the InstantSnapshot resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInstantSnapshot

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string instantSnapshot = "";
// Make the request
InstantSnapshot response = await regionInstantSnapshotsClient.GetAsync(project, region, instantSnapshot);

GetIamPolicy(GetIamPolicyRegionInstantSnapshotRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
GetIamPolicyRegionInstantSnapshotRequest request = new GetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = regionInstantSnapshotsClient.GetIamPolicy(request);

GetIamPolicy(string, string, string, CallSettings)

public virtual Policy GetIamPolicy(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = regionInstantSnapshotsClient.GetIamPolicy(project, region, resource);

GetIamPolicyAsync(GetIamPolicyRegionInstantSnapshotRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRegionInstantSnapshotRequest request = new GetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await regionInstantSnapshotsClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRegionInstantSnapshotRequest request = new GetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await regionInstantSnapshotsClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, string, string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await regionInstantSnapshotsClient.GetIamPolicyAsync(project, region, resource);

GetIamPolicyAsync(string, string, string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await regionInstantSnapshotsClient.GetIamPolicyAsync(project, region, resource);

Insert(InsertRegionInstantSnapshotRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
requestInsertRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
InsertRegionInstantSnapshotRequest request = new InsertRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshotResource = new InstantSnapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.Insert(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Insert(string, string, InstantSnapshot, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, string region, InstantSnapshot instantSnapshotResource, CallSettings callSettings = null)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

Name of the region for this request.

instantSnapshotResourceInstantSnapshot

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
InstantSnapshot instantSnapshotResource = new InstantSnapshot();
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.Insert(project, region, instantSnapshotResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertRegionInstantSnapshotRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
requestInsertRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
InsertRegionInstantSnapshotRequest request = new InsertRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshotResource = new InstantSnapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
requestInsertRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
InsertRegionInstantSnapshotRequest request = new InsertRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    InstantSnapshotResource = new InstantSnapshot(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, string, InstantSnapshot, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, InstantSnapshot instantSnapshotResource, CallSettings callSettings = null)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

Name of the region for this request.

instantSnapshotResourceInstantSnapshot

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
InstantSnapshot instantSnapshotResource = new InstantSnapshot();
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.InsertAsync(project, region, instantSnapshotResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, string, InstantSnapshot, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, InstantSnapshot instantSnapshotResource, CancellationToken cancellationToken)

Creates an instant snapshot in the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

Name of the region for this request.

instantSnapshotResourceInstantSnapshot

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
InstantSnapshot instantSnapshotResource = new InstantSnapshot();
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.InsertAsync(project, region, instantSnapshotResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

List(ListRegionInstantSnapshotsRequest, CallSettings)

public virtual PagedEnumerable<InstantSnapshotList, InstantSnapshot> List(ListRegionInstantSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of InstantSnapshot resources contained within the specified region.

Parameters
NameDescription
requestListRegionInstantSnapshotsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableInstantSnapshotListInstantSnapshot

A pageable sequence of InstantSnapshot resources.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
ListRegionInstantSnapshotsRequest request = new ListRegionInstantSnapshotsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<InstantSnapshotList, InstantSnapshot> response = regionInstantSnapshotsClient.List(request);

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

List(string, string, string, int?, CallSettings)

public virtual PagedEnumerable<InstantSnapshotList, InstantSnapshot> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of InstantSnapshot resources contained within the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableInstantSnapshotListInstantSnapshot

A pageable sequence of InstantSnapshot resources.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<InstantSnapshotList, InstantSnapshot> response = regionInstantSnapshotsClient.List(project, region);

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

ListAsync(ListRegionInstantSnapshotsRequest, CallSettings)

public virtual PagedAsyncEnumerable<InstantSnapshotList, InstantSnapshot> ListAsync(ListRegionInstantSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of InstantSnapshot resources contained within the specified region.

Parameters
NameDescription
requestListRegionInstantSnapshotsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableInstantSnapshotListInstantSnapshot

A pageable asynchronous sequence of InstantSnapshot resources.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
ListRegionInstantSnapshotsRequest request = new ListRegionInstantSnapshotsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<InstantSnapshotList, InstantSnapshot> response = regionInstantSnapshotsClient.ListAsync(request);

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

ListAsync(string, string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<InstantSnapshotList, InstantSnapshot> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of InstantSnapshot resources contained within the specified region.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableInstantSnapshotListInstantSnapshot

A pageable asynchronous sequence of InstantSnapshot resources.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<InstantSnapshotList, InstantSnapshot> response = regionInstantSnapshotsClient.ListAsync(project, region);

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

PollOnceDelete(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetLabels(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetLabels(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceSetLabelsAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetLabelsAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetIamPolicy(SetIamPolicyRegionInstantSnapshotRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
SetIamPolicyRegionInstantSnapshotRequest request = new SetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = regionInstantSnapshotsClient.SetIamPolicy(request);

SetIamPolicy(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = regionInstantSnapshotsClient.SetIamPolicy(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyRegionInstantSnapshotRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRegionInstantSnapshotRequest request = new SetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await regionInstantSnapshotsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRegionInstantSnapshotRequest request = new SetIamPolicyRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await regionInstantSnapshotsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await regionInstantSnapshotsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await regionInstantSnapshotsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetLabels(SetLabelsRegionInstantSnapshotRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(SetLabelsRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
requestSetLabelsRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
SetLabelsRegionInstantSnapshotRequest request = new SetLabelsRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.SetLabels(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabels(string, string, string, RegionSetLabelsRequest, CallSettings)

public virtual Operation<Operation, Operation> SetLabels(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The region for this request.

resourcestring

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = regionInstantSnapshotsClient.SetLabels(project, region, resource, regionSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = regionInstantSnapshotsClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(SetLabelsRegionInstantSnapshotRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
requestSetLabelsRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetLabelsRegionInstantSnapshotRequest request = new SetLabelsRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.SetLabelsAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(SetLabelsRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
requestSetLabelsRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
SetLabelsRegionInstantSnapshotRequest request = new SetLabelsRegionInstantSnapshotRequest
{
    RequestId = "",
    Region = "",
    Resource = "",
    Project = "",
    RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.SetLabelsAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(string, string, string, RegionSetLabelsRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The region for this request.

resourcestring

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetLabelsAsync(string, string, string, RegionSetLabelsRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, CancellationToken cancellationToken)

Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The region for this request.

resourcestring

Name or id of the resource for this request.

regionSetLabelsRequestResourceRegionSetLabelsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await regionInstantSnapshotsClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await regionInstantSnapshotsClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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

TestIamPermissions(TestIamPermissionsRegionInstantSnapshotRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
TestIamPermissionsRegionInstantSnapshotRequest request = new TestIamPermissionsRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = regionInstantSnapshotsClient.TestIamPermissions(request);

TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = RegionInstantSnapshotsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = regionInstantSnapshotsClient.TestIamPermissions(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsRegionInstantSnapshotRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRegionInstantSnapshotRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsRegionInstantSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRegionInstantSnapshotRequest request = new TestIamPermissionsRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await regionInstantSnapshotsClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRegionInstantSnapshotRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRegionInstantSnapshotRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsRegionInstantSnapshotRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRegionInstantSnapshotRequest request = new TestIamPermissionsRegionInstantSnapshotRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await regionInstantSnapshotsClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await regionInstantSnapshotsClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectstring

Project ID for this request.

regionstring

The name of the region for this request.

resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
RegionInstantSnapshotsClient regionInstantSnapshotsClient = await RegionInstantSnapshotsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await regionInstantSnapshotsClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);