Data.Cloud API Test

From RAD Studio Code Examples
Jump to: navigation, search

This is a sample that shows the use of the Cloud API.

Location

You can find the CloudAPITest sample project at:

Description

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:

Running the Sample

  1. Navigate to the locations given above and open:
    • Delphi: Data.Cloud.CloudAPI.dproj.
  2. Press F9 or choose Run > Run.
  3. Under the Accounts tab, choose the account type, enter the requested information and click Add Account. Now you have a connection profile.
  4. Switch to either Amazon or Azure tab (depending on which you have access to).
  5. In the drop-down list on the top of the form, choose the correct connection profile.
  6. 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.

More Information

See the following pages for more information about the Cloud API and the usage of the Cloud API:

Implementation

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.

Uses

See Also