# Apigee API . organizations . environments . flowhooks

## Instance Methods

Attaches a shared flow to a flow hook.

Close httplib2 connections.

Detaches a shared flow from a flow hook.

Returns the name of the shared flow attached to the specified flow hook. If there's no shared flow attached to the flow hook, the API does not return an error; it simply does not return a name in the response.

### Method Details

`attachSharedFlowToFlowHook(name, body=None, x__xgafv=None)`

    Attaches a shared flow to a flow hook.

    Args:
      name: string, Required. Name of the flow hook to which the shared flow should be attached in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}` (required)
      body: object, The request body.
        The object takes the form of:

    {
      "flowHookPoint": "A String", # Output only. Where in the API call flow the flow hook is invoked. Must be one of `PreProxyFlowHook`, `PostProxyFlowHook`, `PreTargetFlowHook`, or `PostTargetFlowHook`.
      "description": "A String", # Description of the flow hook.
      "continueOnError": True or False, # Optional. Flag that specifies whether execution should continue if the flow hook throws an exception. Set to `true` to continue execution. Set to `false` to stop execution if the flow hook throws an exception.Defaults to `true`.
      "sharedFlow": "A String", # Shared flow attached to this flow hook, or empty if there is none attached.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
        "flowHookPoint": "A String", # Output only. Where in the API call flow the flow hook is invoked. Must be one of `PreProxyFlowHook`, `PostProxyFlowHook`, `PreTargetFlowHook`, or `PostTargetFlowHook`.
        "description": "A String", # Description of the flow hook.
        "continueOnError": True or False, # Optional. Flag that specifies whether execution should continue if the flow hook throws an exception. Set to `true` to continue execution. Set to `false` to stop execution if the flow hook throws an exception.Defaults to `true`.
        "sharedFlow": "A String", # Shared flow attached to this flow hook, or empty if there is none attached.
      }

`close()`

    Close httplib2 connections.

`detachSharedFlowFromFlowHook(name, x__xgafv=None)`

    Detaches a shared flow from a flow hook.

    Args:
      name: string, Required. Name of the flow hook to detach in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
        "flowHookPoint": "A String", # Output only. Where in the API call flow the flow hook is invoked. Must be one of `PreProxyFlowHook`, `PostProxyFlowHook`, `PreTargetFlowHook`, or `PostTargetFlowHook`.
        "description": "A String", # Description of the flow hook.
        "continueOnError": True or False, # Optional. Flag that specifies whether execution should continue if the flow hook throws an exception. Set to `true` to continue execution. Set to `false` to stop execution if the flow hook throws an exception.Defaults to `true`.
        "sharedFlow": "A String", # Shared flow attached to this flow hook, or empty if there is none attached.
      }

`get(name, x__xgafv=None)`

    Returns the name of the shared flow attached to the specified flow hook. If there's no shared flow attached to the flow hook, the API does not return an error; it simply does not return a name in the response.

    Args:
      name: string, Required. Name of the flow hook in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
        "flowHookPoint": "A String", # Output only. Where in the API call flow the flow hook is invoked. Must be one of `PreProxyFlowHook`, `PostProxyFlowHook`, `PreTargetFlowHook`, or `PostTargetFlowHook`.
        "description": "A String", # Description of the flow hook.
        "continueOnError": True or False, # Optional. Flag that specifies whether execution should continue if the flow hook throws an exception. Set to `true` to continue execution. Set to `false` to stop execution if the flow hook throws an exception.Defaults to `true`.
        "sharedFlow": "A String", # Shared flow attached to this flow hook, or empty if there is none attached.
      }