rabbitmq.Shovel
The rabbitmq.Shovel
resource creates and manages a dynamic shovel.
Example Usage
using Pulumi;
using RabbitMQ = Pulumi.RabbitMQ;
class MyStack : Stack
{
public MyStack()
{
var testVHost = new RabbitMQ.VHost("testVHost", new RabbitMQ.VHostArgs
{
});
var testExchange = new RabbitMQ.Exchange("testExchange", new RabbitMQ.ExchangeArgs
{
Settings = new RabbitMQ.Inputs.ExchangeSettingsArgs
{
AutoDelete = true,
Durable = false,
Type = "fanout",
},
Vhost = testVHost.Name,
});
var testQueue = new RabbitMQ.Queue("testQueue", new RabbitMQ.QueueArgs
{
Settings = new RabbitMQ.Inputs.QueueSettingsArgs
{
AutoDelete = true,
Durable = false,
},
Vhost = testVHost.Name,
});
var shovelTest = new RabbitMQ.Shovel("shovelTest", new RabbitMQ.ShovelArgs
{
Info = new RabbitMQ.Inputs.ShovelInfoArgs
{
DestinationQueue = testQueue.Name,
DestinationUri = "amqp:///test",
SourceExchange = testExchange.Name,
SourceExchangeKey = "test",
SourceUri = "amqp:///test",
},
Vhost = testVHost.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-rabbitmq/sdk/v3/go/rabbitmq"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testVHost, err := rabbitmq.NewVHost(ctx, "testVHost", nil)
if err != nil {
return err
}
testExchange, err := rabbitmq.NewExchange(ctx, "testExchange", &rabbitmq.ExchangeArgs{
Settings: &ExchangeSettingsArgs{
AutoDelete: pulumi.Bool(true),
Durable: pulumi.Bool(false),
Type: pulumi.String("fanout"),
},
Vhost: testVHost.Name,
})
if err != nil {
return err
}
testQueue, err := rabbitmq.NewQueue(ctx, "testQueue", &rabbitmq.QueueArgs{
Settings: &QueueSettingsArgs{
AutoDelete: pulumi.Bool(true),
Durable: pulumi.Bool(false),
},
Vhost: testVHost.Name,
})
if err != nil {
return err
}
_, err = rabbitmq.NewShovel(ctx, "shovelTest", &rabbitmq.ShovelArgs{
Info: &ShovelInfoArgs{
DestinationQueue: testQueue.Name,
DestinationUri: pulumi.String("amqp:///test"),
SourceExchange: testExchange.Name,
SourceExchangeKey: pulumi.String("test"),
SourceUri: pulumi.String("amqp:///test"),
},
Vhost: testVHost.Name,
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_rabbitmq as rabbitmq
test_v_host = rabbitmq.VHost("testVHost")
test_exchange = rabbitmq.Exchange("testExchange",
settings=rabbitmq.ExchangeSettingsArgs(
auto_delete=True,
durable=False,
type="fanout",
),
vhost=test_v_host.name)
test_queue = rabbitmq.Queue("testQueue",
settings=rabbitmq.QueueSettingsArgs(
auto_delete=True,
durable=False,
),
vhost=test_v_host.name)
shovel_test = rabbitmq.Shovel("shovelTest",
info=rabbitmq.ShovelInfoArgs(
destination_queue=test_queue.name,
destination_uri="amqp:///test",
source_exchange=test_exchange.name,
source_exchange_key="test",
source_uri="amqp:///test",
),
vhost=test_v_host.name)
import * as pulumi from "@pulumi/pulumi";
import * as rabbitmq from "@pulumi/rabbitmq";
const testVHost = new rabbitmq.VHost("test", {});
const testExchange = new rabbitmq.Exchange("test", {
settings: {
autoDelete: true,
durable: false,
type: "fanout",
},
vhost: testVHost.name,
});
const testQueue = new rabbitmq.Queue("test", {
settings: {
autoDelete: true,
durable: false,
},
vhost: testVHost.name,
});
const shovelTest = new rabbitmq.Shovel("shovelTest", {
info: {
destinationQueue: testQueue.name,
destinationUri: "amqp:///test",
sourceExchange: testExchange.name,
sourceExchangeKey: "test",
sourceUri: "amqp:///test",
},
vhost: testVHost.name,
});
Coming soon!
Create Shovel Resource
new Shovel(name: string, args: ShovelArgs, opts?: CustomResourceOptions);
@overload
def Shovel(resource_name: str,
opts: Optional[ResourceOptions] = None,
info: Optional[ShovelInfoArgs] = None,
name: Optional[str] = None,
vhost: Optional[str] = None)
@overload
def Shovel(resource_name: str,
args: ShovelArgs,
opts: Optional[ResourceOptions] = None)
func NewShovel(ctx *Context, name string, args ShovelArgs, opts ...ResourceOption) (*Shovel, error)
public Shovel(string name, ShovelArgs args, CustomResourceOptions? opts = null)
public Shovel(String name, ShovelArgs args)
public Shovel(String name, ShovelArgs args, CustomResourceOptions options)
type: rabbitmq:Shovel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShovelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ShovelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ShovelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShovelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ShovelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Shovel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Shovel resource accepts the following input properties:
- Info
Pulumi.
Rabbit MQ. Inputs. Shovel Info Args The settings of the dynamic shovel. The structure is described below.
- Vhost string
The vhost to create the resource in.
- Name string
The shovel name.
- Info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- Vhost string
The vhost to create the resource in.
- Name string
The shovel name.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- vhost String
The vhost to create the resource in.
- name String
The shovel name.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- vhost string
The vhost to create the resource in.
- name string
The shovel name.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- vhost str
The vhost to create the resource in.
- name str
The shovel name.
- info Property Map
The settings of the dynamic shovel. The structure is described below.
- vhost String
The vhost to create the resource in.
- name String
The shovel name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Shovel resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Shovel Resource
Get an existing Shovel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ShovelState, opts?: CustomResourceOptions): Shovel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
info: Optional[ShovelInfoArgs] = None,
name: Optional[str] = None,
vhost: Optional[str] = None) -> Shovel
func GetShovel(ctx *Context, name string, id IDInput, state *ShovelState, opts ...ResourceOption) (*Shovel, error)
public static Shovel Get(string name, Input<string> id, ShovelState? state, CustomResourceOptions? opts = null)
public static Shovel get(String name, Output<String> id, ShovelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Info
Pulumi.
Rabbit MQ. Inputs. Shovel Info Args The settings of the dynamic shovel. The structure is described below.
- Name string
The shovel name.
- Vhost string
The vhost to create the resource in.
- Info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- Name string
The shovel name.
- Vhost string
The vhost to create the resource in.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- name String
The shovel name.
- vhost String
The vhost to create the resource in.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- name string
The shovel name.
- vhost string
The vhost to create the resource in.
- info
Shovel
Info Args The settings of the dynamic shovel. The structure is described below.
- name str
The shovel name.
- vhost str
The vhost to create the resource in.
- info Property Map
The settings of the dynamic shovel. The structure is described below.
- name String
The shovel name.
- vhost String
The vhost to create the resource in.
Supporting Types
ShovelInfo
- Destination
Uri string The amqp uri for the destination .
- Source
Uri string The amqp uri for the source.
- Ack
Mode string Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- Add
Forward boolHeaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- Delete
After string Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- Destination
Add boolForward Headers Whether to add
x-shovelled
headers to shovelled messages.- Destination
Add boolTimestamp Header - Destination
Address string The AMQP 1.0 destination link address.
- Destination
Application stringProperties Application properties to set when shovelling messages.
- Destination
Exchange string The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- Destination
Exchange stringKey The routing key when using
destination_exchange
.- Destination
Properties string Properties to overwrite when shovelling messages.
- Destination
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- Destination
Publish stringProperties A map of properties to overwrite when shovelling messages.
- Destination
Queue string The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- Prefetch
Count int The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- Reconnect
Delay int The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- Source
Address string The AMQP 1.0 source link address.
- Source
Delete stringAfter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- Source
Exchange string The exchange from which to consume. Either this or
source_queue
must be specified but not both.- Source
Exchange stringKey The routing key when using
source_exchange
.- Source
Prefetch intCount The maximum number of unacknowledged messages copied over a shovel at any one time.
- Source
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- Source
Queue string The queue from which to consume. Either this or
source_exchange
must be specified but not both.
- Destination
Uri string The amqp uri for the destination .
- Source
Uri string The amqp uri for the source.
- Ack
Mode string Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- Add
Forward boolHeaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- Delete
After string Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- Destination
Add boolForward Headers Whether to add
x-shovelled
headers to shovelled messages.- Destination
Add boolTimestamp Header - Destination
Address string The AMQP 1.0 destination link address.
- Destination
Application stringProperties Application properties to set when shovelling messages.
- Destination
Exchange string The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- Destination
Exchange stringKey The routing key when using
destination_exchange
.- Destination
Properties string Properties to overwrite when shovelling messages.
- Destination
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- Destination
Publish stringProperties A map of properties to overwrite when shovelling messages.
- Destination
Queue string The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- Prefetch
Count int The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- Reconnect
Delay int The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- Source
Address string The AMQP 1.0 source link address.
- Source
Delete stringAfter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- Source
Exchange string The exchange from which to consume. Either this or
source_queue
must be specified but not both.- Source
Exchange stringKey The routing key when using
source_exchange
.- Source
Prefetch intCount The maximum number of unacknowledged messages copied over a shovel at any one time.
- Source
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- Source
Queue string The queue from which to consume. Either this or
source_exchange
must be specified but not both.
- destination
Uri String The amqp uri for the destination .
- source
Uri String The amqp uri for the source.
- ack
Mode String Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- add
Forward BooleanHeaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- delete
After String Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- destination
Add BooleanForward Headers Whether to add
x-shovelled
headers to shovelled messages.- destination
Add BooleanTimestamp Header - destination
Address String The AMQP 1.0 destination link address.
- destination
Application StringProperties Application properties to set when shovelling messages.
- destination
Exchange String The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- destination
Exchange StringKey The routing key when using
destination_exchange
.- destination
Properties String Properties to overwrite when shovelling messages.
- destination
Protocol String The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- destination
Publish StringProperties A map of properties to overwrite when shovelling messages.
- destination
Queue String The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- prefetch
Count Integer The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- reconnect
Delay Integer The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- source
Address String The AMQP 1.0 source link address.
- source
Delete StringAfter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- source
Exchange String The exchange from which to consume. Either this or
source_queue
must be specified but not both.- source
Exchange StringKey The routing key when using
source_exchange
.- source
Prefetch IntegerCount The maximum number of unacknowledged messages copied over a shovel at any one time.
- source
Protocol String The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- source
Queue String The queue from which to consume. Either this or
source_exchange
must be specified but not both.
- destination
Uri string The amqp uri for the destination .
- source
Uri string The amqp uri for the source.
- ack
Mode string Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- add
Forward booleanHeaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- delete
After string Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- destination
Add booleanForward Headers Whether to add
x-shovelled
headers to shovelled messages.- destination
Add booleanTimestamp Header - destination
Address string The AMQP 1.0 destination link address.
- destination
Application stringProperties Application properties to set when shovelling messages.
- destination
Exchange string The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- destination
Exchange stringKey The routing key when using
destination_exchange
.- destination
Properties string Properties to overwrite when shovelling messages.
- destination
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- destination
Publish stringProperties A map of properties to overwrite when shovelling messages.
- destination
Queue string The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- prefetch
Count number The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- reconnect
Delay number The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- source
Address string The AMQP 1.0 source link address.
- source
Delete stringAfter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- source
Exchange string The exchange from which to consume. Either this or
source_queue
must be specified but not both.- source
Exchange stringKey The routing key when using
source_exchange
.- source
Prefetch numberCount The maximum number of unacknowledged messages copied over a shovel at any one time.
- source
Protocol string The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- source
Queue string The queue from which to consume. Either this or
source_exchange
must be specified but not both.
- destination_
uri str The amqp uri for the destination .
- source_
uri str The amqp uri for the source.
- ack_
mode str Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- add_
forward_ boolheaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- delete_
after str Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- destination_
add_ boolforward_ headers Whether to add
x-shovelled
headers to shovelled messages.- destination_
add_ booltimestamp_ header - destination_
address str The AMQP 1.0 destination link address.
- destination_
application_ strproperties Application properties to set when shovelling messages.
- destination_
exchange str The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- destination_
exchange_ strkey The routing key when using
destination_exchange
.- destination_
properties str Properties to overwrite when shovelling messages.
- destination_
protocol str The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- destination_
publish_ strproperties A map of properties to overwrite when shovelling messages.
- destination_
queue str The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- prefetch_
count int The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- reconnect_
delay int The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- source_
address str The AMQP 1.0 source link address.
- source_
delete_ strafter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- source_
exchange str The exchange from which to consume. Either this or
source_queue
must be specified but not both.- source_
exchange_ strkey The routing key when using
source_exchange
.- source_
prefetch_ intcount The maximum number of unacknowledged messages copied over a shovel at any one time.
- source_
protocol str The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- source_
queue str The queue from which to consume. Either this or
source_exchange
must be specified but not both.
- destination
Uri String The amqp uri for the destination .
- source
Uri String The amqp uri for the source.
- ack
Mode String Determines how the shovel should acknowledge messages. Possible values are:
on-confirm
,on-publish
andno-ack
. Defaults toon-confirm
.- add
Forward BooleanHeaders Whether to add
x-shovelled
headers to shovelled messages.use destination_add_forward_headers instead
- delete
After String Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.use source_delete_after instead
- destination
Add BooleanForward Headers Whether to add
x-shovelled
headers to shovelled messages.- destination
Add BooleanTimestamp Header - destination
Address String The AMQP 1.0 destination link address.
- destination
Application StringProperties Application properties to set when shovelling messages.
- destination
Exchange String The exchange to which messages should be published. Either this or
destination_queue
must be specified but not both.- destination
Exchange StringKey The routing key when using
destination_exchange
.- destination
Properties String Properties to overwrite when shovelling messages.
- destination
Protocol String The protocol (
amqp091
oramqp10
) to use when connecting to the destination. Defaults toamqp091
.- destination
Publish StringProperties A map of properties to overwrite when shovelling messages.
- destination
Queue String The queue to which messages should be published. Either this or
destination_exchange
must be specified but not both.- prefetch
Count Number The maximum number of unacknowledged messages copied over a shovel at any one time.
use source_prefetch_count instead
- reconnect
Delay Number The duration in seconds to reconnect to a broker after disconnected. Defaults to
1
.- source
Address String The AMQP 1.0 source link address.
- source
Delete StringAfter Determines when (if ever) the shovel should delete itself. Possible values are:
never
,queue-length
or an integer.- source
Exchange String The exchange from which to consume. Either this or
source_queue
must be specified but not both.- source
Exchange StringKey The routing key when using
source_exchange
.- source
Prefetch NumberCount The maximum number of unacknowledged messages copied over a shovel at any one time.
- source
Protocol String The protocol (
amqp091
oramqp10
) to use when connecting to the source. Defaults toamqp091
.- source
Queue String The queue from which to consume. Either this or
source_exchange
must be specified but not both.
Import
Shovels can be imported using the name
and vhost
E.g.
$ pulumi import rabbitmq:index/shovel:Shovel test shovelTest@test
Package Details
- Repository
- RabbitMQ pulumi/pulumi-rabbitmq
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rabbitmq
Terraform Provider.