Class RandomPassword
Note: Requires random provider version >= 2.2.0
Identical to random..RandomString with the exception that the
result is treated as sensitive and, thus, not displayed in console output.
Note: All attributes including the generated password will be stored in
the raw state as plain-text. Read more about sensitive data in
state.
This resource does use a cryptographic random number generator.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
using Random = Pulumi.Random;
class MyStack : Stack
{
public MyStack()
{
var password = new Random.RandomPassword("password", new Random.RandomPasswordArgs
{
Length = 16,
Special = true,
OverrideSpecial = "_%@",
});
var example = new Aws.Rds.Instance("example", new Aws.Rds.InstanceArgs
{
InstanceClass = "db.t3.micro",
AllocatedStorage = 64,
Engine = "mysql",
Username = "someone",
Password = random_string.Password.Result,
});
}
}
Inheritance
System.Object
RandomPassword
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Pulumi.Random.dll
Syntax
public class RandomPassword : CustomResource
Constructors
View Source
RandomPassword(String, RandomPasswordArgs, CustomResourceOptions)
Create a RandomPassword resource with the given unique name, arguments, and options.
Declaration
public RandomPassword(string name, RandomPasswordArgs args, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resource
|
| RandomPasswordArgs |
args |
The arguments used to populate this resource's properties
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Properties
View Source
Keepers
Declaration
public Output<ImmutableDictionary<string, object>> Keepers { get; }
Property Value
| Type |
Description |
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
|
View Source
Length
Declaration
public Output<int> Length { get; }
Property Value
| Type |
Description |
| Output<System.Int32> |
|
View Source
Lower
Declaration
public Output<bool?> Lower { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
MinLower
Declaration
public Output<int?> MinLower { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
MinNumeric
Declaration
public Output<int?> MinNumeric { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
MinSpecial
Declaration
public Output<int?> MinSpecial { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
MinUpper
Declaration
public Output<int?> MinUpper { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
Number
Declaration
public Output<bool?> Number { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
OverrideSpecial
Declaration
public Output<string> OverrideSpecial { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Result
Declaration
public Output<string> Result { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Special
Declaration
public Output<bool?> Special { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
Upper
Declaration
public Output<bool?> Upper { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
Methods
View Source
Get an existing RandomPassword resource's state with the given name, ID, and optional extra
properties used to qualify the lookup.
Declaration
public static RandomPassword Get(string name, Input<string> id, RandomPasswordState state = null, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resulting resource.
|
| Input<System.String> |
id |
The unique provider ID of the resource to lookup.
|
| RandomPasswordState |
state |
Any extra arguments used during the lookup.
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Returns