1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. amqp
  5. Binding
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.amqp.Binding

Explore with Pulumi AI

Provides a RabbitMQ (AMQP) Binding resource.

For information about RabbitMQ (AMQP) Binding and how to use it, see What is Binding.

NOTE: Available since v1.135.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.amqp.Instance("default", {
    instanceType: "enterprise",
    maxTps: "3000",
    queueCapacity: "200",
    storageSize: "700",
    supportEip: false,
    maxEipTps: "128",
    paymentType: "Subscription",
    period: 1,
});
const defaultVirtualHost = new alicloud.amqp.VirtualHost("default", {
    instanceId: _default.id,
    virtualHostName: "tf-example",
});
const defaultExchange = new alicloud.amqp.Exchange("default", {
    autoDeleteState: false,
    exchangeName: "tf-example",
    exchangeType: "HEADERS",
    instanceId: _default.id,
    internal: false,
    virtualHostName: defaultVirtualHost.virtualHostName,
});
const defaultQueue = new alicloud.amqp.Queue("default", {
    instanceId: _default.id,
    queueName: "tf-example",
    virtualHostName: defaultVirtualHost.virtualHostName,
});
const defaultBinding = new alicloud.amqp.Binding("default", {
    argument: "x-match:all",
    bindingKey: defaultQueue.queueName,
    bindingType: "QUEUE",
    destinationName: "tf-example",
    instanceId: _default.id,
    sourceExchange: defaultExchange.exchangeName,
    virtualHostName: defaultVirtualHost.virtualHostName,
});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.amqp.Instance("default",
    instance_type="enterprise",
    max_tps="3000",
    queue_capacity="200",
    storage_size="700",
    support_eip=False,
    max_eip_tps="128",
    payment_type="Subscription",
    period=1)
default_virtual_host = alicloud.amqp.VirtualHost("default",
    instance_id=default.id,
    virtual_host_name="tf-example")
default_exchange = alicloud.amqp.Exchange("default",
    auto_delete_state=False,
    exchange_name="tf-example",
    exchange_type="HEADERS",
    instance_id=default.id,
    internal=False,
    virtual_host_name=default_virtual_host.virtual_host_name)
default_queue = alicloud.amqp.Queue("default",
    instance_id=default.id,
    queue_name="tf-example",
    virtual_host_name=default_virtual_host.virtual_host_name)
