Modifying ServiceBridge information
Function
Modifies information about a specified ServiceBridge.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v2/{project_id}/fgs/servicebridge/{bridge_name}/config
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: None Value range: 32 characters, including letters and digits. Default value: None |
| bridge_name | Yes | String | Name of a ServiceBridge. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Parameter description: User token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. Constraints: None Value range: None Default value: None |
| Content-Type | Yes | String | Parameter description: Specifies the type (or format) of the message body. Constraints: None Value range: Only application/json is supported. Default value: application/json |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| bridge_config | Yes | BridgeConfig object | ServiceBridge configuration structure. |
| xrole | No | String | Configuration agency. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function configuration agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services. |
| bridge_vpc | No | FuncVpc object | VPC configuration. An agency with VPC permissions must be configured for the function. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| data_source_type | Yes | String | Bridge type. The value can be rds, cache, mqs, or mqs-consumer. |
| rds_config | No | RdsConfig object | RDS bridge configuration structure. |
| cache_config | No | CacheConfig object | Cache bridge configuration structure. |
| mqs_config | No | MqsConfig object | MQS bridge configuration structure. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| database_type | Yes | String | Database type. The value can be mariadb, postgresql, or mysql. |
| database_address | Yes | String | IP address of the database. |
| database_name | Yes | String | Database name |
| user_name | Yes | String | Username. |
| password | Yes | String | Password. |
| max_connections | Yes | String | Maximum number of connections. |
| max_wait | No | String | Max. Connection Timeout (ms) |
| max_active | No | String | Maximum number of connections supported by the connection pool. |
| initial_size | No | String | Number of initial connections. |
| min_idle | No | String | Minimum number of idle connections. |
| remove_abandoned_timeout | No | String | Connection Idle Timeout (s) |
| remove_abandoned | No | String | Reclaim Idle Connections |
| enable_ssl | No | String | Allow SSL. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| cache_type | Yes | String | Cache type. The value can be redis_single or redis_cluster. |
| client_name | No | String | Redis Client Name |
| address | Yes | String | Cache address. |
| database | No | String | Database number. |
| user_name | No | String | Username. |
| password | No | String | Password. |
| max_connections | Yes | String | Maximum number of connections. |
| max_wait | No | String | Max. Connection Timeout (ms) |
| max_active | No | String | Maximum number of connections supported by the connection pool. |
| max_idle | No | String | Maximum number of idle connections in the pool. |
| min_idle | No | String | Minimum number of idle connections. |
| connection_timeout | No | String | Connection Timeout (ms) |
| socket_timeout | No | String | Socket timeout interval (ms). |
| max_attempts | No | String | Retry Attempts |
| enable_ssl | No | String | Allow SSL. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| mqs_address | Yes | String | MQS Address |
| mqs_account_config | Yes | MqsAccountConfig object | MQS bridge account information structure. |
| is_encrypt_transport | Yes | String | Allow encrypted transmission. |
| max_connections | Yes | String | Maximum number of connections. |
| max_active | Yes | String | Maximum number of topics supported by a bridge. |
| topics | No | String | topic. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| auth_type | Yes | String | Account information and authentication mode. |
| enterprise | No | String | Enterprise Project |
| project_id | No | String | Project ID. |
| account | No | String | Account. |
| account_secret | No | String | Account password. |
| app_id | No | String | App ID. |
| app_secret | No | String | Specifies the app password. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| domain_id | No | String | Parameter description: Tenant account ID. Value range: None |
| namespace | No | String | Parameter description: Project ID. Value range: None |
| vpc_name | No | String | Definition: VPC name Value range: None |
| vpc_id | Yes | String | Parameter description: VPC ID. Value range: None |
| subnet_name | No | String | Parameter description: Subnet name. Value range: None |
| subnet_id | Yes | String | Parameter description: Subnet ID. Value range: None |
| cidr | No | String | Parameter description: Subnet mask. Value range: None |
| gateway | No | String | Parameter description: Gateway. Value range: None |
| security_groups | No | Array of strings | Parameter description: Security Group Value range: Character string list |
| is_safety | No | Boolean | Definition Whether to enable secure access. When secure access is enabled, you need to configure the VPCEP network to establish a secure VPC connection to private domain names. Once enabled, this feature cannot be disabled. Range |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| project_id | String | Tenant ID. |
| bridge_name | String | Name of a service bridge. |
| bridge_config | BridgeConfig object | ServiceBridge configuration structure. |
| bridge_id | String | Bridge ID, which is unique. |
| xrole | String | Configuration agency. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function configuration agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services. |
| bridge_vpc | FuncVpc object | VPC configuration. An agency with VPC permissions must be configured for the function. |
| Parameter | Type | Description |
|---|---|---|
| data_source_type | String | Bridge type. The value can be rds, cache, mqs, or mqs-consumer. |
| rds_config | RdsConfig object | RDS bridge configuration structure. |
| cache_config | CacheConfig object | Cache bridge configuration structure. |
| mqs_config | MqsConfig object | MQS bridge configuration structure. |
| Parameter | Type | Description |
|---|---|---|
| database_type | String | Database type. The value can be mariadb, postgresql, or mysql. |
| database_address | String | IP address of the database. |
| database_name | String | Database name |
| user_name | String | Username. |
| password | String | Password. |
| max_connections | String | Maximum number of connections. |
| max_wait | String | Max. Connection Timeout (ms) |
| max_active | String | Maximum number of connections supported by the connection pool. |
| initial_size | String | Number of initial connections. |
| min_idle | String | Minimum number of idle connections. |
| remove_abandoned_timeout | String | Connection Idle Timeout (s) |
| remove_abandoned | String | Reclaim Idle Connections |
| enable_ssl | String | Allow SSL. |
| Parameter | Type | Description |
|---|---|---|
| cache_type | String | Cache type. The value can be redis_single or redis_cluster. |
| client_name | String | Redis Client Name |
| address | String | Cache address. |
| database | String | Database number. |
| user_name | String | Username. |
| password | String | Password. |
| max_connections | String | Maximum number of connections. |
| max_wait | String | Max. Connection Timeout (ms) |
| max_active | String | Maximum number of connections supported by the connection pool. |
| max_idle | String | Maximum number of idle connections in the pool. |
| min_idle | String | Minimum number of idle connections. |
| connection_timeout | String | Connection Timeout (ms) |
| socket_timeout | String | Socket timeout interval (ms). |
| max_attempts | String | Retry Attempts |
| enable_ssl | String | Allow SSL. |
| Parameter | Type | Description |
|---|---|---|
| mqs_address | String | MQS Address |
| mqs_account_config | MqsAccountConfig object | MQS bridge account information structure. |
| is_encrypt_transport | String | Allow encrypted transmission. |
| max_connections | String | Maximum number of connections. |
| max_active | String | Maximum number of topics supported by a bridge. |
| topics | String | topic. |
| Parameter | Type | Description |
|---|---|---|
| auth_type | String | Account information and authentication mode. |
| enterprise | String | Enterprise Project |
| project_id | String | Project ID. |
| account | String | Account. |
| account_secret | String | Account password. |
| app_id | String | App ID. |
| app_secret | String | Specifies the app password. |
| Parameter | Type | Description |
|---|---|---|
| domain_id | String | Parameter description: Tenant account ID. Value range: None |
| namespace | String | Parameter description: Project ID. Value range: None |
| vpc_name | String | Definition: VPC name Value range: None |
| vpc_id | String | Parameter description: VPC ID. Value range: None |
| subnet_name | String | Parameter description: Subnet name. Value range: None |
| subnet_id | String | Parameter description: Subnet ID. Value range: None |
| cidr | String | Parameter description: Subnet mask. Value range: None |
| gateway | String | Parameter description: Gateway. Value range: None |
| security_groups | Array of strings | Parameter description: Security Group Value range: Character string list |
| is_safety | Boolean | Definition Whether to enable secure access. When secure access is enabled, you need to configure the VPCEP network to establish a secure VPC connection to private domain names. Once enabled, this feature cannot be disabled. Range |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
Modify the configuration information of the ServiceBridge named test and change the password.
PUT https://{Endpoint}/v2/{project_id}/fgs/servicebridge/{bridge_name}/config
{
"bridge_config" : {
"data_source_type" : "rds"
}
} Example Responses
Status code: 200
{
"project_id" : "xxxxx",
"bridge_name" : "test",
"bridge_config" : {
"data_source_type" : "rds"
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad request. |
| 401 | Unauthorized. |
| 403 | Forbidden. |
| 404 | Not found. |
| 500 | Internal server error. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot