Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Connection (to Be Taken Offline)

Updated on 2025-02-26 GMT+08:00
NOTE:

The connection management capability is provided by Management Center. This API is no longer maintained. You are advised to use the APIs in Management Center for connection management.

Function

This API is used to create a connection. The supported connection types include DWS, DLI, Spark SQL, RDS, CloudTable, and Hive.

URI

  • URI format

    POST /v1/{project_id}/connections

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain a project ID, see Project ID and Account ID.

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

workspace

No

String

Workspace ID.

  • If this parameter is not set, data in the default workspace is queried by default.
  • To query data in other workspaces, this header must be carried.
Table 3 Connection parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Connection name. The name contains a maximum of 100 characters, including only letters, numbers, hyphens (-), and underscores (_). The connection name must be unique.

type

Yes

String

Connection type.

  • DWS
  • DLI
  • SparkSQL
  • HIVE
  • RDS
  • CloudTable
  • HOST

config

No

Map<String,String>

Connection configuration item. The configuration item varies with the connection type. You do not need to set the config parameter for DLI connections. For other types of connections, see the description of connection configuration items.

description

No

String

Description of the connection. The description contains a maximum of 255 characters.

Table 4 DWS connection parameters

Parameter

Mandatory

Type

Description

clusterName

No

String

Name of a DWS cluster.

Perform the following operations to obtain the DWS cluster name:

  1. Log in to the management console.
  2. Click Data Warehouse Service and select Cluster Management from the list on the left.

You can obtain the cluster name from the cluster management list.

By default, this parameter is left blank.

ip

No

String

IP address for accessing the DWS cluster.

Perform the following operations to obtain the DWS access address:

  1. Log in to the management console.
  2. Click Data Warehouse Service and select Cluster Management from the list on the left.
  3. Click the cluster name. The basic information page of the cluster is displayed.

You can obtain the private network IP address on the Database Attribute tab page. If there are multiple IP addresses, select the first IP address.

By default, this parameter is left blank.

port

No

String

Port for accessing the DWS cluster.

Perform the following operations to obtain the DWS access port:

  1. Log in to the management console.
  2. Click Data Warehouse Service and select Cluster Management from the list on the left.
  3. Click the cluster name. The basic information page of the cluster is displayed.

You can obtain the port information on the Database Attribute tab page.

For example, set port to 8000. By default, this parameter is left blank.

userName

Yes

String

Username of the database. This username is the username entered during the creation of the DWS cluster.

password

Yes

String

Password for accessing the database. This password is the password entered during the creation of the DWS cluster.

sslEnable

Yes

boolean

Specifies whether to enable the SSL connection.

kmsKey

Yes

String

Name of a KMS key.

Perform the following operations to obtain the key:

  1. Log in to the management console.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

agentName

Yes

String

Name of a CDM cluster.

You can obtain the cluster name from the CDM cluster list on the DataArts Migration page of the DataArts Studio console.

Table 5 Spark SQL connection parameters

Parameter

Mandatory

Type

Description

clusterName

Yes

String

Name of an MRS cluster.

Perform the following operations to obtain the MRS cluster name:

  1. Log in to the management console.
  2. Click MapReduce Service and select Active Clusters from the list on the left.

You can obtain the cluster name from the active clusters, such as mrsCluster1.

connectionMethod

Yes

String

Method to connect.

  • agent: connected through an agent.
  • direct: connected directly.

userName

No

String

Username of the MRS cluster. This parameter is mandatory when connectionMethod is set to agent.

password

No

String

Password for accessing the MRS cluster. This parameter is mandatory when connectionMethod is set to agent.

agentName

No

String

Name of a CDM cluster. This parameter is mandatory when connectionMethod is set to agent.

You can obtain the cluster name from the CDM cluster list on the DataArts Migration page of the DataArts Studio console.

kmsKey

No

String

Name of a KMS key. This parameter is mandatory when connectionMethod is set to agent.

Perform the following operations to obtain the key:

  1. Log in to the management console.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Table 6 Hive connection parameters

Parameter

Mandatory

Type

Description

clusterName

Yes

String

Name of an MRS cluster, for example, mrsCluster1.

connectionMethod

Yes

String

Method to connect.

  • agent: connected through an agent.
  • direct: connected directly.

userName

No

String

Username of the MRS cluster. This parameter is mandatory when connectionMethod is set to agent.

password

No

String

Password for accessing the MRS cluster. This parameter is mandatory when connectionMethod is set to agent.

agentName

No

String

Name of a CDM cluster. This parameter is mandatory when connectionMethod is set to agent.

You can obtain the cluster name from the CDM cluster list on the DataArts Migration page of the DataArts Studio console.

kmsKey

No

String

Name of a KMS key. This parameter is mandatory when connectionMethod is set to agent.

Perform the following operations to obtain the key:

  1. Log in to the management console.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Table 7 RDS connection parameters

Parameter

Mandatory

Type

Description

ip

Yes

String

Address for accessing RDS.

Perform the following operations to obtain the RDS access address:

  1. Log in to the management console.
  2. Click Relational Database Service and select Instance Management from the list on the left.
  3. Click the name of an instance. The basic information page of the instance is displayed.

You can obtain the IP address on the Connection Information tab.

port

Yes

String

Port for accessing RDS.

Perform the following operations to obtain the RDS access port:

  1. Log in to the management console.
  2. Click Relational Database Service and select Instance Management from the list on the left.
  3. Click the name of an instance. The basic information page of the instance is displayed.

You can obtain the database port on the Connection Information tab page.

userName

Yes

String

Username of the database. This username is the username entered during the creation of the cluster.

password

Yes

String

Password for accessing the database. This password is the password entered during the creation of the cluster.

kmsKey

Yes

String

Name of a KMS key.

Perform the following operations to obtain the key:

  1. Log in to the management console.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

agentName

Yes

String

Name of a CDM cluster.

You can obtain the cluster name from the CDM cluster list on the DataArts Migration page of the DataArts Studio console.

driverName

Yes

String

Name of the driver.

  • com.mysql.jdbc.Driver
  • org.postgresql.Driver

driverPath

Yes

String

Path of the driver on OBS.

Table 8 CloudTable connection parameters

Parameter

Mandatory

Type

Description

clusterName

Yes

String

Name of a CloudTable cluster.

Perform the following operations to obtain the cluster name:

  1. Log in to the management console.
  2. Click CloudTable Service and select Cluster Mode from the list on the left.

You can obtain the cluster name from the cluster list.

Table 9 HOST connection parameters

Parameter

Mandatory

Type

Description

ip

Yes

String

IP address of the host

port

Yes

String

SSH port number of the host

userName

Yes

String

Username for logging in to the host

password

Yes

String

Password for logging in to the host

agentName

Yes

String

Name of a CDM cluster.

You can obtain the cluster name from the CDM cluster list on the DataArts Migration page of the DataArts Studio console.

kmsKey

Yes

String

Name of a KMS key.

Perform the following operations to obtain the key:

  1. Log in to the management console.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Response Parameters

None.

Example Request

Create a connection.
POST /v1/b384b9e9ab9b4ee8994c8633aabc9505/connections
{
    "name":"connection1",
    "type":"DWS",
    "config":{
	    "clusterName":"test",
	    "userName":"dbadmin",
            "password":"*********",
	    "kmsKey":"cdm-dlf",		
	    "agentName":"cdm-donotdelete",		
	    "sslEnable":false
    }
}

Example Response

  • Success response

    HTTP status code 204

  • Failure response

    HTTP status code 400

    {
        "error_code":"DLF.6309",
        "error_msg":"The name already exists."
    }

Status Codes

See Status Codes.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback