com.pulumi.alicloud.amqp.Binding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.amqp;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.amqp.BindingArgs;
import com.pulumi.alicloud.amqp.inputs.BindingState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;
/**
* Provides a RabbitMQ (AMQP) Binding resource to bind tha exchange with another exchange or queue.
*
* For information about RabbitMQ (AMQP) Binding and how to use it, see [What is Binding](https://www.alibabacloud.com/help/en/message-queue-for-rabbitmq/latest/createbinding).
*
* > **NOTE:** Available since v1.135.0.
*
* ## Example Usage
*
* Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* RabbitMQ (AMQP) Binding can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:amqp/binding:Binding example <instance_id>:<virtual_host_name>:<source_exchange>:<destination_name>
* ```
*
*/
@ResourceType(type="alicloud:amqp/binding:Binding")
public class Binding extends com.pulumi.resources.CustomResource {
/**
* X-match Attributes. Valid Values:
* * "x-match:all": Default Value, All the Message Header of Key-Value Pairs Stored in the Must Match.
* * "x-match:any": at Least One Pair of the Message Header of Key-Value Pairs Stored in the Must Match.
*
* **NOTE:** This Parameter Applies Only to Headers Exchange Other Types of Exchange Is Invalid. Other Types of Exchange Here Can Either Be an Arbitrary Value.
*
*/
@Export(name="argument", refs={String.class}, tree="[0]")
private Output argument;
/**
* @return X-match Attributes. Valid Values:
* * "x-match:all": Default Value, All the Message Header of Key-Value Pairs Stored in the Must Match.
* * "x-match:any": at Least One Pair of the Message Header of Key-Value Pairs Stored in the Must Match.
*
* **NOTE:** This Parameter Applies Only to Headers Exchange Other Types of Exchange Is Invalid. Other Types of Exchange Here Can Either Be an Arbitrary Value.
*
*/
public Output argument() {
return this.argument;
}
/**
* The Binding Key.
* * For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs ({@literal @}).
* 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 ({@literal @}).
* 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.
*
*/
@Export(name="bindingKey", refs={String.class}, tree="[0]")
private Output bindingKey;
/**
* @return The Binding Key.
* * For a non-topic source exchange: The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs ({@literal @}).
* 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 ({@literal @}).
* 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.
*
*/
public Output bindingKey() {
return this.bindingKey;
}
/**
* The Target Binding Types. Valid values: `EXCHANGE`, `QUEUE`.
*
*/
@Export(name="bindingType", refs={String.class}, tree="[0]")
private Output bindingType;
/**
* @return The Target Binding Types. Valid values: `EXCHANGE`, `QUEUE`.
*
*/
public Output bindingType() {
return this.bindingType;
}
/**
* The Target Queue Or Exchange of the Name.
*
*/
@Export(name="destinationName", refs={String.class}, tree="[0]")
private Output destinationName;
/**
* @return The Target Queue Or Exchange of the Name.
*
*/
public Output destinationName() {
return this.destinationName;
}
/**
* Instance Id.
*
*/
@Export(name="instanceId", refs={String.class}, tree="[0]")
private Output instanceId;
/**
* @return Instance Id.
*
*/
public Output instanceId() {
return this.instanceId;
}
/**
* The Source Exchange Name.
*
*/
@Export(name="sourceExchange", refs={String.class}, tree="[0]")
private Output sourceExchange;
/**
* @return The Source Exchange Name.
*
*/
public Output sourceExchange() {
return this.sourceExchange;
}
/**
* Virtualhost Name.
*
*/
@Export(name="virtualHostName", refs={String.class}, tree="[0]")
private Output virtualHostName;
/**
* @return Virtualhost Name.
*
*/
public Output virtualHostName() {
return this.virtualHostName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Binding(String name) {
this(name, BindingArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Binding(String name, BindingArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Binding(String name, BindingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:amqp/binding:Binding", name, args == null ? BindingArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private Binding(String name, Output id, @Nullable BindingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:amqp/binding:Binding", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Binding get(String name, Output id, @Nullable BindingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Binding(name, id, state, options);
}
}