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; }
}
Inherited Members
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.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, 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
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> |
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, for use
in the encrypted_secret output attribute.
Declaration
public Output<string> PgpKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
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> |
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> |
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 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 |