Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.23.0 published on Wednesday, Jul 6, 2022 by Pulumi

EngineNamespace

Provides a Microservice Engine (MSE) Engine Namespace resource.

For information about Microservice Engine (MSE) Engine Namespace and how to use it, see What is Engine Namespace.

NOTE: Available in v1.166.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultNetworks = Output.Create(AliCloud.Vpc.GetNetworks.InvokeAsync(new AliCloud.Vpc.GetNetworksArgs
        {
            NameRegex = "default-NODELETING",
        }));
        var defaultSwitches = defaultNetworks.Apply(defaultNetworks => Output.Create(AliCloud.Vpc.GetSwitches.InvokeAsync(new AliCloud.Vpc.GetSwitchesArgs
        {
            VpcId = defaultNetworks.Ids?[0],
        })));
        var defaultCluster = new AliCloud.Mse.Cluster("defaultCluster", new AliCloud.Mse.ClusterArgs
        {
            ClusterSpecification = "MSE_SC_1_2_200_c",
            ClusterType = "Nacos-Ans",
            ClusterVersion = "NACOS_ANS_1_2_1",
            InstanceCount = 1,
            NetType = "privatenet",
            VswitchId = defaultSwitches.Apply(defaultSwitches => defaultSwitches.Ids?[0]),
            PubNetworkFlow = "1",
            AclEntryLists = 
            {
                "127.0.0.1/32",
            },
            ClusterAliasName = "example_value",
        });
        var example = new AliCloud.Mse.EngineNamespace("example", new AliCloud.Mse.EngineNamespaceArgs
        {
            ClusterId = defaultCluster.ClusterId,
            NamespaceShowName = "example_value",
            NamespaceId = "example_value",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
			NameRegex: pulumi.StringRef("default-NODELETING"),
		}, nil)
		if err != nil {
			return err
		}
		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
			VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
		}, nil)
		if err != nil {
			return err
		}
		defaultCluster, err := mse.NewCluster(ctx, "defaultCluster", &mse.ClusterArgs{
			ClusterSpecification: pulumi.String("MSE_SC_1_2_200_c"),
			ClusterType:          pulumi.String("Nacos-Ans"),
			ClusterVersion:       pulumi.String("NACOS_ANS_1_2_1"),
			InstanceCount:        pulumi.Int(1),
			NetType:              pulumi.String("privatenet"),
			VswitchId:            pulumi.String(defaultSwitches.Ids[0]),
			PubNetworkFlow:       pulumi.String("1"),
			AclEntryLists: pulumi.StringArray{
				pulumi.String("127.0.0.1/32"),
			},
			ClusterAliasName: pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		_, err = mse.NewEngineNamespace(ctx, "example", &mse.EngineNamespaceArgs{
			ClusterId:         defaultCluster.ClusterId,
			NamespaceShowName: pulumi.String("example_value"),
			NamespaceId:       pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0])
default_cluster = alicloud.mse.Cluster("defaultCluster",
    cluster_specification="MSE_SC_1_2_200_c",
    cluster_type="Nacos-Ans",
    cluster_version="NACOS_ANS_1_2_1",
    instance_count=1,
    net_type="privatenet",
    vswitch_id=default_switches.ids[0],
    pub_network_flow="1",
    acl_entry_lists=["127.0.0.1/32"],
    cluster_alias_name="example_value")
example = alicloud.mse.EngineNamespace("example",
    cluster_id=default_cluster.cluster_id,
    namespace_show_name="example_value",
    namespace_id="example_value")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultNetworks = alicloud.vpc.getNetworks({
    nameRegex: "default-NODELETING",
});
const defaultSwitches = defaultNetworks.then(defaultNetworks => alicloud.vpc.getSwitches({
    vpcId: defaultNetworks.ids?[0],
}));
const defaultCluster = new alicloud.mse.Cluster("defaultCluster", {
    clusterSpecification: "MSE_SC_1_2_200_c",
    clusterType: "Nacos-Ans",
    clusterVersion: "NACOS_ANS_1_2_1",
    instanceCount: 1,
    netType: "privatenet",
    vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?[0]),
    pubNetworkFlow: "1",
    aclEntryLists: ["127.0.0.1/32"],
    clusterAliasName: "example_value",
});
const example = new alicloud.mse.EngineNamespace("example", {
    clusterId: defaultCluster.clusterId,
    namespaceShowName: "example_value",
    namespaceId: "example_value",
});

Coming soon!

Create a EngineNamespace Resource

new EngineNamespace(name: string, args: EngineNamespaceArgs, opts?: CustomResourceOptions);
@overload
def EngineNamespace(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    accept_language: Optional[str] = None,
                    cluster_id: Optional[str] = None,
                    namespace_id: Optional[str] = None,
                    namespace_show_name: Optional[str] = None)
@overload
def EngineNamespace(resource_name: str,
                    args: EngineNamespaceArgs,
                    opts: Optional[ResourceOptions] = None)
func NewEngineNamespace(ctx *Context, name string, args EngineNamespaceArgs, opts ...ResourceOption) (*EngineNamespace, error)
public EngineNamespace(string name, EngineNamespaceArgs args, CustomResourceOptions? opts = null)
public EngineNamespace(String name, EngineNamespaceArgs args)
public EngineNamespace(String name, EngineNamespaceArgs args, CustomResourceOptions options)
type: alicloud:mse:EngineNamespace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

ClusterId string

The id of the cluster.

NamespaceId string

The id of Namespace.

NamespaceShowName string

The name of the Engine Namespace.

AcceptLanguage string

The language type of the returned information. Valid values: zh, en.

ClusterId string

The id of the cluster.

NamespaceId string

The id of Namespace.

NamespaceShowName string

The name of the Engine Namespace.

AcceptLanguage string

The language type of the returned information. Valid values: zh, en.

clusterId String

The id of the cluster.

namespaceId String

The id of Namespace.

namespaceShowName String

The name of the Engine Namespace.

acceptLanguage String

The language type of the returned information. Valid values: zh, en.

clusterId string

The id of the cluster.

namespaceId string

The id of Namespace.

namespaceShowName string

The name of the Engine Namespace.

acceptLanguage string

The language type of the returned information. Valid values: zh, en.

cluster_id str

The id of the cluster.

namespace_id str

The id of Namespace.

namespace_show_name str

The name of the Engine Namespace.

accept_language str

The language type of the returned information. Valid values: zh, en.

clusterId String

The id of the cluster.

namespaceId String

The id of Namespace.

namespaceShowName String

The name of the Engine Namespace.

acceptLanguage String

The language type of the returned information. Valid values: zh, en.

Outputs

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

Get an existing EngineNamespace 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?: EngineNamespaceState, opts?: CustomResourceOptions): EngineNamespace
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accept_language: Optional[str] = None,
        cluster_id: Optional[str] = None,
        namespace_id: Optional[str] = None,
        namespace_show_name: Optional[str] = None) -> EngineNamespace
