AccessKeyArgs

data class AccessKeyArgs(val pgpKey: Output<String>? = null, val secretFile: Output<String>? = null, val status: Output<String>? = null, val userName: Output<String>? = null) : ConvertibleToJava<AccessKeyArgs>

Provides a RAM User access key resource.

NOTE: You should set the secret_file if you want to get the access key. NOTE: From version 1.98.0, if not set pgp_key, the resource will output the access key secret to field secret and please protect your backend state file judiciously NOTE: Available since v1.0.0+.

Example Usage

Output the secret to a file.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.User;
import com.pulumi.alicloud.ram.UserArgs;
import com.pulumi.alicloud.ram.AccessKey;
import com.pulumi.alicloud.ram.AccessKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var user = new User("user", UserArgs.builder()
.displayName("user_display_name")
.mobile("86-18688888888")
.email("hello.uuu@aaa.com")
.comments("yoyoyo")
.force(true)
.build());
var ak = new AccessKey("ak", AccessKeyArgs.builder()
.userName(user.name())
.secretFile("/xxx/xxx/xxx.txt")
.build());
}
}

Constructors

Link copied to clipboard
fun AccessKeyArgs(pgpKey: Output<String>? = null, secretFile: Output<String>? = null, status: Output<String>? = null, userName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AccessKeyArgs

Properties

Link copied to clipboard
val pgpKey: Output<String>? = null

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

Link copied to clipboard
val secretFile: Output<String>? = null

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.

Link copied to clipboard
val status: Output<String>? = null

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

Link copied to clipboard
val userName: Output<String>? = null

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.