Create PG Slave - CreateUPgSQLReadonly
Overview
Create PG Slave
Definition
Public Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Action | string | Corresponding API command name, the current API is CreateUPgSQLReadonly. | Yes |
| PublicKey | string | The user’s public key can be obtained from Console  | Yes |
| Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Region | string | Region. See List of Regions and Availability Zones | Yes |
| Zone | string | Availability Zone. See Availability Zone List | Yes |
| ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
| Name | string | Database Name | Yes |
| Port | int | DB Port | Yes |
| DiskSpace | int | Disk Space | Yes |
| MachineType | string | Machine configuration type, 2-core 4G machine: o.pgsql2m.medium | Yes |
| SrcInstanceID | string | Source database for synchronization | Yes |
| SubnetID | string | Subnet ID | No |
| VPCID | string | VPCID | No |
Response Field
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
| Action | string | Operation command name. | Yes |
| Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
| InstanceID | string | Resource ID | No |
Example
Request Example
https://api.dezai.com/?Action=CreateUPgSQLReadonly
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=HwCabdnF
&Name=eVNfNZlQ
&Port=8
&DiskSpace=6
&MachineType=dTZknWbl
&SrcInstanceID=QYGlNGlu
&SubnetID=MlhLrhqZ
&VPCID=BLFKqSUAResponse Example
{
"Action": "CreateUPgSQLReadonlyResponse",
"InstanceID": "fhcttZeZ",
"RetCode": 0
}