Creates an exchange.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
amqp:CreateExchange |
create |
*Exchange
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
amqp-cn-v0h1kb9nu*** |
| VirtualHost |
string |
Yes |
The name of the vhost to which the exchange belongs. |
test |
| ExchangeName |
string |
Yes |
The exchange name. Note
Note
|
DemoExchange |
| ExchangeType |
string |
Yes |
The exchange type. Valid values:
Valid values:
|
DIRECT |
| XDelayedType |
string |
No |
An x-delayed-message exchange allows you to customize the header attributes of a message. The x-delay header specifies the delay period for message delivery, in milliseconds. The routing rule of this exchange type depends on the exchange type specified by the x-delayed-type parameter, which specifies the actual exchange type to which delayed messages are ultimately delivered. Valid values:
Valid values:
|
DIRECT |
| AutoDeleteState |
boolean |
Yes |
Specifies whether to automatically delete the exchange. Valid values:
|
false |
| Internal |
boolean |
Yes |
Specifies whether the exchange is an internal exchange. Valid values:
|
false |
| AlternateExchange |
string |
No |
The alternate exchange. An alternate exchange is used to receive messages that fail to be routed by the exchange. |
DemoAE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
021788F6-E50C-4BD6-9F80-66B0A19A**** |
Examples
Success response
JSON format
{
"RequestId": "021788F6-E50C-4BD6-9F80-66B0A19A****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.