Cloud Run Admin API . namespaces . routes

Instance Methods

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Get information about a route.

list(parent, continue=None, fieldSelector=None, includeUninitialized=None, labelSelector=None, limit=None, resourceVersion=None, watch=None, x__xgafv=None)

List routes.

Method Details

close()
Close httplib2 connections.
get(name, x__xgafv=None)
Get information about a route.

Args:
  name: string, The name of the route to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Route is responsible for configuring ingress over a collection of Revisions. Some of the Revisions a Route distributes traffic over may be specified by referencing the Configuration responsible for creating them; in these cases the Route is additionally responsible for monitoring the Configuration for "latest ready" revision changes, and smoothly rolling out latest revisions. Cloud Run currently supports referencing a single Configuration to automatically deploy the "latest ready" Revision from that Configuration.
  "apiVersion": "A String", # The API version for this call such as "serving.knative.dev/v1".
  "kind": "A String", # The kind of this resource, in this case always "Route".
  "metadata": { # google.cloud.run.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. # Metadata associated with this Route, including name, namespace, labels, and annotations.
    "annotations": { # Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.
      "a_key": "A String",
    },
    "clusterName": "A String", # Not supported by Cloud Run
    "creationTimestamp": "A String", # UTC timestamp representing the server time when this object was created.
    "deletionGracePeriodSeconds": 42, # Not supported by Cloud Run
    "deletionTimestamp": "A String", # The read-only soft deletion timestamp for this resource. In Cloud Run, users are not able to set this field. Instead, they must call the corresponding Delete API.
    "finalizers": [ # Not supported by Cloud Run
      "A String",
    ],
    "generateName": "A String", # Not supported by Cloud Run
    "generation": 42, # A system-provided sequence number representing a specific generation of the desired state.
    "labels": { # Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes.
      "a_key": "A String",
    },
    "name": "A String", # Required. The name of the resource. Name is required when creating top-level resources (Service, Job), must be unique within a Cloud Run project/region, and cannot be changed once created.
    "namespace": "A String", # Required. Defines the space within each name must be unique within a Cloud Run region. In Cloud Run, it must be project ID or number.
    "ownerReferences": [ # Not supported by Cloud Run
      { # This is not supported or used by Cloud Run.
        "apiVersion": "A String", # This is not supported or used by Cloud Run.
        "blockOwnerDeletion": True or False, # This is not supported or used by Cloud Run.
        "controller": True or False, # This is not supported or used by Cloud Run.
        "kind": "A String", # This is not supported or used by Cloud Run.
        "name": "A String", # This is not supported or used by Cloud Run.
        "uid": "A String", # This is not supported or used by Cloud Run.
      },
    ],
    "resourceVersion": "A String", # Opaque, system-generated value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server or omit the value to disable conflict-detection.
    "selfLink": "A String", # URL representing this object.
    "uid": "A String", # Unique, system-generated identifier for this resource.
  },
  "spec": { # RouteSpec holds the desired state of the Route (from the client). # Spec holds the desired state of the Route (from the client).
    "traffic": [ # Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Cloud Run currently supports a single configurationName.
      { # TrafficTarget holds a single entry of the routing table for a Route.
        "configurationName": "A String", # [Deprecated] Not supported in Cloud Run. It must be empty.
        "latestRevision": True or False, # Uses the "status.latestReadyRevisionName" of the Service to determine the traffic target. When it changes, traffic will automatically migrate from the prior "latest ready" revision to the new one. This field must be false if RevisionName is set. This field defaults to true otherwise. If the field is set to true on Status, this means that the Revision was resolved from the Service's latest ready revision.
        "percent": 42, # Percent specifies percent of the traffic to this Revision or Configuration. This defaults to zero if unspecified.
        "revisionName": "A String", # Points this traffic target to a specific Revision. This field is mutually exclusive with latest_revision.
        "tag": "A String", # Tag is used to expose a dedicated url for referencing this target exclusively.
        "url": "A String", # Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. https://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)
      },
    ],
  },
  "status": { # RouteStatus communicates the observed state of the Route (from the controller). # Status communicates the observed state of the Route (from the controller).
    "address": { # Information for connecting over HTTP(s). # Similar to url, information on where the service is available on HTTP.
      "url": "A String",
    },
    "conditions": [ # Conditions communicates information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.
      { # Conditions show the status of reconciliation progress on a given resource. Most resource use a top-level condition type "Ready" or "Completed" to show overall status with other conditions to checkpoint each stage of reconciliation. Note that if metadata.Generation does not equal status.ObservedGeneration, the conditions shown may not be relevant for the current spec.
        "lastTransitionTime": "A String", # Optional. Last time the condition transitioned from one status to another.
        "message": "A String", # Optional. Human readable message indicating details about the current status.
        "reason": "A String", # Optional. One-word CamelCase reason for the condition's last transition. These are intended to be stable, unique values which the client may use to trigger error handling logic, whereas messages which may be changed later by the server.
        "severity": "A String", # Optional. How to interpret this condition. One of Error, Warning, or Info. Conditions of severity Info do not contribute to resource readiness.
        "status": "A String", # Status of the condition, one of True, False, Unknown.
        "type": "A String", # type is used to communicate the status of the reconciliation process. Types common to all resources include: * "Ready" or "Completed": True when the Resource is ready.
      },
    ],
    "observedGeneration": 42, # ObservedGeneration is the 'Generation' of the Route that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False. Note that providing a TrafficTarget that has latest_revision=True will result in a Route that does not increment either its metadata.generation or its observedGeneration, as new "latest ready" revisions from the Configuration are processed without an update to the Route's spec.
    "traffic": [ # Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that was last observed.
      { # TrafficTarget holds a single entry of the routing table for a Route.
        "configurationName": "A String", # [Deprecated] Not supported in Cloud Run. It must be empty.
        "latestRevision": True or False, # Uses the "status.latestReadyRevisionName" of the Service to determine the traffic target. When it changes, traffic will automatically migrate from the prior "latest ready" revision to the new one. This field must be false if RevisionName is set. This field defaults to true otherwise. If the field is set to true on Status, this means that the Revision was resolved from the Service's latest ready revision.
        "percent": 42, # Percent specifies percent of the traffic to this Revision or Configuration. This defaults to zero if unspecified.
        "revisionName": "A String", # Points this traffic target to a specific Revision. This field is mutually exclusive with latest_revision.
        "tag": "A String", # Tag is used to expose a dedicated url for referencing this target exclusively.
        "url": "A String", # Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. https://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)
      },
    ],
    "url": "A String", # URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form: `https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app`
  },
}
list(parent, continue=None, fieldSelector=None, includeUninitialized=None, labelSelector=None, limit=None, resourceVersion=None, watch=None, x__xgafv=None)
List routes.

