# Apigee API . organizations . environments . sharedflows . deployments

## Instance Methods

Close httplib2 connections.

Lists all deployments of a shared flow in an environment.

### Method Details

`close()`

    Close httplib2 connections.

`list(parent, x__xgafv=None)`

    Lists all deployments of a shared flow in an environment.

    Args:
      parent: string, Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
        "deployments": [ # List of deployments.
          {
            "environment": "A String", # Environment.
            "instances": [ # Status reported by each runtime instance. This field is not populated in List APIs.
              { # The status of a deployment as reported by a single instance.
                "deployedRevisions": [ # Revisions currently deployed in MPs.
                  { # Revisions deployed in the MPs.
                    "revision": "A String", # The proxy revision reported as deployed.
                    "percentage": 42, # The percentage of MP replicas reporting this revision
                  },
                ],
                "instance": "A String", # ID of the instance reporting the status.
                "deployedRoutes": [ # The current routes deployed in the ingress routing table. A route which is missing will be shown with no destination environment.
                  { # A route deployed in the ingress routing table.
                    "environment": "A String", # The destination environment. This will be empty if the route is not yet reported.
                    "envgroup": "A String", # The envgroup where this route is installed.
                    "basepath": "A String", # The basepath in the routing table.
                    "percentage": 42, # The percentage of ingress replicas reporting this route.
                  },
                ],
              },
            ],
            "revision": "A String", # API proxy revision.
            "pods": [ # Status reported by runtime pods. This field is not populated for List APIs.
              {
                "statusCodeDetails": "A String", # Human-readable message associated with the status code.
                "podStatus": "A String", # Overall status of the pod (not this specific deployment). Valid values include: - `active`: Up to date. - `stale` : Recently out of date. Pods that have not reported status in a long time are excluded from the output.
                "deploymentTime": "A String", # Time the proxy was deployed in milliseconds since epoch.
                "deploymentStatus": "A String", # Status of the deployment. Valid values include: - `deployed`: Successful. - `error` : Failed. - `pending` : Pod has not yet reported on the deployment.
                "podName": "A String", # Name of the pod which is reporting the status.
                "appVersion": "A String", # Version of the application running in the pod.
                "statusCode": "A String", # Code associated with the deployment status.
                "podStatusTime": "A String", # Time the pod status was reported in milliseconds since epoch.
                "deploymentStatusTime": "A String", # Time the deployment status was reported in milliseconds since epoch.
              },
            ],
            "deployStartTime": "A String", # Time the API proxy was marked `deployed` in the control plane in millisconds since epoch.
            "routeConflicts": [ # Conflicts in the desired state routing configuration. The presence of conflicts does not cause the state to be ERROR, but it will mean that some of the deployments basepaths are not routed to its environment. If the conflicts change, the state will transition to PROGRESSING until the latest configuration is rolled out to all instances. This field is not populated in List APIs.
              { # Describes a routing conflict that may cause a deployment not to receive traffic at some basepath.
                "description": "A String", # A human-readable description of this conflict.
                "conflictingDeployment": { # A tuple representing a basepath and the deployment containing it. # The existing basepath/deployment causing the conflict.
                  "apiProxy": "A String", # The name of the deployed proxy revision containing the basepath.
                  "revision": "A String", # The name of the deployed proxy revision containing the basepath.
                  "environment": "A String", # The name of the environment in which the proxy is deployed.
                  "basepath": "A String", # The basepath receiving traffic.
                },
                "environmentGroup": "A String", # The name of the environment group in which this conflict exists.
              },
            ],
            "errors": [ # Errors reported for this deployment. Populated only when state == ERROR. This field is not populated in List APIs.
              { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
                "code": 42, # The status code, which should be an enum value of google.rpc.Code.
                "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                  {
                    "a_key": "", # Properties of the object. Contains field @type with type URL.
                  },
                ],
                "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
              },
            ],
            "state": "A String", # Current state of the deployment. This field is not populated in List APIs.
            "apiProxy": "A String", # API proxy.
          },
        ],
      }