alicloud.rocketmq.ClientUser
Explore with Pulumi AI
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.rocketmq.ClientUser("default", {
sagId: sagId,
bandwidth: 20,
userMail: "tf-example@abc.com",
userName: name,
password: "example1234",
clientIp: "192.1.10.0",
});
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.rocketmq.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")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rocketmq"
"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 := rocketmq.NewClientUser(ctx, "default", &rocketmq.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
})
}
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.RocketMQ.ClientUser("default", new()
{
SagId = sagId,
Bandwidth = 20,
UserMail = "tf-example@abc.com",
UserName = name,
Password = "example1234",
ClientIp = "192.1.10.0",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rocketmq.ClientUser;
import com.pulumi.alicloud.rocketmq.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());
}
}
configuration:
name:
type: string
default: tf-example
sagId:
type: string
default: sag-9bifkfaz4fg***
resources:
default:
type: alicloud:rocketmq:ClientUser
properties:
sagId: ${sagId}
bandwidth: '20'
userMail: tf-example@abc.com
userName: ${name}
password: example1234
clientIp: 192.1.10.0
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,
sag_id: Optional[str] = None,
user_mail: Optional[str] = None,
client_ip: Optional[str] = None,
kms_encrypted_password: Optional[str] = None,
kms_encryption_context: Optional[Mapping[str, str]] = None,
password: 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 string
- The unique name of the resource.
- args ClientUserArgs
- 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 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 string
- The unique name of the resource.
- args ClientUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClientUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClientUserArgs
- 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 clientUserResource = new AliCloud.RocketMQ.ClientUser("clientUserResource", new()
{
Bandwidth = 0,
SagId = "string",
UserMail = "string",
ClientIp = "string",
KmsEncryptedPassword = "string",
KmsEncryptionContext =
{
{ "string", "string" },
},
Password = "string",
UserName = "string",
});
example, err := rocketmq.NewClientUser(ctx, "clientUserResource", &rocketmq.ClientUserArgs{
Bandwidth: pulumi.Int(0),
SagId: pulumi.String("string"),
UserMail: pulumi.String("string"),
ClientIp: pulumi.String("string"),
KmsEncryptedPassword: pulumi.String("string"),
KmsEncryptionContext: pulumi.StringMap{
"string": pulumi.String("string"),
},
Password: pulumi.String("string"),
UserName: pulumi.String("string"),
})
var clientUserResource = new ClientUser("clientUserResource", ClientUserArgs.builder()
.bandwidth(0)
.sagId("string")
.userMail("string")
.clientIp("string")
.kmsEncryptedPassword("string")
.kmsEncryptionContext(Map.of("string", "string"))
.password("string")
.userName("string")
.build());
client_user_resource = alicloud.rocketmq.ClientUser("clientUserResource",
bandwidth=0,
sag_id="string",
user_mail="string",
client_ip="string",
kms_encrypted_password="string",
kms_encryption_context={
"string": "string",
},
password="string",
user_name="string")
const clientUserResource = new alicloud.rocketmq.ClientUser("clientUserResource", {
bandwidth: 0,
sagId: "string",
userMail: "string",
clientIp: "string",
kmsEncryptedPassword: "string",
kmsEncryptionContext: {
string: "string",
},
password: "string",
userName: "string",
});
type: alicloud:rocketmq:ClientUser
properties:
bandwidth: 0
clientIp: string
kmsEncryptedPassword: string
kmsEncryptionContext:
string: string
password: string
sagId: string
userMail: string
userName: string
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 int
- The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
- Sag
Id string - The ID of the SAG instance created for the SAG APP.
- User
Mail 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.
- Client
Ip 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.
- Kms
Encrypted stringPassword - The password of the KMS Encryption.
- Kms
Encryption Dictionary<string, string>Context - The context of the KMS Encryption.
- Password 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.
- User
Name 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.
- Sag
Id string - The ID of the SAG instance created for the SAG APP.
- User
Mail 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.
- Client
Ip 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.
- Kms
Encrypted stringPassword - The password of the KMS Encryption.
- Kms
Encryption map[string]stringContext - The context of the KMS Encryption.
- Password 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.
- User
Name 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.
- sag
Id String - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- client
Ip 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.
- kms
Encrypted StringPassword - The password of the KMS Encryption.
- kms
Encryption Map<String,String>Context - The context of the KMS Encryption.
- password 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.
- user
Name 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.
- sag
Id string - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- client
Ip 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.
- kms
Encrypted stringPassword - The password of the KMS Encryption.
- kms
Encryption {[key: string]: string}Context - The context of the KMS Encryption.
- password 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.
- user
Name 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.
- sag_
id str - The ID of the SAG instance created for the SAG APP.
- user_
mail 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 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_ strpassword - The password of the KMS Encryption.
- kms_
encryption_ Mapping[str, str]context - The context of the KMS Encryption.
- password 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 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.
- sag
Id String - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- client
Ip 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.
- kms
Encrypted StringPassword - The password of the KMS Encryption.
- kms
Encryption Map<String>Context - The context of the KMS Encryption.
- password 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.
- user
Name 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)
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.
- Bandwidth int
- The SAG APP bandwidth that the user can use. Unit: Kbit/s. Maximum value: 2000 Kbit/s.
- Client
Ip 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.
- Kms
Encrypted stringPassword - The password of the KMS Encryption.
- Kms
Encryption Dictionary<string, string>Context - The context of the KMS Encryption.
- Password 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.
- Sag
Id string - The ID of the SAG instance created for the SAG APP.
- User
Mail 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.
- User
Name 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 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.
- Kms
Encrypted stringPassword - The password of the KMS Encryption.
- Kms
Encryption map[string]stringContext - The context of the KMS Encryption.
- Password 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.
- Sag
Id string - The ID of the SAG instance created for the SAG APP.
- User
Mail 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.
- User
Name 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.
- client
Ip 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.
- kms
Encrypted StringPassword - The password of the KMS Encryption.
- kms
Encryption Map<String,String>Context - The context of the KMS Encryption.
- password 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.
- sag
Id String - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- user
Name 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.
- client
Ip 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.
- kms
Encrypted stringPassword - The password of the KMS Encryption.
- kms
Encryption {[key: string]: string}Context - The context of the KMS Encryption.
- password 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.
- sag
Id string - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- user
Name 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 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_ strpassword - The password of the KMS Encryption.
- kms_
encryption_ Mapping[str, str]context - The context of the KMS Encryption.
- password 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 str - The ID of the SAG instance created for the SAG APP.
- user_
mail 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 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.
- client
Ip 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.
- kms
Encrypted StringPassword - The password of the KMS Encryption.
- kms
Encryption Map<String>Context - The context of the KMS Encryption.
- password 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.
- sag
Id String - The ID of the SAG instance created for the SAG APP.
- user
Mail 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.
- user
Name 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
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.