BareMetalSolutionAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport, typing.Callable[[...], google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport]]] = 'grpc_asyncio', client_options: typing.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
api_endpoint
Return the API endpoint used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
BareMetalSolutionTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The universe domain used by the client instance. |
Methods
BareMetalSolutionAsyncClient
BareMetalSolutionAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport, typing.Callable[[...], google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport]]] = 'grpc_asyncio', client_options: typing.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 async client.
Parameters | |
---|---|
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 |
Optional[Union[str,BareMetalSolutionTransport,Callable[..., BareMetalSolutionTransport]]]
The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the BareMetalSolutionTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
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 |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_nfs_share
create_nfs_share(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.CreateNfsShareRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
nfs_share: typing.Optional[
google.cloud.bare_metal_solution_v2.types.nfs_share.NfsShare
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Create an NFS share.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_create_nfs_share():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateNfsShareRequest(
parent="parent_value",
)
# Make the request
operation = client.create_nfs_share(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.CreateNfsShareRequest, dict]]
The request object. Message for creating an NFS share. |
parent |
Required. The parent project and location. This corresponds to the |
nfs_share |
NfsShare
Required. The NfsShare to create. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be NfsShare An NFS share. |
create_provisioning_config
create_provisioning_config(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.provisioning.CreateProvisioningConfigRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
provisioning_config: typing.Optional[
google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
Create new ProvisioningConfig.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_create_provisioning_config():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateProvisioningConfigRequest(
parent="parent_value",
)
# Make the request
response = await client.create_provisioning_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.CreateProvisioningConfigRequest, dict]]
The request object. Request for CreateProvisioningConfig. |
parent |
Required. The parent project and location containing the ProvisioningConfig. This corresponds to the |
provisioning_config |
ProvisioningConfig
Required. The ProvisioningConfig to create. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.ProvisioningConfig |
A provisioning configuration. |
create_ssh_key
create_ssh_key(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.ssh_key.CreateSSHKeyRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
ssh_key: typing.Optional[
google.cloud.bare_metal_solution_v2.types.ssh_key.SSHKey
] = None,
ssh_key_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.ssh_key.SSHKey
Register a public SSH key in the specified project for use with the interactive serial console feature.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_create_ssh_key():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateSSHKeyRequest(
parent="parent_value",
ssh_key_id="ssh_key_id_value",
)
# Make the request
response = await client.create_ssh_key(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.CreateSSHKeyRequest, dict]]
The request object. Message for registering a public SSH key in a project. |
parent |
Required. The parent containing the SSH keys. This corresponds to the |
ssh_key |
SSHKey
Required. The SSH key to register. This corresponds to the |
ssh_key_id |
Required. The ID to use for the key, which will become the final component of the key's resource name. This value must match the regex: [a-zA-Z0-9@.-_]{1,64} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.SSHKey |
An SSH key, used for authorizing with the interactive serial console feature. |
create_volume_snapshot
create_volume_snapshot(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.CreateVolumeSnapshotRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
volume_snapshot: typing.Optional[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.VolumeSnapshot
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.volume_snapshot.VolumeSnapshot
Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_create_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.CreateVolumeSnapshotRequest(
parent="parent_value",
)
# Make the request
response = await client.create_volume_snapshot(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.CreateVolumeSnapshotRequest, dict]]
The request object. Message for creating a volume snapshot. |
parent |
Required. The volume to snapshot. This corresponds to the |
volume_snapshot |
VolumeSnapshot
Required. The snapshot to create. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.VolumeSnapshot |
A snapshot of a volume. Only boot volumes can have snapshots. |
delete_nfs_share
delete_nfs_share(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.DeleteNfsShareRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Delete an NFS share. The underlying volume is automatically deleted.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_delete_nfs_share():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DeleteNfsShareRequest(
name="name_value",
)
# Make the request
operation = client.delete_nfs_share(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.DeleteNfsShareRequest, dict]]
The request object. Message for deleting an NFS share. |
name |
Required. The name of the NFS share to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_ssh_key
delete_ssh_key(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.ssh_key.DeleteSSHKeyRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a public SSH key registered in the specified project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_delete_ssh_key():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DeleteSSHKeyRequest(
name="name_value",
)
# Make the request
await client.delete_ssh_key(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.DeleteSSHKeyRequest, dict]]
The request object. Message for deleting an SSH key from a project. |
name |
Required. The name of the SSH key to delete. Currently, the only valid value for the location is "global". This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.DeleteVolumeSnapshotRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_delete_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DeleteVolumeSnapshotRequest(
name="name_value",
)
# Make the request
await client.delete_volume_snapshot(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.DeleteVolumeSnapshotRequest, dict]]
The request object. Message for deleting named Volume snapshot. |
name |
Required. The name of the snapshot to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
detach_lun
detach_lun(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.DetachLunRequest, dict
]
] = None,
*,
instance: typing.Optional[str] = None,
lun: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Detach LUN from Instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_detach_lun():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DetachLunRequest(
instance="instance_value",
lun="lun_value",
)
# Make the request
operation = client.detach_lun(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.DetachLunRequest, dict]]
The request object. Message for detach specific LUN from an Instance. |
instance |
Required. Name of the instance. This corresponds to the |
lun |
Required. Name of the Lun to detach. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Instance A server. |
disable_interactive_serial_console
disable_interactive_serial_console(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.DisableInteractiveSerialConsoleRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Disable the interactive serial console feature on an instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_disable_interactive_serial_console():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.DisableInteractiveSerialConsoleRequest(
name="name_value",
)
# Make the request
operation = client.disable_interactive_serial_console(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.DisableInteractiveSerialConsoleRequest, dict]]
The request object. Message for disabling the interactive serial console on an instance. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be DisableInteractiveSerialConsoleResponse Message for response of DisableInteractiveSerialConsole. |
enable_interactive_serial_console
enable_interactive_serial_console(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.EnableInteractiveSerialConsoleRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Enable the interactive serial console feature on an instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_enable_interactive_serial_console():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.EnableInteractiveSerialConsoleRequest(
name="name_value",
)
# Make the request
operation = client.enable_interactive_serial_console(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.EnableInteractiveSerialConsoleRequest, dict]]
The request object. Message for enabling the interactive serial console on an instance. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be EnableInteractiveSerialConsoleResponse Message for response of EnableInteractiveSerialConsole. |
evict_lun
evict_lun(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.lun.EvictLunRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Skips lun's cooloff and deletes it now. Lun must be in cooloff state.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_evict_lun():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.EvictLunRequest(
name="name_value",
)
# Make the request
operation = client.evict_lun(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.EvictLunRequest, dict]]
The request object. Request for skip lun cooloff and delete it. |
name |
Required. The name of the lun. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
evict_volume
evict_volume(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.EvictVolumeRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Skips volume's cooloff and deletes it now. Volume must be in cooloff state.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_evict_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.EvictVolumeRequest(
name="name_value",
)
# Make the request
operation = client.evict_volume(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.EvictVolumeRequest, dict]]
The request object. Request for skip volume cooloff and delete it. |
name |
Required. The name of the Volume. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
BareMetalSolutionAsyncClient |
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.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
BareMetalSolutionAsyncClient |
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.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
BareMetalSolutionAsyncClient |
The constructed client. |
get_instance
get_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.GetInstanceRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.instance.Instance
Get details about a single server.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetInstanceRequest(
name="name_value",
)
# Make the request
response = await client.get_instance(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetInstanceRequest, dict]]
The request object. Message for requesting server information. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Instance |
A server. |
get_location
get_location(
request: typing.Optional[
google.cloud.location.locations_pb2.GetLocationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
|
Location object. |
get_lun
get_lun(
request: typing.Optional[
typing.Union[google.cloud.bare_metal_solution_v2.types.lun.GetLunRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.lun.Lun
Get details of a single storage logical unit number(LUN).
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_lun():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetLunRequest(
name="name_value",
)
# Make the request
response = await client.get_lun(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetLunRequest, dict]]
The request object. Message for requesting storage lun information. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
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: typing.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 variable 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.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_network
get_network(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.network.GetNetworkRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.network.Network
Get details of a single network.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_network():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetNetworkRequest(
name="name_value",
)
# Make the request
response = await client.get_network(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetNetworkRequest, dict]]
The request object. Message for requesting network information. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Network |
A Network. |
get_nfs_share
get_nfs_share(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.GetNfsShareRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.nfs_share.NfsShare
Get details of a single NFS share.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_nfs_share():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetNfsShareRequest(
name="name_value",
)
# Make the request
response = await client.get_nfs_share(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetNfsShareRequest, dict]]
The request object. Message for requesting NFS share information. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.NfsShare |
An NFS share. |
get_provisioning_config
get_provisioning_config(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.provisioning.GetProvisioningConfigRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
Get ProvisioningConfig by name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_provisioning_config():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetProvisioningConfigRequest(
name="name_value",
)
# Make the request
response = await client.get_provisioning_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetProvisioningConfigRequest, dict]]
The request object. Request for GetProvisioningConfig. |
name |
Required. Name of the ProvisioningConfig. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.ProvisioningConfig |
A provisioning configuration. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.transports.base.BareMetalSolutionTransport
]
Returns an appropriate transport class.
Parameter | |
---|---|
Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
get_volume
get_volume(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.GetVolumeRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.volume.Volume
Get details of a single storage volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetVolumeRequest(
name="name_value",
)
# Make the request
response = await client.get_volume(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetVolumeRequest, dict]]
The request object. Message for requesting storage volume information. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Volume |
A storage volume. |
get_volume_snapshot
get_volume_snapshot(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.GetVolumeSnapshotRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.volume_snapshot.VolumeSnapshot
Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_get_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.GetVolumeSnapshotRequest(
name="name_value",
)
# Make the request
response = await client.get_volume_snapshot(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.GetVolumeSnapshotRequest, dict]]
The request object. Message for requesting volume snapshot information. |
name |
Required. The name of the snapshot. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.VolumeSnapshot |
A snapshot of a volume. Only boot volumes can have snapshots. |
instance_config_path
instance_config_path(project: str, location: str, instance_config: str) -> str
Returns a fully-qualified instance_config string.
instance_path
instance_path(project: str, location: str, instance: str) -> str
Returns a fully-qualified instance string.
instance_quota_path
instance_quota_path(project: str, location: str, instance_quota: str) -> str
Returns a fully-qualified instance_quota string.
interconnect_attachment_path
interconnect_attachment_path(
project: str, region: str, interconnect_attachment: str
) -> str
Returns a fully-qualified interconnect_attachment string.
list_instances
list_instances(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.ListInstancesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListInstancesAsyncPager
)
List servers in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_instances():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListInstancesRequest, dict]]
The request object. Message for requesting the list of servers. |
parent |
Required. Parent value for ListInstancesRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListInstancesAsyncPager |
Response message for the list of servers. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
google.cloud.location.locations_pb2.ListLocationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse
Lists information about the supported locations for this service.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
|
Response message for ListLocations method. |
list_luns
list_luns(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.lun.ListLunsRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListLunsAsyncPager
)
List storage volume luns for given storage volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_luns():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListLunsRequest, dict]]
The request object. Message for requesting a list of storage volume luns. |
parent |
Required. Parent value for ListLunsRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListLunsAsyncPager |
Response message containing the list of storage volume luns. Iterating over this object will yield results and resolve additional pages automatically. |
list_network_usage
list_network_usage(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.network.ListNetworkUsageRequest,
dict,
]
] = None,
*,
location: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.network.ListNetworkUsageResponse
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_network_usage():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListNetworkUsageRequest(
location="location_value",
)
# Make the request
response = await client.list_network_usage(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListNetworkUsageRequest, dict]]
The request object. Request to get networks with IPs. |
location |
Required. Parent value (project and location). This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.ListNetworkUsageResponse |
Response with Networks with IPs |
list_networks
list_networks(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.network.ListNetworksRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNetworksAsyncPager
)
List network in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_networks():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListNetworksRequest, dict]]
The request object. Message for requesting a list of networks. |
parent |
Required. Parent value for ListNetworksRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNetworksAsyncPager |
Response message containing the list of networks. Iterating over this object will yield results and resolve additional pages automatically. |
list_nfs_shares
list_nfs_shares(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.ListNfsSharesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNfsSharesAsyncPager
)
List NFS shares.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_nfs_shares():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListNfsSharesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_nfs_shares(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListNfsSharesRequest, dict]]
The request object. Message for requesting a list of NFS shares. |
parent |
Required. Parent value for ListNfsSharesRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListNfsSharesAsyncPager |
Response message containing the list of NFS shares. Iterating over this object will yield results and resolve additional pages automatically. |
list_os_images
list_os_images(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.osimage.ListOSImagesRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListOSImagesAsyncPager
)
Retrieves the list of OS images which are currently approved.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_os_images():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListOSImagesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_os_images(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListOSImagesRequest, dict]]
The request object. Request for getting all available OS images. |
parent |
Required. Parent value for ListProvisioningQuotasRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListOSImagesAsyncPager |
Request for getting all available OS images. Iterating over this object will yield results and resolve additional pages automatically. |
list_provisioning_quotas
list_provisioning_quotas(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.provisioning.ListProvisioningQuotasRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListProvisioningQuotasAsyncPager
)
List the budget details to provision resources on a given project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_provisioning_quotas():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListProvisioningQuotasRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_provisioning_quotas(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListProvisioningQuotasRequest, dict]]
The request object. Message for requesting the list of provisioning quotas. |
parent |
Required. Parent value for ListProvisioningQuotasRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListProvisioningQuotasAsyncPager |
Response message for the list of provisioning quotas. Iterating over this object will yield results and resolve additional pages automatically. |
list_ssh_keys
list_ssh_keys(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.ssh_key.ListSSHKeysRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListSSHKeysAsyncPager
)
Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_ssh_keys():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ListSSHKeysRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_ssh_keys(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListSSHKeysRequest, dict]]
The request object. Message for listing the public SSH keys in a project. |
parent |
Required. The parent containing the SSH keys. Currently, the only valid value for the location is "global". This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListSSHKeysAsyncPager |
Message for response of ListSSHKeys. Iterating over this object will yield results and resolve additional pages automatically. |
list_volume_snapshots
list_volume_snapshots(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.ListVolumeSnapshotsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumeSnapshotsAsyncPager
)
Retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_volume_snapshots():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListVolumeSnapshotsRequest, dict]]
The request object. Message for requesting a list of volume snapshots. |
parent |
Required. Parent value for ListVolumesRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumeSnapshotsAsyncPager |
Response message containing the list of volume snapshots. Iterating over this object will yield results and resolve additional pages automatically. |
list_volumes
list_volumes(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.ListVolumesRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumesAsyncPager
)
List storage volumes in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_list_volumes():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ListVolumesRequest, dict]]
The request object. Message for requesting a list of storage volumes. |
parent |
Required. Parent value for ListVolumesRequest. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.services.bare_metal_solution.pagers.ListVolumesAsyncPager |
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) -> str
Returns a fully-qualified lun string.
network_config_path
network_config_path(project: str, location: str, network_config: str) -> str
Returns a fully-qualified network_config string.
network_path
network_path(project: str, location: str, network: str) -> str
Returns a fully-qualified network string.
nfs_share_path
nfs_share_path(project: str, location: str, nfs_share: str) -> str
Returns a fully-qualified nfs_share string.
os_image_path
os_image_path(project: str, location: str, os_image: str) -> str
Returns a fully-qualified os_image string.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]
Parse a project path into its component segments.
parse_instance_config_path
parse_instance_config_path(path: str) -> typing.Dict[str, str]
Parses a instance_config path into its component segments.
parse_instance_path
parse_instance_path(path: str) -> typing.Dict[str, str]
Parses a instance path into its component segments.
parse_instance_quota_path
parse_instance_quota_path(path: str) -> typing.Dict[str, str]
Parses a instance_quota path into its component segments.
parse_interconnect_attachment_path
parse_interconnect_attachment_path(path: str) -> typing.Dict[str, str]
Parses a interconnect_attachment path into its component segments.
parse_lun_path
parse_lun_path(path: str) -> typing.Dict[str, str]
Parses a lun path into its component segments.
parse_network_config_path
parse_network_config_path(path: str) -> typing.Dict[str, str]
Parses a network_config path into its component segments.
parse_network_path
parse_network_path(path: str) -> typing.Dict[str, str]
Parses a network path into its component segments.
parse_nfs_share_path
parse_nfs_share_path(path: str) -> typing.Dict[str, str]
Parses a nfs_share path into its component segments.
parse_os_image_path
parse_os_image_path(path: str) -> typing.Dict[str, str]
Parses a os_image path into its component segments.
parse_provisioning_config_path
parse_provisioning_config_path(path: str) -> typing.Dict[str, str]
Parses a provisioning_config path into its component segments.
parse_provisioning_quota_path
parse_provisioning_quota_path(path: str) -> typing.Dict[str, str]
Parses a provisioning_quota path into its component segments.
parse_server_network_template_path
parse_server_network_template_path(path: str) -> typing.Dict[str, str]
Parses a server_network_template path into its component segments.
parse_ssh_key_path
parse_ssh_key_path(path: str) -> typing.Dict[str, str]
Parses a ssh_key path into its component segments.
parse_volume_config_path
parse_volume_config_path(path: str) -> typing.Dict[str, str]
Parses a volume_config path into its component segments.
parse_volume_path
parse_volume_path(path: str) -> typing.Dict[str, str]
Parses a volume path into its component segments.
parse_volume_snapshot_path
parse_volume_snapshot_path(path: str) -> typing.Dict[str, str]
Parses a volume_snapshot path into its component segments.
provisioning_config_path
provisioning_config_path(
project: str, location: str, provisioning_config: str
) -> str
Returns a fully-qualified provisioning_config string.
provisioning_quota_path
provisioning_quota_path(
project: str, location: str, provisioning_quota: str
) -> str
Returns a fully-qualified provisioning_quota string.
rename_instance
rename_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.RenameInstanceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
new_instance_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.instance.Instance
RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_rename_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.RenameInstanceRequest(
name="name_value",
new_instance_id="new_instance_id_value",
)
# Make the request
response = await client.rename_instance(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.RenameInstanceRequest, dict]]
The request object. Message requesting rename of a server. |
name |
Required. The |
new_instance_id |
Required. The new |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Instance |
A server. |
rename_network
rename_network(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.network.RenameNetworkRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
new_network_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.network.Network
RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_rename_network():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.RenameNetworkRequest(
name="name_value",
new_network_id="new_network_id_value",
)
# Make the request
response = await client.rename_network(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.RenameNetworkRequest, dict]]
The request object. Message requesting rename of a server. |
name |
Required. The |
new_network_id |
Required. The new |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Network |
A Network. |
rename_nfs_share
rename_nfs_share(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.RenameNfsShareRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
new_nfsshare_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.nfs_share.NfsShare
RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_rename_nfs_share():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.RenameNfsShareRequest(
name="name_value",
new_nfsshare_id="new_nfsshare_id_value",
)
# Make the request
response = await client.rename_nfs_share(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.RenameNfsShareRequest, dict]]
The request object. Message requesting rename of a server. |
name |
Required. The |
new_nfsshare_id |
Required. The new |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.NfsShare |
An NFS share. |
rename_volume
rename_volume(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.RenameVolumeRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
new_volume_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.volume.Volume
RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_rename_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.RenameVolumeRequest(
name="name_value",
new_volume_id="new_volume_id_value",
)
# Make the request
response = await client.rename_volume(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.RenameVolumeRequest, dict]]
The request object. Message requesting rename of a server. |
name |
Required. The |
new_volume_id |
Required. The new |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.Volume |
A storage volume. |
reset_instance
reset_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.ResetInstanceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_reset_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ResetInstanceRequest, dict]]
The request object. Message requesting to reset a server. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be ResetInstanceResponse Response message from resetting a server. |
resize_volume
resize_volume(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.ResizeVolumeRequest, dict
]
] = None,
*,
volume: typing.Optional[str] = None,
size_gib: typing.Optional[int] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Emergency Volume resize.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_resize_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.ResizeVolumeRequest(
volume="volume_value",
)
# Make the request
operation = client.resize_volume(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.ResizeVolumeRequest, dict]]
The request object. Request for emergency resize Volume. |
volume |
Required. Volume to resize. This corresponds to the |
size_gib |
New Volume size, in GiB. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Volume A storage volume. |
restore_volume_snapshot
restore_volume_snapshot(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume_snapshot.RestoreVolumeSnapshotRequest,
dict,
]
] = None,
*,
volume_snapshot: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_restore_volume_snapshot():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.RestoreVolumeSnapshotRequest, dict]]
The request object. Message for restoring a volume snapshot. |
volume_snapshot |
Required. Name of the snapshot which will be used to restore its parent volume. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be VolumeSnapshot A snapshot of a volume. Only boot volumes can have snapshots. |
server_network_template_path
server_network_template_path(
project: str, location: str, server_network_template: str
) -> str
Returns a fully-qualified server_network_template string.
ssh_key_path
ssh_key_path(project: str, location: str, ssh_key: str) -> str
Returns a fully-qualified ssh_key string.
start_instance
start_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.StartInstanceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Starts a server that was shutdown.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_start_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.StartInstanceRequest(
name="name_value",
)
# Make the request
operation = client.start_instance(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.StartInstanceRequest, dict]]
The request object. Message requesting to start a server. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be StartInstanceResponse Response message from starting a server. |
stop_instance
stop_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.StopInstanceRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Stop a running server.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_stop_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.StopInstanceRequest(
name="name_value",
)
# Make the request
operation = client.stop_instance(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.StopInstanceRequest, dict]]
The request object. Message requesting to stop a server. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be StopInstanceResponse Response message from stopping a server. |
submit_provisioning_config
submit_provisioning_config(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.provisioning.SubmitProvisioningConfigRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
provisioning_config: typing.Optional[
google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bare_metal_solution_v2.types.provisioning.SubmitProvisioningConfigResponse
)
Submit a provisiong configuration for a given project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_submit_provisioning_config():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.SubmitProvisioningConfigRequest(
parent="parent_value",
)
# Make the request
response = await client.submit_provisioning_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.SubmitProvisioningConfigRequest, dict]]
The request object. Request for SubmitProvisioningConfig. |
parent |
Required. The parent project and location containing the ProvisioningConfig. This corresponds to the |
provisioning_config |
ProvisioningConfig
Required. The ProvisioningConfig to create. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.SubmitProvisioningConfigResponse |
Response for SubmitProvisioningConfig. |
update_instance
update_instance(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.instance.UpdateInstanceRequest,
dict,
]
] = None,
*,
instance: typing.Optional[
google.cloud.bare_metal_solution_v2.types.instance.Instance
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update details of a single server.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_update_instance():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateInstanceRequest(
)
# Make the request
operation = client.update_instance(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.UpdateInstanceRequest, dict]]
The request object. Message requesting to updating a server. |
instance |
Instance
Required. The server to update. The |
update_mask |
The list of fields to update. The currently supported fields are: |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Instance A server. |
update_network
update_network(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.network.UpdateNetworkRequest, dict
]
] = None,
*,
network: typing.Optional[
google.cloud.bare_metal_solution_v2.types.network.Network
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update details of a single network.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_update_network():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateNetworkRequest(
)
# Make the request
operation = client.update_network(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.UpdateNetworkRequest, dict]]
The request object. Message requesting to updating a network. |
network |
Network
Required. The network to update. The |
update_mask |
The list of fields to update. The only currently supported fields are: |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Network A Network. |
update_nfs_share
update_nfs_share(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.nfs_share.UpdateNfsShareRequest,
dict,
]
] = None,
*,
nfs_share: typing.Optional[
google.cloud.bare_metal_solution_v2.types.nfs_share.NfsShare
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update details of a single NFS share.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_update_nfs_share():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateNfsShareRequest(
)
# Make the request
operation = client.update_nfs_share(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.UpdateNfsShareRequest, dict]]
The request object. Message requesting to updating an NFS share. |
nfs_share |
NfsShare
Required. The NFS share to update. The |
update_mask |
The list of fields to update. The only currently supported fields are: |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be NfsShare An NFS share. |
update_provisioning_config
update_provisioning_config(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.provisioning.UpdateProvisioningConfigRequest,
dict,
]
] = None,
*,
provisioning_config: typing.Optional[
google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bare_metal_solution_v2.types.provisioning.ProvisioningConfig
Update existing ProvisioningConfig.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_update_provisioning_config():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# Initialize request argument(s)
request = bare_metal_solution_v2.UpdateProvisioningConfigRequest(
)
# Make the request
response = await client.update_provisioning_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.UpdateProvisioningConfigRequest, dict]]
The request object. Message for updating a ProvisioningConfig. |
provisioning_config |
ProvisioningConfig
Required. The ProvisioningConfig to update. This corresponds to the |
update_mask |
Required. The list of fields to update. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.cloud.bare_metal_solution_v2.types.ProvisioningConfig |
A provisioning configuration. |
update_volume
update_volume(
request: typing.Optional[
typing.Union[
google.cloud.bare_metal_solution_v2.types.volume.UpdateVolumeRequest, dict
]
] = None,
*,
volume: typing.Optional[
google.cloud.bare_metal_solution_v2.types.volume.Volume
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update details of a single storage volume.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bare_metal_solution_v2
async def sample_update_volume():
# Create a client
client = bare_metal_solution_v2.BareMetalSolutionAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.bare_metal_solution_v2.types.UpdateVolumeRequest, dict]]
The request object. Message for updating a volume. |
volume |
Volume
Required. The volume to update. The |
update_mask |
The list of fields to update. The only currently supported fields are: 'labels' This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Volume A storage volume. |
volume_config_path
volume_config_path(project: str, location: str, volume_config: str) -> str
Returns a fully-qualified volume_config string.
volume_path
volume_path(project: str, location: str, volume: str) -> str
Returns a fully-qualified volume string.
volume_snapshot_path
volume_snapshot_path(
project: str, location: str, volume: str, snapshot: str
) -> str
Returns a fully-qualified volume_snapshot string.