
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 command reference can be found here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
23 | |
19 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |