1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rocketmq
  5. ClientUser
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.rocketmq.ClientUser

Explore with Pulumi AI

Deprecated: alicloud.rocketmq/clientuser.ClientUser has been deprecated in favor of alicloud.sag/clientuser.ClientUser

Provides a Sag ClientUser resource. This topic describes how to manage accounts as an administrator. After you configure the network, you can create multiple accounts and distribute them to end users so that clients can access Alibaba Cloud.

For information about Sag ClientUser and how to use it, see What is Sag ClientUser.

NOTE: Available since v1.65.0.

NOTE: Only the following regions support. [cn-shanghai, cn-shanghai-finance-1, cn-hongkong, ap-southeast-1, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1]

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const sagId = config.get("sagId") || "sag-9bifkfaz4fg***";
const _default = new alicloud.sag.ClientUser("default", {
    sagId: sagId,
    bandwidth: 20,
    userMail: "tf-example@abc.com",
    userName: name,
    password: "example1234",
    clientIp: "192.1.10.0",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
sag_id = config.get("sagId")
if sag_id is None:
    sag_id = "sag-9bifkfaz4fg***"
default = alicloud.sag.ClientUser("default",
    sag_id=sag_id,
    bandwidth=20,
    user_mail="tf-example@abc.com",
    user_name=name,
    password="example1234",
    client_ip="192.1.10.0")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sag"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		sagId := "sag-9bifkfaz4fg***"
		if param := cfg.Get("sagId"); param != "" {
			sagId = param
		}
		_, err := sag.NewClientUser(ctx, "default", &sag.ClientUserArgs{
			SagId:     pulumi.String(sagId),
			Bandwidth: pulumi.Int(20),
			UserMail:  pulumi.String("tf-example@abc.com"),
			UserName:  pulumi.String(name),
			Password:  pulumi.String("example1234"),
			ClientIp:  pulumi.String("192.1.10.0"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var sagId = config.Get("sagId") ?? "sag-9bifkfaz4fg***";
    var @default = new AliCloud.Sag.ClientUser("default", new()
    {
        SagId = sagId,
        Bandwidth = 20,
        UserMail = "tf-example@abc.com",
        UserName = name,
        Password = "example1234",
        ClientIp = "192.1.10.0",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sag.ClientUser;
import com.pulumi.alicloud.sag.ClientUserArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("tf-example");
        final var sagId = config.get("sagId").orElse("sag-9bifkfaz4fg***");
        var default_ = new ClientUser("default", ClientUserArgs.builder()
            .sagId(sagId)
            .bandwidth("20")
            .userMail("tf-example@abc.com")
            .userName(name)
            .password("example1234")
            .clientIp("192.1.10.0")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf-example
  sagId:
    type: string
    default: sag-9bifkfaz4fg***
resources:
  default:
    type: alicloud:sag:ClientUser
    properties:
      sagId: ${sagId}
      bandwidth: '20'
      userMail: tf-example@abc.com
      userName: ${name}
      password: example1234
      clientIp: 192.1.10.0
Copy

Create ClientUser Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ClientUser(name: string, args: ClientUserArgs, opts?: CustomResourceOptions);
@overload
def ClientUser(resource_name: str,
               args: ClientUserArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def ClientUser(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               bandwidth: Optional[int] = None,
               client_ip: Optional[str] = None,
               kms_encrypted_password: Optional[str] = None,
               kms_encryption_context: Optional[Mapping[str, str]] = None,
               password: Optional[str] = None,
               sag_id: Optional[str] = None,
               user_mail: Optional[str] = None,
               user_name: Optional[str] = None)
func NewClientUser(ctx *Context, name string, args ClientUserArgs, opts ...ResourceOption) (*ClientUser, error)
public ClientUser(string name, ClientUserArgs args, CustomResourceOptions? opts = null)
public ClientUser(String name, ClientUserArgs args)
public ClientUser(String name, ClientUserArgs args, CustomResourceOptions options)
type: alicloud:rocketmq:ClientUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClientUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClientUserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClientUserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClientUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClientUserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Bandwidth This property is required. int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
SagId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the SAG instance created for the SAG APP.
UserMail
This property is required.
Changes to this property will trigger replacement.
string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
ClientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
KmsEncryptedPassword string
The password of the KMS Encryption.
KmsEncryptionContext Dictionary<string, string>
The context of the KMS Encryption.
Password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
UserName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
Bandwidth This property is required. int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
SagId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the SAG instance created for the SAG APP.
UserMail
This property is required.
Changes to this property will trigger replacement.
string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
ClientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
KmsEncryptedPassword string
The password of the KMS Encryption.
KmsEncryptionContext map[string]string
The context of the KMS Encryption.
Password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
UserName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth This property is required. Integer
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
sagId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the SAG instance created for the SAG APP.
userMail
This property is required.
Changes to this property will trigger replacement.
String
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
clientIp Changes to this property will trigger replacement. String
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword String
The password of the KMS Encryption.
kmsEncryptionContext Map<String,String>
The context of the KMS Encryption.
password Changes to this property will trigger replacement. String
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
userName Changes to this property will trigger replacement. String
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth This property is required. number
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
sagId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the SAG instance created for the SAG APP.
userMail
This property is required.
Changes to this property will trigger replacement.
string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
clientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword string
The password of the KMS Encryption.
kmsEncryptionContext {[key: string]: string}
The context of the KMS Encryption.
password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
userName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth This property is required. int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
sag_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the SAG instance created for the SAG APP.
user_mail
This property is required.
Changes to this property will trigger replacement.
str
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
client_ip Changes to this property will trigger replacement. str
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kms_encrypted_password str
The password of the KMS Encryption.
kms_encryption_context Mapping[str, str]
The context of the KMS Encryption.
password Changes to this property will trigger replacement. str
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
user_name Changes to this property will trigger replacement. str
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth This property is required. Number
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
sagId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the SAG instance created for the SAG APP.
userMail
This property is required.
Changes to this property will trigger replacement.
String
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
clientIp Changes to this property will trigger replacement. String
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword String
The password of the KMS Encryption.
kmsEncryptionContext Map<String>
The context of the KMS Encryption.
password Changes to this property will trigger replacement. String
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
userName Changes to this property will trigger replacement. String
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.

Outputs

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

Get an existing ClientUser 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?: ClientUserState, opts?: CustomResourceOptions): ClientUser
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bandwidth: Optional[int] = None,
        client_ip: Optional[str] = None,
        kms_encrypted_password: Optional[str] = None,
        kms_encryption_context: Optional[Mapping[str, str]] = None,
        password: Optional[str] = None,
        sag_id: Optional[str] = None,
        user_mail: Optional[str] = None,
        user_name: Optional[str] = None) -> ClientUser
func GetClientUser(ctx *Context, name string, id IDInput, state *ClientUserState, opts ...ResourceOption) (*ClientUser, error)
public static ClientUser Get(string name, Input<string> id, ClientUserState? state, CustomResourceOptions? opts = null)
public static ClientUser get(String name, Output<String> id, ClientUserState state, CustomResourceOptions options)
resources:  _:    type: alicloud:rocketmq:ClientUser    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Bandwidth int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
ClientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
KmsEncryptedPassword string
The password of the KMS Encryption.
KmsEncryptionContext Dictionary<string, string>
The context of the KMS Encryption.
Password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
SagId Changes to this property will trigger replacement. string
The ID of the SAG instance created for the SAG APP.
UserMail Changes to this property will trigger replacement. string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
UserName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
Bandwidth int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
ClientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
KmsEncryptedPassword string
The password of the KMS Encryption.
KmsEncryptionContext map[string]string
The context of the KMS Encryption.
Password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
SagId Changes to this property will trigger replacement. string
The ID of the SAG instance created for the SAG APP.
UserMail Changes to this property will trigger replacement. string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
UserName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth Integer
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
clientIp Changes to this property will trigger replacement. String
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword String
The password of the KMS Encryption.
kmsEncryptionContext Map<String,String>
The context of the KMS Encryption.
password Changes to this property will trigger replacement. String
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
sagId Changes to this property will trigger replacement. String
The ID of the SAG instance created for the SAG APP.
userMail Changes to this property will trigger replacement. String
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
userName Changes to this property will trigger replacement. String
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth number
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
clientIp Changes to this property will trigger replacement. string
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword string
The password of the KMS Encryption.
kmsEncryptionContext {[key: string]: string}
The context of the KMS Encryption.
password Changes to this property will trigger replacement. string
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
sagId Changes to this property will trigger replacement. string
The ID of the SAG instance created for the SAG APP.
userMail Changes to this property will trigger replacement. string
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
userName Changes to this property will trigger replacement. string
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth int
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
client_ip Changes to this property will trigger replacement. str
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kms_encrypted_password str
The password of the KMS Encryption.
kms_encryption_context Mapping[str, str]
The context of the KMS Encryption.
password Changes to this property will trigger replacement. str
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
sag_id Changes to this property will trigger replacement. str
The ID of the SAG instance created for the SAG APP.
user_mail Changes to this property will trigger replacement. str
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
user_name Changes to this property will trigger replacement. str
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
bandwidth Number
The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
clientIp Changes to this property will trigger replacement. String
The IP address of the SAG APP. If you specify this parameter, the current account always uses the specified IP address.Note The IP address must be in the private CIDR block of the SAG client.If you do not specify this parameter, the system automatically allocates an IP address from the private CIDR block of the SAG client. In this case, each re-connection uses a different IP address.
kmsEncryptedPassword String
The password of the KMS Encryption.
kmsEncryptionContext Map<String>
The context of the KMS Encryption.
password Changes to this property will trigger replacement. String
The password used to log on to the SAG APP.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.
sagId Changes to this property will trigger replacement. String
The ID of the SAG instance created for the SAG APP.
userMail Changes to this property will trigger replacement. String
The email address of the user. The administrator uses this address to send the account information for logging on to the APP to the user.
userName Changes to this property will trigger replacement. String
The user name. User names in the same SAG APP must be unique.Both the user name and the password must be specified. If you specify the user name, the password must be specified, too.

Import

The Sag ClientUser can be imported using the name, e.g.

$ pulumi import alicloud:rocketmq/clientUser:ClientUser example sag-abc123456:tf-username-abc123456
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.