Data pipelines API . projects . locations

Instance Methods

pipelines()

Returns the pipelines Resource.

close()

Close httplib2 connections.

listPipelines(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists pipelines. Returns a "FORBIDDEN" error if the caller doesn't have permission to access it.

listPipelines_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
listPipelines(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists pipelines. Returns a "FORBIDDEN" error if the caller doesn't have permission to access it.

Args:
  parent: string, Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. (required)
  filter: string, An expression for filtering the results of the request. If unspecified, all pipelines will be returned. Multiple filters can be applied and must be comma separated. Fields eligible for filtering are: + `type`: The type of the pipeline (streaming or batch). Allowed values are `ALL`, `BATCH`, and `STREAMING`. + `status`: The activity status of the pipeline. Allowed values are `ALL`, `ACTIVE`, `ARCHIVED`, and `PAUSED`. For example, to limit results to active batch processing pipelines: type:BATCH,status:ACTIVE
  pageSize: integer, The maximum number of entities to return. The service may return fewer than this value, even if there are additional pages. If unspecified, the max limit is yet to be determined by the backend implementation.
  pageToken: string, A page token, received from a previous `ListPipelines` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPipelines` must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for ListPipelines.
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  "pipelines": [ # Results that matched the filter criteria and were accessible to the caller. Results are always in descending order of pipeline creation date.
    { # The main pipeline entity and all the necessary metadata for launching and managing linked jobs.
      "createTime": "A String", # Output only. Immutable. The timestamp when the pipeline was initially created. Set by the Data Pipelines service.
      "displayName": "A String", # Required. The display name of the pipeline. It can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), and underscores (_).
      "jobCount": 42, # Output only. Number of jobs.
      "lastUpdateTime": "A String", # Output only. Immutable. The timestamp when the pipeline was last modified. Set by the Data Pipelines service.
      "name": "A String", # The pipeline name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID`. * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), and periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects). * `LOCATION_ID` is the canonical ID for the pipeline's location. The list of available locations can be obtained by calling `google.cloud.location.Locations.ListLocations`. Note that the Data Pipelines service is not available in all regions. It depends on Cloud Scheduler, an App Engine application, so it's only available in [App Engine regions](https://cloud.google.com/about/locations#region). * `PIPELINE_ID` is the ID of the pipeline. Must be unique for the selected project and location.
      "pipelineSources": { # Immutable. The sources of the pipeline (for example, Dataplex). The keys and values are set by the corresponding sources during pipeline creation.
        "a_key": "A String",
      },
      "scheduleInfo": { # Details of the schedule the pipeline runs on. # Internal scheduling information for a pipeline. If this information is provided, periodic jobs will be created per the schedule. If not, users are responsible for creating jobs externally.
        "nextJobTime": "A String", # Output only. When the next Scheduler job is going to run.
        "schedule": "A String", # Unix-cron format of the schedule. This information is retrieved from the linked Cloud Scheduler.
        "timeZone": "A String", # Timezone ID. This matches the timezone IDs used by the Cloud Scheduler API. If empty, UTC time is assumed.
      },
      "schedulerServiceAccountEmail": "A String", # Optional. A service account email to be used with the Cloud Scheduler job. If not specified, the default compute engine service account will be used.
      "state": "A String", # Required. The state of the pipeline. When the pipeline is created, the state is set to 'PIPELINE_STATE_ACTIVE' by default. State changes can be requested by setting the state to stopping, paused, or resuming. State cannot be changed through UpdatePipeline requests.
      "type": "A String", # Required. The type of the pipeline. This field affects the scheduling of the pipeline and the type of metrics to show for the pipeline.
      "workload": { # Workload details for creating the pipeline jobs. # Workload information for creating new jobs.
        "dataflowFlexTemplateRequest": { # A request to launch a Dataflow job from a Flex Template. # Template information and additional parameters needed to launch a Dataflow job using the flex launch API.
          "launchParameter": { # Launch Flex Template parameter. # Required. Parameter to launch a job from a Flex Template.
            "containerSpecGcsPath": "A String", # Cloud Storage path to a file with a JSON-serialized ContainerSpec as content.
            "environment": { # The environment values to be set at runtime for a Flex Template. # The runtime environment for the Flex Template job.
              "additionalExperiments": [ # Additional experiment flags for the job.
                "A String",
              ],
              "additionalUserLabels": { # Additional user labels to be specified for the job. Keys and values must follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions). An object containing a list of key/value pairs. Example: `{ "name": "wrench", "mass": "1kg", "count": "3" }`.
                "a_key": "A String",
              },
              "enableStreamingEngine": True or False, # Whether to enable Streaming Engine for the job.
              "flexrsGoal": "A String", # Set FlexRS goal for the job. https://cloud.google.com/dataflow/docs/guides/flexrs
              "ipConfiguration": "A String", # Configuration for VM IPs.
              "kmsKeyName": "A String", # Name for the Cloud KMS key for the job. Key format is: projects//locations//keyRings//cryptoKeys/
              "machineType": "A String", # The machine type to use for the job. Defaults to the value from the template if not specified.
              "maxWorkers": 42, # The maximum number of Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
              "network": "A String", # Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
              "numWorkers": 42, # The initial number of Compute Engine instances for the job.
              "serviceAccountEmail": "A String", # The email address of the service account to run the job as.
              "subnetwork": "A String", # Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL.
              "tempLocation": "A String", # The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.
              "workerRegion": "A String", # The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, defaults to the control plane region.
              "workerZone": "A String", # The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
              "zone": "A String", # The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence.
            },
            "jobName": "A String", # Required. The job name to use for the created job. For an update job request, the job name should be the same as the existing running job.
            "launchOptions": { # Launch options for this Flex Template job. This is a common set of options across languages and templates. This should not be used to pass job parameters.
              "a_key": "A String",
            },
            "parameters": { # The parameters for the Flex Template. Example: `{"num_workers":"5"}`
              "a_key": "A String",
            },
            "transformNameMappings": { # Use this to pass transform name mappings for streaming update jobs. Example: `{"oldTransformName":"newTransformName",...}`
              "a_key": "A String",
            },
            "update": True or False, # Set this to true if you are sending a request to update a running streaming job. When set, the job name should be the same as the running job.
          },
          "location": "A String", # Required. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request. For example, `us-central1`, `us-west1`.
          "projectId": "A String", # Required. The ID of the Cloud Platform project that the job belongs to.
          "validateOnly": True or False, # If true, the request is validated but not actually executed. Defaults to false.
        },
        "dataflowLaunchTemplateRequest": { # A request to launch a template. # Template information and additional parameters needed to launch a Dataflow job using the standard launch API.
          "gcsPath": "A String", # A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with 'gs://'.
          "launchParameters": { # Parameters to provide to the template being launched. # The parameters of the template to launch. This should be part of the body of the POST request.
            "environment": { # The environment values to set at runtime. # The runtime environment for the job.
              "additionalExperiments": [ # Additional experiment flags for the job.
                "A String",
              ],
              "additionalUserLabels": { # Additional user labels to be specified for the job. Keys and values should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) page. An object containing a list of key/value pairs. Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
                "a_key": "A String",
              },
              "bypassTempDirValidation": True or False, # Whether to bypass the safety checks for the job's temporary directory. Use with caution.
              "enableStreamingEngine": True or False, # Whether to enable Streaming Engine for the job.
              "ipConfiguration": "A String", # Configuration for VM IPs.
              "kmsKeyName": "A String", # Name for the Cloud KMS key for the job. The key format is: projects//locations//keyRings//cryptoKeys/
              "machineType": "A String", # The machine type to use for the job. Defaults to the value from the template if not specified.
              "maxWorkers": 42, # The maximum number of Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
              "network": "A String", # Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
              "numWorkers": 42, # The initial number of Compute Engine instances for the job.
              "serviceAccountEmail": "A String", # The email address of the service account to run the job as.
              "subnetwork": "A String", # Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL.
              "tempLocation": "A String", # The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`.
              "workerRegion": "A String", # The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, default to the control plane's region.
              "workerZone": "A String", # The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane's region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
              "zone": "A String", # The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence.
            },
            "jobName": "A String", # Required. The job name to use for the created job.
            "parameters": { # The runtime parameters to pass to the job.
              "a_key": "A String",
            },
            "transformNameMapping": { # Map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. Only applicable when updating a pipeline.
              "a_key": "A String",
            },
            "update": True or False, # If set, replace the existing pipeline with the name specified by jobName with this pipeline, preserving state.
          },
          "location": "A String", # The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.
          "projectId": "A String", # Required. The ID of the Cloud Platform project that the job belongs to.
          "validateOnly": True or False, # If true, the request is validated but not actually executed. Defaults to false.
        },
      },
    },
  ],
}
listPipelines_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.