BareMetalSolutionClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
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
transport
Returns the transport used by the client instance.
Type | Description |
BareMetalSolutionTransport | The transport used by the client instance. |
Methods
BareMetalSolutionClient
BareMetalSolutionClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the bare metal solution client.
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str, BareMetalSolutionTransport]
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. It won't take effect if a |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
common_billing_account_path
common_billing_account_path(billing_account: str)
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str)
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str)
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str)
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str)
Returns a fully-qualified project string.
create_snapshot_schedule_policy
create_snapshot_schedule_policy(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.CreateSnapshotSchedulePolicyRequest, dict]] = None, *, parent: Optional[str] = None, snapshot_schedule_policy: Optional[google.cloud.bare_metal_solution_v2.types.baremetalsolution.SnapshotSchedulePolicy] = None, snapshot_schedule_policy_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Create a snapshot schedule policy in the specified project.
from google.cloud import bare_metal_solution_v2
def sample_create_snapshot_schedule_policy():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateSnapshotSchedulePolicyRequest(
parent="parent_value",
snapshot_schedule_policy_id="snapshot_schedule_policy_id_value",
)
# Make the request
response = client.create_snapshot_schedule_policy(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.CreateSnapshotSchedulePolicyRequest, dict]
The request object. Message for creating a snapshot schedule policy in a project. |
parent |
str
Required. The parent project and location containing the SnapshotSchedulePolicy. This corresponds to the |
snapshot_schedule_policy |
google.cloud.bare_metal_solution_v2.types.SnapshotSchedulePolicy
Required. The SnapshotSchedulePolicy to create. This corresponds to the |
snapshot_schedule_policy_id |
str
Required. Snapshot policy ID This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.SnapshotSchedulePolicy | A snapshot schedule policy. |
create_volume_snapshot
create_volume_snapshot(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.CreateVolumeSnapshotRequest, dict]] = None, *, parent: Optional[str] = None, volume_snapshot: Optional[google.cloud.bare_metal_solution_v2.types.baremetalsolution.VolumeSnapshot] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Create a storage volume snapshot in a containing volume.
from google.cloud import bare_metal_solution_v2
def sample_create_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateVolumeSnapshotRequest(
parent="parent_value",
)
# Make the request
response = client.create_volume_snapshot(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.CreateVolumeSnapshotRequest, dict]
The request object. Message for creating a volume snapshot. |
parent |
str
Required. The volume to snapshot. This corresponds to the |
volume_snapshot |
google.cloud.bare_metal_solution_v2.types.VolumeSnapshot
Required. The volume snapshot to create. Only the description field may be specified. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.VolumeSnapshot | Snapshot registered for a given storage volume. |
delete_snapshot_schedule_policy
delete_snapshot_schedule_policy(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.DeleteSnapshotSchedulePolicyRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Delete a named snapshot schedule policy.
from google.cloud import bare_metal_solution_v2
def sample_delete_snapshot_schedule_policy():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DeleteSnapshotSchedulePolicyRequest(
name="name_value",
)
# Make the request
client.delete_snapshot_schedule_policy(request=request)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.DeleteSnapshotSchedulePolicyRequest, dict]
The request object. Message for deleting a snapshot schedule policy in a project. |
name |
str
Required. The name of the snapshot schedule policy to delete. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_volume_snapshot
delete_volume_snapshot(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.DeleteVolumeSnapshotRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes a storage volume snapshot for a given volume.
from google.cloud import bare_metal_solution_v2
def sample_delete_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DeleteVolumeSnapshotRequest(
name="name_value",
)
# Make the request
client.delete_volume_snapshot(request=request)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.DeleteVolumeSnapshotRequest, dict]
The request object. Message for deleting named Volume snapshot. |
name |
str
Required. The name of the snapshot to delete. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
BareMetalSolutionClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Name | Description |
info |
dict
The service account private key info. |
Type | Description |
BareMetalSolutionClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
BareMetalSolutionClient | The constructed client. |
get_instance
get_instance(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details about a single server.
from google.cloud import bare_metal_solution_v2
def sample_get_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetInstanceRequest(
name="name_value",
)
# Make the request
response = client.get_instance(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetInstanceRequest, dict]
The request object. Message for requesting server information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.Instance | A server. |
get_lun
get_lun(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetLunRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details of a single storage logical unit number(LUN).
from google.cloud import bare_metal_solution_v2
def sample_get_lun():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetLunRequest(
name="name_value",
)
# Make the request
response = client.get_lun(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetLunRequest, dict]
The request object. Message for requesting storage lun information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.Lun | A storage volume logical unit number (LUN). |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: Optional[google.api_core.client_options.ClientOptions] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_network
get_network(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetNetworkRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details of a single network.
from google.cloud import bare_metal_solution_v2
def sample_get_network():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetNetworkRequest(
name="name_value",
)
# Make the request
response = client.get_network(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetNetworkRequest, dict]
The request object. Message for requesting network information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.Network | A Network. |
get_snapshot_schedule_policy
get_snapshot_schedule_policy(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetSnapshotSchedulePolicyRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details of a single snapshot schedule policy.
from google.cloud import bare_metal_solution_v2
def sample_get_snapshot_schedule_policy():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetSnapshotSchedulePolicyRequest(
name="name_value",
)
# Make the request
response = client.get_snapshot_schedule_policy(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetSnapshotSchedulePolicyRequest, dict]
The request object. Message for requesting snapshot schedule policy information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.SnapshotSchedulePolicy | A snapshot schedule policy. |
get_volume
get_volume(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetVolumeRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details of a single storage volume.
from google.cloud import bare_metal_solution_v2
def sample_get_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetVolumeRequest(
name="name_value",
)
# Make the request
response = client.get_volume(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetVolumeRequest, dict]
The request object. Message for requesting storage volume information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.Volume | A storage volume. |
get_volume_snapshot
get_volume_snapshot(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.GetVolumeSnapshotRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get details of a single storage volume snapshot.
from google.cloud import bare_metal_solution_v2
def sample_get_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetVolumeSnapshotRequest(
name="name_value",
)
# Make the request
response = client.get_volume_snapshot(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.GetVolumeSnapshotRequest, dict]
The request object. Message for requesting storage volume snapshot information. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.VolumeSnapshot | Snapshot registered for a given storage volume. |
instance_path
instance_path(project: str, location: str, instance: str)
Returns a fully-qualified instance string.
list_instances
list_instances(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListInstancesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List servers in a given project and location.
from google.cloud import bare_metal_solution_v2
def sample_list_instances():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListInstancesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_instances(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListInstancesRequest, dict]
The request object. Message for requesting the list of servers. |
parent |
str
Required. Parent value for ListInstancesRequest. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListInstancesPager | Response message for the list of servers. Iterating over this object will yield results and resolve additional pages automatically. |
list_luns
list_luns(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListLunsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List storage volume luns for given storage volume.
from google.cloud import bare_metal_solution_v2
def sample_list_luns():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListLunsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_luns(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListLunsRequest, dict]
The request object. Message for requesting a list of storage volume luns. |
parent |
str
Required. Parent value for ListLunsRequest. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListLunsPager | Response message containing the list of storage volume luns. Iterating over this object will yield results and resolve additional pages automatically. |
list_networks
list_networks(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListNetworksRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List network in a given project and location.
from google.cloud import bare_metal_solution_v2
def sample_list_networks():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListNetworksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_networks(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListNetworksRequest, dict]
The request object. Message for requesting a list of networks. |
parent |
str
Required. Parent value for ListNetworksRequest. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNetworksPager | Response message containing the list of networks. Iterating over this object will yield results and resolve additional pages automatically. |
list_snapshot_schedule_policies
list_snapshot_schedule_policies(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListSnapshotSchedulePoliciesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List snapshot schedule policies in a given project and location.
from google.cloud import bare_metal_solution_v2
def sample_list_snapshot_schedule_policies():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListSnapshotSchedulePoliciesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_snapshot_schedule_policies(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListSnapshotSchedulePoliciesRequest, dict]
The request object. Message for requesting a list of snapshot schedule policies. |
parent |
str
Required. The parent project containing the Snapshot Schedule Policies. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListSnapshotSchedulePoliciesPager | Response message containing the list of snapshot schedule policies. Iterating over this object will yield results and resolve additional pages automatically. |
list_volume_snapshots
list_volume_snapshots(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListVolumeSnapshotsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List storage volume snapshots for given storage volume.
from google.cloud import bare_metal_solution_v2
def sample_list_volume_snapshots():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListVolumeSnapshotsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_volume_snapshots(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListVolumeSnapshotsRequest, dict]
The request object. Message for requesting a list of storage volume snapshots. |
parent |
str
Required. Parent value for ListVolumesRequest. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumeSnapshotsPager | Response message containing the list of storage volume snapshots. Iterating over this object will yield results and resolve additional pages automatically. |
list_volumes
list_volumes(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ListVolumesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
List storage volumes in a given project and location.
from google.cloud import bare_metal_solution_v2
def sample_list_volumes():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListVolumesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_volumes(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ListVolumesRequest, dict]
The request object. Message for requesting a list of storage volumes. |
parent |
str
Required. Parent value for ListVolumesRequest. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumesPager | Response message containing the list of storage volumes. Iterating over this object will yield results and resolve additional pages automatically. |
lun_path
lun_path(project: str, location: str, volume: str, lun: str)
Returns a fully-qualified lun string.
network_path
network_path(project: str, location: str, network: str)
Returns a fully-qualified network string.
parse_common_billing_account_path
parse_common_billing_account_path(path: str)
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str)
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str)
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str)
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str)
Parse a project path into its component segments.
parse_instance_path
parse_instance_path(path: str)
Parses a instance path into its component segments.
parse_lun_path
parse_lun_path(path: str)
Parses a lun path into its component segments.
parse_network_path
parse_network_path(path: str)
Parses a network path into its component segments.
parse_snapshot_schedule_policy_path
parse_snapshot_schedule_policy_path(path: str)
Parses a snapshot_schedule_policy path into its component segments.
parse_volume_path
parse_volume_path(path: str)
Parses a volume path into its component segments.
parse_volume_snapshot_path
parse_volume_snapshot_path(path: str)
Parses a volume_snapshot path into its component segments.
reset_instance
reset_instance(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.ResetInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
from google.cloud import bare_metal_solution_v2
def sample_reset_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ResetInstanceRequest(
name="name_value",
)
# Make the request
operation = client.reset_instance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.ResetInstanceRequest, dict]
The request object. Message requesting to reset a server. |
name |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be ResetInstanceResponse Response message from resetting a server. |
restore_volume_snapshot
restore_volume_snapshot(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.RestoreVolumeSnapshotRequest, dict]] = None, *, volume_snapshot: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Restore a storage volume snapshot to its containing volume.
from google.cloud import bare_metal_solution_v2
def sample_restore_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.RestoreVolumeSnapshotRequest(
volume_snapshot="volume_snapshot_value",
)
# Make the request
operation = client.restore_volume_snapshot(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.RestoreVolumeSnapshotRequest, dict]
The request object. Message for restoring a volume snapshot. |
volume_snapshot |
str
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be VolumeSnapshot Snapshot registered for a given storage volume. |
snapshot_schedule_policy_path
snapshot_schedule_policy_path(
project: str, location: str, snapshot_schedule_policy: str
)
Returns a fully-qualified snapshot_schedule_policy string.
update_snapshot_schedule_policy
update_snapshot_schedule_policy(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.UpdateSnapshotSchedulePolicyRequest, dict]] = None, *, snapshot_schedule_policy: Optional[google.cloud.bare_metal_solution_v2.types.baremetalsolution.SnapshotSchedulePolicy] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Update a snapshot schedule policy in the specified project.
from google.cloud import bare_metal_solution_v2
def sample_update_snapshot_schedule_policy():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateSnapshotSchedulePolicyRequest(
)
# Make the request
response = client.update_snapshot_schedule_policy(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.UpdateSnapshotSchedulePolicyRequest, dict]
The request object. Message for updating a snapshot schedule policy in a project. |
snapshot_schedule_policy |
google.cloud.bare_metal_solution_v2.types.SnapshotSchedulePolicy
Required. The snapshot schedule policy to update. The |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. The list of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.bare_metal_solution_v2.types.SnapshotSchedulePolicy | A snapshot schedule policy. |
update_volume
update_volume(request: Optional[Union[google.cloud.bare_metal_solution_v2.types.baremetalsolution.UpdateVolumeRequest, dict]] = None, *, volume: Optional[google.cloud.bare_metal_solution_v2.types.baremetalsolution.Volume] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Update details of a single storage volume.
from google.cloud import bare_metal_solution_v2
def sample_update_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateVolumeRequest(
)
# Make the request
operation = client.update_volume(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.bare_metal_solution_v2.types.UpdateVolumeRequest, dict]
The request object. Message for updating a volume. |
volume |
google.cloud.bare_metal_solution_v2.types.Volume
Required. The volume to update. The |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
The list of fields to update. The only currently supported fields are: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Volume A storage volume. |
volume_path
volume_path(project: str, location: str, volume: str)
Returns a fully-qualified volume string.
volume_snapshot_path
volume_snapshot_path(project: str, location: str, volume: str, snapshot: str)
Returns a fully-qualified volume_snapshot string.