Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
kevin_hu
Active Participant
0 Kudos

SAP HANA Cloud instances (other environments) can be created and managed using the BTP CLI.

This blog is summarizing the common operations.

Please note: SAP HANA Cloud instances provisioned in the cloud foundry environment cannot be managed by BTP CLI at the time of writing. 

Check my other blog for managing instances in cloud foundry environment.
Manage SAP HANA Cloud instance on BTP using Cloud Foundry CLI 

Prerequisite:

Create HANA Cloud instance (in other environments)

In free tier or production, choose offering name as "hana-cloud". In trial, choose "hana-cloud-trial".

In free tier, choose plan name as "hana-free". In trial or production, choose "hana".

Bash/Shell:

 

 

btp create services/instance --offering-name hana-cloud --plan-name hana-free --name test-db --parameters '{"data": {"memory": 32, "systempassword": "Welcome100."}}'

 

 

 It will start provisioning an instance in "other environment" and soon the new service instance will be visible from BTP cockpit namely "test-db". 
Alternatively, check the service using the BTP CLI, copy the instance id for future reference.

 

 

btp list services/instance

 

 

or

 

 

btp get services/instance --name test-db

 

 

Start/Stop an instance

To stop:
Bash/Shell:

 

 

btp update services/instance --id 0e269e34-0bb3-47eb-b09b-cc5050dcb3cc --parameters '{"data":{"serviceStopped":true}}'

 

 

To start:
Bash/Shell:

 

 

 

btp update services/instance --id 0e269e34-0bb3-47eb-b09b-cc5050dcb3cc --parameters '{"data":{"serviceStopped":false}}'

 

 

Update whitelisted IPs

For local/hybrid or cross-region developers, whitelisted IPs are needed to be updated on the instance level for connections.

To open connections from all IPs.
Bash/Shell:

 

 

btp update services/instance --id 0e269e34-0bb3-47eb-b09b-cc5050dcb3cc --parameters '{"data":{"whitelistIPs":["0.0.0.0/0"]}}'

 

 

 

Full list of the supported parameters can be found here.

Delete an instance

Bash/Shell:

 

btp delete services/instance --id 0e269e34-0bb3-47eb-b09b-cc5050dcb3cc  

 

Limitations:

  • BTP CLI is not able to manage instances created in Cloud Foundry runtime environment at the time of writing. Cloud Foundry CLI is the command line tool for HANA Cloud instances inside the cloud foundry runtime. See my blog here for details.
  • Instance created using BTP CLI is in "other environments" and able to be managed via the SAP HANA Cloud Central, multi-environment edition.
  • BTP CLI can only be used in subaccount which feature B is enabled.

BTP CLI command reference can be found here.

 

Labels in this area