View Source ExRabbitMQAdmin.Vhost (ex_rabbitmq_admin v0.1.1)
This module contains functions for interacting with RabbitMQ virtual hosts.
Link to this section Summary
Functions
Delete a specific virtual host by name.
Get an individual virtual host by name.
List all open channels for a specific virtual host. Optionally pass pagination parameters to filter channels.
List all open open connections in a specific virtual host. Optionally pass pagination parameters to filter connections.
List all permissions for a specific virtual host.
List all topic permissions for a specific virtual host.
List all virtual hosts running on the RabbitMQ cluster.
Create a new virtual host with given name.
Set permissions for a user on a specific virtual host. RabbitMQ permissions are defined as triplets of regular expressions.
Start a specific virtual host on given node.
Link to this section Functions
@spec delete_vhost(client :: Tesla.Client.t(), name :: String.t()) :: {:ok, Tesla.Env.t()}
Delete a specific virtual host by name.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, The name of the virtual host that should be deleted.
@spec get_vhost(client :: Telsa.Client.t(), name :: String.t()) :: {:ok, Tesla.Env.t()}
Get an individual virtual host by name.
params
Params
client
- Tesla client used to perform the request.
@spec list_vhost_channels( client :: Tesla.Client.t(), name :: String.t(), opts :: Keyword.t() ) :: {:ok, Tesla.Env.t()}
List all open channels for a specific virtual host. Optionally pass pagination parameters to filter channels.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, required:true
:page
(non_neg_integer/0
) - Page number to fetch if paginating the results.:page_size
(non_neg_integer/0
) - Number of elements per page, defaults to 100.:name
(String.t/0
) - Filter by name, for example queue name, exchange name, etc.:use_regex
(boolean/0
) - Enables regular expression for the paramname
.
@spec list_vhost_connections( client :: Tesla.Client.t(), name :: String.t(), opts :: Keyword.t() ) :: {:ok, Tesla.Env.t()}
List all open open connections in a specific virtual host. Optionally pass pagination parameters to filter connections.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, required:true
:page
(non_neg_integer/0
) - Page number to fetch if paginating the results.:page_size
(non_neg_integer/0
) - Number of elements per page, defaults to 100.:name
(String.t/0
) - Filter by name, for example queue name, exchange name, etc.:use_regex
(boolean/0
) - Enables regular expression for the paramname
.
@spec list_vhost_permissions(client :: Tesla.Client.t(), name :: String.t()) :: {:ok, Tesla.Env.t()}
List all permissions for a specific virtual host.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, The name of the vhost to list permissions for.
@spec list_vhost_topic_permissions(client :: Tesla.Client.t(), name :: String.t()) :: {:ok, Tesla.Env.t()}
List all topic permissions for a specific virtual host.
params
Params
client
- Tesla client used to perform the request.
@spec list_vhosts(client :: Tesla.Client.t()) :: {:ok, Tesla.Env.t()}
List all virtual hosts running on the RabbitMQ cluster.
params
Params
client
- Tesla client used to perform the request.
@spec put_vhost(client :: Telsa.Client.t(), name :: String.t(), opts :: Keyword.t()) :: {:ok, Tesla.Env.t()}
Create a new virtual host with given name.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, required:true
:description
(String.t/0
) - Optional description for virtual host. The default value is""
.:tags
(String.t/0
) - Tags is an optional comma-separated list of tags. The default value is""
.
@spec put_vhost_permissions( client :: Telsa.Client.t(), name :: String.t(), user :: String.t(), opts :: Keyword.t() ) :: {:ok, Tesla.Env.t()} | ArgumentError
Set permissions for a user on a specific virtual host. RabbitMQ permissions are defined as triplets of regular expressions.
Please consult the official documentation for more details.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, The name of the vhost to assign permissions for.user
- type:string
, The username to assign permissions for.:configure
(String.t/0
) - Required. A regular expression that will determine theconfigure
permissions for the given resource. Defaults to deny-all. The default value is"^$"
.:write
(String.t/0
) - Required. A regular expression that will determine thewrite
permissions for the given resource. Defaults to deny-all. The default value is"^$"
.:read
(String.t/0
) - Required. A regular expression that will determine theread
permissions for the given resource. Defaults to deny-all. The default value is"^$"
.
@spec start_vhost(client :: Tesla.Client.t(), name :: String.t(), node :: String.t()) :: {:ok, Tesla.Env.t()}
Start a specific virtual host on given node.
params
Params
client
- Tesla client used to perform the request.name
- type:string
, The name of the virtual host that should be started.node
- type:string
, The name of the node that the virtual host should be started on.