Support Questions

Find answers, ask questions, and share your expertise

Cloudera Director: How to update the environment settings for Azure

avatar
New Contributor

We deployed cloudera cluster using Director on Azure, but our account information is no longer valid.  How can we update the client information (what format is needed to do this either through the GUI, or via the REST API or from CLI).

 

We were trying to use this method:

/api/v5/environments/{name}/provider/credentials

 

api1.png

 

so far none of the formats for the put body have been successful.  and the documentation is missing a schema example of how to construct the JSON.

 

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Due to a bug, the UI is displaying only properties marked as sensitive, despite the fact that other properties are required. As a workaround, you can use the API console to update the credentials.

 

Go to the Environments section of the API console.
Open the Get /api/v5/environments section, and click Try it out! to list the environments.
Copy the environment name for the environment in which you want to update the credentials.
Open the Get /api/v5/environments/{name} section, paste the environment name into the name parameter box, and click Try it out! to display the environment.
Copy the config block of the JSON (should have keys like tenantId, etc.). You only want the curly braces and content, not the "config": key.
Open the Put /api/v5/environments/{name}/provider/credentials section, paste the JSON block, remove the line containing the region (*see below for an explanation), and replace the REDACTED value of clientSecret with the new value. Click Try it out! to update the credentials. On success, you should get a 202 response code. For other response codes, check the error message and look in the Director server log if necessary.

 

* The region key is not a credentials configuration key. You can see all the valid credentials configuration keys by opening the provider-metadata section of the API console, opening the Get /api/v5/metadata/providers/{providerId} section, entering azure in the providerId parameter box, clicking Try it out! to list the metadata, and finding the credentialsProperties JSON block. The configKey field of the entries in there are the valid credentials property configuration keys.

View solution in original post

2 REPLIES 2

avatar
New Contributor

Additional Information: When using cloudera director web ui --

Director Update Environment1.pngDirector Update Environment2.png

 

Upon entering the Client Secret as defined  -- we get an error saying "Subscription ID is mandatory".

 

Director Update Environment3.pngDirector Update Environment4.png

 

Does anyone know what the proper entry format should be for this field?

 

avatar
Expert Contributor

Due to a bug, the UI is displaying only properties marked as sensitive, despite the fact that other properties are required. As a workaround, you can use the API console to update the credentials.

 

Go to the Environments section of the API console.
Open the Get /api/v5/environments section, and click Try it out! to list the environments.
Copy the environment name for the environment in which you want to update the credentials.
Open the Get /api/v5/environments/{name} section, paste the environment name into the name parameter box, and click Try it out! to display the environment.
Copy the config block of the JSON (should have keys like tenantId, etc.). You only want the curly braces and content, not the "config": key.
Open the Put /api/v5/environments/{name}/provider/credentials section, paste the JSON block, remove the line containing the region (*see below for an explanation), and replace the REDACTED value of clientSecret with the new value. Click Try it out! to update the credentials. On success, you should get a 202 response code. For other response codes, check the error message and look in the Director server log if necessary.

 

* The region key is not a credentials configuration key. You can see all the valid credentials configuration keys by opening the provider-metadata section of the API console, opening the Get /api/v5/metadata/providers/{providerId} section, entering azure in the providerId parameter box, clicking Try it out! to list the metadata, and finding the credentialsProperties JSON block. The configKey field of the entries in there are the valid credentials property configuration keys.