public abstract class BareMetalSolutionClient
Reference documentation and code samples for the Bare Metal Solution v2 API class BareMetalSolutionClient.
BareMetalSolution client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.BareMetalSolution.V2Assembly
Google.Cloud.BareMetalSolution.V2.dll
Remarks
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com
service provides management
capabilities for Bare Metal Solution servers. To access the API methods, you
must assign Bare Metal Solution IAM roles containing the desired permissions
to your staff in your Google Cloud project. You must also enable the Bare
Metal Solution API. Once enabled, the methods act
upon specific servers in your Bare Metal Solution environment.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the BareMetalSolution service, which is a host of "baremetalsolution.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default BareMetalSolution scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default BareMetalSolution scopes are:
DetachLunOperationsClient
public virtual OperationsClient DetachLunOperationsClient { get; }
The long-running operations client for DetachLun
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual BareMetalSolution.BareMetalSolutionClient GrpcClient { get; }
The underlying gRPC BareMetalSolution client
Property Value | |
---|---|
Type | Description |
BareMetalSolution.BareMetalSolutionClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ResetInstanceOperationsClient
public virtual OperationsClient ResetInstanceOperationsClient { get; }
The long-running operations client for ResetInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ResizeVolumeOperationsClient
public virtual OperationsClient ResizeVolumeOperationsClient { get; }
The long-running operations client for ResizeVolume
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
StartInstanceOperationsClient
public virtual OperationsClient StartInstanceOperationsClient { get; }
The long-running operations client for StartInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StopInstanceOperationsClient
public virtual OperationsClient StopInstanceOperationsClient { get; }
The long-running operations client for StopInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateInstanceOperationsClient
public virtual OperationsClient UpdateInstanceOperationsClient { get; }
The long-running operations client for UpdateInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateNetworkOperationsClient
public virtual OperationsClient UpdateNetworkOperationsClient { get; }
The long-running operations client for UpdateNetwork
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateNfsShareOperationsClient
public virtual OperationsClient UpdateNfsShareOperationsClient { get; }
The long-running operations client for UpdateNfsShare
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateVolumeOperationsClient
public virtual OperationsClient UpdateVolumeOperationsClient { get; }
The long-running operations client for UpdateVolume
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static BareMetalSolutionClient Create()
Synchronously creates a BareMetalSolutionClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BareMetalSolutionClientBuilder.
Returns | |
---|---|
Type | Description |
BareMetalSolutionClient | The created BareMetalSolutionClient. |
CreateAsync(CancellationToken)
public static Task<BareMetalSolutionClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a BareMetalSolutionClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BareMetalSolutionClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<BareMetalSolutionClient> | The task representing the created BareMetalSolutionClient. |
DetachLun(DetachLunRequest, CallSettings)
public virtual Operation<Instance, OperationMetadata> DetachLun(DetachLunRequest request, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
request | DetachLunRequest 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 |
Operation<Instance, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
DetachLunRequest request = new DetachLunRequest
{
InstanceAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
LunAsLunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Operation<Instance, OperationMetadata> response = bareMetalSolutionClient.DetachLun(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 = bareMetalSolutionClient.PollOnceDetachLun(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;
}
DetachLun(InstanceName, LunName, CallSettings)
public virtual Operation<Instance, OperationMetadata> DetachLun(InstanceName instance, LunName lun, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | InstanceName Required. Name of the instance. |
lun | LunName Required. Name of the Lun to detach. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Instance, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
InstanceName instance = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
LunName lun = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Operation<Instance, OperationMetadata> response = bareMetalSolutionClient.DetachLun(instance, lun);
// 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 = bareMetalSolutionClient.PollOnceDetachLun(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;
}
DetachLun(String, String, CallSettings)
public virtual Operation<Instance, OperationMetadata> DetachLun(string instance, string lun, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | String Required. Name of the instance. |
lun | String Required. Name of the Lun to detach. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Instance, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string instance = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string lun = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Operation<Instance, OperationMetadata> response = bareMetalSolutionClient.DetachLun(instance, lun);
// 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 = bareMetalSolutionClient.PollOnceDetachLun(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;
}
DetachLunAsync(DetachLunRequest, CallSettings)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(DetachLunRequest request, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
request | DetachLunRequest 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 |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
DetachLunRequest request = new DetachLunRequest
{
InstanceAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
LunAsLunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
DetachLunAsync(DetachLunRequest, CancellationToken)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(DetachLunRequest request, CancellationToken cancellationToken)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
request | DetachLunRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
DetachLunRequest request = new DetachLunRequest
{
InstanceAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
LunAsLunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
DetachLunAsync(InstanceName, LunName, CallSettings)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(InstanceName instance, LunName lun, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | InstanceName Required. Name of the instance. |
lun | LunName Required. Name of the Lun to detach. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName instance = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
LunName lun = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(instance, lun);
// 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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
DetachLunAsync(InstanceName, LunName, CancellationToken)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(InstanceName instance, LunName lun, CancellationToken cancellationToken)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | InstanceName Required. Name of the instance. |
lun | LunName Required. Name of the Lun to detach. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName instance = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
LunName lun = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(instance, lun);
// 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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
DetachLunAsync(String, String, CallSettings)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(string instance, string lun, CallSettings callSettings = null)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | String Required. Name of the instance. |
lun | String Required. Name of the Lun to detach. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string instance = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string lun = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(instance, lun);
// 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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
DetachLunAsync(String, String, CancellationToken)
public virtual Task<Operation<Instance, OperationMetadata>> DetachLunAsync(string instance, string lun, CancellationToken cancellationToken)
Detach LUN from Instance.
Parameters | |
---|---|
Name | Description |
instance | String Required. Name of the instance. |
lun | String Required. Name of the Lun to detach. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string instance = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string lun = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.DetachLunAsync(instance, lun);
// 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 bareMetalSolutionClient.PollOnceDetachLunAsync(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;
}
GetInstance(GetInstanceRequest, CallSettings)
public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)
Get details about a single server.
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. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = bareMetalSolutionClient.GetInstance(request);
GetInstance(InstanceName, CallSettings)
public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Instance | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = bareMetalSolutionClient.GetInstance(name);
GetInstance(String, CallSettings)
public virtual Instance GetInstance(string name, CallSettings callSettings = null)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Instance | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = bareMetalSolutionClient.GetInstance(name);
GetInstanceAsync(GetInstanceRequest, CallSettings)
public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)
Get details about a single server.
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 |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(request);
GetInstanceAsync(GetInstanceRequest, CancellationToken)
public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)
Get details about a single server.
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 |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(request);
GetInstanceAsync(InstanceName, CallSettings)
public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(name);
GetInstanceAsync(InstanceName, CancellationToken)
public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(name);
GetInstanceAsync(String, CallSettings)
public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(name);
GetInstanceAsync(String, CancellationToken)
public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)
Get details about a single server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Instance> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await bareMetalSolutionClient.GetInstanceAsync(name);
GetLun(GetLunRequest, CallSettings)
public virtual Lun GetLun(GetLunRequest request, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
request | GetLunRequest 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 |
Lun | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
GetLunRequest request = new GetLunRequest
{
LunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Lun response = bareMetalSolutionClient.GetLun(request);
GetLun(LunName, CallSettings)
public virtual Lun GetLun(LunName name, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | LunName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Lun | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LunName name = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Lun response = bareMetalSolutionClient.GetLun(name);
GetLun(String, CallSettings)
public virtual Lun GetLun(string name, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Lun | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Lun response = bareMetalSolutionClient.GetLun(name);
GetLunAsync(GetLunRequest, CallSettings)
public virtual Task<Lun> GetLunAsync(GetLunRequest request, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
request | GetLunRequest 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 |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetLunRequest request = new GetLunRequest
{
LunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(request);
GetLunAsync(GetLunRequest, CancellationToken)
public virtual Task<Lun> GetLunAsync(GetLunRequest request, CancellationToken cancellationToken)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
request | GetLunRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetLunRequest request = new GetLunRequest
{
LunName = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"),
};
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(request);
GetLunAsync(LunName, CallSettings)
public virtual Task<Lun> GetLunAsync(LunName name, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | LunName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LunName name = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(name);
GetLunAsync(LunName, CancellationToken)
public virtual Task<Lun> GetLunAsync(LunName name, CancellationToken cancellationToken)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | LunName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LunName name = LunName.FromProjectLocationVolumeLun("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(name);
GetLunAsync(String, CallSettings)
public virtual Task<Lun> GetLunAsync(string name, CallSettings callSettings = null)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(name);
GetLunAsync(String, CancellationToken)
public virtual Task<Lun> GetLunAsync(string name, CancellationToken cancellationToken)
Get details of a single storage logical unit number(LUN).
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Lun> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]/luns/[LUN]";
// Make the request
Lun response = await bareMetalSolutionClient.GetLunAsync(name);
GetNetwork(GetNetworkRequest, CallSettings)
public virtual Network GetNetwork(GetNetworkRequest request, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest 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 |
Network | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
NetworkName = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]"),
};
// Make the request
Network response = bareMetalSolutionClient.GetNetwork(request);
GetNetwork(NetworkName, CallSettings)
public virtual Network GetNetwork(NetworkName name, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | NetworkName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Network | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
NetworkName name = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]");
// Make the request
Network response = bareMetalSolutionClient.GetNetwork(name);
GetNetwork(String, CallSettings)
public virtual Network GetNetwork(string name, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Network | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/networks/[NETWORK]";
// Make the request
Network response = bareMetalSolutionClient.GetNetwork(name);
GetNetworkAsync(GetNetworkRequest, CallSettings)
public virtual Task<Network> GetNetworkAsync(GetNetworkRequest request, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest 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 |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
NetworkName = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]"),
};
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(request);
GetNetworkAsync(GetNetworkRequest, CancellationToken)
public virtual Task<Network> GetNetworkAsync(GetNetworkRequest request, CancellationToken cancellationToken)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
request | GetNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetNetworkRequest request = new GetNetworkRequest
{
NetworkName = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]"),
};
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(request);
GetNetworkAsync(NetworkName, CallSettings)
public virtual Task<Network> GetNetworkAsync(NetworkName name, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | NetworkName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NetworkName name = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]");
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(name);
GetNetworkAsync(NetworkName, CancellationToken)
public virtual Task<Network> GetNetworkAsync(NetworkName name, CancellationToken cancellationToken)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | NetworkName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NetworkName name = NetworkName.FromProjectLocationNetwork("[PROJECT]", "[LOCATION]", "[NETWORK]");
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(name);
GetNetworkAsync(String, CallSettings)
public virtual Task<Network> GetNetworkAsync(string name, CallSettings callSettings = null)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/networks/[NETWORK]";
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(name);
GetNetworkAsync(String, CancellationToken)
public virtual Task<Network> GetNetworkAsync(string name, CancellationToken cancellationToken)
Get details of a single network.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Network> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/networks/[NETWORK]";
// Make the request
Network response = await bareMetalSolutionClient.GetNetworkAsync(name);
GetNfsShare(GetNfsShareRequest, CallSettings)
public virtual NfsShare GetNfsShare(GetNfsShareRequest request, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | GetNfsShareRequest 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 |
NfsShare | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
GetNfsShareRequest request = new GetNfsShareRequest
{
NFSShareName = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"),
};
// Make the request
NfsShare response = bareMetalSolutionClient.GetNfsShare(request);
GetNfsShare(NFSShareName, CallSettings)
public virtual NfsShare GetNfsShare(NFSShareName name, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | NFSShareName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NfsShare | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
NFSShareName name = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]");
// Make the request
NfsShare response = bareMetalSolutionClient.GetNfsShare(name);
GetNfsShare(String, CallSettings)
public virtual NfsShare GetNfsShare(string name, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NfsShare | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nfsShares/[NFS_SHARE]";
// Make the request
NfsShare response = bareMetalSolutionClient.GetNfsShare(name);
GetNfsShareAsync(GetNfsShareRequest, CallSettings)
public virtual Task<NfsShare> GetNfsShareAsync(GetNfsShareRequest request, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | GetNfsShareRequest 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 |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetNfsShareRequest request = new GetNfsShareRequest
{
NFSShareName = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"),
};
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(request);
GetNfsShareAsync(GetNfsShareRequest, CancellationToken)
public virtual Task<NfsShare> GetNfsShareAsync(GetNfsShareRequest request, CancellationToken cancellationToken)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | GetNfsShareRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetNfsShareRequest request = new GetNfsShareRequest
{
NFSShareName = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"),
};
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(request);
GetNfsShareAsync(NFSShareName, CallSettings)
public virtual Task<NfsShare> GetNfsShareAsync(NFSShareName name, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | NFSShareName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NFSShareName name = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]");
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(name);
GetNfsShareAsync(NFSShareName, CancellationToken)
public virtual Task<NfsShare> GetNfsShareAsync(NFSShareName name, CancellationToken cancellationToken)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | NFSShareName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NFSShareName name = NFSShareName.FromProjectLocationNfsShare("[PROJECT]", "[LOCATION]", "[NFS_SHARE]");
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(name);
GetNfsShareAsync(String, CallSettings)
public virtual Task<NfsShare> GetNfsShareAsync(string name, CallSettings callSettings = null)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nfsShares/[NFS_SHARE]";
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(name);
GetNfsShareAsync(String, CancellationToken)
public virtual Task<NfsShare> GetNfsShareAsync(string name, CancellationToken cancellationToken)
Get details of a single NFS share.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<NfsShare> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/nfsShares/[NFS_SHARE]";
// Make the request
NfsShare response = await bareMetalSolutionClient.GetNfsShareAsync(name);
GetVolume(GetVolumeRequest, CallSettings)
public virtual Volume GetVolume(GetVolumeRequest request, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | GetVolumeRequest 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 |
Volume | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
GetVolumeRequest request = new GetVolumeRequest
{
VolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
};
// Make the request
Volume response = bareMetalSolutionClient.GetVolume(request);
GetVolume(VolumeName, CallSettings)
public virtual Volume GetVolume(VolumeName name, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | VolumeName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Volume | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
VolumeName name = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
// Make the request
Volume response = bareMetalSolutionClient.GetVolume(name);
GetVolume(String, CallSettings)
public virtual Volume GetVolume(string name, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Volume | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
// Make the request
Volume response = bareMetalSolutionClient.GetVolume(name);
GetVolumeAsync(GetVolumeRequest, CallSettings)
public virtual Task<Volume> GetVolumeAsync(GetVolumeRequest request, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | GetVolumeRequest 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 |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetVolumeRequest request = new GetVolumeRequest
{
VolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
};
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(request);
GetVolumeAsync(GetVolumeRequest, CancellationToken)
public virtual Task<Volume> GetVolumeAsync(GetVolumeRequest request, CancellationToken cancellationToken)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | GetVolumeRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
GetVolumeRequest request = new GetVolumeRequest
{
VolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
};
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(request);
GetVolumeAsync(VolumeName, CallSettings)
public virtual Task<Volume> GetVolumeAsync(VolumeName name, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | VolumeName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
VolumeName name = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(name);
GetVolumeAsync(VolumeName, CancellationToken)
public virtual Task<Volume> GetVolumeAsync(VolumeName name, CancellationToken cancellationToken)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | VolumeName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
VolumeName name = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(name);
GetVolumeAsync(String, CallSettings)
public virtual Task<Volume> GetVolumeAsync(string name, CallSettings callSettings = null)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(name);
GetVolumeAsync(String, CancellationToken)
public virtual Task<Volume> GetVolumeAsync(string name, CancellationToken cancellationToken)
Get details of a single storage volume.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Volume> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
// Make the request
Volume response = await bareMetalSolutionClient.GetVolumeAsync(name);
ListInstances(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List servers in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListInstancesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListInstancesResponse, Instance> | A pageable sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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)
List servers 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 |
PagedEnumerable<ListInstancesResponse, Instance> | A pageable sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List servers in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListInstancesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListInstancesResponse, Instance> | A pageable sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List servers in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListInstancesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListInstancesResponse, Instance> | A pageable asynchronous sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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)
List servers 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 |
PagedAsyncEnumerable<ListInstancesResponse, Instance> | A pageable asynchronous sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List servers in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListInstancesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListInstancesResponse, Instance> | A pageable asynchronous sequence of Instance resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = bareMetalSolutionClient.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;
ListLuns(ListLunsRequest, CallSettings)
public virtual PagedEnumerable<ListLunsResponse, Lun> ListLuns(ListLunsRequest request, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
request | ListLunsRequest 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 |
PagedEnumerable<ListLunsResponse, Lun> | A pageable sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListLunsRequest request = new ListLunsRequest
{
ParentAsVolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
};
// Make the request
PagedEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLuns(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Lun 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 (ListLunsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListLuns(VolumeName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListLunsResponse, Lun> ListLuns(VolumeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
parent | VolumeName Required. Parent value for ListLunsRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListLunsResponse, Lun> | A pageable sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
VolumeName parent = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
// Make the request
PagedEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLuns(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Lun 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 (ListLunsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListLuns(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListLunsResponse, Lun> ListLuns(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListLunsRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListLunsResponse, Lun> | A pageable sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
// Make the request
PagedEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLuns(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Lun 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 (ListLunsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListLunsAsync(ListLunsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListLunsResponse, Lun> ListLunsAsync(ListLunsRequest request, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
request | ListLunsRequest 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 |
PagedAsyncEnumerable<ListLunsResponse, Lun> | A pageable asynchronous sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListLunsRequest request = new ListLunsRequest
{
ParentAsVolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
};
// Make the request
PagedAsyncEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLunsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Lun 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((ListLunsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListLunsAsync(VolumeName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListLunsResponse, Lun> ListLunsAsync(VolumeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
parent | VolumeName Required. Parent value for ListLunsRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListLunsResponse, Lun> | A pageable asynchronous sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
VolumeName parent = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
// Make the request
PagedAsyncEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLunsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Lun 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((ListLunsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListLunsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListLunsResponse, Lun> ListLunsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volume luns for given storage volume.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListLunsRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListLunsResponse, Lun> | A pageable asynchronous sequence of Lun resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
// Make the request
PagedAsyncEnumerable<ListLunsResponse, Lun> response = bareMetalSolutionClient.ListLunsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Lun 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((ListLunsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Lun 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<Lun> 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 (Lun 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;
ListNetworks(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListNetworksResponse, Network> ListNetworks(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListNetworksRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListNetworksResponse, Network> | A pageable sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Network 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 (ListNetworksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworks(ListNetworksRequest, CallSettings)
public virtual PagedEnumerable<ListNetworksResponse, Network> ListNetworks(ListNetworksRequest request, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListNetworksRequest 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 |
PagedEnumerable<ListNetworksResponse, Network> | A pageable sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListNetworksRequest request = new ListNetworksRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworks(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Network 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 (ListNetworksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworks(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListNetworksResponse, Network> ListNetworks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListNetworksRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListNetworksResponse, Network> | A pageable sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Network 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 (ListNetworksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworksAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListNetworksResponse, Network> ListNetworksAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListNetworksRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListNetworksResponse, Network> | A pageable asynchronous sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Network 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((ListNetworksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworksAsync(ListNetworksRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListNetworksResponse, Network> ListNetworksAsync(ListNetworksRequest request, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListNetworksRequest 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 |
PagedAsyncEnumerable<ListNetworksResponse, Network> | A pageable asynchronous sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListNetworksRequest request = new ListNetworksRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworksAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Network 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((ListNetworksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworksAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListNetworksResponse, Network> ListNetworksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List network in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListNetworksRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListNetworksResponse, Network> | A pageable asynchronous sequence of Network resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListNetworksResponse, Network> response = bareMetalSolutionClient.ListNetworksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Network 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((ListNetworksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Network 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<Network> 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 (Network 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;
ListNetworkUsage(LocationName, CallSettings)
public virtual ListNetworkUsageResponse ListNetworkUsage(LocationName location, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | LocationName Required. Parent value (project and location). |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListNetworkUsageResponse | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListNetworkUsageResponse response = bareMetalSolutionClient.ListNetworkUsage(location);
ListNetworkUsage(ListNetworkUsageRequest, CallSettings)
public virtual ListNetworkUsageResponse ListNetworkUsage(ListNetworkUsageRequest request, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
request | ListNetworkUsageRequest 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 |
ListNetworkUsageResponse | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListNetworkUsageRequest request = new ListNetworkUsageRequest
{
LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
ListNetworkUsageResponse response = bareMetalSolutionClient.ListNetworkUsage(request);
ListNetworkUsage(String, CallSettings)
public virtual ListNetworkUsageResponse ListNetworkUsage(string location, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | String Required. Parent value (project and location). |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListNetworkUsageResponse | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListNetworkUsageResponse response = bareMetalSolutionClient.ListNetworkUsage(location);
ListNetworkUsageAsync(LocationName, CallSettings)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(LocationName location, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | LocationName Required. Parent value (project and location). |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(location);
ListNetworkUsageAsync(LocationName, CancellationToken)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(LocationName location, CancellationToken cancellationToken)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | LocationName Required. Parent value (project and location). |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(location);
ListNetworkUsageAsync(ListNetworkUsageRequest, CallSettings)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(ListNetworkUsageRequest request, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
request | ListNetworkUsageRequest 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 |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListNetworkUsageRequest request = new ListNetworkUsageRequest
{
LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(request);
ListNetworkUsageAsync(ListNetworkUsageRequest, CancellationToken)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(ListNetworkUsageRequest request, CancellationToken cancellationToken)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
request | ListNetworkUsageRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListNetworkUsageRequest request = new ListNetworkUsageRequest
{
LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(request);
ListNetworkUsageAsync(String, CallSettings)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(string location, CallSettings callSettings = null)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | String Required. Parent value (project and location). |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(location);
ListNetworkUsageAsync(String, CancellationToken)
public virtual Task<ListNetworkUsageResponse> ListNetworkUsageAsync(string location, CancellationToken cancellationToken)
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Parameters | |
---|---|
Name | Description |
location | String Required. Parent value (project and location). |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ListNetworkUsageResponse> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
ListNetworkUsageResponse response = await bareMetalSolutionClient.ListNetworkUsageAsync(location);
ListNfsShares(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListNfsSharesResponse, NfsShare> ListNfsShares(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListNfsSharesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListNfsSharesResponse, NfsShare> | A pageable sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsShares(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (NfsShare 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 (ListNfsSharesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListNfsShares(ListNfsSharesRequest, CallSettings)
public virtual PagedEnumerable<ListNfsSharesResponse, NfsShare> ListNfsShares(ListNfsSharesRequest request, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
request | ListNfsSharesRequest 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 |
PagedEnumerable<ListNfsSharesResponse, NfsShare> | A pageable sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListNfsSharesRequest request = new ListNfsSharesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsShares(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (NfsShare 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 (ListNfsSharesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListNfsShares(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListNfsSharesResponse, NfsShare> ListNfsShares(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListNfsSharesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListNfsSharesResponse, NfsShare> | A pageable sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsShares(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (NfsShare 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 (ListNfsSharesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListNfsSharesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> ListNfsSharesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListNfsSharesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> | A pageable asynchronous sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsSharesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NfsShare 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((ListNfsSharesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListNfsSharesAsync(ListNfsSharesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> ListNfsSharesAsync(ListNfsSharesRequest request, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
request | ListNfsSharesRequest 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 |
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> | A pageable asynchronous sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListNfsSharesRequest request = new ListNfsSharesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsSharesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NfsShare 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((ListNfsSharesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListNfsSharesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> ListNfsSharesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List NFS shares.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListNfsSharesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> | A pageable asynchronous sequence of NfsShare resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListNfsSharesResponse, NfsShare> response = bareMetalSolutionClient.ListNfsSharesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NfsShare 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((ListNfsSharesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NfsShare 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<NfsShare> 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 (NfsShare 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;
ListVolumes(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListVolumesResponse, Volume> ListVolumes(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListVolumesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListVolumesResponse, Volume> | A pageable sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Volume 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 (ListVolumesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
ListVolumes(ListVolumesRequest, CallSettings)
public virtual PagedEnumerable<ListVolumesResponse, Volume> ListVolumes(ListVolumesRequest request, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListVolumesRequest 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 |
PagedEnumerable<ListVolumesResponse, Volume> | A pageable sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ListVolumesRequest request = new ListVolumesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Volume 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 (ListVolumesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
ListVolumes(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListVolumesResponse, Volume> ListVolumes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListVolumesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListVolumesResponse, Volume> | A pageable sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Volume 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 (ListVolumesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
ListVolumesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListVolumesResponse, Volume> ListVolumesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Parent value for ListVolumesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListVolumesResponse, Volume> | A pageable asynchronous sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Volume 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((ListVolumesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
ListVolumesAsync(ListVolumesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListVolumesResponse, Volume> ListVolumesAsync(ListVolumesRequest request, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListVolumesRequest 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 |
PagedAsyncEnumerable<ListVolumesResponse, Volume> | A pageable asynchronous sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ListVolumesRequest request = new ListVolumesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Volume 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((ListVolumesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
ListVolumesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListVolumesResponse, Volume> ListVolumesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List storage volumes in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. Parent value for ListVolumesRequest. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListVolumesResponse, Volume> | A pageable asynchronous sequence of Volume resources. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListVolumesResponse, Volume> response = bareMetalSolutionClient.ListVolumesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Volume 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((ListVolumesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Volume 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<Volume> 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 (Volume 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;
PollOnceDetachLun(String, CallSettings)
public virtual Operation<Instance, OperationMetadata> PollOnceDetachLun(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DetachLun
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Instance, OperationMetadata> | The result of polling the operation. |
PollOnceDetachLunAsync(String, CallSettings)
public virtual Task<Operation<Instance, OperationMetadata>> PollOnceDetachLunAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DetachLun
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceResetInstance(String, CallSettings)
public virtual Operation<ResetInstanceResponse, OperationMetadata> PollOnceResetInstance(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ResetInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ResetInstanceResponse, OperationMetadata> | The result of polling the operation. |
PollOnceResetInstanceAsync(String, CallSettings)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> PollOnceResetInstanceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ResetInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceResizeVolume(String, CallSettings)
public virtual Operation<Volume, OperationMetadata> PollOnceResizeVolume(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ResizeVolume
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Volume, OperationMetadata> | The result of polling the operation. |
PollOnceResizeVolumeAsync(String, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> PollOnceResizeVolumeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ResizeVolume
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceStartInstance(String, CallSettings)
public virtual Operation<StartInstanceResponse, OperationMetadata> PollOnceStartInstance(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of StartInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StartInstanceResponse, OperationMetadata> | The result of polling the operation. |
PollOnceStartInstanceAsync(String, CallSettings)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> PollOnceStartInstanceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
StartInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceStopInstance(String, CallSettings)
public virtual Operation<StopInstanceResponse, OperationMetadata> PollOnceStopInstance(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of StopInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StopInstanceResponse, OperationMetadata> | The result of polling the operation. |
PollOnceStopInstanceAsync(String, CallSettings)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> PollOnceStopInstanceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
StopInstance
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Instance, OperationMetadata> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateNetwork(String, CallSettings)
public virtual Operation<Network, OperationMetadata> PollOnceUpdateNetwork(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateNetwork
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Network, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateNetworkAsync(String, CallSettings)
public virtual Task<Operation<Network, OperationMetadata>> PollOnceUpdateNetworkAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateNetwork
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Network, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateNfsShare(String, CallSettings)
public virtual Operation<NfsShare, OperationMetadata> PollOnceUpdateNfsShare(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateNfsShare
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<NfsShare, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateNfsShareAsync(String, CallSettings)
public virtual Task<Operation<NfsShare, OperationMetadata>> PollOnceUpdateNfsShareAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateNfsShare
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<NfsShare, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateVolume(String, CallSettings)
public virtual Operation<Volume, OperationMetadata> PollOnceUpdateVolume(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateVolume
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Volume, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateVolumeAsync(String, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> PollOnceUpdateVolumeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateVolume
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A task representing the result of polling the operation. |
ResetInstance(InstanceName, CallSettings)
public virtual Operation<ResetInstanceResponse, OperationMetadata> ResetInstance(InstanceName name, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ResetInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.ResetInstance(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResetInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstance(ResetInstanceRequest, CallSettings)
public virtual Operation<ResetInstanceResponse, OperationMetadata> ResetInstance(ResetInstanceRequest request, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest 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 |
Operation<ResetInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.ResetInstance(request);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResetInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstance(String, CallSettings)
public virtual Operation<ResetInstanceResponse, OperationMetadata> ResetInstance(string name, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ResetInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.ResetInstance(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResetInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(InstanceName, CallSettings)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(InstanceName name, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(InstanceName, CancellationToken)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(InstanceName name, CancellationToken cancellationToken)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(ResetInstanceRequest, CallSettings)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(ResetInstanceRequest request, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest 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 |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(ResetInstanceRequest, CancellationToken)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(ResetInstanceRequest request, CancellationToken cancellationToken)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(String, CallSettings)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(string name, CallSettings callSettings = null)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResetInstanceAsync(String, CancellationToken)
public virtual Task<Operation<ResetInstanceResponse, OperationMetadata>> ResetInstanceAsync(string name, CancellationToken cancellationToken)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ResetInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<ResetInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.ResetInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<ResetInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ResetInstanceResponse 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<ResetInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResetInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ResetInstanceResponse retrievedResult = retrievedResponse.Result;
}
ResizeVolume(ResizeVolumeRequest, CallSettings)
public virtual Operation<Volume, OperationMetadata> ResizeVolume(ResizeVolumeRequest request, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
request | ResizeVolumeRequest 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 |
Operation<Volume, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
ResizeVolumeRequest request = new ResizeVolumeRequest
{
VolumeAsVolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
SizeGib = 0L,
};
// Make the request
Operation<Volume, OperationMetadata> response = bareMetalSolutionClient.ResizeVolume(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResizeVolume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolume(VolumeName, Int64, CallSettings)
public virtual Operation<Volume, OperationMetadata> ResizeVolume(VolumeName volume, long sizeGib, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | VolumeName Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Volume, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
VolumeName volume = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = bareMetalSolutionClient.ResizeVolume(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResizeVolume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolume(String, Int64, CallSettings)
public virtual Operation<Volume, OperationMetadata> ResizeVolume(string volume, long sizeGib, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | String Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Volume, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string volume = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = bareMetalSolutionClient.ResizeVolume(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceResizeVolume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(ResizeVolumeRequest, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(ResizeVolumeRequest request, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
request | ResizeVolumeRequest 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 |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ResizeVolumeRequest request = new ResizeVolumeRequest
{
VolumeAsVolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
SizeGib = 0L,
};
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(ResizeVolumeRequest, CancellationToken)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(ResizeVolumeRequest request, CancellationToken cancellationToken)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
request | ResizeVolumeRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
ResizeVolumeRequest request = new ResizeVolumeRequest
{
VolumeAsVolumeName = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]"),
SizeGib = 0L,
};
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(VolumeName, Int64, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(VolumeName volume, long sizeGib, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | VolumeName Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
VolumeName volume = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(VolumeName, Int64, CancellationToken)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(VolumeName volume, long sizeGib, CancellationToken cancellationToken)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | VolumeName Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
VolumeName volume = VolumeName.FromProjectLocationVolume("[PROJECT]", "[LOCATION]", "[VOLUME]");
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(String, Int64, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(string volume, long sizeGib, CallSettings callSettings = null)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | String Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string volume = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ResizeVolumeAsync(String, Int64, CancellationToken)
public virtual Task<Operation<Volume, OperationMetadata>> ResizeVolumeAsync(string volume, long sizeGib, CancellationToken cancellationToken)
Emergency Volume resize.
Parameters | |
---|---|
Name | Description |
volume | String Required. Volume to resize. |
sizeGib | Int64 New Volume size, in GiB. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string volume = "projects/[PROJECT]/locations/[LOCATION]/volumes/[VOLUME]";
long sizeGib = 0L;
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.ResizeVolumeAsync(volume, sizeGib);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceResizeVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
StartInstance(InstanceName, CallSettings)
public virtual Operation<StartInstanceResponse, OperationMetadata> StartInstance(InstanceName name, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StartInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StartInstance(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStartInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstance(StartInstanceRequest, CallSettings)
public virtual Operation<StartInstanceResponse, OperationMetadata> StartInstance(StartInstanceRequest request, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest 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 |
Operation<StartInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StartInstance(request);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStartInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstance(String, CallSettings)
public virtual Operation<StartInstanceResponse, OperationMetadata> StartInstance(string name, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StartInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StartInstance(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStartInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(InstanceName, CallSettings)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(InstanceName name, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(InstanceName, CancellationToken)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(InstanceName name, CancellationToken cancellationToken)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(StartInstanceRequest, CallSettings)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(StartInstanceRequest request, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest 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 |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(StartInstanceRequest, CancellationToken)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(StartInstanceRequest request, CancellationToken cancellationToken)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(String, CallSettings)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(string name, CallSettings callSettings = null)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StartInstanceAsync(String, CancellationToken)
public virtual Task<Operation<StartInstanceResponse, OperationMetadata>> StartInstanceAsync(string name, CancellationToken cancellationToken)
Starts a server that was shutdown.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StartInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StartInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StartInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StartInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartInstanceResponse 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<StartInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStartInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StartInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstance(InstanceName, CallSettings)
public virtual Operation<StopInstanceResponse, OperationMetadata> StopInstance(InstanceName name, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StopInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StopInstance(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStopInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstance(StopInstanceRequest, CallSettings)
public virtual Operation<StopInstanceResponse, OperationMetadata> StopInstance(StopInstanceRequest request, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest 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 |
Operation<StopInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StopInstance(request);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStopInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstance(String, CallSettings)
public virtual Operation<StopInstanceResponse, OperationMetadata> StopInstance(string name, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<StopInstanceResponse, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = bareMetalSolutionClient.StopInstance(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceStopInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(InstanceName, CallSettings)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(InstanceName name, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(InstanceName, CancellationToken)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(InstanceName name, CancellationToken cancellationToken)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | InstanceName Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(StopInstanceRequest, CallSettings)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(StopInstanceRequest request, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest 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 |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(StopInstanceRequest, CancellationToken)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(StopInstanceRequest request, CancellationToken cancellationToken)
Stop a running server.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(request);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(String, CallSettings)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(string name, CallSettings callSettings = null)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
StopInstanceAsync(String, CancellationToken)
public virtual Task<Operation<StopInstanceResponse, OperationMetadata>> StopInstanceAsync(string name, CancellationToken cancellationToken)
Stop a running server.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<StopInstanceResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<StopInstanceResponse, OperationMetadata> response = await bareMetalSolutionClient.StopInstanceAsync(name);
// Poll until the returned long-running operation is complete
Operation<StopInstanceResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StopInstanceResponse 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<StopInstanceResponse, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceStopInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
StopInstanceResponse retrievedResult = retrievedResponse.Result;
}
UpdateInstance(Instance, FieldMask, CallSettings)
public virtual Operation<Instance, OperationMetadata> UpdateInstance(Instance instance, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single server.
Parameters | |
---|---|
Name | Description |
instance | Instance Required. The server to update. The |
updateMask | FieldMask The list of fields to update.
The currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Instance, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = bareMetalSolutionClient.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 = bareMetalSolutionClient.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)
Update details of a single server.
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 |
Operation<Instance, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Instance = new Instance(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Instance, OperationMetadata> response = bareMetalSolutionClient.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 = bareMetalSolutionClient.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)
Update details of a single server.
Parameters | |
---|---|
Name | Description |
instance | Instance Required. The server to update. The |
updateMask | FieldMask The list of fields to update.
The currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.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 bareMetalSolutionClient.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)
Update details of a single server.
Parameters | |
---|---|
Name | Description |
instance | Instance Required. The server to update. The |
updateMask | FieldMask The list of fields to update.
The currently supported fields are:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.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 bareMetalSolutionClient.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)
Update details of a single server.
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 |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Instance = new Instance(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.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 bareMetalSolutionClient.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)
Update details of a single server.
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 |
Task<Operation<Instance, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Instance = new Instance(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await bareMetalSolutionClient.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 bareMetalSolutionClient.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;
}
UpdateNetwork(Network, FieldMask, CallSettings)
public virtual Operation<Network, OperationMetadata> UpdateNetwork(Network network, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
network | Network Required. The network to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Network, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
Network network = new Network();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Network, OperationMetadata> response = bareMetalSolutionClient.UpdateNetwork(network, updateMask);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateNetwork(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNetwork(UpdateNetworkRequest, CallSettings)
public virtual Operation<Network, OperationMetadata> UpdateNetwork(UpdateNetworkRequest request, CallSettings callSettings = null)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkRequest 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 |
Operation<Network, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
UpdateNetworkRequest request = new UpdateNetworkRequest
{
Network = new Network(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Network, OperationMetadata> response = bareMetalSolutionClient.UpdateNetwork(request);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateNetwork(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNetworkAsync(Network, FieldMask, CallSettings)
public virtual Task<Operation<Network, OperationMetadata>> UpdateNetworkAsync(Network network, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
network | Network Required. The network to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Network, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Network network = new Network();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Network, OperationMetadata> response = await bareMetalSolutionClient.UpdateNetworkAsync(network, updateMask);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNetworkAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNetworkAsync(Network, FieldMask, CancellationToken)
public virtual Task<Operation<Network, OperationMetadata>> UpdateNetworkAsync(Network network, FieldMask updateMask, CancellationToken cancellationToken)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
network | Network Required. The network to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Network, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Network network = new Network();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Network, OperationMetadata> response = await bareMetalSolutionClient.UpdateNetworkAsync(network, updateMask);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNetworkAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNetworkAsync(UpdateNetworkRequest, CallSettings)
public virtual Task<Operation<Network, OperationMetadata>> UpdateNetworkAsync(UpdateNetworkRequest request, CallSettings callSettings = null)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkRequest 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 |
Task<Operation<Network, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateNetworkRequest request = new UpdateNetworkRequest
{
Network = new Network(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Network, OperationMetadata> response = await bareMetalSolutionClient.UpdateNetworkAsync(request);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNetworkAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNetworkAsync(UpdateNetworkRequest, CancellationToken)
public virtual Task<Operation<Network, OperationMetadata>> UpdateNetworkAsync(UpdateNetworkRequest request, CancellationToken cancellationToken)
Update details of a single network.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Network, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateNetworkRequest request = new UpdateNetworkRequest
{
Network = new Network(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Network, OperationMetadata> response = await bareMetalSolutionClient.UpdateNetworkAsync(request);
// Poll until the returned long-running operation is complete
Operation<Network, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Network 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<Network, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNetworkAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Network retrievedResult = retrievedResponse.Result;
}
UpdateNfsShare(NfsShare, FieldMask, CallSettings)
public virtual Operation<NfsShare, OperationMetadata> UpdateNfsShare(NfsShare nfsShare, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
nfsShare | NfsShare Required. The NFS share to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<NfsShare, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
NfsShare nfsShare = new NfsShare();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<NfsShare, OperationMetadata> response = bareMetalSolutionClient.UpdateNfsShare(nfsShare, updateMask);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateNfsShare(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateNfsShare(UpdateNfsShareRequest, CallSettings)
public virtual Operation<NfsShare, OperationMetadata> UpdateNfsShare(UpdateNfsShareRequest request, CallSettings callSettings = null)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | UpdateNfsShareRequest 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 |
Operation<NfsShare, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
UpdateNfsShareRequest request = new UpdateNfsShareRequest
{
NfsShare = new NfsShare(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<NfsShare, OperationMetadata> response = bareMetalSolutionClient.UpdateNfsShare(request);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateNfsShare(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateNfsShareAsync(NfsShare, FieldMask, CallSettings)
public virtual Task<Operation<NfsShare, OperationMetadata>> UpdateNfsShareAsync(NfsShare nfsShare, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
nfsShare | NfsShare Required. The NFS share to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<NfsShare, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NfsShare nfsShare = new NfsShare();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<NfsShare, OperationMetadata> response = await bareMetalSolutionClient.UpdateNfsShareAsync(nfsShare, updateMask);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNfsShareAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateNfsShareAsync(NfsShare, FieldMask, CancellationToken)
public virtual Task<Operation<NfsShare, OperationMetadata>> UpdateNfsShareAsync(NfsShare nfsShare, FieldMask updateMask, CancellationToken cancellationToken)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
nfsShare | NfsShare Required. The NFS share to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<NfsShare, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
NfsShare nfsShare = new NfsShare();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<NfsShare, OperationMetadata> response = await bareMetalSolutionClient.UpdateNfsShareAsync(nfsShare, updateMask);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNfsShareAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateNfsShareAsync(UpdateNfsShareRequest, CallSettings)
public virtual Task<Operation<NfsShare, OperationMetadata>> UpdateNfsShareAsync(UpdateNfsShareRequest request, CallSettings callSettings = null)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | UpdateNfsShareRequest 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 |
Task<Operation<NfsShare, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateNfsShareRequest request = new UpdateNfsShareRequest
{
NfsShare = new NfsShare(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<NfsShare, OperationMetadata> response = await bareMetalSolutionClient.UpdateNfsShareAsync(request);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNfsShareAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateNfsShareAsync(UpdateNfsShareRequest, CancellationToken)
public virtual Task<Operation<NfsShare, OperationMetadata>> UpdateNfsShareAsync(UpdateNfsShareRequest request, CancellationToken cancellationToken)
Update details of a single NFS share.
Parameters | |
---|---|
Name | Description |
request | UpdateNfsShareRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<NfsShare, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateNfsShareRequest request = new UpdateNfsShareRequest
{
NfsShare = new NfsShare(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<NfsShare, OperationMetadata> response = await bareMetalSolutionClient.UpdateNfsShareAsync(request);
// Poll until the returned long-running operation is complete
Operation<NfsShare, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NfsShare 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<NfsShare, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateNfsShareAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
NfsShare retrievedResult = retrievedResponse.Result;
}
UpdateVolume(UpdateVolumeRequest, CallSettings)
public virtual Operation<Volume, OperationMetadata> UpdateVolume(UpdateVolumeRequest request, CallSettings callSettings = null)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | UpdateVolumeRequest 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 |
Operation<Volume, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
UpdateVolumeRequest request = new UpdateVolumeRequest
{
Volume = new Volume(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Volume, OperationMetadata> response = bareMetalSolutionClient.UpdateVolume(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateVolume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
UpdateVolume(Volume, FieldMask, CallSettings)
public virtual Operation<Volume, OperationMetadata> UpdateVolume(Volume volume, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
volume | Volume Required. The volume to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Volume, OperationMetadata> | The RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.Create();
// Initialize request argument(s)
Volume volume = new Volume();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Volume, OperationMetadata> response = bareMetalSolutionClient.UpdateVolume(volume, updateMask);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = bareMetalSolutionClient.PollOnceUpdateVolume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
UpdateVolumeAsync(UpdateVolumeRequest, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> UpdateVolumeAsync(UpdateVolumeRequest request, CallSettings callSettings = null)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | UpdateVolumeRequest 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 |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateVolumeRequest request = new UpdateVolumeRequest
{
Volume = new Volume(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.UpdateVolumeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
UpdateVolumeAsync(UpdateVolumeRequest, CancellationToken)
public virtual Task<Operation<Volume, OperationMetadata>> UpdateVolumeAsync(UpdateVolumeRequest request, CancellationToken cancellationToken)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
request | UpdateVolumeRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
UpdateVolumeRequest request = new UpdateVolumeRequest
{
Volume = new Volume(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.UpdateVolumeAsync(request);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
UpdateVolumeAsync(Volume, FieldMask, CallSettings)
public virtual Task<Operation<Volume, OperationMetadata>> UpdateVolumeAsync(Volume volume, FieldMask updateMask, CallSettings callSettings = null)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
volume | Volume Required. The volume to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Volume volume = new Volume();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.UpdateVolumeAsync(volume, updateMask);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}
UpdateVolumeAsync(Volume, FieldMask, CancellationToken)
public virtual Task<Operation<Volume, OperationMetadata>> UpdateVolumeAsync(Volume volume, FieldMask updateMask, CancellationToken cancellationToken)
Update details of a single storage volume.
Parameters | |
---|---|
Name | Description |
volume | Volume Required. The volume to update. The |
updateMask | FieldMask The list of fields to update.
The only currently supported fields are:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Volume, OperationMetadata>> | A Task containing the RPC response. |
// Create client
BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
// Initialize request argument(s)
Volume volume = new Volume();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Volume, OperationMetadata> response = await bareMetalSolutionClient.UpdateVolumeAsync(volume, updateMask);
// Poll until the returned long-running operation is complete
Operation<Volume, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Volume 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<Volume, OperationMetadata> retrievedResponse = await bareMetalSolutionClient.PollOnceUpdateVolumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Volume retrievedResult = retrievedResponse.Result;
}