How to use gcloud commands programmatically via - Java - google-cloud-platform

Is there an option to use gcloud commands programmatically via - Java?
I see not all of the google provided libraries have all the functionalities that are present as part of gcloud command.

Ugh :-(
You're correct but there's a better solution.
Please see this explanation:
https://cloud.google.com/apis/docs/client-libraries-explained
I discourage you from shelling out to calling the gcloud commands from Java to solve your problem and from attempting to make the calls directly.
In summary:
All of Google's services are available for all of the supported languages using the older client libraries called the API Client Libraries. The API Client Libraries are machine-generated and mostly guaranteed to perfectly reflect the underlying services:
https://developers.google.com/api-client-library/
For Google Cloud Platform, a newer (better) set of client libraries is available but, these have required hand-coding. It's not a good excuse but, because of this, these libraries have lagged their underlying services. The lag includes some services not being available in some languages, some methods of some services not being available etc.
https://cloud.google.com/apis/docs/cloud-client-libraries
So, this creates a few challenges but...
If you require one set of libraries for everything, go API Client Libraries
Otherwise:
If the Cloud Client Library is available, use it.
If the Cloud Client Library is not available, use the API Client Library.

url :
cloud.google.com/compute/docs/containers/deploying-containers
I found below description
"You can only use this feature through the Google Cloud Platform Console or the gcloud command-line tool, not the API."
here its not possible using api but only possible use gcloud command line.
so using gcloud command from java is still issue.

Related

Selling Partner API using command line interface or tool

We're new to Amazon Seller Partner-API. Need to invoke certain Amazon SP-APIs for an integration workflow. For some internal reasons, using Amazon SDKs is a secondary option. With our conventional approach, we're able to interact with most APIs, in this case the AWS Request signing & Signature generation is where we're stuck.
As per Amazon using SDK handles it all internally. Is it possible to use a command line utility like - AWS CLI to interact with SP-APIs? Not sure if this is feasible. Found this - amazon-sp-api but not sure if it is stable / reliable.
I believe there should be ways to interact with SP-API from command line. If not, atleast there should be a tool that is able to produce AWS Request signature (given the request info, key etc...).
Kindly share your experience and expertise. We're new to AWS, so if I'm confusing AWS with SP-API (esp for Request signing - I believe both use the same mechanism) pls point it out.
The link you shared to amz.tools does not look like a command line interface. It is just an SDK generated in NodeJS. There is not way to connect to the API via command line. You can use Postman if you want to avoid SDKs.
And yes, AWS is not the same thing as SP API.
You can search github for SDKs generated on other languages; some seem to have a lot of use.
We generated our own SDK in C# because others didn't fit out criteria.

Working with google cloud storage in julia applications

I have a query related to the google cloud storage for julia application.
Currently, I am hosting a julia application (docker container) on GCP and would like to allow the app to utilize cloud storage buckets to write and read the data.
I have explored few packages which promise to do this operation.
GoogleCloud.jl
This package in the docs show a clear and concise representation of the implementation. However, adding this package result in incremental compilation warning with many of the packages failing to compile. I have opened an issue on their github page : https://github.com/JuliaCloud/GoogleCloud.jl/issues/41
GCP.jl
The scope is limited, currently the only support is for BigQuery
Python package google
This is quite informative and operational but will take a toll on the code's performance. But do advise if this is the only viable option.
I would like to know are there other methods which can be used to configure a julia app to work with google storage?
Thanks look forward to the suggestions!
GCP.jl is promising plus you may be able to do with gRPC if Julia support gRPC (see below).
Discovery
Google has 2 types of SDK (aka Client Library). API Client Libraries are available for all Google's APIs|services.
Cloud Client Libraries are newer, more language idiosyncratic but only available for Cloud. Google Cloud Storage (GCS) is part of Cloud but, in this case, I think an API Client Library is worth pursuing...
Google's API (!) Client Libraries are auto-generated from a so-called Discovery document. Interestingly, GCP.jl specifically describes using Discovery to generate the BigQuery SDK and mentions that you can use the same mechanism for any other API Client Library (i.e. GCS).
NOTE Explanation of Google Discovery
I'm unfamiliar with Julia but, if you can understand enough of that repo to confirm that it's using the Discovery document to generate APIs and, if you can work out how to reconfigure it for GCS, this approach would provide you with a 100% fidelity SDK for Cloud Storage (and any other Google API|service).
Someone else tried to use the code to generate an SDK for Sheets and had an issue so it may not be perfect.
gRPC
Google publishes for the subset of its services that support gRPC. If you'd prefer to use gRPC, it ought be possible to use the Protobufs in Google's repo to define a gRPC client for Cloud Storage

Mapping dependencies/requirements for GCP APIs/services

Does anyone knows a way to map the dependencies or requirements of any GCP API?
E.g. enabling container.googleapis.com would automatically enable compute.googleapis.com and others into a same chart/table/text/anything.
The GCP docs don't specify any such dependency for any API (from what I have seen so far). So I'm either looking for a Doc which specifies this, a gcloud command or a completely different tool that can help mapping it.
We don't have any public external documentation around service dependencies for now. therefore please open a FR in refer to this link
did you open a Feature Request as suggested ? If so, can you share the link ?
As a faint consolation, you can have a look at this article from which we can tell that the API interdependency information was once available through the serviceusage API.
There you'll find a diagram as of october 2020 (see screenshot bellow)
One workaround could be to use the Service Usage API. The disable method has a disableDependentServices field which disables all services that depend on the services being disabled.
You could enable a bunch of services in GCP, disable a service, and observe which dependent services are also disabled.
I did end up opening a feature request for this and the fact that I had to do so still boggles the mind.

Talend Identity and Access Management for Talend Cloud

We are using the Talend Cloud version, so, there is TMC (Talend Management Console) instead of TAC. We need to set up authentication and authorization for our ESB services, but it is impossible within TMC. We have found Talend Identity and Access Management, but no idea if it is used for only TAC or TMC as well. Could you inform me if this Talend IAM supports TMC or not, if yes then how? If not, then which tool could be used instead?
Kind Regards
It would appear that TIA is a white labeled version of Apache Syncope. Using on-premise Talend (i.e. TAC) you could install this on the same server running TAC, however as you are using Talend Cloud this isn't an option.
It looks like you are going to need a server of some description to run TIA on, if you are using Remote Engines (which I think you much be as I don't think you can run ESB jobs on Cloud Engines yet) then I recommend you install TIA (or even the latest version of Apache Syncope as Talend can sometimes ship some pretty ancient versions of software they have white-labeled) on a remote engine.
As far as I can tell there should be no reason why your ESB jobs shouldn't be able to use TIA (or Syncope) provided the appropriate firewall rules are in place.

Consume WSDL using SOAP client using dynamic proxy

I m trying to consume my web service using dynamic proxy where i get my interfaces at compile time and Services get fetched at the run time.
Documentation provides me wscompile command to generate the endpoint interfaces but this command don't exist in my system.
Need Help!!!!!
Well regarding:
Documentation provides me wscompile command to generate the endpoint interfaces but this command don't exist in my system.
Instead of wscompile, you could also use wsimport which is included in the Java JDK.
(if you ask about the difference: What is the difference between wscompile and wsimport?)