Show / Hide Table of Contents

Class AccessKey

Provides an IAM access key. This is a set of credentials that allow API requests to be made as an IAM user.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var lbUser = new Aws.Iam.User("lbUser", new Aws.Iam.UserArgs
    {
        Path = "/system/",
    });
    var lbAccessKey = new Aws.Iam.AccessKey("lbAccessKey", new Aws.Iam.AccessKeyArgs
    {
        PgpKey = "keybase:some_person_that_exists",
        User = lbUser.Name,
    });
    var lbRo = new Aws.Iam.UserPolicy("lbRo", new Aws.Iam.UserPolicyArgs
    {
        Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": [
    ""ec2:Describe*""
  ],
  ""Effect"": ""Allow"",
  ""Resource"": ""*""
}
]
}

",
        User = lbUser.Name,
    });
    this.Secret = lbAccessKey.EncryptedSecret;
}

[Output("secret")]
public Output<string> Secret { get; set; }
}
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.Aws.Iam
Assembly: Pulumi.Aws.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, 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

The encrypted secret, base64 encoded, if pgp_key was specified.

NOTE: The encrypted secret may be decrypted using the command line,

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, for use in the encrypted_secret output attribute.

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

Secret

The secret access key. Note that this will be written to the state file. If you use this, please protect your backend state file judiciously. Alternatively, you may supply a pgp_key instead, which will prevent the secret from being stored in plaintext, at the cost of preventing the use of the secret key in automation.

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

SesSmtpPassword

DEPRECATED The secret access key converted into an SES SMTP password by applying [AWS's documented conversion

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

SesSmtpPasswordV4

The secret access key converted into an SES SMTP password by applying AWS's documented Sigv4 conversion algorithm. As SigV4 is region specific, valid Provider regions are ap-south-1, ap-southeast-2, eu-central-1, eu-west-1, us-east-1 and us-west-2. See current AWS SES regions

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

Status

The access key status to apply. Defaults to Active. Valid values are Active and Inactive.

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

User

The IAM user to associate with this access key.

Declaration
public Output<string> User { 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.