Show / Hide Table of Contents

Class 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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AccessKey
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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()
Namespace: Pulumi.AliCloud.Ram
Assembly: Pulumi.AliCloud.dll
Syntax
public class AccessKey : CustomResource

Constructors

View Source

AccessKey(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 Source

EncryptedSecret

Declaration
public Output<string> EncryptedSecret { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.