Reputation: 737
Hi i am new to Google Cloud Platform and Cloud Composer.
I want to create Cloud Composer Environment using code. But before that i have following questions:
Please help me to understand it better.
Upvotes: 0
Views: 469
Reputation: 2331
Disclaimer: Without seeing an error, it's hard to say why whatever you are trying is not working. If you can share any code it will be useful.
The Composer API has methods to do CRUD on environments. You can create a new environment with environments.create
. In fact, there's a Try API section on that page to allow you to try the call from the documentation.
Making the request via the API should be pretty easy. Mainly you'll need to specify an Environment
and most of what you will want to set is going to be in the ClusterConfig
. Do take note that a lot of the fields are output only, so you do not need to specify them in your request. Also mind the URL syntax - you will need to adapt it to your specific request.
My guess on why it's not working - have you ensured the API is enabled? As for the Python client libraries - it looks like they need to be regenerated.
Having said all of that, what's the use case to create an environment via the API? Generally most environments are left running persistently, meaning the create call is an atomic one-time operation for most people.
Upvotes: 2