Class AccessKey
Provides a RAM User access key resource.
NOTE: You should set the
secret_fileif you want to get the access key.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
// Create a new RAM access key for user.
var user = new AliCloud.Ram.User("user", new AliCloud.Ram.UserArgs
{
Comments = "yoyoyo",
DisplayName = "user_display_name",
Email = "hello.uuu@aaa.com",
Force = true,
Mobile = "86-18688888888",
});
var ak = new AliCloud.Ram.AccessKey("ak", new AliCloud.Ram.AccessKeyArgs
{
SecretFile = "/xxx/xxx/xxx.txt",
UserName = user.Name,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.Ram
Assembly: Pulumi.AliCloud.dll
Syntax
public class AccessKey : CustomResource
Constructors
View SourceAccessKey(String, AccessKeyArgs, CustomResourceOptions)
Create a AccessKey resource with the given unique name, arguments, and options.
Declaration
public AccessKey(string name, AccessKeyArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AccessKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEncryptedSecret
Declaration
public Output<string> EncryptedSecret { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KeyFingerprint
The fingerprint of the PGP key used to encrypt the secret
Declaration
public Output<string> KeyFingerprint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PgpKey
Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists
Declaration
public Output<string> PgpKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecretFile
The name of file that can save access key id and access key secret. Strongly suggest you to specified it when you creating access key, otherwise, you wouldn't get its secret ever.
Declaration
public Output<string> SecretFile { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
Status of access key. It must be Active or Inactive. Default value is Active.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserName
Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
Declaration
public Output<string> UserName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AccessKeyState, CustomResourceOptions)
Get an existing AccessKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AccessKey Get(string name, Input<string> id, AccessKeyState 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. |
| AccessKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AccessKey |