Data.Cloud API Test
This is a sample that shows the use of the Cloud API.
You can find the CloudAPITest sample project at:
- Start | Programs | Embarcadero RAD Studio Berlin | Samples and then navigate to either:
- Subversion Repository for Delphi: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Berlin/Object%20Pascal/Database/CloudAPI/CloudAPITest
This application demonstrates the use Cloud API to connect to a cloud service and perform different operations, such as cloud storage manipulation, cloud database manipulation and queue service usage.
The application uses many UI controls, such as:
How to Use the Sample
You need at least one of the following:
Account Information and Access Keys
To connect to either one of the cloud services, you need account information and access keys. For more information on how to find the account information and access keys, see:
- Amazon: Managing Access Keys section of the official documentation.
- Azure: Storage account - View, copy, and regenerate storage access keys
Running the Sample
- Navigate to the locations given above and open:
- Delphi: Data.Cloud.CloudAPI.dproj.
- Press F9 or choose Run > Run.
- Under the Accounts tab, choose the account type, enter the requested information and click Add Account. Now you have a connection profile.
- Switch to either Amazon or Azure tab (depending on which you have access to).
- In the drop-down list on the top of the form, choose the correct connection profile.
- Choose from any of the available actions. Switch between the services in the tabs on the right (Tables,Queues,Blobs).
For some of the operations a dialog window appears that allows you to choose the output format: XML or non-XML. All the responses are shown in the output memo on the left side.
See the following pages for more information about the Cloud API and the usage of the Cloud API:
This application defines 3 units:
CloudRefactorUI: The main unit, implements the UI and all the event handlers for the user interaction.
CloudPopulator: The implementation of the Cloud API with all the corresponding methods for the available operations.
CloudAccountsIO: Handles the account information of the user-generated profiles and saves that information into a JSON file.