AccessKey

Provides a RAM User access key resource.

NOTE: You should set the secret_file if 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,
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

# Create a new RAM access key for user.
user = alicloud.ram.User("user",
    comments="yoyoyo",
    display_name="user_display_name",
    email="hello.uuu@aaa.com",
    force=True,
    mobile="86-18688888888")
ak = alicloud.ram.AccessKey("ak",
    secret_file="/xxx/xxx/xxx.txt",
    user_name=user.name)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Create a new RAM access key for user.
const user = new alicloud.ram.User("user", {
    comments: "yoyoyo",
    displayName: "user_display_name",
    email: "hello.uuu@aaa.com",
    force: true,
    mobile: "86-18688888888",
});
const ak = new alicloud.ram.AccessKey("ak", {
    secretFile: "/xxx/xxx/xxx.txt",
    userName: user.name,
});

Create a AccessKey Resource

def AccessKey(resource_name, opts=None, pgp_key=None, secret_file=None, status=None, user_name=None, __props__=None);
func NewAccessKey(ctx *Context, name string, args *AccessKeyArgs, opts ...ResourceOption) (*AccessKey, error)
public AccessKey(string name, AccessKeyArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AccessKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AccessKey resource accepts the following input properties:

PgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

SecretFile string

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.

Status string

Status of access key. It must be Active or Inactive. Default value is Active.

UserName string

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.

PgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

SecretFile string

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.

Status string

Status of access key. It must be Active or Inactive. Default value is Active.

UserName string

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.

pgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

secretFile string

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.

status string

Status of access key. It must be Active or Inactive. Default value is Active.

userName string

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.

pgp_key str

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

secret_file str

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.

status str

Status of access key. It must be Active or Inactive. Default value is Active.

user_name str

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the AccessKey resource produces the following output properties:

EncryptedSecret string
Id string
The provider-assigned unique ID for this managed resource.
KeyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

EncryptedSecret string
Id string
The provider-assigned unique ID for this managed resource.
KeyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

encryptedSecret string
id string
The provider-assigned unique ID for this managed resource.
keyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

encrypted_secret str
id str
The provider-assigned unique ID for this managed resource.
key_fingerprint str

The fingerprint of the PGP key used to encrypt the secret

Look up an Existing AccessKey Resource

Get an existing AccessKey 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?: AccessKeyState, opts?: CustomResourceOptions): AccessKey
static get(resource_name, id, opts=None, encrypted_secret=None, key_fingerprint=None, pgp_key=None, secret_file=None, status=None, user_name=None, __props__=None);
func GetAccessKey(ctx *Context, name string, id IDInput, state *AccessKeyState, opts ...ResourceOption) (*AccessKey, error)
public static AccessKey Get(string name, Input<string> id, AccessKeyState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

EncryptedSecret string
KeyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

PgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

SecretFile string

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.

Status string

Status of access key. It must be Active or Inactive. Default value is Active.

UserName string

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.

EncryptedSecret string
KeyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

PgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

SecretFile string

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.

Status string

Status of access key. It must be Active or Inactive. Default value is Active.

UserName string

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.

encryptedSecret string
keyFingerprint string

The fingerprint of the PGP key used to encrypt the secret

pgpKey string

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

secretFile string

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.

status string

Status of access key. It must be Active or Inactive. Default value is Active.

userName string

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.

encrypted_secret str
key_fingerprint str

The fingerprint of the PGP key used to encrypt the secret

pgp_key str

Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists

secret_file str

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.

status str

Status of access key. It must be Active or Inactive. Default value is Active.

user_name str

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.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.