Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

VirtualHost

Provides a RabbitMQ (AMQP) Virtual Host resource.

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

NOTE: Available in v1.126.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Amqp.VirtualHost("example", new AliCloud.Amqp.VirtualHostArgs
        {
            InstanceId = "amqp-abc12345",
            VirtualHostName = "my-VirtualHost",
        });
    }

}
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 {
		_, err := amqp.NewVirtualHost(ctx, "example", &amqp.VirtualHostArgs{
			InstanceId:      pulumi.String("amqp-abc12345"),
			VirtualHostName: pulumi.String("my-VirtualHost"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.amqp.VirtualHost;
import com.pulumi.alicloud.amqp.VirtualHostArgs;
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 example = new VirtualHost("example", VirtualHostArgs.builder()        
            .instanceId("amqp-abc12345")
            .virtualHostName("my-VirtualHost")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.amqp.VirtualHost("example",
    instance_id="amqp-abc12345",
    virtual_host_name="my-VirtualHost")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.amqp.VirtualHost("example", {
    instanceId: "amqp-abc12345",
    virtualHostName: "my-VirtualHost",
});
resources:
  example:
    type: alicloud:amqp:VirtualHost
    properties:
      instanceId: amqp-abc12345
      virtualHostName: my-VirtualHost

Create a VirtualHost Resource

new VirtualHost(name: string, args: VirtualHostArgs, opts?: CustomResourceOptions);
@overload
def VirtualHost(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                instance_id: Optional[str] = None,
                virtual_host_name: Optional[str] = None)
@overload
def VirtualHost(resource_name: str,
                args: VirtualHostArgs,
                opts: Optional[ResourceOptions] = None)
func NewVirtualHost(ctx *Context, name string, args VirtualHostArgs, opts ...ResourceOption) (*VirtualHost, error)
public VirtualHost(string name, VirtualHostArgs args, CustomResourceOptions? opts = null)
public VirtualHost(String name, VirtualHostArgs args)
public VirtualHost(String name, VirtualHostArgs args, CustomResourceOptions options)
type: alicloud:amqp:VirtualHost
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

InstanceId string

InstanceId.

VirtualHostName string

VirtualHostName.

InstanceId string

InstanceId.

VirtualHostName string

VirtualHostName.

instanceId String

InstanceId.

virtualHostName String

VirtualHostName.

instanceId string

InstanceId.

virtualHostName string

VirtualHostName.

instance_id str

InstanceId.

virtual_host_name str

VirtualHostName.

instanceId String

InstanceId.

virtualHostName String

VirtualHostName.

Outputs

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

Get an existing VirtualHost 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?: VirtualHostState, opts?: CustomResourceOptions): VirtualHost
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instance_id: Optional[str] = None,
        virtual_host_name: Optional[str] = None) -> VirtualHost
func GetVirtualHost(ctx *Context, name string, id IDInput, state *VirtualHostState, opts ...ResourceOption) (*VirtualHost, error)
public static VirtualHost Get(string name, Input<string> id, VirtualHostState? state, CustomResourceOptions? opts = null)
public static VirtualHost get(String name, Output<String> id, VirtualHostState 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:
InstanceId string

InstanceId.

VirtualHostName string

VirtualHostName.

InstanceId string

InstanceId.

VirtualHostName string

VirtualHostName.

instanceId String

InstanceId.

virtualHostName String

VirtualHostName.

instanceId string

InstanceId.

virtualHostName string

VirtualHostName.

instance_id str

InstanceId.

virtual_host_name str

VirtualHostName.

instanceId String

InstanceId.

virtualHostName String

VirtualHostName.

Import

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

 $ pulumi import alicloud:amqp/virtualHost:VirtualHost example <instance_id>:<virtual_host_name>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.