rajeshkalyankar
Intern
Intern
  • UID5858
  • Fans0
  • Follows0
  • Posts4
Reads:165Replies:7

How to pass Proxy details for Create Instance

Created#
More Posted time:Jul 11, 2018 0:45 AM
Hi,


I am using the Java SDK for create instance. I want to know how to pass the proxy details in SDK call. I didnt find any documentation regarding passing proxy details in SDK call.

JohnHanley
Assistant Engineer
Assistant Engineer
  • UID5606
  • Fans1
  • Follows1
  • Posts52
1st Reply#
Posted time:Jul 11, 2018 1:07 AM
What do you mean by "Proxy for ECS Service"?

rajeshkalyankar
Intern
Intern
  • UID5858
  • Fans0
  • Follows0
  • Posts4
2nd Reply#
Posted time:Jul 11, 2018 1:31 AM
I mean to say How to pass proxy details in SDK call. I am working on Java SDK to create instance but I have a proxy configured in my system so every call needs to go through proxy only. So how can I pass proxy details while making SDK call. In documentation I didnt find any info for this.

JohnHanley
Assistant Engineer
Assistant Engineer
  • UID5606
  • Fans1
  • Follows1
  • Posts52
3rd Reply#
Posted time:Jul 11, 2018 4:15 AM
Hi,

I still don't understand what you are trying to accomplish. Can you provide more details? What is "my system"?

When you say "I have a proxy configured in my system" how does that affect creating an ECS instance in Java? The ECS SDK does not care about nor support application level configuration of your instances. If you have user level configuration that needs to be done once an instance is created look at passing "User Data" to the instance. https://www.alibabacloud.com/help/faq-detail/49121.htm

If instead you mean that you have designed a proxy that is the front-end to the Alibaba API, then you will need to configure your proxy settings in the application that calls your front-end. I am not aware of any APIs in the SDK libraries that support proxy configurations for endpoints (I may be wrong here but I have studied the Python SDK source code).

rajeshkalyankar
Intern
Intern
  • UID5858
  • Fans0
  • Follows0
  • Posts4
4Floor#
Posted time:Jul 11, 2018 16:25 PM
Yes like you stated I have proxy configured front-end to the Alibaba API. I checked in Java SDK  I didnt find anywhere that how to configure proxy details in SDK call. While making the SDK calls I am getting following error "com.aliyuncs.exceptions.ClientException: SDK.UnsupportedEncoding : Can not parse response due to un supported encoding.". If there is no proxy SDK call createing instance with proxy I am getting error.

JohnHanley
Assistant Engineer
Assistant Engineer
  • UID5606
  • Fans1
  • Follows1
  • Posts52
5Floor#
Posted time:Jul 11, 2018 16:35 PM
What you want to do is unsupported (I think). I would open a support ticked and see if there are future plans for proxy support. You could modify the SDK yourself and add proxy support. Otherwise you will need to rethink your current design.

rajeshkalyankar
Intern
Intern
  • UID5858
  • Fans0
  • Follows0
  • Posts4
6Floor#
Posted time:Jul 11, 2018 18:36 PM
Thanks for the reply. If you have any working code or document to modify the SDK to configure proxy that will be helpful.

JohnHanley
Assistant Engineer
Assistant Engineer
  • UID5606
  • Fans1
  • Follows1
  • Posts52
7Floor#
Posted time:Jul 12, 2018 5:22 AM
I don't have any documents for modifying the SDK to support proxy configurations. I don't see proxy requirements at all these days (at least in the US). A suggestion might be to contact the proxy software / hardware vendor and see how they can help you pass thru API calls.

I would open a ticket from the Alibaba Console. They might be able to put you in touch with a product manager that can make resources available for you. Spend a few minutes and put together your business use case so that they can see value in what you need.
Guest