rabbitmq logo
RabbitMQ v3.2.0, Nov 11 21

rabbitmq.TopicPermissions

The rabbitmq.TopicPermissions resource creates and manages a user’s set of topic permissions.

Example Usage

using Pulumi;
using RabbitMQ = Pulumi.RabbitMQ;

class MyStack : Stack
{
    public MyStack()
    {
        var testVHost = new RabbitMQ.VHost("testVHost", new RabbitMQ.VHostArgs
        {
        });
        var testUser = new RabbitMQ.User("testUser", new RabbitMQ.UserArgs
        {
            Password = "foobar",
            Tags = 
            {
                "administrator",
            },
        });
        var testTopicPermissions = new RabbitMQ.TopicPermissions("testTopicPermissions", new RabbitMQ.TopicPermissionsArgs
        {
            Permissions = 
            {
                new RabbitMQ.Inputs.TopicPermissionsPermissionArgs
                {
                    Exchange = "amq.topic",
                    Read = ".*",
                    Write = ".*",
                },
            },
            User = testUser.Name,
            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
		}
		testUser, err := rabbitmq.NewUser(ctx, "testUser", &rabbitmq.UserArgs{
			Password: pulumi.String("foobar"),
			Tags: pulumi.StringArray{
				pulumi.String("administrator"),
			},
		})
		if err != nil {
			return err
		}
		_, err = rabbitmq.NewTopicPermissions(ctx, "testTopicPermissions", &rabbitmq.TopicPermissionsArgs{
			Permissions: TopicPermissionsPermissionArray{
				&TopicPermissionsPermissionArgs{
					Exchange: pulumi.String("amq.topic"),
					Read:     pulumi.String(".*"),
					Write:    pulumi.String(".*"),
				},
			},
			User:  testUser.Name,
			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_user = rabbitmq.User("testUser",
    password="foobar",
    tags=["administrator"])
test_topic_permissions = rabbitmq.TopicPermissions("testTopicPermissions",
    permissions=[rabbitmq.TopicPermissionsPermissionArgs(
        exchange="amq.topic",
        read=".*",
        write=".*",
    )],
    user=test_user.name,
    vhost=test_v_host.name)
import * as pulumi from "@pulumi/pulumi";
import * as rabbitmq from "@pulumi/rabbitmq";

const testVHost = new rabbitmq.VHost("test", {});
const testUser = new rabbitmq.User("test", {
    password: "foobar",
    tags: ["administrator"],
});
const testTopicPermissions = new rabbitmq.TopicPermissions("test", {
    permissions: [{
        exchange: "amq.topic",
        read: ".*",
        write: ".*",
    }],
    user: testUser.name,
    vhost: testVHost.name,
});

Coming soon!

Create TopicPermissions Resource

new TopicPermissions(name: string, args: TopicPermissionsArgs, opts?: CustomResourceOptions);
@overload
def TopicPermissions(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     permissions: Optional[Sequence[TopicPermissionsPermissionArgs]] = None,
                     user: Optional[str] = None,
                     vhost: Optional[str] = None)
@overload
def TopicPermissions(resource_name: str,
                     args: TopicPermissionsArgs,
                     opts: Optional[ResourceOptions] = None)
func NewTopicPermissions(ctx *Context, name string, args TopicPermissionsArgs, opts ...ResourceOption) (*TopicPermissions, error)
public TopicPermissions(string name, TopicPermissionsArgs args, CustomResourceOptions? opts = null)
public TopicPermissions(String name, TopicPermissionsArgs args)
public TopicPermissions(String name, TopicPermissionsArgs args, CustomResourceOptions options)
type: rabbitmq:TopicPermissions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TopicPermissionsArgs
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 TopicPermissionsArgs
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 TopicPermissionsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TopicPermissionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TopicPermissionsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

TopicPermissions 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 TopicPermissions resource accepts the following input properties:

Permissions List<Pulumi.RabbitMQ.Inputs.TopicPermissionsPermissionArgs>

The settings of the permissions. The structure is described below.

User string

The user to apply the permissions to.

Vhost string

The vhost to create the resource in.

Permissions []TopicPermissionsPermissionArgs

The settings of the permissions. The structure is described below.

User string

The user to apply the permissions to.

Vhost string

The vhost to create the resource in.

permissions List<TopicPermissionsPermissionArgs>

The settings of the permissions. The structure is described below.

user String

The user to apply the permissions to.

vhost String

The vhost to create the resource in.

permissions TopicPermissionsPermissionArgs[]

The settings of the permissions. The structure is described below.

user string

The user to apply the permissions to.

vhost string

The vhost to create the resource in.

permissions Sequence[TopicPermissionsPermissionArgs]

The settings of the permissions. The structure is described below.

user str

The user to apply the permissions to.

vhost str

The vhost to create the resource in.

permissions List<Property Map>

The settings of the permissions. The structure is described below.

user String

The user to apply the permissions to.

vhost String

The vhost to create the resource in.

Outputs

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

Get an existing TopicPermissions 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?: TopicPermissionsState, opts?: CustomResourceOptions): TopicPermissions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        permissions: Optional[Sequence[TopicPermissionsPermissionArgs]] = None,
        user: Optional[str] = None,
        vhost: Optional[str] = None) -> TopicPermissions
func GetTopicPermissions(ctx *Context, name string, id IDInput, state *TopicPermissionsState, opts ...ResourceOption) (*TopicPermissions, error)
public static TopicPermissions Get(string name, Input<string> id, TopicPermissionsState? state, CustomResourceOptions? opts = null)
public static TopicPermissions get(String name, Output<String> id, TopicPermissionsState 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.
The following state arguments are supported:
Permissions List<Pulumi.RabbitMQ.Inputs.TopicPermissionsPermissionArgs>

The settings of the permissions. The structure is described below.

User string

The user to apply the permissions to.

Vhost string

The vhost to create the resource in.

Permissions []TopicPermissionsPermissionArgs

The settings of the permissions. The structure is described below.

User string

The user to apply the permissions to.

Vhost string

The vhost to create the resource in.

permissions List<TopicPermissionsPermissionArgs>

The settings of the permissions. The structure is described below.

user String

The user to apply the permissions to.

vhost String

The vhost to create the resource in.

permissions TopicPermissionsPermissionArgs[]

The settings of the permissions. The structure is described below.

user string

The user to apply the permissions to.

vhost string

The vhost to create the resource in.

permissions Sequence[TopicPermissionsPermissionArgs]

The settings of the permissions. The structure is described below.

user str

The user to apply the permissions to.

vhost str

The vhost to create the resource in.

permissions List<Property Map>

The settings of the permissions. The structure is described below.

user String

The user to apply the permissions to.

vhost String

The vhost to create the resource in.

Supporting Types

TopicPermissionsPermission

Exchange string

The exchange to set the permissions for.

Read string

The "read" ACL.

Write string

The "write" ACL.

Exchange string

The exchange to set the permissions for.

Read string

The "read" ACL.

Write string

The "write" ACL.

exchange String

The exchange to set the permissions for.

read String

The "read" ACL.

write String

The "write" ACL.

exchange string

The exchange to set the permissions for.

read string

The "read" ACL.

write string

The "write" ACL.

exchange str

The exchange to set the permissions for.

read str

The "read" ACL.

write str

The "write" ACL.

exchange String

The exchange to set the permissions for.

read String

The "read" ACL.

write String

The "write" ACL.

Import

Permissions can be imported using the id which is composed of

user@vhost. E.g.

 $ pulumi import rabbitmq:index/topicPermissions:TopicPermissions test user@vhost

Package Details

Repository
RabbitMQ pulumi/pulumi-rabbitmq
License
Apache-2.0
Notes

This Pulumi package is based on the rabbitmq Terraform Provider.