volcengine.rocketmq.RocketMQPublicAddress
Explore with Pulumi AI
Provides a resource to manage rocketmq public address
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooRocketMQInstance = new volcengine.rocketmq.RocketMQInstance("fooRocketMQInstance", {
zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
subnetId: fooSubnet.id,
version: "4.8",
computeSpec: "rocketmq.n1.x2.micro",
storageSpace: 300,
autoScaleQueue: true,
fileReservedTime: 10,
instanceName: "acc-test-rocketmq",
instanceDescription: "acc-test",
projectName: "default",
chargeInfo: {
chargeType: "PostPaid",
},
tags: [{
key: "k1",
value: "v1",
}],
});
const fooAddress = new volcengine.eip.Address("fooAddress", {
billingType: "PostPaidByBandwidth",
bandwidth: 1,
isp: "BGP",
description: "acc-test",
projectName: "default",
});
const fooRocketMQPublicAddress = new volcengine.rocketmq.RocketMQPublicAddress("fooRocketMQPublicAddress", {
instanceId: fooRocketMQInstance.id,
eipId: fooAddress.id,
sslMode: "permissive",
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_rocket_mq_instance = volcengine.rocketmq.RocketMQInstance("fooRocketMQInstance",
zone_ids=[foo_zones.zones[0].id],
subnet_id=foo_subnet.id,
version="4.8",
compute_spec="rocketmq.n1.x2.micro",
storage_space=300,
auto_scale_queue=True,
file_reserved_time=10,
instance_name="acc-test-rocketmq",
instance_description="acc-test",
project_name="default",
charge_info=volcengine.rocketmq.RocketMQInstanceChargeInfoArgs(
charge_type="PostPaid",
),
tags=[volcengine.rocketmq.RocketMQInstanceTagArgs(
key="k1",
value="v1",
)])
foo_address = volcengine.eip.Address("fooAddress",
billing_type="PostPaidByBandwidth",
bandwidth=1,
isp="BGP",
description="acc-test",
project_name="default")
foo_rocket_mq_public_address = volcengine.rocketmq.RocketMQPublicAddress("fooRocketMQPublicAddress",
instance_id=foo_rocket_mq_instance.id,
eip_id=foo_address.id,
ssl_mode="permissive")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/eip"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rocketmq"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooRocketMQInstance, err := rocketmq.NewRocketMQInstance(ctx, "fooRocketMQInstance", &rocketmq.RocketMQInstanceArgs{
ZoneIds: pulumi.StringArray{
pulumi.String(fooZones.Zones[0].Id),
},
SubnetId: fooSubnet.ID(),
Version: pulumi.String("4.8"),
ComputeSpec: pulumi.String("rocketmq.n1.x2.micro"),
StorageSpace: pulumi.Int(300),
AutoScaleQueue: pulumi.Bool(true),
FileReservedTime: pulumi.Int(10),
InstanceName: pulumi.String("acc-test-rocketmq"),
InstanceDescription: pulumi.String("acc-test"),
ProjectName: pulumi.String("default"),
ChargeInfo: &rocketmq.RocketMQInstanceChargeInfoArgs{
ChargeType: pulumi.String("PostPaid"),
},
Tags: rocketmq.RocketMQInstanceTagArray{
&rocketmq.RocketMQInstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
fooAddress, err := eip.NewAddress(ctx, "fooAddress", &eip.AddressArgs{
BillingType: pulumi.String("PostPaidByBandwidth"),
Bandwidth: pulumi.Int(1),
Isp: pulumi.String("BGP"),
Description: pulumi.String("acc-test"),
ProjectName: pulumi.String("default"),
})
if err != nil {
return err
}
_, err = rocketmq.NewRocketMQPublicAddress(ctx, "fooRocketMQPublicAddress", &rocketmq.RocketMQPublicAddressArgs{
InstanceId: fooRocketMQInstance.ID(),
EipId: fooAddress.ID(),
SslMode: pulumi.String("permissive"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooRocketMQInstance = new Volcengine.Rocketmq.RocketMQInstance("fooRocketMQInstance", new()
{
ZoneIds = new[]
{
fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
},
SubnetId = fooSubnet.Id,
Version = "4.8",
ComputeSpec = "rocketmq.n1.x2.micro",
StorageSpace = 300,
AutoScaleQueue = true,
FileReservedTime = 10,
InstanceName = "acc-test-rocketmq",
InstanceDescription = "acc-test",
ProjectName = "default",
ChargeInfo = new Volcengine.Rocketmq.Inputs.RocketMQInstanceChargeInfoArgs
{
ChargeType = "PostPaid",
},
Tags = new[]
{
new Volcengine.Rocketmq.Inputs.RocketMQInstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooAddress = new Volcengine.Eip.Address("fooAddress", new()
{
BillingType = "PostPaidByBandwidth",
Bandwidth = 1,
Isp = "BGP",
Description = "acc-test",
ProjectName = "default",
});
var fooRocketMQPublicAddress = new Volcengine.Rocketmq.RocketMQPublicAddress("fooRocketMQPublicAddress", new()
{
InstanceId = fooRocketMQInstance.Id,
EipId = fooAddress.Id,
SslMode = "permissive",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.rocketmq.RocketMQInstance;
import com.pulumi.volcengine.rocketmq.RocketMQInstanceArgs;
import com.pulumi.volcengine.rocketmq.inputs.RocketMQInstanceChargeInfoArgs;
import com.pulumi.volcengine.rocketmq.inputs.RocketMQInstanceTagArgs;
import com.pulumi.volcengine.eip.Address;
import com.pulumi.volcengine.eip.AddressArgs;
import com.pulumi.volcengine.rocketmq.RocketMQPublicAddress;
import com.pulumi.volcengine.rocketmq.RocketMQPublicAddressArgs;
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) {
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooRocketMQInstance = new RocketMQInstance("fooRocketMQInstance", RocketMQInstanceArgs.builder()
.zoneIds(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.subnetId(fooSubnet.id())
.version("4.8")
.computeSpec("rocketmq.n1.x2.micro")
.storageSpace(300)
.autoScaleQueue(true)
.fileReservedTime(10)
.instanceName("acc-test-rocketmq")
.instanceDescription("acc-test")
.projectName("default")
.chargeInfo(RocketMQInstanceChargeInfoArgs.builder()
.chargeType("PostPaid")
.build())
.tags(RocketMQInstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooAddress = new Address("fooAddress", AddressArgs.builder()
.billingType("PostPaidByBandwidth")
.bandwidth(1)
.isp("BGP")
.description("acc-test")
.projectName("default")
.build());
var fooRocketMQPublicAddress = new RocketMQPublicAddress("fooRocketMQPublicAddress", RocketMQPublicAddressArgs.builder()
.instanceId(fooRocketMQInstance.id())
.eipId(fooAddress.id())
.sslMode("permissive")
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooRocketMQInstance:
type: volcengine:rocketmq:RocketMQInstance
properties:
zoneIds:
- ${fooZones.zones[0].id}
subnetId: ${fooSubnet.id}
version: '4.8'
computeSpec: rocketmq.n1.x2.micro
storageSpace: 300
autoScaleQueue: true
fileReservedTime: 10
instanceName: acc-test-rocketmq
instanceDescription: acc-test
projectName: default
chargeInfo:
chargeType: PostPaid
tags:
- key: k1
value: v1
fooAddress:
type: volcengine:eip:Address
properties:
billingType: PostPaidByBandwidth
bandwidth: 1
isp: BGP
description: acc-test
projectName: default
fooRocketMQPublicAddress:
type: volcengine:rocketmq:RocketMQPublicAddress
properties:
instanceId: ${fooRocketMQInstance.id}
eipId: ${fooAddress.id}
sslMode: permissive
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create RocketMQPublicAddress Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RocketMQPublicAddress(name: string, args: RocketMQPublicAddressArgs, opts?: CustomResourceOptions);
@overload
def RocketMQPublicAddress(resource_name: str,
args: RocketMQPublicAddressArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RocketMQPublicAddress(resource_name: str,
opts: Optional[ResourceOptions] = None,
eip_id: Optional[str] = None,
instance_id: Optional[str] = None,
ssl_mode: Optional[str] = None)
func NewRocketMQPublicAddress(ctx *Context, name string, args RocketMQPublicAddressArgs, opts ...ResourceOption) (*RocketMQPublicAddress, error)
public RocketMQPublicAddress(string name, RocketMQPublicAddressArgs args, CustomResourceOptions? opts = null)
public RocketMQPublicAddress(String name, RocketMQPublicAddressArgs args)
public RocketMQPublicAddress(String name, RocketMQPublicAddressArgs args, CustomResourceOptions options)
type: volcengine:rocketmq:RocketMQPublicAddress
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RocketMQPublicAddressArgs
- 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 RocketMQPublicAddressArgs
- 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 RocketMQPublicAddressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RocketMQPublicAddressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RocketMQPublicAddressArgs
- 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 rocketMQPublicAddressResource = new Volcengine.Rocketmq.RocketMQPublicAddress("rocketMQPublicAddressResource", new()
{
EipId = "string",
InstanceId = "string",
SslMode = "string",
});
example, err := rocketmq.NewRocketMQPublicAddress(ctx, "rocketMQPublicAddressResource", &rocketmq.RocketMQPublicAddressArgs{
EipId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
SslMode: pulumi.String("string"),
})
var rocketMQPublicAddressResource = new RocketMQPublicAddress("rocketMQPublicAddressResource", RocketMQPublicAddressArgs.builder()
.eipId("string")
.instanceId("string")
.sslMode("string")
.build());
rocket_mq_public_address_resource = volcengine.rocketmq.RocketMQPublicAddress("rocketMQPublicAddressResource",
eip_id="string",
instance_id="string",
ssl_mode="string")
const rocketMQPublicAddressResource = new volcengine.rocketmq.RocketMQPublicAddress("rocketMQPublicAddressResource", {
eipId: "string",
instanceId: "string",
sslMode: "string",
});
type: volcengine:rocketmq:RocketMQPublicAddress
properties:
eipId: string
instanceId: string
sslMode: string
RocketMQPublicAddress 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 RocketMQPublicAddress resource accepts the following input properties:
- Eip
Id string - The id of the eip.
- Instance
Id string - The id of rocketmq instance.
- Ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- Eip
Id string - The id of the eip.
- Instance
Id string - The id of rocketmq instance.
- Ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id String - The id of the eip.
- instance
Id String - The id of rocketmq instance.
- ssl
Mode String - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id string - The id of the eip.
- instance
Id string - The id of rocketmq instance.
- ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip_
id str - The id of the eip.
- instance_
id str - The id of rocketmq instance.
- ssl_
mode str - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id String - The id of the eip.
- instance
Id String - The id of rocketmq instance.
- ssl
Mode String - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
Outputs
All input properties are implicitly available as output properties. Additionally, the RocketMQPublicAddress 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 RocketMQPublicAddress Resource
Get an existing RocketMQPublicAddress 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?: RocketMQPublicAddressState, opts?: CustomResourceOptions): RocketMQPublicAddress
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
eip_id: Optional[str] = None,
instance_id: Optional[str] = None,
ssl_mode: Optional[str] = None) -> RocketMQPublicAddress
func GetRocketMQPublicAddress(ctx *Context, name string, id IDInput, state *RocketMQPublicAddressState, opts ...ResourceOption) (*RocketMQPublicAddress, error)
public static RocketMQPublicAddress Get(string name, Input<string> id, RocketMQPublicAddressState? state, CustomResourceOptions? opts = null)
public static RocketMQPublicAddress get(String name, Output<String> id, RocketMQPublicAddressState state, CustomResourceOptions options)
resources: _: type: volcengine:rocketmq:RocketMQPublicAddress get: id: ${id}
- 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.
- Eip
Id string - The id of the eip.
- Instance
Id string - The id of rocketmq instance.
- Ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- Eip
Id string - The id of the eip.
- Instance
Id string - The id of rocketmq instance.
- Ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id String - The id of the eip.
- instance
Id String - The id of rocketmq instance.
- ssl
Mode String - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id string - The id of the eip.
- instance
Id string - The id of rocketmq instance.
- ssl
Mode string - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip_
id str - The id of the eip.
- instance_
id str - The id of rocketmq instance.
- ssl_
mode str - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
- eip
Id String - The id of the eip.
- instance
Id String - The id of rocketmq instance.
- ssl
Mode String - The ssl mode of the rocketmq instance. Valid values:
enforcing
,permissive
. Default ispermissive
.
Import
RocketmqPublicAddress can be imported using the instance_id:eip_id, e.g.
$ pulumi import volcengine:rocketmq/rocketMQPublicAddress:RocketMQPublicAddress default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.