NotebookService¶
- class google.cloud.notebooks_v1.services.notebook_service.NotebookServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport, typing.Callable[[...], google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶
API v1 service for Cloud AI Platform Notebooks.
Instantiates the notebook service async client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Optional[Union[str,NotebookServiceTransport,Callable[..., NotebookServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the NotebookServiceTransport constructor. If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –
Custom options for the client.
1. The
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “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).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS 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.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note thatapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.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.
- Raises
google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- async cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
CancelOperationRequest
) – The request object. Request message for CancelOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- static common_billing_account_path(billing_account: str) str ¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) str ¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) str ¶
Returns a fully-qualified organization string.
- async create_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateEnvironmentRequest, dict]] = None, *, parent: Optional[str] = None, environment: Optional[google.cloud.notebooks_v1.types.environment.Environment] = None, environment_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates a new Environment.
# 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 notebooks_v1 async def sample_create_environment(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) environment = notebooks_v1.Environment() environment.vm_image.image_name = "image_name_value" environment.vm_image.project = "project_value" request = notebooks_v1.CreateEnvironmentRequest( parent="parent_value", environment_id="environment_id_value", environment=environment, ) # Make the request operation = client.create_environment(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.CreateEnvironmentRequest, dict]]) – The request object. Request for creating a notebook environment.
parent (
str
) –Required. Format:
projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.environment (
google.cloud.notebooks_v1.types.Environment
) –Required. The environment to be created.
This corresponds to the
environment
field on therequest
instance; ifrequest
is provided, this should not be set.environment_id (
str
) –Required. User-defined unique ID of this environment. The
environment_id
must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.This corresponds to the
environment_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.notebooks_v1.types.Environment
Definition of a software environment that is used to start a notebook instance.
- The result type for the operation will be
- Return type
- async create_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateExecutionRequest, dict]] = None, *, parent: Optional[str] = None, execution: Optional[google.cloud.notebooks_v1.types.execution.Execution] = None, execution_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates a new Execution 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 notebooks_v1 async def sample_create_execution(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.CreateExecutionRequest( parent="parent_value", execution_id="execution_id_value", ) # Make the request operation = client.create_execution(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.CreateExecutionRequest, dict]]) – The request object. Request to create notebook execution
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.execution (
google.cloud.notebooks_v1.types.Execution
) –Required. The execution to be created.
This corresponds to the
execution
field on therequest
instance; ifrequest
is provided, this should not be set.execution_id (
str
) –Required. User-defined unique ID of this execution.
This corresponds to the
execution_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Execution
The definition of a single executed notebook.- Return type
- async create_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateInstanceRequest, dict]] = None, *, parent: Optional[str] = None, instance: Optional[google.cloud.notebooks_v1.types.instance.Instance] = None, instance_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates a new Instance 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 notebooks_v1 async def sample_create_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) instance = notebooks_v1.Instance() instance.vm_image.image_name = "image_name_value" instance.vm_image.project = "project_value" instance.machine_type = "machine_type_value" request = notebooks_v1.CreateInstanceRequest( parent="parent_value", instance_id="instance_id_value", instance=instance, ) # Make the request operation = client.create_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.CreateInstanceRequest, dict]]) – The request object. Request for creating a notebook instance.
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.instance (
google.cloud.notebooks_v1.types.Instance
) – Required. The instance to be created. This corresponds to theinstance
field on therequest
instance; ifrequest
is provided, this should not be set.instance_id (
str
) –Required. User-defined unique ID of this instance.
This corresponds to the
instance_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async create_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateScheduleRequest, dict]] = None, *, parent: Optional[str] = None, schedule: Optional[google.cloud.notebooks_v1.types.schedule.Schedule] = None, schedule_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates a new Scheduled Notebook 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 notebooks_v1 async def sample_create_schedule(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.CreateScheduleRequest( parent="parent_value", schedule_id="schedule_id_value", ) # Make the request operation = client.create_schedule(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.CreateScheduleRequest, dict]]) – The request object. Request for created scheduled notebooks
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.schedule (
google.cloud.notebooks_v1.types.Schedule
) – Required. The schedule to be created. This corresponds to theschedule
field on therequest
instance; ifrequest
is provided, this should not be set.schedule_id (
str
) –Required. User-defined unique ID of this schedule.
This corresponds to the
schedule_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Schedule
The definition of a schedule.- Return type
- async delete_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Deletes a single Environment.
# 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 notebooks_v1 async def sample_delete_environment(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.DeleteEnvironmentRequest( name="name_value", ) # Make the request operation = client.delete_environment(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.DeleteEnvironmentRequest, dict]]) – The request object. Request for deleting a notebook environment.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- async delete_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Deletes execution
# 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 notebooks_v1 async def sample_delete_execution(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.DeleteExecutionRequest( name="name_value", ) # Make the request operation = client.delete_execution(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.DeleteExecutionRequest, dict]]) – The request object. Request for deleting a scheduled notebook execution
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/executions/{execution_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- async delete_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Deletes a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_delete_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.DeleteInstanceRequest( name="name_value", ) # Make the request operation = client.delete_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.DeleteInstanceRequest, dict]]) – The request object. Request for deleting a notebook instance.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- async delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes a long-running operation.
This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
DeleteOperationRequest
) – The request object. Request message for DeleteOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- async delete_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteScheduleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Deletes schedule and all underlying jobs
# 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 notebooks_v1 async def sample_delete_schedule(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.DeleteScheduleRequest( name="name_value", ) # Make the request operation = client.delete_schedule(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.DeleteScheduleRequest, dict]]) – The request object. Request for deleting an Schedule
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/schedules/{schedule_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- async diagnose_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.DiagnoseInstanceRequest, dict]] = None, *, name: Optional[str] = None, diagnostic_config: Optional[google.cloud.notebooks_v1.types.diagnostic_config.DiagnosticConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_diagnose_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) diagnostic_config = notebooks_v1.DiagnosticConfig() diagnostic_config.gcs_bucket = "gcs_bucket_value" request = notebooks_v1.DiagnoseInstanceRequest( name="name_value", diagnostic_config=diagnostic_config, ) # Make the request operation = client.diagnose_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.DiagnoseInstanceRequest, dict]]) – The request object. Request for creating a notebook instance diagnostic file.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.diagnostic_config (
google.cloud.notebooks_v1.types.DiagnosticConfig
) –Required. Defines flags that are used to run the diagnostic tool
This corresponds to the
diagnostic_config
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static environment_path(project: str, environment: str) str ¶
Returns a fully-qualified environment string.
- static execution_path(project: str, location: str, execution: str) str ¶
Returns a fully-qualified execution string.
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- async get_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.environment.Environment [source]¶
Gets details of a single Environment.
# 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 notebooks_v1 async def sample_get_environment(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.GetEnvironmentRequest( name="name_value", ) # Make the request response = await client.get_environment(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.GetEnvironmentRequest, dict]]) – The request object. Request for getting a notebook environment.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Definition of a software environment that is used to start a notebook instance.
- Return type
- async get_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.execution.Execution [source]¶
Gets details of executions
# 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 notebooks_v1 async def sample_get_execution(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.GetExecutionRequest( name="name_value", ) # Make the request response = await client.get_execution(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.GetExecutionRequest, dict]]) – The request object. Request for getting scheduled notebook execution
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/executions/{execution_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The definition of a single executed notebook.
- Return type
- async get_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy [source]¶
Gets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
- Parameters
request (
GetIamPolicyRequest
) – The request object. Request message for GetIamPolicy method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] }
YAML Example
bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- async get_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.instance.Instance [source]¶
Gets details of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_get_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.GetInstanceRequest( name="name_value", ) # Make the request response = await client.get_instance(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.GetInstanceRequest, dict]]) – The request object. Request for getting a notebook instance.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The definition of a notebook instance.
- Return type
- async get_instance_health(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetInstanceHealthRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.GetInstanceHealthResponse [source]¶
Check if a notebook instance is healthy.
# 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 notebooks_v1 async def sample_get_instance_health(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.GetInstanceHealthRequest( name="name_value", ) # Make the request response = await client.get_instance_health(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.GetInstanceHealthRequest, dict]]) – The request object. Request for checking if a notebook instance is healthy.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for checking if a notebook instance is healthy.
- Return type
- async get_location(request: Optional[google.cloud.location.locations_pb2.GetLocationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.location.locations_pb2.Location [source]¶
Gets information about a location.
- Parameters
request (
GetLocationRequest
) – The request object. Request message for GetLocation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Location object.
- Return type
Location
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
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.
- Parameters
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.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- async get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.Operation [source]¶
Gets the latest state of a long-running operation.
- Parameters
request (
GetOperationRequest
) – The request object. Request message for GetOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An
Operation
object.- Return type
Operation
- async get_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetScheduleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.schedule.Schedule [source]¶
Gets details of schedule
# 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 notebooks_v1 async def sample_get_schedule(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.GetScheduleRequest( name="name_value", ) # Make the request response = await client.get_schedule(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.GetScheduleRequest, dict]]) – The request object. Request for getting scheduled notebook.
name (
str
) –Required. Format:
projects/{project_id}/locations/{location}/schedules/{schedule_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The definition of a schedule.
- Return type
- classmethod get_transport_class(label: Optional[str] = None) Type[google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport] ¶
Returns an appropriate transport class.
- Parameters
label – The name of the desired transport. If none is provided, then the first transport in the registry is used.
- Returns
The transport class to use.
- async is_instance_upgradeable(request: Optional[Union[google.cloud.notebooks_v1.types.service.IsInstanceUpgradeableRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.IsInstanceUpgradeableResponse [source]¶
Check if a notebook instance is upgradable.
# 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 notebooks_v1 async def sample_is_instance_upgradeable(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.IsInstanceUpgradeableRequest( notebook_instance="notebook_instance_value", ) # Make the request response = await client.is_instance_upgradeable(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest, dict]]) – The request object. Request for checking if a notebook instance is upgradeable.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for checking if a notebook instance is upgradeable.
- Return type
google.cloud.notebooks_v1.types.IsInstanceUpgradeableResponse
- async list_environments(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListEnvironmentsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsAsyncPager [source]¶
Lists environments in a 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 notebooks_v1 async def sample_list_environments(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ListEnvironmentsRequest( parent="parent_value", ) # Make the request page_result = client.list_environments(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ListEnvironmentsRequest, dict]]) – The request object. Request for listing environments.
parent (
str
) –Required. Format:
projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for listing environments.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsAsyncPager
- async list_executions(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsAsyncPager [source]¶
Lists executions 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 notebooks_v1 async def sample_list_executions(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ListExecutionsRequest( parent="parent_value", ) # Make the request page_result = client.list_executions(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ListExecutionsRequest, dict]]) – The request object. Request for listing scheduled notebook executions.
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for listing scheduled notebook executions Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsAsyncPager
- async list_instances(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListInstancesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesAsyncPager [source]¶
Lists instances 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 notebooks_v1 async def sample_list_instances(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ListInstancesRequest( parent="parent_value", ) # Make the request page_result = client.list_instances(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ListInstancesRequest, dict]]) – The request object. Request for listing notebook instances.
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for listing notebook instances. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesAsyncPager
- async list_locations(request: Optional[google.cloud.location.locations_pb2.ListLocationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.location.locations_pb2.ListLocationsResponse [source]¶
Lists information about the supported locations for this service.
- Parameters
request (
ListLocationsRequest
) – The request object. Request message for ListLocations method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListLocations
method.- Return type
ListLocationsResponse
- async list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.ListOperationsResponse [source]¶
Lists operations that match the specified filter in the request.
- Parameters
request (
ListOperationsRequest
) – The request object. Request message for ListOperations method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListOperations
method.- Return type
ListOperationsResponse
- async list_schedules(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListSchedulesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesAsyncPager [source]¶
Lists schedules 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 notebooks_v1 async def sample_list_schedules(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ListSchedulesRequest( parent="parent_value", ) # Make the request page_result = client.list_schedules(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ListSchedulesRequest, dict]]) – The request object. Request for listing scheduled notebook job.
parent (
str
) –Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for listing scheduled notebook job. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesAsyncPager
- static parse_common_billing_account_path(path: str) Dict[str, str] ¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) Dict[str, str] ¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) Dict[str, str] ¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) Dict[str, str] ¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) Dict[str, str] ¶
Parse a project path into its component segments.
- static parse_environment_path(path: str) Dict[str, str] ¶
Parses a environment path into its component segments.
- static parse_execution_path(path: str) Dict[str, str] ¶
Parses a execution path into its component segments.
- static parse_instance_path(path: str) Dict[str, str] ¶
Parses a instance path into its component segments.
- static parse_schedule_path(path: str) Dict[str, str] ¶
Parses a schedule path into its component segments.
- static parse_tensorboard_path(path: str) Dict[str, str] ¶
Parses a tensorboard path into its component segments.
- async register_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.RegisterInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
# 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 notebooks_v1 async def sample_register_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.RegisterInstanceRequest( parent="parent_value", instance_id="instance_id_value", ) # Make the request operation = client.register_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.RegisterInstanceRequest, dict]]) – The request object. Request for registering a notebook instance.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async report_instance_info(request: Optional[Union[google.cloud.notebooks_v1.types.service.ReportInstanceInfoRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
# 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 notebooks_v1 async def sample_report_instance_info(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ReportInstanceInfoRequest( name="name_value", vm_id="vm_id_value", ) # Make the request operation = client.report_instance_info(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ReportInstanceInfoRequest, dict]]) – The request object. Request for notebook instances to report information to Notebooks API.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async reset_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.ResetInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Resets a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_reset_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.ResetInstanceRequest( name="name_value", ) # Make the request operation = client.reset_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.ResetInstanceRequest, dict]]) – The request object. Request for resetting a notebook instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async rollback_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.RollbackInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Rollbacks a notebook instance to the previous version.
# 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 notebooks_v1 async def sample_rollback_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.RollbackInstanceRequest( name="name_value", target_snapshot="target_snapshot_value", ) # Make the request operation = client.rollback_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.RollbackInstanceRequest, dict]]) – The request object. Request for rollbacking a notebook instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static schedule_path(project: str, location: str, schedule: str) str ¶
Returns a fully-qualified schedule string.
- async set_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy [source]¶
Sets the IAM access control policy on the specified function.
Replaces any existing policy.
- Parameters
request (
SetIamPolicyRequest
) – The request object. Request message for SetIamPolicy method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] }
YAML Example
bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- async set_instance_accelerator(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceAcceleratorRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Updates the guest accelerators of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_set_instance_accelerator(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceAcceleratorRequest( name="name_value", type_="TPU_V3", core_count=1073, ) # Make the request operation = client.set_instance_accelerator(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest, dict]]) – The request object. Request for setting instance accelerator.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async set_instance_labels(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceLabelsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Replaces all the labels of an Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_set_instance_labels(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceLabelsRequest( name="name_value", ) # Make the request operation = client.set_instance_labels(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.SetInstanceLabelsRequest, dict]]) – The request object. Request for setting instance labels.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async set_instance_machine_type(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceMachineTypeRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Updates the machine type of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_set_instance_machine_type(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceMachineTypeRequest( name="name_value", machine_type="machine_type_value", ) # Make the request operation = client.set_instance_machine_type(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest, dict]]) – The request object. Request for setting instance machine type.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async start_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.StartInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Starts a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_start_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.StartInstanceRequest( name="name_value", ) # Make the request operation = client.start_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.StartInstanceRequest, dict]]) – The request object. Request for starting a notebook instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async stop_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.StopInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Stops a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_stop_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.StopInstanceRequest( name="name_value", ) # Make the request operation = client.stop_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.StopInstanceRequest, dict]]) – The request object. Request for stopping a notebook instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static tensorboard_path(project: str, location: str, tensorboard: str) str ¶
Returns a fully-qualified tensorboard string.
- async test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse [source]¶
- Tests the specified IAM permissions against the IAM access control
policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
- Parameters
request (
TestIamPermissionsRequest
) – The request object. Request message for TestIamPermissions method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
TestIamPermissions
method.- Return type
TestIamPermissionsResponse
- property transport: google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport¶
Returns the transport used by the client instance.
- Returns
The transport used by the client instance.
- Return type
NotebookServiceTransport
- async trigger_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.TriggerScheduleRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Triggers execution of an existing schedule.
# 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 notebooks_v1 async def sample_trigger_schedule(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.TriggerScheduleRequest( name="name_value", ) # Make the request operation = client.trigger_schedule(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.TriggerScheduleRequest, dict]]) – The request object. Request for created scheduled notebooks
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Schedule
The definition of a schedule.- Return type
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
- The universe domain used
by the client instance.
- Return type
- async update_instance_config(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateInstanceConfigRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Update Notebook Instance configurations.
# 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 notebooks_v1 async def sample_update_instance_config(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.UpdateInstanceConfigRequest( name="name_value", ) # Make the request operation = client.update_instance_config(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest, dict]]) – The request object. Request for updating instance configurations.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async update_instance_metadata_items(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateInstanceMetadataItemsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.UpdateInstanceMetadataItemsResponse [source]¶
Add/update metadata items for an instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_update_instance_metadata_items(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.UpdateInstanceMetadataItemsRequest( name="name_value", ) # Make the request response = await client.update_instance_metadata_items(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsRequest, dict]]) – The request object. Request for adding/changing metadata items for an instance.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response for adding/changing metadata items for an instance.
- Return type
google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsResponse
- async update_shielded_instance_config(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateShieldedInstanceConfigRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Updates the Shielded instance configuration of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 async def sample_update_shielded_instance_config(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.UpdateShieldedInstanceConfigRequest( name="name_value", ) # Make the request operation = client.update_shielded_instance_config(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest, dict]]) – The request object. Request for updating the Shielded Instance config for a notebook instance. You can only use this method on a stopped instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async upgrade_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpgradeInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Upgrades a notebook instance to the latest version.
# 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 notebooks_v1 async def sample_upgrade_instance(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.UpgradeInstanceRequest( name="name_value", ) # Make the request operation = client.upgrade_instance(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.UpgradeInstanceRequest, dict]]) – The request object. Request for upgrading a notebook instance
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- async upgrade_instance_internal(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpgradeInstanceInternalRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
# 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 notebooks_v1 async def sample_upgrade_instance_internal(): # Create a client client = notebooks_v1.NotebookServiceAsyncClient() # Initialize request argument(s) request = notebooks_v1.UpgradeInstanceInternalRequest( name="name_value", vm_id="vm_id_value", ) # Make the request operation = client.upgrade_instance_internal(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest, dict]]) – The request object. Request for upgrading a notebook instance from within the VM
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- class google.cloud.notebooks_v1.services.notebook_service.NotebookServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport, typing.Callable[[...], google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport]]] = 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>)[source]¶
API v1 service for Cloud AI Platform Notebooks.
Instantiates the notebook service client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Optional[Union[str,NotebookServiceTransport,Callable[..., NotebookServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the NotebookServiceTransport constructor. If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –
Custom options for the client.
1. The
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “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).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS 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.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note that theapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.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.
- Raises
google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.
- __exit__(type, value, traceback)[source]¶
Releases underlying transport’s resources.
Warning
ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
CancelOperationRequest
) – The request object. Request message for CancelOperation method.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
None
- static common_billing_account_path(billing_account: str) str [source]¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) str [source]¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) str [source]¶
Returns a fully-qualified organization string.
- create_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateEnvironmentRequest, dict]] = None, *, parent: Optional[str] = None, environment: Optional[google.cloud.notebooks_v1.types.environment.Environment] = None, environment_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates a new Environment.
# 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 notebooks_v1 def sample_create_environment(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) environment = notebooks_v1.Environment() environment.vm_image.image_name = "image_name_value" environment.vm_image.project = "project_value" request = notebooks_v1.CreateEnvironmentRequest( parent="parent_value", environment_id="environment_id_value", environment=environment, ) # Make the request operation = client.create_environment(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.CreateEnvironmentRequest, dict]) – The request object. Request for creating a notebook environment.
parent (str) –
Required. Format:
projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.environment (google.cloud.notebooks_v1.types.Environment) –
Required. The environment to be created.
This corresponds to the
environment
field on therequest
instance; ifrequest
is provided, this should not be set.environment_id (str) –
Required. User-defined unique ID of this environment. The
environment_id
must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.This corresponds to the
environment_id
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.notebooks_v1.types.Environment
Definition of a software environment that is used to start a notebook instance.
- The result type for the operation will be
- Return type
- create_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateExecutionRequest, dict]] = None, *, parent: Optional[str] = None, execution: Optional[google.cloud.notebooks_v1.types.execution.Execution] = None, execution_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates a new Execution 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 notebooks_v1 def sample_create_execution(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.CreateExecutionRequest( parent="parent_value", execution_id="execution_id_value", ) # Make the request operation = client.create_execution(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.CreateExecutionRequest, dict]) – The request object. Request to create notebook execution
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.execution (google.cloud.notebooks_v1.types.Execution) –
Required. The execution to be created.
This corresponds to the
execution
field on therequest
instance; ifrequest
is provided, this should not be set.execution_id (str) –
Required. User-defined unique ID of this execution.
This corresponds to the
execution_id
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Execution
The definition of a single executed notebook.- Return type
- create_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateInstanceRequest, dict]] = None, *, parent: Optional[str] = None, instance: Optional[google.cloud.notebooks_v1.types.instance.Instance] = None, instance_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates a new Instance 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 notebooks_v1 def sample_create_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) instance = notebooks_v1.Instance() instance.vm_image.image_name = "image_name_value" instance.vm_image.project = "project_value" instance.machine_type = "machine_type_value" request = notebooks_v1.CreateInstanceRequest( parent="parent_value", instance_id="instance_id_value", instance=instance, ) # Make the request operation = client.create_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.CreateInstanceRequest, dict]) – The request object. Request for creating a notebook instance.
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.instance (google.cloud.notebooks_v1.types.Instance) – Required. The instance to be created. This corresponds to the
instance
field on therequest
instance; ifrequest
is provided, this should not be set.instance_id (str) –
Required. User-defined unique ID of this instance.
This corresponds to the
instance_id
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- create_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.CreateScheduleRequest, dict]] = None, *, parent: Optional[str] = None, schedule: Optional[google.cloud.notebooks_v1.types.schedule.Schedule] = None, schedule_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates a new Scheduled Notebook 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 notebooks_v1 def sample_create_schedule(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.CreateScheduleRequest( parent="parent_value", schedule_id="schedule_id_value", ) # Make the request operation = client.create_schedule(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.CreateScheduleRequest, dict]) – The request object. Request for created scheduled notebooks
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.schedule (google.cloud.notebooks_v1.types.Schedule) – Required. The schedule to be created. This corresponds to the
schedule
field on therequest
instance; ifrequest
is provided, this should not be set.schedule_id (str) –
Required. User-defined unique ID of this schedule.
This corresponds to the
schedule_id
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Schedule
The definition of a schedule.- Return type
- delete_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Deletes a single Environment.
# 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 notebooks_v1 def sample_delete_environment(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.DeleteEnvironmentRequest( name="name_value", ) # Make the request operation = client.delete_environment(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.DeleteEnvironmentRequest, dict]) – The request object. Request for deleting a notebook environment.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- delete_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Deletes execution
# 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 notebooks_v1 def sample_delete_execution(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.DeleteExecutionRequest( name="name_value", ) # Make the request operation = client.delete_execution(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.DeleteExecutionRequest, dict]) – The request object. Request for deleting a scheduled notebook execution
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/executions/{execution_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- delete_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Deletes a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_delete_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.DeleteInstanceRequest( name="name_value", ) # Make the request operation = client.delete_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.DeleteInstanceRequest, dict]) – The request object. Request for deleting a notebook instance.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes a long-running operation.
This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
DeleteOperationRequest
) – The request object. Request message for DeleteOperation method.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
None
- delete_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.DeleteScheduleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Deletes schedule and all underlying jobs
# 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 notebooks_v1 def sample_delete_schedule(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.DeleteScheduleRequest( name="name_value", ) # Make the request operation = client.delete_schedule(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.DeleteScheduleRequest, dict]) – The request object. Request for deleting an Schedule
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/schedules/{schedule_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
- The result type for the operation will be
google.protobuf.empty_pb2.Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
- service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
- The result type for the operation will be
- Return type
- diagnose_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.DiagnoseInstanceRequest, dict]] = None, *, name: Optional[str] = None, diagnostic_config: Optional[google.cloud.notebooks_v1.types.diagnostic_config.DiagnosticConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_diagnose_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) diagnostic_config = notebooks_v1.DiagnosticConfig() diagnostic_config.gcs_bucket = "gcs_bucket_value" request = notebooks_v1.DiagnoseInstanceRequest( name="name_value", diagnostic_config=diagnostic_config, ) # Make the request operation = client.diagnose_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.DiagnoseInstanceRequest, dict]) – The request object. Request for creating a notebook instance diagnostic file.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.diagnostic_config (google.cloud.notebooks_v1.types.DiagnosticConfig) –
Required. Defines flags that are used to run the diagnostic tool
This corresponds to the
diagnostic_config
field on therequest
instance; ifrequest
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static environment_path(project: str, environment: str) str [source]¶
Returns a fully-qualified environment string.
- static execution_path(project: str, location: str, execution: str) str [source]¶
Returns a fully-qualified execution string.
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- get_environment(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.environment.Environment [source]¶
Gets details of a single Environment.
# 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 notebooks_v1 def sample_get_environment(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.GetEnvironmentRequest( name="name_value", ) # Make the request response = client.get_environment(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.GetEnvironmentRequest, dict]) – The request object. Request for getting a notebook environment.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
Definition of a software environment that is used to start a notebook instance.
- Return type
- get_execution(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.execution.Execution [source]¶
Gets details of executions
# 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 notebooks_v1 def sample_get_execution(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.GetExecutionRequest( name="name_value", ) # Make the request response = client.get_execution(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.GetExecutionRequest, dict]) – The request object. Request for getting scheduled notebook execution
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/executions/{execution_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
The definition of a single executed notebook.
- Return type
- get_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy [source]¶
Gets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
- Parameters
request (
GetIamPolicyRequest
) – The request object. Request message for GetIamPolicy method.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
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] }
YAML Example
bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- get_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetInstanceRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.instance.Instance [source]¶
Gets details of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_get_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.GetInstanceRequest( name="name_value", ) # Make the request response = client.get_instance(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.GetInstanceRequest, dict]) – The request object. Request for getting a notebook instance.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
The definition of a notebook instance.
- Return type
- get_instance_health(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetInstanceHealthRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.GetInstanceHealthResponse [source]¶
Check if a notebook instance is healthy.
# 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 notebooks_v1 def sample_get_instance_health(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.GetInstanceHealthRequest( name="name_value", ) # Make the request response = client.get_instance_health(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.GetInstanceHealthRequest, dict]) – The request object. Request for checking if a notebook instance is healthy.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
Response for checking if a notebook instance is healthy.
- Return type
- get_location(request: Optional[google.cloud.location.locations_pb2.GetLocationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.location.locations_pb2.Location [source]¶
Gets information about a location.
- Parameters
request (
GetLocationRequest
) – The request object. Request message for GetLocation method.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
Location object.
- Return type
Location
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
Deprecated. 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.
- Parameters
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.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.Operation [source]¶
Gets the latest state of a long-running operation.
- Parameters
request (
GetOperationRequest
) – The request object. Request message for GetOperation method.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
An
Operation
object.- Return type
Operation
- get_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.GetScheduleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.schedule.Schedule [source]¶
Gets details of schedule
# 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 notebooks_v1 def sample_get_schedule(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.GetScheduleRequest( name="name_value", ) # Make the request response = client.get_schedule(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.GetScheduleRequest, dict]) – The request object. Request for getting scheduled notebook.
name (str) –
Required. Format:
projects/{project_id}/locations/{location}/schedules/{schedule_id}
This corresponds to the
name
field on therequest
instance; ifrequest
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
The definition of a schedule.
- Return type
- static instance_path(project: str, instance: str) str [source]¶
Returns a fully-qualified instance string.
- is_instance_upgradeable(request: Optional[Union[google.cloud.notebooks_v1.types.service.IsInstanceUpgradeableRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.IsInstanceUpgradeableResponse [source]¶
Check if a notebook instance is upgradable.
# 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 notebooks_v1 def sample_is_instance_upgradeable(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.IsInstanceUpgradeableRequest( notebook_instance="notebook_instance_value", ) # Make the request response = client.is_instance_upgradeable(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest, dict]) – The request object. Request for checking if a notebook instance is upgradeable.
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
Response for checking if a notebook instance is upgradeable.
- Return type
google.cloud.notebooks_v1.types.IsInstanceUpgradeableResponse
- list_environments(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListEnvironmentsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsPager [source]¶
Lists environments in a 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 notebooks_v1 def sample_list_environments(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ListEnvironmentsRequest( parent="parent_value", ) # Make the request page_result = client.list_environments(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ListEnvironmentsRequest, dict]) – The request object. Request for listing environments.
parent (str) –
Required. Format:
projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
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
Response for listing environments.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsPager
- list_executions(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsPager [source]¶
Lists executions 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 notebooks_v1 def sample_list_executions(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ListExecutionsRequest( parent="parent_value", ) # Make the request page_result = client.list_executions(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ListExecutionsRequest, dict]) – The request object. Request for listing scheduled notebook executions.
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
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
Response for listing scheduled notebook executions Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsPager
- list_instances(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListInstancesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesPager [source]¶
Lists instances 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 notebooks_v1 def sample_list_instances(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ListInstancesRequest( parent="parent_value", ) # Make the request page_result = client.list_instances(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ListInstancesRequest, dict]) – The request object. Request for listing notebook instances.
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
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
Response for listing notebook instances. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesPager
- list_locations(request: Optional[google.cloud.location.locations_pb2.ListLocationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.location.locations_pb2.ListLocationsResponse [source]¶
Lists information about the supported locations for this service.
- Parameters
request (
ListLocationsRequest
) – The request object. Request message for ListLocations method.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
Response message for
ListLocations
method.- Return type
ListLocationsResponse
- list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.ListOperationsResponse [source]¶
Lists operations that match the specified filter in the request.
- Parameters
request (
ListOperationsRequest
) – The request object. Request message for ListOperations method.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
Response message for
ListOperations
method.- Return type
ListOperationsResponse
- list_schedules(request: Optional[Union[google.cloud.notebooks_v1.types.service.ListSchedulesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesPager [source]¶
Lists schedules 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 notebooks_v1 def sample_list_schedules(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ListSchedulesRequest( parent="parent_value", ) # Make the request page_result = client.list_schedules(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ListSchedulesRequest, dict]) – The request object. Request for listing scheduled notebook job.
parent (str) –
Required. Format:
parent=projects/{project_id}/locations/{location}
This corresponds to the
parent
field on therequest
instance; ifrequest
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
Response for listing scheduled notebook job. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesPager
- static parse_common_billing_account_path(path: str) Dict[str, str] [source]¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) Dict[str, str] [source]¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) Dict[str, str] [source]¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) Dict[str, str] [source]¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) Dict[str, str] [source]¶
Parse a project path into its component segments.
- static parse_environment_path(path: str) Dict[str, str] [source]¶
Parses a environment path into its component segments.
- static parse_execution_path(path: str) Dict[str, str] [source]¶
Parses a execution path into its component segments.
- static parse_instance_path(path: str) Dict[str, str] [source]¶
Parses a instance path into its component segments.
- static parse_schedule_path(path: str) Dict[str, str] [source]¶
Parses a schedule path into its component segments.
- static parse_tensorboard_path(path: str) Dict[str, str] [source]¶
Parses a tensorboard path into its component segments.
- register_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.RegisterInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
# 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 notebooks_v1 def sample_register_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.RegisterInstanceRequest( parent="parent_value", instance_id="instance_id_value", ) # Make the request operation = client.register_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.RegisterInstanceRequest, dict]) – The request object. Request for registering a notebook instance.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- report_instance_info(request: Optional[Union[google.cloud.notebooks_v1.types.service.ReportInstanceInfoRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
# 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 notebooks_v1 def sample_report_instance_info(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ReportInstanceInfoRequest( name="name_value", vm_id="vm_id_value", ) # Make the request operation = client.report_instance_info(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ReportInstanceInfoRequest, dict]) – The request object. Request for notebook instances to report information to Notebooks API.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- reset_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.ResetInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Resets a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_reset_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.ResetInstanceRequest( name="name_value", ) # Make the request operation = client.reset_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.ResetInstanceRequest, dict]) – The request object. Request for resetting a notebook instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- rollback_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.RollbackInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Rollbacks a notebook instance to the previous version.
# 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 notebooks_v1 def sample_rollback_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.RollbackInstanceRequest( name="name_value", target_snapshot="target_snapshot_value", ) # Make the request operation = client.rollback_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.RollbackInstanceRequest, dict]) – The request object. Request for rollbacking a notebook instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static schedule_path(project: str, location: str, schedule: str) str [source]¶
Returns a fully-qualified schedule string.
- set_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy [source]¶
Sets the IAM access control policy on the specified function.
Replaces any existing policy.
- Parameters
request (
SetIamPolicyRequest
) – The request object. Request message for SetIamPolicy method.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
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] }
YAML Example
bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- set_instance_accelerator(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceAcceleratorRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Updates the guest accelerators of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_set_instance_accelerator(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceAcceleratorRequest( name="name_value", type_="TPU_V3", core_count=1073, ) # Make the request operation = client.set_instance_accelerator(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest, dict]) – The request object. Request for setting instance accelerator.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- set_instance_labels(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceLabelsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Replaces all the labels of an Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_set_instance_labels(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceLabelsRequest( name="name_value", ) # Make the request operation = client.set_instance_labels(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.SetInstanceLabelsRequest, dict]) – The request object. Request for setting instance labels.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- set_instance_machine_type(request: Optional[Union[google.cloud.notebooks_v1.types.service.SetInstanceMachineTypeRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Updates the machine type of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_set_instance_machine_type(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.SetInstanceMachineTypeRequest( name="name_value", machine_type="machine_type_value", ) # Make the request operation = client.set_instance_machine_type(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest, dict]) – The request object. Request for setting instance machine type.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- start_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.StartInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Starts a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_start_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.StartInstanceRequest( name="name_value", ) # Make the request operation = client.start_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.StartInstanceRequest, dict]) – The request object. Request for starting a notebook instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- stop_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.StopInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Stops a notebook instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_stop_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.StopInstanceRequest( name="name_value", ) # Make the request operation = client.stop_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.StopInstanceRequest, dict]) – The request object. Request for stopping a notebook instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- static tensorboard_path(project: str, location: str, tensorboard: str) str [source]¶
Returns a fully-qualified tensorboard string.
- test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse [source]¶
- Tests the specified IAM permissions against the IAM access control
policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
- Parameters
request (
TestIamPermissionsRequest
) – The request object. Request message for TestIamPermissions method.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
Response message for
TestIamPermissions
method.- Return type
TestIamPermissionsResponse
- property transport: google.cloud.notebooks_v1.services.notebook_service.transports.base.NotebookServiceTransport¶
Returns the transport used by the client instance.
- Returns
- The transport used by the client
instance.
- Return type
NotebookServiceTransport
- trigger_schedule(request: Optional[Union[google.cloud.notebooks_v1.types.service.TriggerScheduleRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Triggers execution of an existing schedule.
# 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 notebooks_v1 def sample_trigger_schedule(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.TriggerScheduleRequest( name="name_value", ) # Make the request operation = client.trigger_schedule(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.TriggerScheduleRequest, dict]) – The request object. Request for created scheduled notebooks
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Schedule
The definition of a schedule.- Return type
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
The universe domain used by the client instance.
- Return type
- update_instance_config(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateInstanceConfigRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Update Notebook Instance configurations.
# 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 notebooks_v1 def sample_update_instance_config(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.UpdateInstanceConfigRequest( name="name_value", ) # Make the request operation = client.update_instance_config(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest, dict]) – The request object. Request for updating instance configurations.
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- update_instance_metadata_items(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateInstanceMetadataItemsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.notebooks_v1.types.service.UpdateInstanceMetadataItemsResponse [source]¶
Add/update metadata items for an instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_update_instance_metadata_items(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.UpdateInstanceMetadataItemsRequest( name="name_value", ) # Make the request response = client.update_instance_metadata_items(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsRequest, dict]) – The request object. Request for adding/changing metadata items for an instance.
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
Response for adding/changing metadata items for an instance.
- Return type
google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsResponse
- update_shielded_instance_config(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpdateShieldedInstanceConfigRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Updates the Shielded instance configuration of a single Instance.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import notebooks_v1 def sample_update_shielded_instance_config(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.UpdateShieldedInstanceConfigRequest( name="name_value", ) # Make the request operation = client.update_shielded_instance_config(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest, dict]) – The request object. Request for updating the Shielded Instance config for a notebook instance. You can only use this method on a stopped instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- upgrade_instance(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpgradeInstanceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Upgrades a notebook instance to the latest version.
# 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 notebooks_v1 def sample_upgrade_instance(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.UpgradeInstanceRequest( name="name_value", ) # Make the request operation = client.upgrade_instance(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceRequest, dict]) – The request object. Request for upgrading a notebook instance
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- upgrade_instance_internal(request: Optional[Union[google.cloud.notebooks_v1.types.service.UpgradeInstanceInternalRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
# 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 notebooks_v1 def sample_upgrade_instance_internal(): # Create a client client = notebooks_v1.NotebookServiceClient() # Initialize request argument(s) request = notebooks_v1.UpgradeInstanceInternalRequest( name="name_value", vm_id="vm_id_value", ) # Make the request operation = client.upgrade_instance_internal(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest, dict]) – The request object. Request for upgrading a notebook instance from within the VM
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
An object representing a long-running operation.
The result type for the operation will be
google.cloud.notebooks_v1.types.Instance
The definition of a notebook instance.- Return type
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsAsyncPager(method: Callable[[...], Awaitable[google.cloud.notebooks_v1.types.service.ListEnvironmentsResponse]], request: google.cloud.notebooks_v1.types.service.ListEnvironmentsRequest, response: google.cloud.notebooks_v1.types.service.ListEnvironmentsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_environments
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListEnvironmentsResponse
object, and provides an__aiter__
method to iterate through itsenvironments
field.If there are more pages, the
__aiter__
method will make additionalListEnvironments
requests and continue to iterate through theenvironments
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListEnvironmentsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListEnvironmentsRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListEnvironmentsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListEnvironmentsPager(method: Callable[[...], google.cloud.notebooks_v1.types.service.ListEnvironmentsResponse], request: google.cloud.notebooks_v1.types.service.ListEnvironmentsRequest, response: google.cloud.notebooks_v1.types.service.ListEnvironmentsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_environments
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListEnvironmentsResponse
object, and provides an__iter__
method to iterate through itsenvironments
field.If there are more pages, the
__iter__
method will make additionalListEnvironments
requests and continue to iterate through theenvironments
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListEnvironmentsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListEnvironmentsRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListEnvironmentsResponse) – The initial response object.
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.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsAsyncPager(method: Callable[[...], Awaitable[google.cloud.notebooks_v1.types.service.ListExecutionsResponse]], request: google.cloud.notebooks_v1.types.service.ListExecutionsRequest, response: google.cloud.notebooks_v1.types.service.ListExecutionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_executions
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListExecutionsResponse
object, and provides an__aiter__
method to iterate through itsexecutions
field.If there are more pages, the
__aiter__
method will make additionalListExecutions
requests and continue to iterate through theexecutions
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListExecutionsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListExecutionsRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListExecutionsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListExecutionsPager(method: Callable[[...], google.cloud.notebooks_v1.types.service.ListExecutionsResponse], request: google.cloud.notebooks_v1.types.service.ListExecutionsRequest, response: google.cloud.notebooks_v1.types.service.ListExecutionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_executions
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListExecutionsResponse
object, and provides an__iter__
method to iterate through itsexecutions
field.If there are more pages, the
__iter__
method will make additionalListExecutions
requests and continue to iterate through theexecutions
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListExecutionsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListExecutionsRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListExecutionsResponse) – The initial response object.
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.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesAsyncPager(method: Callable[[...], Awaitable[google.cloud.notebooks_v1.types.service.ListInstancesResponse]], request: google.cloud.notebooks_v1.types.service.ListInstancesRequest, response: google.cloud.notebooks_v1.types.service.ListInstancesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_instances
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListInstancesResponse
object, and provides an__aiter__
method to iterate through itsinstances
field.If there are more pages, the
__aiter__
method will make additionalListInstances
requests and continue to iterate through theinstances
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListInstancesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListInstancesRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListInstancesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListInstancesPager(method: Callable[[...], google.cloud.notebooks_v1.types.service.ListInstancesResponse], request: google.cloud.notebooks_v1.types.service.ListInstancesRequest, response: google.cloud.notebooks_v1.types.service.ListInstancesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_instances
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListInstancesResponse
object, and provides an__iter__
method to iterate through itsinstances
field.If there are more pages, the
__iter__
method will make additionalListInstances
requests and continue to iterate through theinstances
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListInstancesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListInstancesRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListInstancesResponse) – The initial response object.
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.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesAsyncPager(method: Callable[[...], Awaitable[google.cloud.notebooks_v1.types.service.ListSchedulesResponse]], request: google.cloud.notebooks_v1.types.service.ListSchedulesRequest, response: google.cloud.notebooks_v1.types.service.ListSchedulesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_schedules
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListSchedulesResponse
object, and provides an__aiter__
method to iterate through itsschedules
field.If there are more pages, the
__aiter__
method will make additionalListSchedules
requests and continue to iterate through theschedules
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListSchedulesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListSchedulesRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListSchedulesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.notebooks_v1.services.notebook_service.pagers.ListSchedulesPager(method: Callable[[...], google.cloud.notebooks_v1.types.service.ListSchedulesResponse], request: google.cloud.notebooks_v1.types.service.ListSchedulesRequest, response: google.cloud.notebooks_v1.types.service.ListSchedulesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_schedules
requests.This class thinly wraps an initial
google.cloud.notebooks_v1.types.ListSchedulesResponse
object, and provides an__iter__
method to iterate through itsschedules
field.If there are more pages, the
__iter__
method will make additionalListSchedules
requests and continue to iterate through theschedules
field on the corresponding responses.All the usual
google.cloud.notebooks_v1.types.ListSchedulesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.notebooks_v1.types.ListSchedulesRequest) – The initial request object.
response (google.cloud.notebooks_v1.types.ListSchedulesResponse) – The initial response object.
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.