All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.iam.AccessKeyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.66.3
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.iam;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class AccessKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final AccessKeyArgs Empty = new AccessKeyArgs();

    /**
     * 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. If providing a base-64 encoded PGP public key, make sure to provide the "raw" version and not the "armored" one (e.g. avoid passing the `-a` option to `gpg --export`).
     * 
     */
    @Import(name="pgpKey")
    private @Nullable Output pgpKey;

    /**
     * @return 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. If providing a base-64 encoded PGP public key, make sure to provide the "raw" version and not the "armored" one (e.g. avoid passing the `-a` option to `gpg --export`).
     * 
     */
    public Optional> pgpKey() {
        return Optional.ofNullable(this.pgpKey);
    }

    /**
     * Access key status to apply. Defaults to `Active`. Valid values are `Active` and `Inactive`.
     * 
     */
    @Import(name="status")
    private @Nullable Output status;

    /**
     * @return Access key status to apply. Defaults to `Active`. Valid values are `Active` and `Inactive`.
     * 
     */
    public Optional> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * IAM user to associate with this access key.
     * 
     */
    @Import(name="user", required=true)
    private Output user;

    /**
     * @return IAM user to associate with this access key.
     * 
     */
    public Output user() {
        return this.user;
    }

    private AccessKeyArgs() {}

    private AccessKeyArgs(AccessKeyArgs $) {
        this.pgpKey = $.pgpKey;
        this.status = $.status;
        this.user = $.user;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(AccessKeyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private AccessKeyArgs $;

        public Builder() {
            $ = new AccessKeyArgs();
        }

        public Builder(AccessKeyArgs defaults) {
            $ = new AccessKeyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param 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. If providing a base-64 encoded PGP public key, make sure to provide the "raw" version and not the "armored" one (e.g. avoid passing the `-a` option to `gpg --export`).
         * 
         * @return builder
         * 
         */
        public Builder pgpKey(@Nullable Output pgpKey) {
            $.pgpKey = pgpKey;
            return this;
        }

        /**
         * @param 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. If providing a base-64 encoded PGP public key, make sure to provide the "raw" version and not the "armored" one (e.g. avoid passing the `-a` option to `gpg --export`).
         * 
         * @return builder
         * 
         */
        public Builder pgpKey(String pgpKey) {
            return pgpKey(Output.of(pgpKey));
        }

        /**
         * @param status Access key status to apply. Defaults to `Active`. Valid values are `Active` and `Inactive`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status Access key status to apply. Defaults to `Active`. Valid values are `Active` and `Inactive`.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param user IAM user to associate with this access key.
         * 
         * @return builder
         * 
         */
        public Builder user(Output user) {
            $.user = user;
            return this;
        }

        /**
         * @param user IAM user to associate with this access key.
         * 
         * @return builder
         * 
         */
        public Builder user(String user) {
            return user(Output.of(user));
        }

        public AccessKeyArgs build() {
            if ($.user == null) {
                throw new MissingRequiredPropertyException("AccessKeyArgs", "user");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy