Class NetAppClient (0.2.0)

NetAppClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.netapp_v1.services.net_app.transports.base.NetAppTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

NetApp Files Google Cloud Service

Properties

transport

Returns the transport used by the client instance.

Returns
TypeDescription
NetAppTransportThe transport used by the client instance.

Methods

NetAppClient

NetAppClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.netapp_v1.services.net_app.transports.base.NetAppTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the net app client.

Parameters
NameDescription
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Union[str, NetAppTransport]

The transport to use. 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. It won't take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, the api_endpoint property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used.

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 None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

active_directory_path

active_directory_path(project: str, location: str, active_directory: str) -> str

Returns a fully-qualified active_directory string.

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_active_directory

create_active_directory(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.active_directory.CreateActiveDirectoryRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    active_directory: typing.Optional[
        google.cloud.netapp_v1.types.active_directory.ActiveDirectory
    ] = None,
    active_directory_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

CreateActiveDirectory Creates the active directory specified in the request.

# 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 netapp_v1

def sample_create_active_directory():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    active_directory = netapp_v1.ActiveDirectory()
    active_directory.domain = "domain_value"
    active_directory.dns = "dns_value"
    active_directory.net_bios_prefix = "net_bios_prefix_value"
    active_directory.username = "username_value"
    active_directory.password = "password_value"

    request = netapp_v1.CreateActiveDirectoryRequest(
        parent="parent_value",
        active_directory=active_directory,
        active_directory_id="active_directory_id_value",
    )

    # Make the request
    operation = client.create_active_directory(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateActiveDirectoryRequest, dict]

The request object. CreateActiveDirectoryRequest for creating an active directory.

parent str

Required. Value for parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

active_directory google.cloud.netapp_v1.types.ActiveDirectory

Required. Fields of the to be created active directory. This corresponds to the active_directory field on the request instance; if request is provided, this should not be set.

active_directory_id str

Required. ID of the active directory to create. This corresponds to the active_directory_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ActiveDirectory ActiveDirectory is the public representation of the active directory config.

create_kms_config

create_kms_config(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.CreateKmsConfigRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    kms_config: typing.Optional[google.cloud.netapp_v1.types.kms.KmsConfig] = None,
    kms_config_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Creates a new KMS config.

# 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 netapp_v1

def sample_create_kms_config():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    kms_config = netapp_v1.KmsConfig()
    kms_config.crypto_key_name = "crypto_key_name_value"

    request = netapp_v1.CreateKmsConfigRequest(
        parent="parent_value",
        kms_config_id="kms_config_id_value",
        kms_config=kms_config,
    )

    # Make the request
    operation = client.create_kms_config(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateKmsConfigRequest, dict]

The request object.

parent str

Required. Value for parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

kms_config google.cloud.netapp_v1.types.KmsConfig

Required. The required parameters to create a new KmsConfig. This corresponds to the kms_config field on the request instance; if request is provided, this should not be set.

kms_config_id str

Required. Id of the requesting KmsConfig If auto-generating Id server-side, remove this field and id from the method_signature of Create RPC This corresponds to the kms_config_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be KmsConfig KmsConfig is the customer managed encryption key(CMEK) configuration.

create_replication

create_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.CreateReplicationRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    replication: typing.Optional[
        google.cloud.netapp_v1.types.replication.Replication
    ] = None,
    replication_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Create a new replication for a 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 netapp_v1

def sample_create_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    replication = netapp_v1.Replication()
    replication.replication_schedule = "DAILY"
    replication.destination_volume_parameters.storage_pool = "storage_pool_value"

    request = netapp_v1.CreateReplicationRequest(
        parent="parent_value",
        replication=replication,
        replication_id="replication_id_value",
    )

    # Make the request
    operation = client.create_replication(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateReplicationRequest, dict]

The request object. CreateReplicationRequest creates a replication.

parent str

Required. The NetApp volume to create the replications of, in the format projects/{project_id}/locations/{location}/volumes/{volume_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

replication google.cloud.netapp_v1.types.Replication

Required. A replication resource This corresponds to the replication field on the request instance; if request is provided, this should not be set.

replication_id str

Required. ID of the replication to create. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. This corresponds to the replication_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Replication Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

create_snapshot

create_snapshot(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.snapshot.CreateSnapshotRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    snapshot: typing.Optional[google.cloud.netapp_v1.types.snapshot.Snapshot] = None,
    snapshot_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Create a new snapshot for a 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 netapp_v1

def sample_create_snapshot():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.CreateSnapshotRequest(
        parent="parent_value",
        snapshot_id="snapshot_id_value",
    )

    # Make the request
    operation = client.create_snapshot(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateSnapshotRequest, dict]

The request object. CreateSnapshotRequest creates a snapshot.

parent str

Required. The NetApp volume to create the snapshots of, in the format projects/{project_id}/locations/{location}/volumes/{volume_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

snapshot google.cloud.netapp_v1.types.Snapshot

Required. A snapshot resource This corresponds to the snapshot field on the request instance; if request is provided, this should not be set.

snapshot_id str

Required. ID of the snapshot to create. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. This corresponds to the snapshot_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Snapshot

create_storage_pool

create_storage_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.storage_pool.CreateStoragePoolRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    storage_pool: typing.Optional[
        google.cloud.netapp_v1.types.storage_pool.StoragePool
    ] = None,
    storage_pool_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Creates a new storage pool.

# 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 netapp_v1

def sample_create_storage_pool():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    storage_pool = netapp_v1.StoragePool()
    storage_pool.service_level = "STANDARD"
    storage_pool.capacity_gib = 1247
    storage_pool.network = "network_value"

    request = netapp_v1.CreateStoragePoolRequest(
        parent="parent_value",
        storage_pool_id="storage_pool_id_value",
        storage_pool=storage_pool,
    )

    # Make the request
    operation = client.create_storage_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateStoragePoolRequest, dict]

The request object.

parent str

Required. Value for parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

storage_pool google.cloud.netapp_v1.types.StoragePool

Required. The required parameters to create a new storage pool. This corresponds to the storage_pool field on the request instance; if request is provided, this should not be set.

storage_pool_id str

Required. Id of the requesting storage pool If auto-generating Id server-side, remove this field and id from the method_signature of Create RPC This corresponds to the storage_pool_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be StoragePool StoragePool is a container for volumes with a service level and capacity. Volumes can be created in a pool of sufficient available capacity. StoragePool capacity is what you are billed for.

create_volume

create_volume(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.CreateVolumeRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    volume: typing.Optional[google.cloud.netapp_v1.types.volume.Volume] = None,
    volume_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Creates a new Volume 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 netapp_v1

def sample_create_volume():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    volume = netapp_v1.Volume()
    volume.share_name = "share_name_value"
    volume.storage_pool = "storage_pool_value"
    volume.capacity_gib = 1247
    volume.protocols = ['SMB']

    request = netapp_v1.CreateVolumeRequest(
        parent="parent_value",
        volume_id="volume_id_value",
        volume=volume,
    )

    # Make the request
    operation = client.create_volume(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.CreateVolumeRequest, dict]

The request object. Message for creating a Volume

parent str

Required. Value for parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

volume google.cloud.netapp_v1.types.Volume

Required. The volume being created. This corresponds to the volume field on the request instance; if request is provided, this should not be set.

volume_id str

Required. Id of the requesting volume If auto-generating Id server-side, remove this field and Id from the method_signature of Create RPC This corresponds to the volume_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Volume Volume provides a filesystem that you can mount.

delete_active_directory

delete_active_directory(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.active_directory.DeleteActiveDirectoryRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Delete the active directory specified in the request.

# 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 netapp_v1

def sample_delete_active_directory():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteActiveDirectoryRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_active_directory(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteActiveDirectoryRequest, dict]

The request object. DeleteActiveDirectoryRequest for deleting a single active directory.

name str

Required. Name of the active directory. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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_kms_config

delete_kms_config(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.DeleteKmsConfigRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Warning! This operation will permanently delete the Kms config.

# 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 netapp_v1

def sample_delete_kms_config():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteKmsConfigRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_kms_config(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteKmsConfigRequest, dict]

The request object.

name str

Required. Name of the KmsConfig. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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_replication

delete_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.DeleteReplicationRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Deletes a replication.

# 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 netapp_v1

def sample_delete_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteReplicationRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_replication(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteReplicationRequest, dict]

The request object. DeleteReplicationRequest deletes a replication.

name str

Required. The replication resource name, in the format projects//locations//volumes/*/replications/{replication_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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_snapshot

delete_snapshot(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.snapshot.DeleteSnapshotRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Deletes a snapshot.

# 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 netapp_v1

def sample_delete_snapshot():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteSnapshotRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_snapshot(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteSnapshotRequest, dict]

The request object. DeleteSnapshotRequest deletes a snapshot.

name str

Required. The snapshot resource name, in the format projects//locations//volumes/*/snapshots/{snapshot_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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_storage_pool

delete_storage_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.storage_pool.DeleteStoragePoolRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Warning! This operation will permanently delete the storage pool.

# 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 netapp_v1

def sample_delete_storage_pool():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteStoragePoolRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_storage_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteStoragePoolRequest, dict]

The request object.

name str

Required. Name of the storage pool This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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_volume

delete_volume(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.DeleteVolumeRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Deletes a single 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 netapp_v1

def sample_delete_volume():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.DeleteVolumeRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_volume(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.DeleteVolumeRequest, dict]

The request object. Message for deleting a Volume

name str

Required. Name of the volume This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn 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); }

encrypt_volumes

encrypt_volumes(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.EncryptVolumesRequest, dict]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.

# 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 netapp_v1

def sample_encrypt_volumes():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.EncryptVolumesRequest(
        name="name_value",
    )

    # Make the request
    operation = client.encrypt_volumes(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.EncryptVolumesRequest, dict]

The request object. EncryptVolumesRequest specifies the KMS config to encrypt existing volumes.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be KmsConfig KmsConfig is the customer managed encryption key(CMEK) configuration.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
NetAppClientThe 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
NameDescription
info dict

The service account private key info.

Returns
TypeDescription
NetAppClientThe 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
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
NetAppClientThe constructed client.

get_active_directory

get_active_directory(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.active_directory.GetActiveDirectoryRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.active_directory.ActiveDirectory

Describes a specified active directory.

# 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 netapp_v1

def sample_get_active_directory():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetActiveDirectoryRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_active_directory(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetActiveDirectoryRequest, dict]

The request object. GetActiveDirectory for getting a single active directory.

name str

Required. Name of the active directory. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.ActiveDirectoryActiveDirectory is the public representation of the active directory config.

get_kms_config

get_kms_config(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.GetKmsConfigRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.kms.KmsConfig

Returns the description of the specified KMS config by kms_config_id.

# 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 netapp_v1

def sample_get_kms_config():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetKmsConfigRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_kms_config(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetKmsConfigRequest, dict]

The request object.

name str

Required. Name of the KmsConfig This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.KmsConfigKmsConfig is the customer managed encryption key(CMEK) configuration.

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
NameDescription
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf any errors happen.
Returns
TypeDescription
Tuple[str, Callable[[], Tuple[bytes, bytes]]]returns the API endpoint and the client cert source to use.

get_replication

get_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.GetReplicationRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.replication.Replication

Describe a replication for a 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 netapp_v1

def sample_get_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetReplicationRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_replication(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetReplicationRequest, dict]

The request object. GetReplicationRequest gets the state of a replication.

name str

Required. The replication resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.ReplicationReplication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

get_snapshot

get_snapshot(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.snapshot.GetSnapshotRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.snapshot.Snapshot

Describe a snapshot for a 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 netapp_v1

def sample_get_snapshot():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetSnapshotRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_snapshot(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetSnapshotRequest, dict]

The request object. GetSnapshotRequest gets the state of a snapshot.

name str

Required. The snapshot resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

get_storage_pool

get_storage_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.storage_pool.GetStoragePoolRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.storage_pool.StoragePool

Returns the description of the specified storage pool by poolId.

# 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 netapp_v1

def sample_get_storage_pool():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetStoragePoolRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_storage_pool(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetStoragePoolRequest, dict]

The request object.

name str

Required. Name of the storage pool This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.StoragePoolStoragePool is a container for volumes with a service level and capacity. Volumes can be created in a pool of sufficient available capacity. StoragePool capacity is what you are billed for.

get_volume

get_volume(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.GetVolumeRequest, dict]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.volume.Volume

Gets details of a single 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 netapp_v1

def sample_get_volume():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.GetVolumeRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_volume(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.GetVolumeRequest, dict]

The request object. Message for getting a Volume

name str

Required. Name of the volume This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.VolumeVolume provides a filesystem that you can mount.

kms_config_path

kms_config_path(project: str, location: str, kms_config: str) -> str

Returns a fully-qualified kms_config string.

list_active_directories

list_active_directories(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.active_directory.ListActiveDirectoriesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListActiveDirectoriesPager

Lists active directories.

# 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 netapp_v1

def sample_list_active_directories():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListActiveDirectoriesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_active_directories(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListActiveDirectoriesRequest, dict]

The request object. ListActiveDirectoriesRequest for requesting multiple active directories.

parent str

Required. Parent value for ListActiveDirectoriesRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListActiveDirectoriesPagerListActiveDirectoriesResponse contains all the active directories requested. Iterating over this object will yield results and resolve additional pages automatically.

list_kms_configs

list_kms_configs(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.ListKmsConfigsRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListKmsConfigsPager

Returns descriptions of all KMS configs owned by the caller.

# 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 netapp_v1

def sample_list_kms_configs():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListKmsConfigsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_kms_configs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListKmsConfigsRequest, dict]

The request object.

parent str

Required. Parent value This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListKmsConfigsPagerIterating over this object will yield results and resolve additional pages automatically.

list_replications

list_replications(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.ListReplicationsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListReplicationsPager

Returns descriptions of all replications for a 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 netapp_v1

def sample_list_replications():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListReplicationsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_replications(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListReplicationsRequest, dict]

The request object. ListReplications lists replications.

parent str

Required. The volume for which to retrieve replication information, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListReplicationsPagerListReplicationsResponse is the result of ListReplicationsRequest. Iterating over this object will yield results and resolve additional pages automatically.

list_snapshots

list_snapshots(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.snapshot.ListSnapshotsRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListSnapshotsPager

Returns descriptions of all snapshots for a 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 netapp_v1

def sample_list_snapshots():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListSnapshotsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_snapshots(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListSnapshotsRequest, dict]

The request object. ListSnapshotsRequest lists snapshots.

parent str

Required. The volume for which to retrieve snapshot information, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListSnapshotsPagerListSnapshotsResponse is the result of ListSnapshotsRequest. Iterating over this object will yield results and resolve additional pages automatically.

list_storage_pools

list_storage_pools(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.storage_pool.ListStoragePoolsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListStoragePoolsPager

Returns descriptions of all storage pools owned by the caller.

# 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 netapp_v1

def sample_list_storage_pools():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListStoragePoolsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_storage_pools(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListStoragePoolsRequest, dict]

The request object.

parent str

Required. Parent value This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListStoragePoolsPagerIterating over this object will yield results and resolve additional pages automatically.

list_volumes

list_volumes(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.ListVolumesRequest, dict]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.services.net_app.pagers.ListVolumesPager

Lists Volumes in 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 netapp_v1

def sample_list_volumes():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ListVolumesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_volumes(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ListVolumesRequest, dict]

The request object. Message for requesting list of Volumes

parent str

Required. Parent value for ListVolumesRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.services.net_app.pagers.ListVolumesPagerMessage for response to listing Volumes Iterating over this object will yield results and resolve additional pages automatically.

network_path

network_path(project: str, network: str) -> str

Returns a fully-qualified network string.

parse_active_directory_path

parse_active_directory_path(path: str) -> typing.Dict[str, str]

Parses a active_directory path into its component segments.

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_kms_config_path

parse_kms_config_path(path: str) -> typing.Dict[str, str]

Parses a kms_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_replication_path

parse_replication_path(path: str) -> typing.Dict[str, str]

Parses a replication path into its component segments.

parse_snapshot_path

parse_snapshot_path(path: str) -> typing.Dict[str, str]

Parses a snapshot path into its component segments.

parse_storage_pool_path

parse_storage_pool_path(path: str) -> typing.Dict[str, str]

Parses a storage_pool 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.

replication_path

replication_path(project: str, location: str, volume: str, replication: str) -> str

Returns a fully-qualified replication string.

resume_replication

resume_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.ResumeReplicationRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Resume Cross Region Replication.

# 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 netapp_v1

def sample_resume_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ResumeReplicationRequest(
        name="name_value",
    )

    # Make the request
    operation = client.resume_replication(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ResumeReplicationRequest, dict]

The request object. ResumeReplicationRequest resumes a stopped replication.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Replication Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

reverse_replication_direction

reverse_replication_direction(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.ReverseReplicationDirectionRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Reverses direction of replication. Source becomes destination and destination becomes source.

# 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 netapp_v1

def sample_reverse_replication_direction():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.ReverseReplicationDirectionRequest(
        name="name_value",
    )

    # Make the request
    operation = client.reverse_replication_direction(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.ReverseReplicationDirectionRequest, dict]

The request object. ReverseReplicationDirectionRequest reverses direction of replication. Source becomes destination and destination becomes source.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Replication Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

revert_volume

revert_volume(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.RevertVolumeRequest, dict]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.

# 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 netapp_v1

def sample_revert_volume():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.RevertVolumeRequest(
        name="name_value",
        snapshot_id="snapshot_id_value",
    )

    # Make the request
    operation = client.revert_volume(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.RevertVolumeRequest, dict]

The request object. RevertVolumeRequest reverts the given volume to the specified snapshot.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Volume Volume provides a filesystem that you can mount.

snapshot_path

snapshot_path(project: str, location: str, volume: str, snapshot: str) -> str

Returns a fully-qualified snapshot string.

stop_replication

stop_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.StopReplicationRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Stop Cross Region Replication.

# 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 netapp_v1

def sample_stop_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.StopReplicationRequest(
        name="name_value",
    )

    # Make the request
    operation = client.stop_replication(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.StopReplicationRequest, dict]

The request object. StopReplicationRequest stops a replication until resumed.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Replication Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

storage_pool_path

storage_pool_path(project: str, location: str, storage_pool: str) -> str

Returns a fully-qualified storage_pool string.

update_active_directory

update_active_directory(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.active_directory.UpdateActiveDirectoryRequest,
            dict,
        ]
    ] = None,
    *,
    active_directory: typing.Optional[
        google.cloud.netapp_v1.types.active_directory.ActiveDirectory
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Update the parameters of an active directories.

# 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 netapp_v1

def sample_update_active_directory():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    active_directory = netapp_v1.ActiveDirectory()
    active_directory.domain = "domain_value"
    active_directory.dns = "dns_value"
    active_directory.net_bios_prefix = "net_bios_prefix_value"
    active_directory.username = "username_value"
    active_directory.password = "password_value"

    request = netapp_v1.UpdateActiveDirectoryRequest(
        active_directory=active_directory,
    )

    # Make the request
    operation = client.update_active_directory(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateActiveDirectoryRequest, dict]

The request object. UpdateActiveDirectoryRequest for updating an active directory.

active_directory google.cloud.netapp_v1.types.ActiveDirectory

Required. The volume being updated This corresponds to the active_directory field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Active Directory resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ActiveDirectory ActiveDirectory is the public representation of the active directory config.

update_kms_config

update_kms_config(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.UpdateKmsConfigRequest, dict]
    ] = None,
    *,
    kms_config: typing.Optional[google.cloud.netapp_v1.types.kms.KmsConfig] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Updates the Kms config properties with the full spec

# 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 netapp_v1

def sample_update_kms_config():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    kms_config = netapp_v1.KmsConfig()
    kms_config.crypto_key_name = "crypto_key_name_value"

    request = netapp_v1.UpdateKmsConfigRequest(
        kms_config=kms_config,
    )

    # Make the request
    operation = client.update_kms_config(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateKmsConfigRequest, dict]

The request object.

kms_config google.cloud.netapp_v1.types.KmsConfig

Required. The KmsConfig being updated This corresponds to the kms_config field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the KmsConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be KmsConfig KmsConfig is the customer managed encryption key(CMEK) configuration.

update_replication

update_replication(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.replication.UpdateReplicationRequest, dict
        ]
    ] = None,
    *,
    replication: typing.Optional[
        google.cloud.netapp_v1.types.replication.Replication
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Updates the settings of a specific replication.

# 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 netapp_v1

def sample_update_replication():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    replication = netapp_v1.Replication()
    replication.replication_schedule = "DAILY"
    replication.destination_volume_parameters.storage_pool = "storage_pool_value"

    request = netapp_v1.UpdateReplicationRequest(
        replication=replication,
    )

    # Make the request
    operation = client.update_replication(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateReplicationRequest, dict]

The request object. UpdateReplicationRequest updates description and/or labels for a replication.

replication google.cloud.netapp_v1.types.Replication

Required. A replication resource This corresponds to the replication field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Mask of fields to update. At least one path must be supplied in this field. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Replication Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.

update_snapshot

update_snapshot(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.snapshot.UpdateSnapshotRequest, dict]
    ] = None,
    *,
    snapshot: typing.Optional[google.cloud.netapp_v1.types.snapshot.Snapshot] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Updates the settings of a specific snapshot.

# 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 netapp_v1

def sample_update_snapshot():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.UpdateSnapshotRequest(
    )

    # Make the request
    operation = client.update_snapshot(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateSnapshotRequest, dict]

The request object. UpdateSnapshotRequest updates description and/or labels for a snapshot.

snapshot google.cloud.netapp_v1.types.Snapshot

Required. A snapshot resource This corresponds to the snapshot field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Mask of fields to update. At least one path must be supplied in this field. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Snapshot

update_storage_pool

update_storage_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.netapp_v1.types.storage_pool.UpdateStoragePoolRequest, dict
        ]
    ] = None,
    *,
    storage_pool: typing.Optional[
        google.cloud.netapp_v1.types.storage_pool.StoragePool
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Updates the storage pool properties with the full spec

# 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 netapp_v1

def sample_update_storage_pool():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    storage_pool = netapp_v1.StoragePool()
    storage_pool.service_level = "STANDARD"
    storage_pool.capacity_gib = 1247
    storage_pool.network = "network_value"

    request = netapp_v1.UpdateStoragePoolRequest(
        storage_pool=storage_pool,
    )

    # Make the request
    operation = client.update_storage_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateStoragePoolRequest, dict]

The request object.

storage_pool google.cloud.netapp_v1.types.StoragePool

Required. The pool being updated This corresponds to the storage_pool field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the StoragePool resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be StoragePool StoragePool is a container for volumes with a service level and capacity. Volumes can be created in a pool of sufficient available capacity. StoragePool capacity is what you are billed for.

update_volume

update_volume(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.volume.UpdateVolumeRequest, dict]
    ] = None,
    *,
    volume: typing.Optional[google.cloud.netapp_v1.types.volume.Volume] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.Operation

Updates the parameters of a single 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 netapp_v1

def sample_update_volume():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    volume = netapp_v1.Volume()
    volume.share_name = "share_name_value"
    volume.storage_pool = "storage_pool_value"
    volume.capacity_gib = 1247
    volume.protocols = ['SMB']

    request = netapp_v1.UpdateVolumeRequest(
        volume=volume,
    )

    # Make the request
    operation = client.update_volume(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.UpdateVolumeRequest, dict]

The request object. Message for updating a Volume

volume google.cloud.netapp_v1.types.Volume

Required. The volume being updated This corresponds to the volume field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Volume resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be Volume Volume provides a filesystem that you can mount.

verify_kms_config

verify_kms_config(
    request: typing.Optional[
        typing.Union[google.cloud.netapp_v1.types.kms.VerifyKmsConfigRequest, dict]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, 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.netapp_v1.types.kms.VerifyKmsConfigResponse

Verifies KMS config reachability.

# 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 netapp_v1

def sample_verify_kms_config():
    # Create a client
    client = netapp_v1.NetAppClient()

    # Initialize request argument(s)
    request = netapp_v1.VerifyKmsConfigRequest(
        name="name_value",
    )

    # Make the request
    response = client.verify_kms_config(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.netapp_v1.types.VerifyKmsConfigRequest, dict]

The request object. VerifyKmsConfigRequest specifies the KMS config to be validated.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.netapp_v1.types.VerifyKmsConfigResponseVerifyKmsConfigResponse contains the information if the config is correctly and error message.

volume_path

volume_path(project: str, location: str, volume: str) -> str

Returns a fully-qualified volume string.