As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

JobService

class google.cloud.aiplatform_v1.services.job_service.JobServiceAsyncClient(*, credentials: ~typing.Optional[~google.auth.credentials.Credentials] = None, transport: ~typing.Optional[~typing.Union[str, ~google.cloud.aiplatform_v1.services.job_service.transports.base.JobServiceTransport, ~typing.Callable[[...], ~google.cloud.aiplatform_v1.services.job_service.transports.base.JobServiceTransport]]] = '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]

A service for creating and managing Vertex AI’s jobs.

Instantiates the job 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,JobServiceTransport,Callable[..., JobServiceTransport]]]) – 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 JobServiceTransport 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 when transport is not explicitly provided. Only if this property is not set and transport 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 api_endpoint property still takes precedence; and universe_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:

str

static batch_prediction_job_path(project: str, location: str, batch_prediction_job: str) str

Returns a fully-qualified batch_prediction_job string.

async cancel_batch_prediction_job(request: Optional[Union[CancelBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_cancel_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelBatchPredictionJobRequest(
        name="name_value",
    )

    # Make the request
    await client.cancel_batch_prediction_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CancelBatchPredictionJobRequest, dict]]) – The request object. Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

    This corresponds to the name field on the request instance; if request 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.

async cancel_custom_job(request: Optional[Union[CancelCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

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

async def sample_cancel_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelCustomJobRequest(
        name="name_value",
    )

    # Make the request
    await client.cancel_custom_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CancelCustomJobRequest, dict]]) – The request object. Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].

  • name (str) –

    Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

    This corresponds to the name field on the request instance; if request 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.

async cancel_data_labeling_job(request: Optional[Union[CancelDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

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

async def sample_cancel_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelDataLabelingJobRequest(
        name="name_value",
    )

    # Make the request
    await client.cancel_data_labeling_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CancelDataLabelingJobRequest, dict]]) – The request object. Request message for [JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

    This corresponds to the name field on the request instance; if request 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.

async cancel_hyperparameter_tuning_job(request: Optional[Union[CancelHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

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

async def sample_cancel_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelHyperparameterTuningJobRequest(
        name="name_value",
    )

    # Make the request
    await client.cancel_hyperparameter_tuning_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CancelHyperparameterTuningJobRequest, dict]]) – The request object. Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

    This corresponds to the name field on the request instance; if request 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.

async cancel_nas_job(request: Optional[Union[CancelNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to CANCELLED.

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

async def sample_cancel_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelNasJobRequest(
        name="name_value",
    )

    # Make the request
    await client.cancel_nas_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CancelNasJobRequest, dict]]) – The request object. Request message for [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob].

  • name (str) –

    Required. The name of the NasJob to cancel. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    This corresponds to the name field on the request instance; if request 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.

async cancel_operation(request: Optional[CancelOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _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_folder_path(folder: str) str

Returns a fully-qualified folder 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.

static common_project_path(project: str) str

Returns a fully-qualified project string.

static context_path(project: str, location: str, metadata_store: str, context: str) str

Returns a fully-qualified context string.

async create_batch_prediction_job(request: Optional[Union[CreateBatchPredictionJobRequest, dict]] = None, *, parent: Optional[str] = None, batch_prediction_job: Optional[BatchPredictionJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) BatchPredictionJob[source]

Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

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

async def sample_create_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    batch_prediction_job = aiplatform_v1.BatchPredictionJob()
    batch_prediction_job.display_name = "display_name_value"
    batch_prediction_job.input_config.gcs_source.uris = ['uris_value1', 'uris_value2']
    batch_prediction_job.input_config.instances_format = "instances_format_value"
    batch_prediction_job.output_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"
    batch_prediction_job.output_config.predictions_format = "predictions_format_value"

    request = aiplatform_v1.CreateBatchPredictionJobRequest(
        parent="parent_value",
        batch_prediction_job=batch_prediction_job,
    )

    # Make the request
    response = await client.create_batch_prediction_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateBatchPredictionJobRequest, dict]]) – The request object. Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].

  • parent (str) –

    Required. The resource name of the Location to create the BatchPredictionJob in. Format: projects/{project}/locations/{location}

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

  • batch_prediction_job (google.cloud.aiplatform_v1.types.BatchPredictionJob) –

    Required. The BatchPredictionJob to create.

    This corresponds to the batch_prediction_job field on the request instance; if request 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:

A job that uses a

[Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances.

Return type:

google.cloud.aiplatform_v1.types.BatchPredictionJob

async create_custom_job(request: Optional[Union[CreateCustomJobRequest, dict]] = None, *, parent: Optional[str] = None, custom_job: Optional[CustomJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) CustomJob[source]

Creates a CustomJob. A created CustomJob right away will be attempted to be run.

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

async def sample_create_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    custom_job = aiplatform_v1.CustomJob()
    custom_job.display_name = "display_name_value"
    custom_job.job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"

    request = aiplatform_v1.CreateCustomJobRequest(
        parent="parent_value",
        custom_job=custom_job,
    )

    # Make the request
    response = await client.create_custom_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateCustomJobRequest, dict]]) – The request object. Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].

  • parent (str) –

    Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}

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

  • custom_job (google.cloud.aiplatform_v1.types.CustomJob) – Required. The CustomJob to create. This corresponds to the custom_job field on the request instance; if request 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:

Represents a job that runs custom workloads such as a Docker container or a Python package. A CustomJob can have multiple worker pools and each worker pool can have its own machine and input spec. A CustomJob will be cleaned up once the job enters terminal state (failed or succeeded).

Return type:

google.cloud.aiplatform_v1.types.CustomJob

async create_data_labeling_job(request: Optional[Union[CreateDataLabelingJobRequest, dict]] = None, *, parent: Optional[str] = None, data_labeling_job: Optional[DataLabelingJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) DataLabelingJob[source]

Creates a DataLabelingJob.

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

async def sample_create_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    data_labeling_job = aiplatform_v1.DataLabelingJob()
    data_labeling_job.display_name = "display_name_value"
    data_labeling_job.datasets = ['datasets_value1', 'datasets_value2']
    data_labeling_job.labeler_count = 1375
    data_labeling_job.instruction_uri = "instruction_uri_value"
    data_labeling_job.inputs_schema_uri = "inputs_schema_uri_value"
    data_labeling_job.inputs.null_value = "NULL_VALUE"

    request = aiplatform_v1.CreateDataLabelingJobRequest(
        parent="parent_value",
        data_labeling_job=data_labeling_job,
    )

    # Make the request
    response = await client.create_data_labeling_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateDataLabelingJobRequest, dict]]) – The request object. Request message for [JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob].

  • parent (str) –

    Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

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

  • data_labeling_job (google.cloud.aiplatform_v1.types.DataLabelingJob) –

    Required. The DataLabelingJob to create.

    This corresponds to the data_labeling_job field on the request instance; if request 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:

DataLabelingJob is used to trigger a human labeling job on unlabeled data from the following Dataset:

Return type:

google.cloud.aiplatform_v1.types.DataLabelingJob