Args:
  parent: string, The namespace from which the routes should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID (required)
  continue: string, Optional. Encoded string to continue paging.
  fieldSelector: string, Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.
  includeUninitialized: boolean, Not currently used by Cloud Run.
  labelSelector: string, Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.
  limit: integer, Optional. The maximum number of records that should be returned.
  resourceVersion: string, The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.
  watch: boolean, Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # ListRoutesResponse is a list of Route resources.
  "apiVersion": "A String", # The API version for this call such as "serving.knative.dev/v1".
  "items": [ # List of Routes.
    { # Route is responsible for configuring ingress over a collection of Revisions. Some of the Revisions a Route distributes traffic over may be specified by referencing the Configuration responsible for creating them; in these cases the Route is additionally responsible for monitoring the Configuration for "latest ready" revision changes, and smoothly rolling out latest revisions. Cloud Run currently supports referencing a single Configuration to automatically deploy the "latest ready" Revision from that Configuration.
      "apiVersion": "A String", # The API version for this call such as "serving.knative.dev/v1".
      "kind": "A String", # The kind of this resource, in this case always "Route".
      "metadata": { # google.cloud.run.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. # Metadata associated with this Route, including name, namespace, labels, and annotations.
        "annotations": { # Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.
          "a_key": "A String",
        },
        "clusterName": "A String", # Not supported by Cloud Run
        "creationTimestamp": "A String", # UTC timestamp representing the server time when this object was created.
        "deletionGracePeriodSeconds": 42, # Not supported by Cloud Run
        "deletionTimestamp": "A String", # The read-only soft deletion timestamp for this resource. In Cloud Run, users are not able to set this field. Instead, they must call the corresponding Delete API.
        "finalizers": [ # Not supported by Cloud Run
          "A String",
        ],
        "generateName": "A String", # Not supported by Cloud Run
        "generation": 42, # A system-provided sequence number representing a specific generation of the desired state.
        "labels": { # Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes.
          "a_key": "A String",
        },
        "name": "A String", # Required. The name of the resource. Name is required when creating top-level resources (Service, Job), must be unique within a Cloud Run project/region, and cannot be changed once created.
        "namespace": "A String", # Required. Defines the space within each name must be unique within a Cloud Run region. In Cloud Run, it must be project ID or number.
        "ownerReferences": [ # Not supported by Cloud Run
          { # This is not supported or used by Cloud Run.
            "apiVersion": "A String", # This is not supported or used by Cloud Run.
            "blockOwnerDeletion": True or False, # This is not supported or used by Cloud Run.
            "controller": True or False, # This is not supported or used by Cloud Run.
            "kind": "A String", # This is not supported or used by Cloud Run.
            "name": "A String", # This is not supported or used by Cloud Run.
            "uid": "A String", # This is not supported or used by Cloud Run.
          },
        ],
        "resourceVersion": "A String", # Opaque, system-generated value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server or omit the value to disable conflict-detection.
        "selfLink": "A String", # URL representing this object.
        "uid": "A String", # Unique, system-generated identifier for this resource.
      },
      "spec": { # RouteSpec holds the desired state of the Route (from the client). # Spec holds the desired state of the Route (from the client).
        "traffic": [ # Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Cloud Run currently supports a single configurationName.
          { # TrafficTarget holds a single entry of the routing table for a Route.
            "configurationName": "A String", # [Deprecated] Not supported in Cloud Run. It must be empty.
            "latestRevision": True or False, # Uses the "status.latestReadyRevisionName" of the Service to determine the traffic target. When it changes, traffic will automatically migrate from the prior "latest ready" revision to the new one. This field must be false if RevisionName is set. This field defaults to true otherwise. If the field is set to true on Status, this means that the Revision was resolved from the Service's latest ready revision.
            "percent": 42, # Percent specifies percent of the traffic to this Revision or Configuration. This defaults to zero if unspecified.
            "revisionName": "A String", # Points this traffic target to a specific Revision. This field is mutually exclusive with latest_revision.
            "tag": "A String", # Tag is used to expose a dedicated url for referencing this target exclusively.
            "url": "A String", # Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. https://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)
          },
        ],
      },
      "status": { # RouteStatus communicates the observed state of the Route (from the controller). # Status communicates the observed state of the Route (from the controller).
        "address": { # Information for connecting over HTTP(s). # Similar to url, information on where the service is available on HTTP.
          "url": "A String",
        },
        "conditions": [ # Conditions communicates information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.
          { # Conditions show the status of reconciliation progress on a given resource. Most resource use a top-level condition type "Ready" or "Completed" to show overall status with other conditions to checkpoint each stage of reconciliation. Note that if metadata.Generation does not equal status.ObservedGeneration, the conditions shown may not be relevant for the current spec.
            "lastTransitionTime": "A String", # Optional. Last time the condition transitioned from one status to another.
            "message": "A String", # Optional. Human readable message indicating details about the current status.
            "reason": "A String", # Optional. One-word CamelCase reason for the condition's last transition. These are intended to be stable, unique values which the client may use to trigger error handling logic, whereas messages which may be changed later by the server.
            "severity": "A String", # Optional. How to interpret this condition. One of Error, Warning, or Info. Conditions of severity Info do not contribute to resource readiness.
            "status": "A String", # Status of the condition, one of True, False, Unknown.
            "type": "A String", # type is used to communicate the status of the reconciliation process. Types common to all resources include: * "Ready" or "Completed": True when the Resource is ready.
          },
        ],
        "observedGeneration": 42, # ObservedGeneration is the 'Generation' of the Route that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False. Note that providing a TrafficTarget that has latest_revision=True will result in a Route that does not increment either its metadata.generation or its observedGeneration, as new "latest ready" revisions from the Configuration are processed without an update to the Route's spec.
        "traffic": [ # Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that was last observed.
          { # TrafficTarget holds a single entry of the routing table for a Route.
            "configurationName": "A String", # [Deprecated] Not supported in Cloud Run. It must be empty.
            "latestRevision": True or False, # Uses the "status.latestReadyRevisionName" of the Service to determine the traffic target. When it changes, traffic will automatically migrate from the prior "latest ready" revision to the new one. This field must be false if RevisionName is set. This field defaults to true otherwise. If the field is set to true on Status, this means that the Revision was resolved from the Service's latest ready revision.
            "percent": 42, # Percent specifies percent of the traffic to this Revision or Configuration. This defaults to zero if unspecified.
            "revisionName": "A String", # Points this traffic target to a specific Revision. This field is mutually exclusive with latest_revision.
            "tag": "A String", # Tag is used to expose a dedicated url for referencing this target exclusively.
            "url": "A String", # Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. https://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)
          },
        ],
        "url": "A String", # URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form: `https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app`
      },
    },
  ],
  "kind": "A String", # The kind of this resource, in this case always "RouteList".
  "metadata": { # Metadata for synthetic resources like List. In Cloud Run, all List Resources Responses will have a ListMeta instead of ObjectMeta. # Metadata associated with this Route list.
    "continue": "A String", # Continuation token is a value emitted when the count of items is larger than the user/system limit. To retrieve the next page of items, pass the value of `continue` as the next request's `page_token`.
    "resourceVersion": "A String", # Opaque string that identifies the server's internal version of this object. It can be used by clients to determine when objects have changed. If the message is passed back to the server, it must be left unmodified.
    "selfLink": "A String", # URL representing this object.
  },
  "unreachable": [ # Locations that could not be reached.
    "A String",
  ],
}