Skip to content

How to update <HTTPTargetConnection> in Apigee Edge Proxy Dynamically or Runtime? #214

@gg-gg-v1

Description

@gg-gg-v1

I am deploying some service called MyService on Ec2 and got the ip or url let's say https://myservice.com

Now I want to use this url https://myservice.com in apigee edge runtime,

Let's say, Below is Apigee Edge Proxy Project Structure.

apiproxy
  - policies
    - somepolicy
  - proxies
    - default.xml
  - targets
    - default.xml
  apiproxy.xml

In below xml file from targets/default.xml, I want to replace https://example.com url Dynamically or Runtime with the url (https://myservice.com) which I got when I deployed the Service called MyService on ec2.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
  <PreFlow name="PreFlow">
    <Request/>
    <Response/>
  </PreFlow>
  <Flows/>
  <PostFlow name="PostFlow">
    <Request/>
    <Response/>
  </PostFlow>
  <HTTPTargetConnection>
    <URL>https://example.com</URL>
  </HTTPTargetConnection>
</TargetEndpoint>

Main reason behind updating this url runtime is:

In my network, we are updating urls on daily basis of the services which are deployed on ec2, here for example, it is MyService on ec2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions