I have a very basic REST API that provides some information, which was written with JAX-RS.
Now I want to implement some azure cli commands, like az acr repository list as well as kubectl.
I found the Azure Java SDK, and read its API reference, but I couldn't figure out how I will basically list the repositories.
Kubernetes example is much better, but I am stuck with Azure Container Registry.
Basically I am asking a code sample (reference), or tutorial, or guidance.
Whatever my experience of using Azure docs, it's little hard to find API doc which will work for you and you may found some discrepancies between docs like one of API via cli vs sdk behaves different.
As per my work with various clouds, most of the cloud clients are inclined to use python SDKs. 3-4 ago, I had used java for openstack, now python. For VCloud, used java but now moving to python, in fact they stopped to provide java sdk.
Hope you have got some pointers.
Related
I'm on a student research team currently working on a Java project in which we want to be able to gather some info about specific external programs in CentOS 7. Some potential examples of data we might want to gather would be the URL from firefox, or the coordinates from Google Earth. Thus far, looking into how to implement this has mostly led me to using JNA and ptrace.
Is this a good route to take to tackle this problem? And if so, what can I use to find the location of specific information about the programs in memory?
JNA and ptrace are quite low level things. To run system applications you should use:
exec method of Runtime class
Apache Common Exec
Last one is more useful.
But it seems you don't need to run any application at all. To get information from Google Earth you can just use special web API - Google Maps APIs Web Services. If you want to send HTTP request you should try Apache Http Client. It's very powerful library and i'm pretty sure it's all for you need.
PS. More convenient client Java Client for Google Maps Services
PS1. I think java is the worst choice to work with OS and native applications. I see 2 ways to use it:
write agent on C/C++ which will be gather this information for java manager. It's a hard way
use hacks and tricks like here is there a way to get the url from current tab in google-chrome or here Possible to catch URLs in linux?. It's more easy but you will have restricted amount these hacks. And it will work not for all applications and cases.
I am new to Google cloud platform and is working on developing Google app engine app in standard Java environment. For some of the part, I require using Google cloud pub/sub. Looking at the resources available, I feel that pub/sub can only be integrated in the flexible environment. Can someone please tell if it is possible to integrate pub/sub in the standard environment and if yes then how?
For standard environment try this client https://developers.google.com/api-client-library/java/apis/pubsub/v1.
IOM somewhat limited but it works.
For some reason I cannot find the official examples anymore, Google has probably removed them, which is pretty evil since the cloud pub sub library doesn't work in standard env plus the fact that cloud pub sub library is still in alpha which to is a reason not to use i t for production.
Found this, should help you on the way:
http://book2s.com/java/src/package/com/google/cloud/pubsub/client/demos/appengine/util/pubsubutils.html
In my Java Application I want to use Oracle Responsys to trigger individual email in response to some activity detected by my web site
Oracle Responsys is completely new for me and not able find out where to start.
I got SOAP API Developer’s Guide — Standard documentation, and trying to figure out myself. But seems to be I am not understanding the core concept of how to integrate Oracle Responsys in my application.
Please help on how to integrate Oracle Responsys into my web application? I am not able to find any Java SDK for Oracle Responsys, is there one available? If available from where I can get it?
I am not understanding the core concept of how to integrate Oracle Responsys in my application.
The "core concept" is that your application sends requests to the Responsys server's API over HTTP / HTTPS. Your application can (in theory) do this directly by crafting HTTP requests with the correct parameters / payloads / etc, and then parsing the results. Alternatively, it can use either a generic framework (such as JAX-WS), or a specific client library to do most of the tedious stuff for you.
I am not able to find any Java SDK for Oracle Responsys, is there one available.
Responsys provides both REST and SOAP based APIs, but at this time they don't appear to provide any (official) Java client-side libraries for either API.
I did find some 3rd-party client libraries on Github. Rather than listing them, I suggest that you Google for responsys api github and start trawling the search results.
Questions that ask for recommendations on StackOverflow, are off topic, so I'm assuming that you are not asking for one. But, you will need to do your own assessment of the completeness and fitness for purpose of the various library alternatives.
I am attempting to create a program that can manage EC2 instances (create, stop, terminate). I am unfamiliar with the service, and after looking through documentation and searching the web have not found any general advice on creating a management service. My questions are:
What programming environment/language would best be suited to creating a management program?
How can this program interact with EC2 instances? (I've looked into AWS EC2 command line tools. Can these be used from a program to create/terminate instances?)
Any general advice in accomplishing this is appreciated (links to examples especially).
What programming environment/language would best be suited to creating a management program?
This question cannot be answered in a definite way, rather you should either choose the language you are most comfortable with or that's best suited to your environment/team instead - there are plenty to choose from, most popular major languages are covered by a dedicated SDK (currently Java, .NET, Node.js, Python, PHP, Ruby), see Tools for Amazon Web Services for the detailed listing and links to further information about each.
Please note that there are also two IDE Toolkits listed that might make it easier to get started if you happen to develop in Java or C#, specifically the AWS Toolkit for Eclipse and the AWS Toolkit for Microsoft Visual Studio.
How can this program interact with EC2 instances?
All the SDKs (and also the command line tools build on top of these) do use the AWS APIs to interact with the respective services (each one has a separate API, but most of them are structured very similar), see Documentation for a listing of all currently available services and links to their documentation:
Welcome to the Amazon Web Services (AWS) Documentation. Whether you are new to AWS or an advanced user, you can find useful information about the services ranging from introductions to advanced features.
To learn how you can get started with AWS, see our Getting Started with AWS guide. If you are interested in learning more about our AWS Free Usage Tier, see our AWS free usage tier article.
I guess you are new to the cloud and aws world, you can use AWS Command line tools to management the services. Also to make things pretty simpler you can make use of the readily available aws management console if you are only worry is to start, stop or terminate the instance. Also people have build some thing called Config management system like opscode chef which is built of ruby or you can use puppet built of puppet lab's custom DSL.
I am not sure if you really need a program to do that. The Amazon Management Console ( https://console.aws.amazon.com ) is pretty straight forward, simple to use, you can spin thousands of instances in a very short time. I created 20 instances in about 3 minutes and deleted(terminated) 9 during my first interaction with the technology. Would you provide a use case where this is necessary? Its like you want to create a missile to kill a chicken(rather than buy a knife)
HTH, Thanks,
Bles
I used to work on a project that deals a lot with EC2 and one of my responsibility was to manage instances remotly( deploy/start/stor/reboot). I used Java and the Amazon API to write a communication module for the application.
In addition I made a few general ant scripts to deal with code that has to be deploed into an instance. Kind a old fashion way, but works perfectly :)
Basically I would like a TFS SDK that I can uses to retrieve files from source control.
Does something like this exist for Java? My searching only returned results from 2007 about rumors that Teamprise was working on a SDK.
You can now download a TFS SDK for Java provided by Microsoft here.
I don't know about an SDK, but if you connect to the TFS URL, you will see that it's actually a standard SOAP webservice with functions pretty much matching the .NET SDK functions 1:1. The rest should be straightforward.
Teamprise plugin is now called "Team Explorer Everywhere" and has a java based command line client (TEE-CLC), also have a look at SvnBridge which would let you use subclipse/other svn clients to connect to TFS.
Another way, suggested by Robaticus in comments is to use the command line utilities that come with TFS. Simple and reliable, although less integration.
Added: The CLI utilities come with TFS itself. A quick google query reveals the official documentation.
A third possibility that came to my mind is to use a Java-to-.NET bridge. There are a few to choose from. This way you can use the original MS libraries.