func GetEngineNamespace(ctx *Context, name string, id IDInput, state *EngineNamespaceState, opts ...ResourceOption) (*EngineNamespace, error)
public static EngineNamespace Get(string name, Input<string> id, EngineNamespaceState? state, CustomResourceOptions? opts = null)
public static EngineNamespace get(String name, Output<String> id, EngineNamespaceState 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:
AcceptLanguage string

The language type of the returned information. Valid values: zh, en.

ClusterId string

The id of the cluster.

NamespaceId string

The id of Namespace.

NamespaceShowName string

The name of the Engine Namespace.

AcceptLanguage string

The language type of the returned information. Valid values: zh, en.

ClusterId string

The id of the cluster.

NamespaceId string

The id of Namespace.

NamespaceShowName string

The name of the Engine Namespace.

acceptLanguage String

The language type of the returned information. Valid values: zh, en.

clusterId String

The id of the cluster.

namespaceId String

The id of Namespace.

namespaceShowName String

The name of the Engine Namespace.

acceptLanguage string

The language type of the returned information. Valid values: zh, en.

clusterId string

The id of the cluster.

namespaceId string

The id of Namespace.

namespaceShowName string

The name of the Engine Namespace.

accept_language str

The language type of the returned information. Valid values: zh, en.

cluster_id str

The id of the cluster.

namespace_id str

The id of Namespace.

namespace_show_name str

The name of the Engine Namespace.

acceptLanguage String

The language type of the returned information. Valid values: zh, en.

clusterId String

The id of the cluster.

namespaceId String

The id of Namespace.

namespaceShowName String

The name of the Engine Namespace.

Import

Microservice Engine (MSE) Engine Namespace can be imported using the id, e.g.

 $ pulumi import alicloud:mse/engineNamespace:EngineNamespace example <cluster_id>:<namespace_id>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.