Cloud-side entry point class, which provides Cloud instances for different data processing locations. After initializing Cloud, you need to obtain an instance, which allows you to perform operations such as creating an Auth Service instance.
Constructor Info |
|---|
constructor(path?: string, name: string, region?: string) Constructor. |
Qualifier and Type | Method Name |
|---|---|
Cloud | createInstance(path?: string, name: string, region?: string) Creates a Cloud instance. |
Auth | auth() Creates a Cloud Auth instance. |
CloudDB | database(config: DatabaseConfig) Creates a CloudDB instance. |
CloudFunction | function() Creates a CloudFunction instance. |
Method |
|---|
constructor(path?: string, name: string, region?: string) Initializes a Cloud instance. |
Parameters
Name | Description |
|---|---|
path | Path to the authentication credential file (agc-apiclient-xxx-xxx.json). This parameter is optional. |
name | Name of the Cloud instance. |
region | Data processing location to which the instance belongs. This parameter is optional. |
Method |
|---|
createInstance(path?: string, name: string, region?: string): Cloud Initializes a Cloud instance. |
Parameters
Name | Type | Description |
|---|---|---|
path | string | Path to the authentication credential file. This parameter is optional. |
name | string | Name of the Cloud instance. |
region | string | Data processing location. This parameter is optional. |
Return
Type | Description |
|---|---|
Cloud object. |
Method |
|---|
auth(): Auth Obtains the Auth instance corresponding to the data processing location. |
Return
Type | Description |
|---|---|
Auth object. |
Method |
|---|
database(config: DatabaseConfig): CloudDB Obtains the CloudDB instance corresponding to the data processing location. The Cloud DB zone configuration can be transferred and data can be managed only after the instance is obtained. |
Parameters
Return
Type | Description |
|---|---|
CloudDB | If the API is successfully called, a CloudDB object will be obtained. You can use the collection method to perform create, read, update, and delete operations on the CloudDB object. |