async create_hyperparameter_tuning_job(request: Optional[Union[CreateHyperparameterTuningJobRequest, dict]] = None, *, parent: Optional[str] = None, hyperparameter_tuning_job: Optional[HyperparameterTuningJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) HyperparameterTuningJob[source]

Creates a HyperparameterTuningJob

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

async def sample_create_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    hyperparameter_tuning_job = aiplatform_v1.HyperparameterTuningJob()
    hyperparameter_tuning_job.display_name = "display_name_value"
    hyperparameter_tuning_job.study_spec.metrics.metric_id = "metric_id_value"
    hyperparameter_tuning_job.study_spec.metrics.goal = "MINIMIZE"
    hyperparameter_tuning_job.study_spec.parameters.double_value_spec.min_value = 0.96
    hyperparameter_tuning_job.study_spec.parameters.double_value_spec.max_value = 0.962
    hyperparameter_tuning_job.study_spec.parameters.parameter_id = "parameter_id_value"
    hyperparameter_tuning_job.max_trial_count = 1609
    hyperparameter_tuning_job.parallel_trial_count = 2128
    hyperparameter_tuning_job.trial_job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"

    request = aiplatform_v1.CreateHyperparameterTuningJobRequest(
        parent="parent_value",
        hyperparameter_tuning_job=hyperparameter_tuning_job,
    )

    # Make the request
    response = await client.create_hyperparameter_tuning_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateHyperparameterTuningJobRequest, dict]]) – The request object. Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].

  • parent (str) –

    Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: projects/{project}/locations/{location}

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

  • hyperparameter_tuning_job (google.cloud.aiplatform_v1.types.HyperparameterTuningJob) –

    Required. The HyperparameterTuningJob to create.

    This corresponds to the hyperparameter_tuning_job field on the request instance; if request 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:

Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.

Return type:

google.cloud.aiplatform_v1.types.HyperparameterTuningJob

async create_model_deployment_monitoring_job(request: Optional[Union[CreateModelDeploymentMonitoringJobRequest, dict]] = None, *, parent: Optional[str] = None, model_deployment_monitoring_job: Optional[ModelDeploymentMonitoringJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ModelDeploymentMonitoringJob[source]

Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

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

async def sample_create_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    model_deployment_monitoring_job = aiplatform_v1.ModelDeploymentMonitoringJob()
    model_deployment_monitoring_job.display_name = "display_name_value"
    model_deployment_monitoring_job.endpoint = "endpoint_value"

    request = aiplatform_v1.CreateModelDeploymentMonitoringJobRequest(
        parent="parent_value",
        model_deployment_monitoring_job=model_deployment_monitoring_job,
    )

    # Make the request
    response = await client.create_model_deployment_monitoring_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].

  • parent (str) –

    Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

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

  • model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob) –

    Required. The ModelDeploymentMonitoringJob to create

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request 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:

Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob

async create_nas_job(request: Optional[Union[CreateNasJobRequest, dict]] = None, *, parent: Optional[str] = None, nas_job: Optional[NasJob] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasJob[source]

Creates a NasJob

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

async def sample_create_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    nas_job = aiplatform_v1.NasJob()
    nas_job.display_name = "display_name_value"
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.search_trial_job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.max_trial_count = 1609
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.max_parallel_trial_count = 2549

    request = aiplatform_v1.CreateNasJobRequest(
        parent="parent_value",
        nas_job=nas_job,
    )

    # Make the request
    response = await client.create_nas_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateNasJobRequest, dict]]) – The request object. Request message for [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob].

  • parent (str) –

    Required. The resource name of the Location to create the NasJob in. Format: projects/{project}/locations/{location}

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

  • nas_job (google.cloud.aiplatform_v1.types.NasJob) – Required. The NasJob to create. This corresponds to the nas_job field on the request instance; if request 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:

Represents a Neural Architecture Search (NAS) job.

Return type:

google.cloud.aiplatform_v1.types.NasJob

static custom_job_path(project: str, location: str, custom_job: str) str

Returns a fully-qualified custom_job string.

static data_labeling_job_path(project: str, location: str, data_labeling_job: str) str

Returns a fully-qualified data_labeling_job string.

static dataset_path(project: str, location: str, dataset: str) str

Returns a fully-qualified dataset string.

async delete_batch_prediction_job(request: Optional[Union[DeleteBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a BatchPredictionJob. Can only be called on jobs that already finished.

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

async def sample_delete_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteBatchPredictionJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteBatchPredictionJobRequest, dict]]) – The request object. Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob resource to be deleted. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_custom_job(request: Optional[Union[DeleteCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a CustomJob.

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

async def sample_delete_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteCustomJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteCustomJobRequest, dict]]) – The request object. Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].

  • name (str) –

    Required. The name of the CustomJob resource to be deleted. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_data_labeling_job(request: Optional[Union[DeleteDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a DataLabelingJob.

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

async def sample_delete_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteDataLabelingJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteDataLabelingJobRequest, dict]]) – The request object. Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob to be deleted. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_hyperparameter_tuning_job(request: Optional[Union[DeleteHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a HyperparameterTuningJob.

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

async def sample_delete_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteHyperparameterTuningJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteHyperparameterTuningJobRequest, dict]]) – The request object. Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob resource to be deleted. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_model_deployment_monitoring_job(request: Optional[Union[DeleteModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a ModelDeploymentMonitoringJob.

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

async def sample_delete_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.DeleteModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_nas_job(request: Optional[Union[DeleteNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a NasJob.

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

async def sample_delete_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteNasJobRequest(
        name="name_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteNasJobRequest, dict]]) – The request object. Request message for [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob].

  • name (str) –

    Required. The name of the NasJob resource to be deleted. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    This corresponds to the name field on the request instance; if request 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_operation(request: Optional[DeleteOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _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

static endpoint_path(project: str, location: str, endpoint: str) str

Returns a fully-qualified endpoint 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:

JobServiceAsyncClient

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:

JobServiceAsyncClient

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:

JobServiceAsyncClient

async get_batch_prediction_job(request: Optional[Union[GetBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) BatchPredictionJob[source]

Gets a BatchPredictionJob

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

async def sample_get_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetBatchPredictionJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_batch_prediction_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetBatchPredictionJobRequest, dict]]) – The request object. Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob resource. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

    This corresponds to the name field on the request instance; if request 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:

A job that uses a

[Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances.

Return type:

google.cloud.aiplatform_v1.types.BatchPredictionJob

async get_custom_job(request: Optional[Union[GetCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) CustomJob[source]

Gets a CustomJob.

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

async def sample_get_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetCustomJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_custom_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetCustomJobRequest, dict]]) – The request object. Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].

  • name (str) –

    Required. The name of the CustomJob resource. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

    This corresponds to the name field on the request instance; if request 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:

Represents a job that runs custom workloads such as a Docker container or a Python package. A CustomJob can have multiple worker pools and each worker pool can have its own machine and input spec. A CustomJob will be cleaned up once the job enters terminal state (failed or succeeded).

Return type:

google.cloud.aiplatform_v1.types.CustomJob

async get_data_labeling_job(request: Optional[Union[GetDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) DataLabelingJob[source]

Gets a DataLabelingJob.

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

async def sample_get_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetDataLabelingJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_data_labeling_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetDataLabelingJobRequest, dict]]) – The request object. Request message for [JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

    This corresponds to the name field on the request instance; if request 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:

DataLabelingJob is used to trigger a human labeling job on unlabeled data from the following Dataset:

Return type:

google.cloud.aiplatform_v1.types.DataLabelingJob

async get_hyperparameter_tuning_job(request: Optional[Union[GetHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) HyperparameterTuningJob[source]

Gets a HyperparameterTuningJob

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

async def sample_get_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetHyperparameterTuningJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_hyperparameter_tuning_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetHyperparameterTuningJobRequest, dict]]) – The request object. Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob resource. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

    This corresponds to the name field on the request instance; if request 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:

Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.

Return type:

google.cloud.aiplatform_v1.types.HyperparameterTuningJob

async get_iam_policy(request: Optional[GetIamPolicyRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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 of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, 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_location(request: Optional[GetLocationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

async get_model_deployment_monitoring_job(request: Optional[Union[GetModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ModelDeploymentMonitoringJob[source]

Gets a ModelDeploymentMonitoringJob.

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

async def sample_get_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_model_deployment_monitoring_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.GetModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the name field on the request instance; if request 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:

Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[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:

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises:

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

async get_nas_job(request: Optional[Union[GetNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasJob[source]

Gets a NasJob

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

async def sample_get_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetNasJobRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_nas_job(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetNasJobRequest, dict]]) – The request object. Request message for [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob].

  • name (str) –

    Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    This corresponds to the name field on the request instance; if request 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:

Represents a Neural Architecture Search (NAS) job.

Return type:

google.cloud.aiplatform_v1.types.NasJob

async get_nas_trial_detail(request: Optional[Union[GetNasTrialDetailRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasTrialDetail[source]

Gets a NasTrialDetail.

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

async def sample_get_nas_trial_detail():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetNasTrialDetailRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_nas_trial_detail(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetNasTrialDetailRequest, dict]]) – The request object. Request message for [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail].

  • name (str) –

    Required. The name of the NasTrialDetail resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}

    This corresponds to the name field on the request instance; if request 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:

Represents a NasTrial details along with its parameters. If there is a corresponding train NasTrial, the train NasTrial is also returned.

Return type:

google.cloud.aiplatform_v1.types.NasTrialDetail

async get_operation(request: Optional[GetOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

classmethod get_transport_class(label: Optional[str] = None) Type[JobServiceTransport]

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.

static hyperparameter_tuning_job_path(project: str, location: str, hyperparameter_tuning_job: str) str

Returns a fully-qualified hyperparameter_tuning_job string.

async list_batch_prediction_jobs(request: Optional[Union[ListBatchPredictionJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListBatchPredictionJobsAsyncPager[source]

Lists BatchPredictionJobs in a 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 aiplatform_v1

async def sample_list_batch_prediction_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListBatchPredictionJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListBatchPredictionJobsRequest, dict]]) – The request object. Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].

  • parent (str) –

    Required. The resource name of the Location to list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListBatchPredictionJobsAsyncPager

async list_custom_jobs(request: Optional[Union[ListCustomJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListCustomJobsAsyncPager[source]

Lists CustomJobs in a 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 aiplatform_v1

async def sample_list_custom_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListCustomJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListCustomJobsRequest, dict]]) – The request object. Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].

  • parent (str) –

    Required. The resource name of the Location to list the CustomJobs from. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListCustomJobsAsyncPager

async list_data_labeling_jobs(request: Optional[Union[ListDataLabelingJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListDataLabelingJobsAsyncPager[source]

Lists DataLabelingJobs in a 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 aiplatform_v1

async def sample_list_data_labeling_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListDataLabelingJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListDataLabelingJobsRequest, dict]]) – The request object. Request message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].

  • parent (str) –

    Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListDataLabelingJobsAsyncPager

async list_hyperparameter_tuning_jobs(request: Optional[Union[ListHyperparameterTuningJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListHyperparameterTuningJobsAsyncPager[source]

Lists HyperparameterTuningJobs in a 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 aiplatform_v1

async def sample_list_hyperparameter_tuning_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListHyperparameterTuningJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsRequest, dict]]) – The request object. Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].

  • parent (str) –

    Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListHyperparameterTuningJobsAsyncPager

async list_locations(request: Optional[ListLocationsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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_model_deployment_monitoring_jobs(request: Optional[Union[ListModelDeploymentMonitoringJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListModelDeploymentMonitoringJobsAsyncPager[source]

Lists ModelDeploymentMonitoringJobs in a 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 aiplatform_v1

async def sample_list_model_deployment_monitoring_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListModelDeploymentMonitoringJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsRequest, dict]]) – The request object. Request message for [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].

  • parent (str) –

    Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListModelDeploymentMonitoringJobsAsyncPager

async list_nas_jobs(request: Optional[Union[ListNasJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListNasJobsAsyncPager[source]

Lists NasJobs in a 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 aiplatform_v1

async def sample_list_nas_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListNasJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListNasJobsRequest, dict]]) – The request object. Request message for [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs].

  • parent (str) –

    Required. The resource name of the Location to list the NasJobs from. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListNasJobsAsyncPager

async list_nas_trial_details(request: Optional[Union[ListNasTrialDetailsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListNasTrialDetailsAsyncPager[source]

List top NasTrialDetails of a NasJob.

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

async def sample_list_nas_trial_details():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListNasTrialDetailsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListNasTrialDetailsRequest, dict]]) – The request object. Request message for [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails].

  • parent (str) –

    Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    This corresponds to the parent field on the request instance; if request 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 message for

[JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListNasTrialDetailsAsyncPager

async list_operations(request: Optional[ListOperationsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

static model_deployment_monitoring_job_path(project: str, location: str, model_deployment_monitoring_job: str) str

Returns a fully-qualified model_deployment_monitoring_job string.

static model_path(project: str, location: str, model: str) str

Returns a fully-qualified model string.

static nas_job_path(project: str, location: str, nas_job: str) str

Returns a fully-qualified nas_job string.

static nas_trial_detail_path(project: str, location: str, nas_job: str, nas_trial_detail: str) str

Returns a fully-qualified nas_trial_detail string.

static network_path(project: str, network: str) str

Returns a fully-qualified network string.

static notification_channel_path(project: str, notification_channel: str) str

Returns a fully-qualified notification_channel string.

static parse_batch_prediction_job_path(path: str) Dict[str, str]

Parses a batch_prediction_job path into its component segments.

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_context_path(path: str) Dict[str, str]

Parses a context path into its component segments.

static parse_custom_job_path(path: str) Dict[str, str]

Parses a custom_job path into its component segments.

static parse_data_labeling_job_path(path: str) Dict[str, str]

Parses a data_labeling_job path into its component segments.

static parse_dataset_path(path: str) Dict[str, str]

Parses a dataset path into its component segments.

static parse_endpoint_path(path: str) Dict[str, str]

Parses a endpoint path into its component segments.

static parse_hyperparameter_tuning_job_path(path: str) Dict[str, str]

Parses a hyperparameter_tuning_job path into its component segments.

static parse_model_deployment_monitoring_job_path(path: str) Dict[str, str]

Parses a model_deployment_monitoring_job path into its component segments.

static parse_model_path(path: str) Dict[str, str]

Parses a model path into its component segments.

static parse_nas_job_path(path: str) Dict[str, str]

Parses a nas_job path into its component segments.

static parse_nas_trial_detail_path(path: str) Dict[str, str]

Parses a nas_trial_detail path into its component segments.

static parse_network_path(path: str) Dict[str, str]

Parses a network path into its component segments.

static parse_notification_channel_path(path: str) Dict[str, str]

Parses a notification_channel path into its component segments.

static parse_persistent_resource_path(path: str) Dict[str, str]

Parses a persistent_resource path into its component segments.

static parse_reservation_path(path: str) Dict[str, str]

Parses a reservation path into its component segments.

static parse_tensorboard_path(path: str) Dict[str, str]

Parses a tensorboard path into its component segments.

static parse_trial_path(path: str) Dict[str, str]

Parses a trial path into its component segments.

async pause_model_deployment_monitoring_job(request: Optional[Union[PauseModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to ‘PAUSED’.

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

async def sample_pause_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PauseModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

    # Make the request
    await client.pause_model_deployment_monitoring_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.PauseModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.PauseModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the name field on the request instance; if request 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.

static persistent_resource_path(project: str, location: str, persistent_resource: str) str

Returns a fully-qualified persistent_resource string.

static reservation_path(project_id_or_number: str, zone: str, reservation_name: str) str

Returns a fully-qualified reservation string.

async resume_model_deployment_monitoring_job(request: Optional[Union[ResumeModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.

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

async def sample_resume_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ResumeModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

    # Make the request
    await client.resume_model_deployment_monitoring_job(request=request)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ResumeModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.ResumeModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the name field on the request instance; if request 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.

async search_model_deployment_monitoring_stats_anomalies(request: Optional[Union[SearchModelDeploymentMonitoringStatsAnomaliesRequest, dict]] = None, *, model_deployment_monitoring_job: Optional[str] = None, deployed_model_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) SearchModelDeploymentMonitoringStatsAnomaliesAsyncPager[source]

Searches Model Monitoring Statistics generated within a given time window.

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

async def sample_search_model_deployment_monitoring_stats_anomalies():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest(
        model_deployment_monitoring_job="model_deployment_monitoring_job_value",
        deployed_model_id="deployed_model_id_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesRequest, dict]]) – The request object. Request message for [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].

  • model_deployment_monitoring_job (str) –

    Required. ModelDeploymentMonitoring Job resource name. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request is provided, this should not be set.

  • deployed_model_id (str) –

    Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].

    This corresponds to the deployed_model_id field on the request instance; if request 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 message for

[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.SearchModelDeploymentMonitoringStatsAnomaliesAsyncPager

async set_iam_policy(request: Optional[SetIamPolicyRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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 of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, 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

static tensorboard_path(project: str, location: str, tensorboard: str) str

Returns a fully-qualified tensorboard string.

async test_iam_permissions(request: Optional[TestIamPermissionsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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: JobServiceTransport

Returns the transport used by the client instance.

Returns:

The transport used by the client instance.

Return type:

JobServiceTransport

static trial_path(project: str, location: str, study: str, trial: str) str

Returns a fully-qualified trial string.

property universe_domain: str

Return the universe domain used by the client instance.

Returns:

The universe domain used

by the client instance.

Return type:

str

async update_model_deployment_monitoring_job(request: Optional[Union[UpdateModelDeploymentMonitoringJobRequest, dict]] = None, *, model_deployment_monitoring_job: Optional[ModelDeploymentMonitoringJob] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Updates a ModelDeploymentMonitoringJob.

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

async def sample_update_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceAsyncClient()

    # Initialize request argument(s)
    model_deployment_monitoring_job = aiplatform_v1.ModelDeploymentMonitoringJob()
    model_deployment_monitoring_job.display_name = "display_name_value"
    model_deployment_monitoring_job.endpoint = "endpoint_value"

    request = aiplatform_v1.UpdateModelDeploymentMonitoringJobRequest(
        model_deployment_monitoring_job=model_deployment_monitoring_job,
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.UpdateModelDeploymentMonitoringJobRequest, dict]]) – The request object. Request message for [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].

  • model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob) –

    Required. The model monitoring configuration which replaces the resource on the server.

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to * to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.

    Updatable fields:

    • display_name

    • model_deployment_monitoring_schedule_config

    • model_monitoring_alert_config

    • logging_sampling_strategy

    • labels

    • log_ttl

    • enable_monitoring_pipeline_logs . and

    • model_deployment_monitoring_objective_configs . or

    • model_deployment_monitoring_objective_configs.objective_config.training_dataset

    • model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config

    • model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_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.aiplatform_v1.types.ModelDeploymentMonitoringJob Represents a job that runs periodically to monitor the deployed models in an

endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.api_core.operation_async.AsyncOperation

async wait_operation(request: Optional[WaitOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state.

If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (WaitOperationRequest) – The request object. Request message for WaitOperation 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

class google.cloud.aiplatform_v1.services.job_service.JobServiceClient(*, credentials: ~typing.Optional[~google.auth.credentials.Credentials] = None, transport: ~typing.Optional[~typing.Union[str, ~google.cloud.aiplatform_v1.services.job_service.transports.base.JobServiceTransport, ~typing.Callable[[...], ~google.cloud.aiplatform_v1.services.job_service.transports.base.JobServiceTransport]]] = 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]

A service for creating and managing Vertex AI’s jobs.

Instantiates the job 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,JobServiceTransport,Callable[..., JobServiceTransport]]]) – 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 JobServiceTransport 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 when transport is not explicitly provided. Only if this property is not set and transport 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 the api_endpoint property still takes precedence; and universe_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:

str

static batch_prediction_job_path(project: str, location: str, batch_prediction_job: str) str[source]

Returns a fully-qualified batch_prediction_job string.

cancel_batch_prediction_job(request: Optional[Union[CancelBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_cancel_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelBatchPredictionJobRequest(
        name="name_value",
    )

    # Make the request
    client.cancel_batch_prediction_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CancelBatchPredictionJobRequest, dict]) – The request object. Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

cancel_custom_job(request: Optional[Union[CancelCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

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

def sample_cancel_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelCustomJobRequest(
        name="name_value",
    )

    # Make the request
    client.cancel_custom_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CancelCustomJobRequest, dict]) – The request object. Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].

  • name (str) –

    Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

cancel_data_labeling_job(request: Optional[Union[CancelDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

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

def sample_cancel_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelDataLabelingJobRequest(
        name="name_value",
    )

    # Make the request
    client.cancel_data_labeling_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CancelDataLabelingJobRequest, dict]) – The request object. Request message for [JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

cancel_hyperparameter_tuning_job(request: Optional[Union[CancelHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

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

def sample_cancel_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelHyperparameterTuningJobRequest(
        name="name_value",
    )

    # Make the request
    client.cancel_hyperparameter_tuning_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CancelHyperparameterTuningJobRequest, dict]) – The request object. Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

cancel_nas_job(request: Optional[Union[CancelNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to CANCELLED.

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

def sample_cancel_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelNasJobRequest(
        name="name_value",
    )

    # Make the request
    client.cancel_nas_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CancelNasJobRequest, dict]) – The request object. Request message for [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob].

  • name (str) –

    Required. The name of the NasJob to cancel. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

cancel_operation(request: Optional[CancelOperationRequest] = None, *, retry: Optional[Union[Retry, _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_folder_path(folder: str) str[source]

Returns a fully-qualified folder 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.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

static context_path(project: str, location: str, metadata_store: str, context: str) str[source]

Returns a fully-qualified context string.

create_batch_prediction_job(request: Optional[Union[CreateBatchPredictionJobRequest, dict]] = None, *, parent: Optional[str] = None, batch_prediction_job: Optional[BatchPredictionJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) BatchPredictionJob[source]

Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

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

def sample_create_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    batch_prediction_job = aiplatform_v1.BatchPredictionJob()
    batch_prediction_job.display_name = "display_name_value"
    batch_prediction_job.input_config.gcs_source.uris = ['uris_value1', 'uris_value2']
    batch_prediction_job.input_config.instances_format = "instances_format_value"
    batch_prediction_job.output_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"
    batch_prediction_job.output_config.predictions_format = "predictions_format_value"

    request = aiplatform_v1.CreateBatchPredictionJobRequest(
        parent="parent_value",
        batch_prediction_job=batch_prediction_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateBatchPredictionJobRequest, dict]) – The request object. Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].

  • parent (str) –

    Required. The resource name of the Location to create the BatchPredictionJob in. Format: projects/{project}/locations/{location}

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

  • batch_prediction_job (google.cloud.aiplatform_v1.types.BatchPredictionJob) –

    Required. The BatchPredictionJob to create.

    This corresponds to the batch_prediction_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A job that uses a

[Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances.

Return type:

google.cloud.aiplatform_v1.types.BatchPredictionJob

create_custom_job(request: Optional[Union[CreateCustomJobRequest, dict]] = None, *, parent: Optional[str] = None, custom_job: Optional[CustomJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) CustomJob[source]

Creates a CustomJob. A created CustomJob right away will be attempted to be run.

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

def sample_create_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    custom_job = aiplatform_v1.CustomJob()
    custom_job.display_name = "display_name_value"
    custom_job.job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"

    request = aiplatform_v1.CreateCustomJobRequest(
        parent="parent_value",
        custom_job=custom_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateCustomJobRequest, dict]) – The request object. Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].

  • parent (str) –

    Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}

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

  • custom_job (google.cloud.aiplatform_v1.types.CustomJob) – Required. The CustomJob to create. This corresponds to the custom_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a job that runs custom workloads such as a Docker container or a Python package. A CustomJob can have multiple worker pools and each worker pool can have its own machine and input spec. A CustomJob will be cleaned up once the job enters terminal state (failed or succeeded).

Return type:

google.cloud.aiplatform_v1.types.CustomJob

create_data_labeling_job(request: Optional[Union[CreateDataLabelingJobRequest, dict]] = None, *, parent: Optional[str] = None, data_labeling_job: Optional[DataLabelingJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) DataLabelingJob[source]

Creates a DataLabelingJob.

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

def sample_create_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    data_labeling_job = aiplatform_v1.DataLabelingJob()
    data_labeling_job.display_name = "display_name_value"
    data_labeling_job.datasets = ['datasets_value1', 'datasets_value2']
    data_labeling_job.labeler_count = 1375
    data_labeling_job.instruction_uri = "instruction_uri_value"
    data_labeling_job.inputs_schema_uri = "inputs_schema_uri_value"
    data_labeling_job.inputs.null_value = "NULL_VALUE"

    request = aiplatform_v1.CreateDataLabelingJobRequest(
        parent="parent_value",
        data_labeling_job=data_labeling_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateDataLabelingJobRequest, dict]) – The request object. Request message for [JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob].

  • parent (str) –

    Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

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

  • data_labeling_job (google.cloud.aiplatform_v1.types.DataLabelingJob) –

    Required. The DataLabelingJob to create.

    This corresponds to the data_labeling_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

DataLabelingJob is used to trigger a human labeling job on unlabeled data from the following Dataset:

Return type:

google.cloud.aiplatform_v1.types.DataLabelingJob

create_hyperparameter_tuning_job(request: Optional[Union[CreateHyperparameterTuningJobRequest, dict]] = None, *, parent: Optional[str] = None, hyperparameter_tuning_job: Optional[HyperparameterTuningJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) HyperparameterTuningJob[source]

Creates a HyperparameterTuningJob

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

def sample_create_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    hyperparameter_tuning_job = aiplatform_v1.HyperparameterTuningJob()
    hyperparameter_tuning_job.display_name = "display_name_value"
    hyperparameter_tuning_job.study_spec.metrics.metric_id = "metric_id_value"
    hyperparameter_tuning_job.study_spec.metrics.goal = "MINIMIZE"
    hyperparameter_tuning_job.study_spec.parameters.double_value_spec.min_value = 0.96
    hyperparameter_tuning_job.study_spec.parameters.double_value_spec.max_value = 0.962
    hyperparameter_tuning_job.study_spec.parameters.parameter_id = "parameter_id_value"
    hyperparameter_tuning_job.max_trial_count = 1609
    hyperparameter_tuning_job.parallel_trial_count = 2128
    hyperparameter_tuning_job.trial_job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"

    request = aiplatform_v1.CreateHyperparameterTuningJobRequest(
        parent="parent_value",
        hyperparameter_tuning_job=hyperparameter_tuning_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateHyperparameterTuningJobRequest, dict]) – The request object. Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].

  • parent (str) –

    Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: projects/{project}/locations/{location}

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

  • hyperparameter_tuning_job (google.cloud.aiplatform_v1.types.HyperparameterTuningJob) –

    Required. The HyperparameterTuningJob to create.

    This corresponds to the hyperparameter_tuning_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.

Return type:

google.cloud.aiplatform_v1.types.HyperparameterTuningJob

create_model_deployment_monitoring_job(request: Optional[Union[CreateModelDeploymentMonitoringJobRequest, dict]] = None, *, parent: Optional[str] = None, model_deployment_monitoring_job: Optional[ModelDeploymentMonitoringJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ModelDeploymentMonitoringJob[source]

Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

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

def sample_create_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    model_deployment_monitoring_job = aiplatform_v1.ModelDeploymentMonitoringJob()
    model_deployment_monitoring_job.display_name = "display_name_value"
    model_deployment_monitoring_job.endpoint = "endpoint_value"

    request = aiplatform_v1.CreateModelDeploymentMonitoringJobRequest(
        parent="parent_value",
        model_deployment_monitoring_job=model_deployment_monitoring_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].

  • parent (str) –

    Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

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

  • model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob) –

    Required. The ModelDeploymentMonitoringJob to create

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob

create_nas_job(request: Optional[Union[CreateNasJobRequest, dict]] = None, *, parent: Optional[str] = None, nas_job: Optional[NasJob] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasJob[source]

Creates a NasJob

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

def sample_create_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    nas_job = aiplatform_v1.NasJob()
    nas_job.display_name = "display_name_value"
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.search_trial_job_spec.worker_pool_specs.container_spec.image_uri = "image_uri_value"
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.max_trial_count = 1609
    nas_job.nas_job_spec.multi_trial_algorithm_spec.search_trial_spec.max_parallel_trial_count = 2549

    request = aiplatform_v1.CreateNasJobRequest(
        parent="parent_value",
        nas_job=nas_job,
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateNasJobRequest, dict]) – The request object. Request message for [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob].

  • parent (str) –

    Required. The resource name of the Location to create the NasJob in. Format: projects/{project}/locations/{location}

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

  • nas_job (google.cloud.aiplatform_v1.types.NasJob) – Required. The NasJob to create. This corresponds to the nas_job field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a Neural Architecture Search (NAS) job.

Return type:

google.cloud.aiplatform_v1.types.NasJob

static custom_job_path(project: str, location: str, custom_job: str) str[source]

Returns a fully-qualified custom_job string.

static data_labeling_job_path(project: str, location: str, data_labeling_job: str) str[source]

Returns a fully-qualified data_labeling_job string.

static dataset_path(project: str, location: str, dataset: str) str[source]

Returns a fully-qualified dataset string.

delete_batch_prediction_job(request: Optional[Union[DeleteBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a BatchPredictionJob. Can only be called on jobs that already finished.

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

def sample_delete_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteBatchPredictionJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteBatchPredictionJobRequest, dict]) – The request object. Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob resource to be deleted. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_custom_job(request: Optional[Union[DeleteCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a CustomJob.

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

def sample_delete_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteCustomJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteCustomJobRequest, dict]) – The request object. Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].

  • name (str) –

    Required. The name of the CustomJob resource to be deleted. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_data_labeling_job(request: Optional[Union[DeleteDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a DataLabelingJob.

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

def sample_delete_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteDataLabelingJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteDataLabelingJobRequest, dict]) – The request object. Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob to be deleted. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_hyperparameter_tuning_job(request: Optional[Union[DeleteHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a HyperparameterTuningJob.

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

def sample_delete_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteHyperparameterTuningJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteHyperparameterTuningJobRequest, dict]) – The request object. Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob resource to be deleted. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_model_deployment_monitoring_job(request: Optional[Union[DeleteModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a ModelDeploymentMonitoringJob.

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

def sample_delete_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.DeleteModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_nas_job(request: Optional[Union[DeleteNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a NasJob.

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

def sample_delete_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteNasJobRequest(
        name="name_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteNasJobRequest, dict]) – The request object. Request message for [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob].

  • name (str) –

    Required. The name of the NasJob resource to be deleted. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

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);

}

Return type:

google.api_core.operation.Operation

delete_operation(request: Optional[DeleteOperationRequest] = None, *, retry: Optional[Union[Retry, _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

static endpoint_path(project: str, location: str, endpoint: str) str[source]

Returns a fully-qualified endpoint 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:

JobServiceClient

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:

JobServiceClient

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:

JobServiceClient

get_batch_prediction_job(request: Optional[Union[GetBatchPredictionJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) BatchPredictionJob[source]

Gets a BatchPredictionJob

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

def sample_get_batch_prediction_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetBatchPredictionJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetBatchPredictionJobRequest, dict]) – The request object. Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].

  • name (str) –

    Required. The name of the BatchPredictionJob resource. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A job that uses a

[Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances.

Return type:

google.cloud.aiplatform_v1.types.BatchPredictionJob

get_custom_job(request: Optional[Union[GetCustomJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) CustomJob[source]

Gets a CustomJob.

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

def sample_get_custom_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetCustomJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetCustomJobRequest, dict]) – The request object. Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].

  • name (str) –

    Required. The name of the CustomJob resource. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a job that runs custom workloads such as a Docker container or a Python package. A CustomJob can have multiple worker pools and each worker pool can have its own machine and input spec. A CustomJob will be cleaned up once the job enters terminal state (failed or succeeded).

Return type:

google.cloud.aiplatform_v1.types.CustomJob

get_data_labeling_job(request: Optional[Union[GetDataLabelingJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) DataLabelingJob[source]

Gets a DataLabelingJob.

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

def sample_get_data_labeling_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetDataLabelingJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetDataLabelingJobRequest, dict]) – The request object. Request message for [JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob].

  • name (str) –

    Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

DataLabelingJob is used to trigger a human labeling job on unlabeled data from the following Dataset:

Return type:

google.cloud.aiplatform_v1.types.DataLabelingJob

get_hyperparameter_tuning_job(request: Optional[Union[GetHyperparameterTuningJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) HyperparameterTuningJob[source]

Gets a HyperparameterTuningJob

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

def sample_get_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetHyperparameterTuningJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetHyperparameterTuningJobRequest, dict]) – The request object. Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].

  • name (str) –

    Required. The name of the HyperparameterTuningJob resource. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.

Return type:

google.cloud.aiplatform_v1.types.HyperparameterTuningJob

get_iam_policy(request: Optional[GetIamPolicyRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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 of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, 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_location(request: Optional[GetLocationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

get_model_deployment_monitoring_job(request: Optional[Union[GetModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ModelDeploymentMonitoringJob[source]

Gets a ModelDeploymentMonitoringJob.

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

def sample_get_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.GetModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[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:

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises:

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

get_nas_job(request: Optional[Union[GetNasJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasJob[source]

Gets a NasJob

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

def sample_get_nas_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetNasJobRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetNasJobRequest, dict]) – The request object. Request message for [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob].

  • name (str) –

    Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a Neural Architecture Search (NAS) job.

Return type:

google.cloud.aiplatform_v1.types.NasJob

get_nas_trial_detail(request: Optional[Union[GetNasTrialDetailRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) NasTrialDetail[source]

Gets a NasTrialDetail.

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

def sample_get_nas_trial_detail():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetNasTrialDetailRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetNasTrialDetailRequest, dict]) – The request object. Request message for [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail].

  • name (str) –

    Required. The name of the NasTrialDetail resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Represents a NasTrial details along with its parameters. If there is a corresponding train NasTrial, the train NasTrial is also returned.

Return type:

google.cloud.aiplatform_v1.types.NasTrialDetail

get_operation(request: Optional[GetOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

static hyperparameter_tuning_job_path(project: str, location: str, hyperparameter_tuning_job: str) str[source]

Returns a fully-qualified hyperparameter_tuning_job string.

list_batch_prediction_jobs(request: Optional[Union[ListBatchPredictionJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListBatchPredictionJobsPager[source]

Lists BatchPredictionJobs in a 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 aiplatform_v1

def sample_list_batch_prediction_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListBatchPredictionJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListBatchPredictionJobsRequest, dict]) – The request object. Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].

  • parent (str) –

    Required. The resource name of the Location to list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListBatchPredictionJobsPager

list_custom_jobs(request: Optional[Union[ListCustomJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListCustomJobsPager[source]

Lists CustomJobs in a 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 aiplatform_v1

def sample_list_custom_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListCustomJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListCustomJobsRequest, dict]) – The request object. Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].

  • parent (str) –

    Required. The resource name of the Location to list the CustomJobs from. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListCustomJobsPager

list_data_labeling_jobs(request: Optional[Union[ListDataLabelingJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListDataLabelingJobsPager[source]

Lists DataLabelingJobs in a 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 aiplatform_v1

def sample_list_data_labeling_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListDataLabelingJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListDataLabelingJobsRequest, dict]) – The request object. Request message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].

  • parent (str) –

    Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListDataLabelingJobsPager

list_hyperparameter_tuning_jobs(request: Optional[Union[ListHyperparameterTuningJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListHyperparameterTuningJobsPager[source]

Lists HyperparameterTuningJobs in a 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 aiplatform_v1

def sample_list_hyperparameter_tuning_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListHyperparameterTuningJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsRequest, dict]) – The request object. Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].

  • parent (str) –

    Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListHyperparameterTuningJobsPager

list_locations(request: Optional[ListLocationsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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_model_deployment_monitoring_jobs(request: Optional[Union[ListModelDeploymentMonitoringJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListModelDeploymentMonitoringJobsPager[source]

Lists ModelDeploymentMonitoringJobs in a 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 aiplatform_v1

def sample_list_model_deployment_monitoring_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListModelDeploymentMonitoringJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsRequest, dict]) – The request object. Request message for [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].

  • parent (str) –

    Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListModelDeploymentMonitoringJobsPager

list_nas_jobs(request: Optional[Union[ListNasJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListNasJobsPager[source]

Lists NasJobs in a 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 aiplatform_v1

def sample_list_nas_jobs():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListNasJobsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListNasJobsRequest, dict]) – The request object. Request message for [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs].

  • parent (str) –

    Required. The resource name of the Location to list the NasJobs from. Format: projects/{project}/locations/{location}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListNasJobsPager

list_nas_trial_details(request: Optional[Union[ListNasTrialDetailsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListNasTrialDetailsPager[source]

List top NasTrialDetails of a NasJob.

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

def sample_list_nas_trial_details():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListNasTrialDetailsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListNasTrialDetailsRequest, dict]) – The request object. Request message for [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails].

  • parent (str) –

    Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.ListNasTrialDetailsPager

list_operations(request: Optional[ListOperationsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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

static model_deployment_monitoring_job_path(project: str, location: str, model_deployment_monitoring_job: str) str[source]

Returns a fully-qualified model_deployment_monitoring_job string.

static model_path(project: str, location: str, model: str) str[source]

Returns a fully-qualified model string.

static nas_job_path(project: str, location: str, nas_job: str) str[source]

Returns a fully-qualified nas_job string.

static nas_trial_detail_path(project: str, location: str, nas_job: str, nas_trial_detail: str) str[source]

Returns a fully-qualified nas_trial_detail string.

static network_path(project: str, network: str) str[source]

Returns a fully-qualified network string.

static notification_channel_path(project: str, notification_channel: str) str[source]

Returns a fully-qualified notification_channel string.

static parse_batch_prediction_job_path(path: str) Dict[str, str][source]

Parses a batch_prediction_job path into its component segments.

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_context_path(path: str) Dict[str, str][source]

Parses a context path into its component segments.

static parse_custom_job_path(path: str) Dict[str, str][source]

Parses a custom_job path into its component segments.

static parse_data_labeling_job_path(path: str) Dict[str, str][source]

Parses a data_labeling_job path into its component segments.

static parse_dataset_path(path: str) Dict[str, str][source]

Parses a dataset path into its component segments.

static parse_endpoint_path(path: str) Dict[str, str][source]

Parses a endpoint path into its component segments.

static parse_hyperparameter_tuning_job_path(path: str) Dict[str, str][source]

Parses a hyperparameter_tuning_job path into its component segments.

static parse_model_deployment_monitoring_job_path(path: str) Dict[str, str][source]

Parses a model_deployment_monitoring_job path into its component segments.

static parse_model_path(path: str) Dict[str, str][source]

Parses a model path into its component segments.

static parse_nas_job_path(path: str) Dict[str, str][source]

Parses a nas_job path into its component segments.

static parse_nas_trial_detail_path(path: str) Dict[str, str][source]

Parses a nas_trial_detail path into its component segments.

static parse_network_path(path: str) Dict[str, str][source]

Parses a network path into its component segments.

static parse_notification_channel_path(path: str) Dict[str, str][source]

Parses a notification_channel path into its component segments.

static parse_persistent_resource_path(path: str) Dict[str, str][source]

Parses a persistent_resource path into its component segments.

static parse_reservation_path(path: str) Dict[str, str][source]

Parses a reservation path into its component segments.

static parse_tensorboard_path(path: str) Dict[str, str][source]

Parses a tensorboard path into its component segments.

static parse_trial_path(path: str) Dict[str, str][source]

Parses a trial path into its component segments.

pause_model_deployment_monitoring_job(request: Optional[Union[PauseModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to ‘PAUSED’.

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

def sample_pause_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PauseModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

    # Make the request
    client.pause_model_deployment_monitoring_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.PauseModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.PauseModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

static persistent_resource_path(project: str, location: str, persistent_resource: str) str[source]

Returns a fully-qualified persistent_resource string.

static reservation_path(project_id_or_number: str, zone: str, reservation_name: str) str[source]

Returns a fully-qualified reservation string.

resume_model_deployment_monitoring_job(request: Optional[Union[ResumeModelDeploymentMonitoringJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.

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

def sample_resume_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ResumeModelDeploymentMonitoringJobRequest(
        name="name_value",
    )

    # Make the request
    client.resume_model_deployment_monitoring_job(request=request)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ResumeModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.ResumeModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob].

  • name (str) –

    Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

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

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

search_model_deployment_monitoring_stats_anomalies(request: Optional[Union[SearchModelDeploymentMonitoringStatsAnomaliesRequest, dict]] = None, *, model_deployment_monitoring_job: Optional[str] = None, deployed_model_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) SearchModelDeploymentMonitoringStatsAnomaliesPager[source]

Searches Model Monitoring Statistics generated within a given time window.

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

def sample_search_model_deployment_monitoring_stats_anomalies():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest(
        model_deployment_monitoring_job="model_deployment_monitoring_job_value",
        deployed_model_id="deployed_model_id_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesRequest, dict]) – The request object. Request message for [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].

  • model_deployment_monitoring_job (str) –

    Required. ModelDeploymentMonitoring Job resource name. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request is provided, this should not be set.

  • deployed_model_id (str) –

    Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].

    This corresponds to the deployed_model_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.job_service.pagers.SearchModelDeploymentMonitoringStatsAnomaliesPager

set_iam_policy(request: Optional[SetIamPolicyRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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 of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, 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

static tensorboard_path(project: str, location: str, tensorboard: str) str[source]

Returns a fully-qualified tensorboard string.

test_iam_permissions(request: Optional[TestIamPermissionsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) 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: JobServiceTransport

Returns the transport used by the client instance.

Returns:

The transport used by the client

instance.

Return type:

JobServiceTransport

static trial_path(project: str, location: str, study: str, trial: str) str[source]

Returns a fully-qualified trial string.

property universe_domain: str

Return the universe domain used by the client instance.

Returns:

The universe domain used by the client instance.

Return type:

str

update_model_deployment_monitoring_job(request: Optional[Union[UpdateModelDeploymentMonitoringJobRequest, dict]] = None, *, model_deployment_monitoring_job: Optional[ModelDeploymentMonitoringJob] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Updates a ModelDeploymentMonitoringJob.

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

def sample_update_model_deployment_monitoring_job():
    # Create a client
    client = aiplatform_v1.JobServiceClient()

    # Initialize request argument(s)
    model_deployment_monitoring_job = aiplatform_v1.ModelDeploymentMonitoringJob()
    model_deployment_monitoring_job.display_name = "display_name_value"
    model_deployment_monitoring_job.endpoint = "endpoint_value"

    request = aiplatform_v1.UpdateModelDeploymentMonitoringJobRequest(
        model_deployment_monitoring_job=model_deployment_monitoring_job,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.UpdateModelDeploymentMonitoringJobRequest, dict]) – The request object. Request message for [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].

  • model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob) –

    Required. The model monitoring configuration which replaces the resource on the server.

    This corresponds to the model_deployment_monitoring_job field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to * to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.

    Updatable fields:

    • display_name

    • model_deployment_monitoring_schedule_config

    • model_monitoring_alert_config

    • logging_sampling_strategy

    • labels

    • log_ttl

    • enable_monitoring_pipeline_logs . and

    • model_deployment_monitoring_objective_configs . or

    • model_deployment_monitoring_objective_configs.objective_config.training_dataset

    • model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config

    • model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob Represents a job that runs periodically to monitor the deployed models in an

endpoint. It will analyze the logged training & prediction data to detect any abnormal behaviors.

Return type:

google.api_core.operation.Operation

wait_operation(request: Optional[WaitOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state.

If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (WaitOperationRequest) – The request object. Request message for WaitOperation 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

class google.cloud.aiplatform_v1.services.job_service.pagers.ListBatchPredictionJobsAsyncPager(method: Callable[[...], Awaitable[ListBatchPredictionJobsResponse]], request: ListBatchPredictionJobsRequest, response: ListBatchPredictionJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_batch_prediction_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListBatchPredictionJobsResponse object, and provides an __aiter__ method to iterate through its batch_prediction_jobs field.

If there are more pages, the __aiter__ method will make additional ListBatchPredictionJobs requests and continue to iterate through the batch_prediction_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListBatchPredictionJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListBatchPredictionJobsPager(method: Callable[[...], ListBatchPredictionJobsResponse], request: ListBatchPredictionJobsRequest, response: ListBatchPredictionJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_batch_prediction_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListBatchPredictionJobsResponse object, and provides an __iter__ method to iterate through its batch_prediction_jobs field.

If there are more pages, the __iter__ method will make additional ListBatchPredictionJobs requests and continue to iterate through the batch_prediction_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListBatchPredictionJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListCustomJobsAsyncPager(method: Callable[[...], Awaitable[ListCustomJobsResponse]], request: ListCustomJobsRequest, response: ListCustomJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_custom_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListCustomJobsResponse object, and provides an __aiter__ method to iterate through its custom_jobs field.

If there are more pages, the __aiter__ method will make additional ListCustomJobs requests and continue to iterate through the custom_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListCustomJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListCustomJobsPager(method: Callable[[...], ListCustomJobsResponse], request: ListCustomJobsRequest, response: ListCustomJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_custom_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListCustomJobsResponse object, and provides an __iter__ method to iterate through its custom_jobs field.

If there are more pages, the __iter__ method will make additional ListCustomJobs requests and continue to iterate through the custom_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListCustomJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListDataLabelingJobsAsyncPager(method: Callable[[...], Awaitable[ListDataLabelingJobsResponse]], request: ListDataLabelingJobsRequest, response: ListDataLabelingJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_data_labeling_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListDataLabelingJobsResponse object, and provides an __aiter__ method to iterate through its data_labeling_jobs field.

If there are more pages, the __aiter__ method will make additional ListDataLabelingJobs requests and continue to iterate through the data_labeling_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListDataLabelingJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListDataLabelingJobsPager(method: Callable[[...], ListDataLabelingJobsResponse], request: ListDataLabelingJobsRequest, response: ListDataLabelingJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_data_labeling_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListDataLabelingJobsResponse object, and provides an __iter__ method to iterate through its data_labeling_jobs field.

If there are more pages, the __iter__ method will make additional ListDataLabelingJobs requests and continue to iterate through the data_labeling_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListDataLabelingJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListHyperparameterTuningJobsAsyncPager(method: Callable[[...], Awaitable[ListHyperparameterTuningJobsResponse]], request: ListHyperparameterTuningJobsRequest, response: ListHyperparameterTuningJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_hyperparameter_tuning_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsResponse object, and provides an __aiter__ method to iterate through its hyperparameter_tuning_jobs field.

If there are more pages, the __aiter__ method will make additional ListHyperparameterTuningJobs requests and continue to iterate through the hyperparameter_tuning_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListHyperparameterTuningJobsPager(method: Callable[[...], ListHyperparameterTuningJobsResponse], request: ListHyperparameterTuningJobsRequest, response: ListHyperparameterTuningJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_hyperparameter_tuning_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsResponse object, and provides an __iter__ method to iterate through its hyperparameter_tuning_jobs field.

If there are more pages, the __iter__ method will make additional ListHyperparameterTuningJobs requests and continue to iterate through the hyperparameter_tuning_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListHyperparameterTuningJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListModelDeploymentMonitoringJobsAsyncPager(method: Callable[[...], Awaitable[ListModelDeploymentMonitoringJobsResponse]], request: ListModelDeploymentMonitoringJobsRequest, response: ListModelDeploymentMonitoringJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_model_deployment_monitoring_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsResponse object, and provides an __aiter__ method to iterate through its model_deployment_monitoring_jobs field.

If there are more pages, the __aiter__ method will make additional ListModelDeploymentMonitoringJobs requests and continue to iterate through the model_deployment_monitoring_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListModelDeploymentMonitoringJobsPager(method: Callable[[...], ListModelDeploymentMonitoringJobsResponse], request: ListModelDeploymentMonitoringJobsRequest, response: ListModelDeploymentMonitoringJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_model_deployment_monitoring_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsResponse object, and provides an __iter__ method to iterate through its model_deployment_monitoring_jobs field.

If there are more pages, the __iter__ method will make additional ListModelDeploymentMonitoringJobs requests and continue to iterate through the model_deployment_monitoring_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListModelDeploymentMonitoringJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListNasJobsAsyncPager(method: Callable[[...], Awaitable[ListNasJobsResponse]], request: ListNasJobsRequest, response: ListNasJobsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_nas_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListNasJobsResponse object, and provides an __aiter__ method to iterate through its nas_jobs field.

If there are more pages, the __aiter__ method will make additional ListNasJobs requests and continue to iterate through the nas_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListNasJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListNasJobsPager(method: Callable[[...], ListNasJobsResponse], request: ListNasJobsRequest, response: ListNasJobsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_nas_jobs requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListNasJobsResponse object, and provides an __iter__ method to iterate through its nas_jobs field.

If there are more pages, the __iter__ method will make additional ListNasJobs requests and continue to iterate through the nas_jobs field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListNasJobsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListNasTrialDetailsAsyncPager(method: Callable[[...], Awaitable[ListNasTrialDetailsResponse]], request: ListNasTrialDetailsRequest, response: ListNasTrialDetailsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_nas_trial_details requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListNasTrialDetailsResponse object, and provides an __aiter__ method to iterate through its nas_trial_details field.

If there are more pages, the __aiter__ method will make additional ListNasTrialDetails requests and continue to iterate through the nas_trial_details field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListNasTrialDetailsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.ListNasTrialDetailsPager(method: Callable[[...], ListNasTrialDetailsResponse], request: ListNasTrialDetailsRequest, response: ListNasTrialDetailsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_nas_trial_details requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListNasTrialDetailsResponse object, and provides an __iter__ method to iterate through its nas_trial_details field.

If there are more pages, the __iter__ method will make additional ListNasTrialDetails requests and continue to iterate through the nas_trial_details field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListNasTrialDetailsResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.SearchModelDeploymentMonitoringStatsAnomaliesAsyncPager(method: Callable[[...], Awaitable[SearchModelDeploymentMonitoringStatsAnomaliesResponse]], request: SearchModelDeploymentMonitoringStatsAnomaliesRequest, response: SearchModelDeploymentMonitoringStatsAnomaliesResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through search_model_deployment_monitoring_stats_anomalies requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesResponse object, and provides an __aiter__ method to iterate through its monitoring_stats field.

If there are more pages, the __aiter__ method will make additional SearchModelDeploymentMonitoringStatsAnomalies requests and continue to iterate through the monitoring_stats field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesResponse 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:
class google.cloud.aiplatform_v1.services.job_service.pagers.SearchModelDeploymentMonitoringStatsAnomaliesPager(method: Callable[[...], SearchModelDeploymentMonitoringStatsAnomaliesResponse], request: SearchModelDeploymentMonitoringStatsAnomaliesRequest, response: SearchModelDeploymentMonitoringStatsAnomaliesResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through search_model_deployment_monitoring_stats_anomalies requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesResponse object, and provides an __iter__ method to iterate through its monitoring_stats field.

If there are more pages, the __iter__ method will make additional SearchModelDeploymentMonitoringStatsAnomalies requests and continue to iterate through the monitoring_stats field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesResponse 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: