title: How to properly extract endpoint id from gcp_resources of a Vertex AI pipeline on GCP?
body: <p>I am using GCP Vertex AI pipeline (KFP) and using <code>google-cloud-aiplatform==1.10.0</code>, <code>kfp==1.8.11</code>, <code>google-cloud-pipeline-components==0.2.6</code>
  In a component I am getting a gcp_resources <a href="https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/proto/README.md" rel="nofollow noreferrer">documentation</a> :</p>
  <pre><code>gcp_resources (str):
              Serialized gcp_resources proto tracking the create endpoint's long running operation.
  </code></pre>
  <p>To extract the endpoint_id to do online prediction of my deployed model, I am doing:</p>
  <pre><code>from google_cloud_pipeline_components.proto.gcp_resources_pb2 import GcpResources
  from google.protobuf.json_format import Parse
  input_gcp_resources = Parse(endpoint_ressource_name, GcpResources())
  gcp_resources=input_gcp_resources.resources.__getitem__(0).resource_uri.split('/')
  endpoint_id=gcp_resources[gcp_resources.index('endpoints')+1]
  </code></pre>
  <p>Is there a better/native way of extracting such info ?</p>