Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#34)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent 43b0e7d commit 78a321c
Show file tree
Hide file tree
Showing 25 changed files with 2,538 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,27 @@ async def list_instances(
r"""Lists all instances in a project for either a
specified location or for all locations.
.. code-block::
from google.cloud import filestore_v1
def sample_list_instances():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.ListInstancesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_instances(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.ListInstancesRequest, dict]):
The request object. ListInstancesRequest lists
Expand Down Expand Up @@ -342,6 +363,25 @@ async def get_instance(
) -> cloud_filestore_service.Instance:
r"""Gets the details of a specific instance.
.. code-block::
from google.cloud import filestore_v1
def sample_get_instance():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.GetInstanceRequest(
name="name_value",
)
# Make the request
response = client.get_instance(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.GetInstanceRequest, dict]):
The request object. GetInstanceRequest gets the state of
Expand Down Expand Up @@ -426,6 +466,31 @@ async def create_instance(
capacity of the backup (and also equal to or larger than
the minimum capacity of the tier).
.. code-block::
from google.cloud import filestore_v1
def sample_create_instance():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.CreateInstanceRequest(
parent="parent_value",
instance_id="instance_id_value",
)
# Make the request
operation = client.create_instance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.CreateInstanceRequest, dict]):
The request object. CreateInstanceRequest creates an
Expand Down Expand Up @@ -530,6 +595,28 @@ async def update_instance(
) -> operation_async.AsyncOperation:
r"""Updates the settings of a specific instance.
.. code-block::
from google.cloud import filestore_v1
def sample_update_instance():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.UpdateInstanceRequest(
)
# Make the request
operation = client.update_instance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.UpdateInstanceRequest, dict]):
The request object. UpdateInstanceRequest updates the
Expand Down Expand Up @@ -629,6 +716,32 @@ async def restore_instance(
larger than the capacity of the backup (and also equal
to or larger than the minimum capacity of the tier).
.. code-block::
from google.cloud import filestore_v1
def sample_restore_instance():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.RestoreInstanceRequest(
source_backup="source_backup_value",
name="name_value",
file_share="file_share_value",
)
# Make the request
operation = client.restore_instance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.RestoreInstanceRequest, dict]):
The request object. RestoreInstanceRequest restores an
Expand Down Expand Up @@ -690,6 +803,29 @@ async def delete_instance(
) -> operation_async.AsyncOperation:
r"""Deletes an instance.
.. code-block::
from google.cloud import filestore_v1
def sample_delete_instance():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.DeleteInstanceRequest(
name="name_value",
)
# Make the request
operation = client.delete_instance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.DeleteInstanceRequest, dict]):
The request object. DeleteInstanceRequest deletes an
Expand Down Expand Up @@ -783,6 +919,27 @@ async def list_backups(
r"""Lists all backups in a project for either a specified
location or for all locations.
.. code-block::
from google.cloud import filestore_v1
def sample_list_backups():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.ListBackupsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backups(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.ListBackupsRequest, dict]):
The request object. ListBackupsRequest lists backups.
Expand Down Expand Up @@ -875,6 +1032,25 @@ async def get_backup(
) -> cloud_filestore_service.Backup:
r"""Gets the details of a specific backup.
.. code-block::
from google.cloud import filestore_v1
def sample_get_backup():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.GetBackupRequest(
name="name_value",
)
# Make the request
response = client.get_backup(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.GetBackupRequest, dict]):
The request object. GetBackupRequest gets the state of a
Expand Down Expand Up @@ -955,6 +1131,30 @@ async def create_backup(
) -> operation_async.AsyncOperation:
r"""Creates a backup.
.. code-block::
from google.cloud import filestore_v1
def sample_create_backup():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.CreateBackupRequest(
parent="parent_value",
backup_id="backup_id_value",
)
# Make the request
operation = client.create_backup(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.CreateBackupRequest, dict]):
The request object. CreateBackupRequest creates a
Expand Down Expand Up @@ -1063,6 +1263,29 @@ async def delete_backup(
) -> operation_async.AsyncOperation:
r"""Deletes a backup.
.. code-block::
from google.cloud import filestore_v1
def sample_delete_backup():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.DeleteBackupRequest(
name="name_value",
)
# Make the request
operation = client.delete_backup(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.DeleteBackupRequest, dict]):
The request object. DeleteBackupRequest deletes a
Expand Down Expand Up @@ -1156,6 +1379,28 @@ async def update_backup(
) -> operation_async.AsyncOperation:
r"""Updates the settings of a specific backup.
.. code-block::
from google.cloud import filestore_v1
def sample_update_backup():
# Create a client
client = filestore_v1.CloudFilestoreManagerClient()
# Initialize request argument(s)
request = filestore_v1.UpdateBackupRequest(
)
# Make the request
operation = client.update_backup(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.filestore_v1.types.UpdateBackupRequest, dict]):
The request object. UpdateBackupRequest updates
Expand Down
Loading

0 comments on commit 78a321c

Please sign in to comment.