default_binding = alicloud.amqp.Binding("default",
    argument="x-match:all",
    binding_key=default_queue.queue_name,
    binding_type="QUEUE",
    destination_name="tf-example",
    instance_id=default.id,
    source_exchange=default_exchange.exchange_name,
    virtual_host_name=default_virtual_host.virtual_host_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/amqp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := amqp.NewInstance(ctx, "default", &amqp.InstanceArgs{
			InstanceType:  pulumi.String("enterprise"),
			MaxTps:        pulumi.String("3000"),
			QueueCapacity: pulumi.String("200"),
			StorageSize:   pulumi.String("700"),
			SupportEip:    pulumi.Bool(false),
			MaxEipTps:     pulumi.String("128"),
			PaymentType:   pulumi.String("Subscription"),
			Period:        pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		defaultVirtualHost, err := amqp.NewVirtualHost(ctx, "default", &amqp.VirtualHostArgs{
			InstanceId:      _default.ID(),
			VirtualHostName: pulumi.String("tf-example"),
		})
		if err != nil {
			return err
		}
		defaultExchange, err := amqp.NewExchange(ctx, "default", &amqp.ExchangeArgs{
			AutoDeleteState: pulumi.Bool(false),
			ExchangeName:    pulumi.String("tf-example"),
			ExchangeType:    pulumi.String("HEADERS"),
			InstanceId:      _default.ID(),
			Internal:        pulumi.Bool(false),
			VirtualHostName: defaultVirtualHost.VirtualHostName,
		})
		if err != nil {
			return err
		}
		defaultQueue, err := amqp.NewQueue(ctx, "default", &amqp.QueueArgs{
			InstanceId:      _default.ID(),
			QueueName:       pulumi.String("tf-example"),
			VirtualHostName: defaultVirtualHost.VirtualHostName,
		})
		if err != nil {
			return err
		}
		_, err = amqp.NewBinding(ctx, "default", &amqp.BindingArgs{
			Argument:        pulumi.String("x-match:all"),
			BindingKey:      defaultQueue.QueueName,
			BindingType:     pulumi.String("QUEUE"),
			DestinationName: pulumi.String("tf-example"),
			InstanceId:      _default.ID(),
			SourceExchange:  defaultExchange.ExchangeName,
			VirtualHostName: defaultVirtualHost.VirtualHostName,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Amqp.Instance("default", new()
    {
        InstanceType = "enterprise",
        MaxTps = "3000",
        QueueCapacity = "200",
        StorageSize = "700",
        SupportEip = false,
        MaxEipTps = "128",
        PaymentType = "Subscription",
        Period = 1,
    });

    var defaultVirtualHost = new AliCloud.Amqp.VirtualHost("default", new()
    {
        InstanceId = @default.Id,
        VirtualHostName = "tf-example",
    });

    var defaultExchange = new AliCloud.Amqp.Exchange("default", new()
    {
        AutoDeleteState = false,
        ExchangeName = "tf-example",
        ExchangeType = "HEADERS",
        InstanceId = @default.Id,
        Internal = false,
        VirtualHostName = defaultVirtualHost.VirtualHostName,
    });

    var defaultQueue = new AliCloud.Amqp.Queue("default", new()
    {
        InstanceId = @default.Id,
        QueueName = "tf-example",
        VirtualHostName = defaultVirtualHost.VirtualHostName,
    });

    var defaultBinding = new AliCloud.Amqp.Binding("default", new()
    {
        Argument = "x-match:all",
        BindingKey = defaultQueue.QueueName,
        BindingType = "QUEUE",
        DestinationName = "tf-example",
        InstanceId = @default.Id,
        SourceExchange = defaultExchange.ExchangeName,
        VirtualHostName = defaultVirtualHost.VirtualHostName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.amqp.Instance;
import com.pulumi.alicloud.amqp.InstanceArgs;
import com.pulumi.alicloud.amqp.VirtualHost;
import com.pulumi.alicloud.amqp.VirtualHostArgs;
import com.pulumi.alicloud.amqp.Exchange;
import com.pulumi.alicloud.amqp.ExchangeArgs;
import com.pulumi.alicloud.amqp.Queue;
import com.pulumi.alicloud.amqp.QueueArgs;
import com.pulumi.alicloud.amqp.Binding;
import com.pulumi.alicloud.amqp.BindingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Instance("default", InstanceArgs.builder()
            .instanceType("enterprise")
            .maxTps(3000)
            .queueCapacity(200)
            .storageSize(700)
            .supportEip(false)
            .maxEipTps(128)
            .paymentType("Subscription")
            .period(1)
            .build());

        var defaultVirtualHost = new VirtualHost("defaultVirtualHost", VirtualHostArgs.builder()
            .instanceId(default_.id())
            .virtualHostName("tf-example")
            .build());

        var defaultExchange = new Exchange("defaultExchange", ExchangeArgs.builder()
            .autoDeleteState(false)
            .exchangeName("tf-example")
            .exchangeType("HEADERS")
            .instanceId(default_.id())
            .internal(false)
            .virtualHostName(defaultVirtualHost.virtualHostName())
            .build());

        var defaultQueue = new Queue("defaultQueue", QueueArgs.builder()
            .instanceId(default_.id())
            .queueName("tf-example")
            .virtualHostName(defaultVirtualHost.virtualHostName())
            .build());

        var defaultBinding = new Binding("defaultBinding", BindingArgs.builder()
            .argument("x-match:all")
            .bindingKey(defaultQueue.queueName())
            .bindingType("QUEUE")
            .destinationName("tf-example")
            .instanceId(default_.id())
            .sourceExchange(defaultExchange.exchangeName())
            .virtualHostName(defaultVirtualHost.virtualHostName())
            .build());

    }
}
Copy
resources:
  default:
    type: alicloud:amqp:Instance
    properties:
      instanceType: enterprise
      maxTps: 3000
      queueCapacity: 200
      storageSize: 700
      supportEip: false
      maxEipTps: 128
      paymentType: Subscription
      period: 1
  defaultVirtualHost:
    type: alicloud:amqp:VirtualHost
    name: default
    properties:
      instanceId: ${default.id}
      virtualHostName: tf-example
  defaultExchange:
    type: alicloud:amqp:Exchange
    name: default
    properties:
      autoDeleteState: false
      exchangeName: tf-example
      exchangeType: HEADERS
      instanceId: ${default.id}
      internal: false
      virtualHostName: ${defaultVirtualHost.virtualHostName}
  defaultQueue:
    type: alicloud:amqp:Queue
    name: default
    properties:
      instanceId: ${default.id}
      queueName: tf-example
      virtualHostName: ${defaultVirtualHost.virtualHostName}
  defaultBinding:
    type: alicloud:amqp:Binding
    name: default
    properties:
      argument: x-match:all
      bindingKey: ${defaultQueue.queueName}
      bindingType: QUEUE
      destinationName: tf-example
      instanceId: ${default.id}
      sourceExchange: ${defaultExchange.exchangeName}
      virtualHostName: ${defaultVirtualHost.virtualHostName}
Copy

Create Binding Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Binding(name: string, args: BindingArgs, opts?: CustomResourceOptions);
@overload
def Binding(resource_name: str,
            args: BindingArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Binding(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            binding_key: Optional[str] = None,
            binding_type: Optional[str] = None,
            destination_name: Optional[str] = None,
            instance_id: Optional[str] = None,
            source_exchange: Optional[str] = None,
            virtual_host_name: Optional[str] = None,
            argument: Optional[str] = None)
func NewBinding(ctx *Context, name string, args BindingArgs, opts ...ResourceOption) (*Binding, error)
public Binding(string name, BindingArgs args, CustomResourceOptions? opts = null)
public Binding(String name, BindingArgs args)
public Binding(String name, BindingArgs args, CustomResourceOptions options)
type: alicloud:amqp:Binding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BindingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BindingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var bindingResource = new AliCloud.Amqp.Binding("bindingResource", new()
{
    BindingKey = "string",
    BindingType = "string",
    DestinationName = "string",
    InstanceId = "string",
    SourceExchange = "string",
    VirtualHostName = "string",
    Argument = "string",
});
Copy
example, err := amqp.NewBinding(ctx, "bindingResource", &amqp.BindingArgs{
	BindingKey:      pulumi.String("string"),
	BindingType:     pulumi.String("string"),
	DestinationName: pulumi.String("string"),
	InstanceId:      pulumi.String("string"),
	SourceExchange:  pulumi.String("string"),
	VirtualHostName: pulumi.String("string"),
	Argument:        pulumi.String("string"),
})
Copy
var bindingResource = new Binding("bindingResource", BindingArgs.builder()
    .bindingKey("string")
    .bindingType("string")
    .destinationName("string")
    .instanceId("string")
    .sourceExchange("string")
    .virtualHostName("string")
    .argument("string")
    .build());
Copy
binding_resource = alicloud.amqp.Binding("bindingResource",
    binding_key="string",
    binding_type="string",
    destination_name="string",
    instance_id="string",
    source_exchange="string",
    virtual_host_name="string",
    argument="string")
Copy
const bindingResource = new alicloud.amqp.Binding("bindingResource", {
    bindingKey: "string",
    bindingType: "string",
    destinationName: "string",
    instanceId: "string",
    sourceExchange: "string",
    virtualHostName: "string",
    argument: "string",
});
Copy
type: alicloud:amqp:Binding
properties:
    argument: string
    bindingKey: string
    bindingType: string
    destinationName: string
    instanceId: string
    sourceExchange: string
    virtualHostName: string
Copy

Binding Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Binding resource accepts the following input properties:

BindingKey
This property is required.
Changes to this property will trigger replacement.
string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
BindingType
This property is required.
Changes to this property will trigger replacement.
string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
DestinationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the object that you want to bind to the source exchange.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
SourceExchange
This property is required.
Changes to this property will trigger replacement.
string
The name of the source exchange.
VirtualHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the vhost.
Argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

BindingKey
This property is required.
Changes to this property will trigger replacement.
string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
BindingType
This property is required.
Changes to this property will trigger replacement.
string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
DestinationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the object that you want to bind to the source exchange.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
SourceExchange
This property is required.
Changes to this property will trigger replacement.
string
The name of the source exchange.
VirtualHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the vhost.
Argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey
This property is required.
Changes to this property will trigger replacement.
String
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType
This property is required.
Changes to this property will trigger replacement.
String
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the object that you want to bind to the source exchange.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the instance.
sourceExchange
This property is required.
Changes to this property will trigger replacement.
String
The name of the source exchange.
virtualHostName
This property is required.
Changes to this property will trigger replacement.
String
The name of the vhost.
argument Changes to this property will trigger replacement. String

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey
This property is required.
Changes to this property will trigger replacement.
string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType
This property is required.
Changes to this property will trigger replacement.
string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the object that you want to bind to the source exchange.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the instance.
sourceExchange
This property is required.
Changes to this property will trigger replacement.
string
The name of the source exchange.
virtualHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the vhost.
argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

binding_key
This property is required.
Changes to this property will trigger replacement.
str
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
binding_type
This property is required.
Changes to this property will trigger replacement.
str
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destination_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the object that you want to bind to the source exchange.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the instance.
source_exchange
This property is required.
Changes to this property will trigger replacement.
str
The name of the source exchange.
virtual_host_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the vhost.
argument Changes to this property will trigger replacement. str

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey
This property is required.
Changes to this property will trigger replacement.
String
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType
This property is required.
Changes to this property will trigger replacement.
String
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the object that you want to bind to the source exchange.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the instance.
sourceExchange
This property is required.
Changes to this property will trigger replacement.
String
The name of the source exchange.
virtualHostName
This property is required.
Changes to this property will trigger replacement.
String
The name of the vhost.
argument Changes to this property will trigger replacement. String

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

Outputs

All input properties are implicitly available as output properties. Additionally, the Binding 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 Binding Resource

Get an existing Binding 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?: BindingState, opts?: CustomResourceOptions): Binding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        argument: Optional[str] = None,
        binding_key: Optional[str] = None,
        binding_type: Optional[str] = None,
        destination_name: Optional[str] = None,
        instance_id: Optional[str] = None,
        source_exchange: Optional[str] = None,
        virtual_host_name: Optional[str] = None) -> Binding
func GetBinding(ctx *Context, name string, id IDInput, state *BindingState, opts ...ResourceOption) (*Binding, error)
public static Binding Get(string name, Input<string> id, BindingState? state, CustomResourceOptions? opts = null)
public static Binding get(String name, Output<String> id, BindingState state, CustomResourceOptions options)
resources:  _:    type: alicloud:amqp:Binding    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

BindingKey Changes to this property will trigger replacement. string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
BindingType Changes to this property will trigger replacement. string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
DestinationName Changes to this property will trigger replacement. string
The name of the object that you want to bind to the source exchange.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance.
SourceExchange Changes to this property will trigger replacement. string
The name of the source exchange.
VirtualHostName Changes to this property will trigger replacement. string
The name of the vhost.
Argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

BindingKey Changes to this property will trigger replacement. string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
BindingType Changes to this property will trigger replacement. string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
DestinationName Changes to this property will trigger replacement. string
The name of the object that you want to bind to the source exchange.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance.
SourceExchange Changes to this property will trigger replacement. string
The name of the source exchange.
VirtualHostName Changes to this property will trigger replacement. string
The name of the vhost.
argument Changes to this property will trigger replacement. String

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey Changes to this property will trigger replacement. String
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType Changes to this property will trigger replacement. String
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName Changes to this property will trigger replacement. String
The name of the object that you want to bind to the source exchange.
instanceId Changes to this property will trigger replacement. String
The ID of the instance.
sourceExchange Changes to this property will trigger replacement. String
The name of the source exchange.
virtualHostName Changes to this property will trigger replacement. String
The name of the vhost.
argument Changes to this property will trigger replacement. string

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey Changes to this property will trigger replacement. string
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType Changes to this property will trigger replacement. string
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName Changes to this property will trigger replacement. string
The name of the object that you want to bind to the source exchange.
instanceId Changes to this property will trigger replacement. string
The ID of the instance.
sourceExchange Changes to this property will trigger replacement. string
The name of the source exchange.
virtualHostName Changes to this property will trigger replacement. string
The name of the vhost.
argument Changes to this property will trigger replacement. str

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

binding_key Changes to this property will trigger replacement. str
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
binding_type Changes to this property will trigger replacement. str
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destination_name Changes to this property will trigger replacement. str
The name of the object that you want to bind to the source exchange.
instance_id Changes to this property will trigger replacement. str
The ID of the instance.
source_exchange Changes to this property will trigger replacement. str
The name of the source exchange.
virtual_host_name Changes to this property will trigger replacement. str
The name of the vhost.
argument Changes to this property will trigger replacement. String

The key-value pairs that are configured for the headers attributes of a message. Default value: x-match:all. Valid values:

  • x-match:all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message.
  • x-match:any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.
  • NOTE: If the exchange type is not 'HEADERS', the argument should not been set, otherwise, there are always "forces replacement" changes.

bindingKey Changes to this property will trigger replacement. String
The Binding Key.

  • For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). The binding key must be 1 to 255 characters in length.
  • For a topic source exchange: The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@). If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.). The binding key must be 1 to 255 characters in length.
bindingType Changes to this property will trigger replacement. String
The type of the object that you want to bind to the source exchange. Valid values: EXCHANGE, QUEUE.
destinationName Changes to this property will trigger replacement. String
The name of the object that you want to bind to the source exchange.
instanceId Changes to this property will trigger replacement. String
The ID of the instance.
sourceExchange Changes to this property will trigger replacement. String
The name of the source exchange.
virtualHostName Changes to this property will trigger replacement. String
The name of the vhost.

Import

RabbitMQ (AMQP) Binding can be imported using the id, e.g.

$ pulumi import alicloud:amqp/binding:Binding example <instance_id>:<virtual_host_name>:<source_exchange>:<destination_name>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.