class_docstr: Creates a new Data Pipelines instance from the Data Pipelines API.
  
  :param body: The request body (contains instance of Pipeline). See:
      https://cloud.google.com/dataflow/docs/reference/data-pipelines/rest/v1/projects.locations.pipelines/create#request-body
  :param project_id: The ID of the GCP project that owns the job.
  :param location: The location to direct the Data Pipelines instance to (for example us-central1).
  :param gcp_conn_id: The connection ID to connect to the Google Cloud
      Platform.
  :param impersonation_chain: Optional service account to impersonate using short-term
      credentials, or chained list of accounts required to get the access_token
      of the last account in the list, which will be impersonated in the request.
      If set as a string, the account must grant the originating account
      the Service Account Token Creator IAM role.
      If set as a sequence, the identities from the list must grant
      Service Account Token Creator IAM role to the directly preceding identity, with first
      account from the list granting this role to the originating account (templated).
  
      .. warning::
          This option requires Apache Beam 2.39.0 or newer.
  
  Returns the created Data Pipelines instance in JSON representation.
class_docstr_tok: ["Creates","a","new","Data","Pipelines","instance","from","the","Data","Pipelines","API",".",":","param","body",":","The","request","body","(","contains","instance","of","Pipeline",")",".","See",":","https",":","\/\/cloud.google.com\/dataflow\/docs\/reference\/data-pipelines\/rest\/v1\/projects.locations.pipelines\/create","#","request-body",":","param","project_id",":","The","ID","of","the","GCP","project","that","owns","the","job",".",":","param","location",":","The","location","to","direct","the","Data","Pipelines","instance","to","(","for","example","us-central1",")",".",":","param","gcp_conn_id",":","The","connection","ID","to","connect","to","the","Google","Cloud","Platform",".",":","param","impersonation_chain",":","Optional","service","account","to","impersonate","using","short-term","credentials",",","or","chained","list","of","accounts","required","to","get","the","access_token","of","the","last","account","in","the","list",",","which","will","be","impersonated","in","the","request",".","If","set","as","a","string",",","the","account","must","grant","the","originating","account","the","Service","Account","Token","Creator","IAM","role",".","If","set","as","a","sequence",",","the","identities","from","the","list","must","grant","Service","Account","Token","Creator","IAM","role","to","the","directly","preceding","identity",",","with","first","account","from","the","list","granting","this","role","to","the","originating","account","(","templated",")",".","..","warning",":",":","This","option","requires","Apache","Beam","2.39.0","or","newer",".","Returns","the","created","Data","Pipelines","instance","in","JSON","representation","."]
code: def execute(self, context: Context):
      if self.body is None:
          raise AirflowException(
              "Request Body not given; cannot create a Data Pipeline without the Request Body."
          )
      if self.project_id is None:
          raise AirflowException(
              "Project ID not given; cannot create a Data Pipeline without the Project ID."
          )
      if self.location is None:
          raise AirflowException(
              "location not given; cannot create a Data Pipeline without the location."
          )
  
      self.datapipeline_hook = DataPipelineHook(
          gcp_conn_id=self.gcp_conn_id,
          impersonation_chain=self.impersonation_chain,
      )
  
      self.data_pipeline = self.datapipeline_hook.create_data_pipeline(
          project_id=self.project_id,
          body=self.body,
          location=self.location,
      )
      if self.data_pipeline:
          if "error" in self.data_pipeline:
              raise AirflowException(
                  self.data_pipeline.get("error").get("message")
              )
  
      return self.data_pipeline
  
file_path: airflow/airflow/providers/google/cloud/operators/datapipeline.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Sequence
  from airflow.exceptions import AirflowException
  from airflow.providers.google.cloud.hooks.datapipeline import DEFAULT_DATAPIPELINE_LOCATION, DataPipelineHook
  from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
label_desc: Use image node_id 2 for calling the CreateDataPipelineOperator obj's underlying member method code with example usage: obj.execute(context) and returns: self