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

com.pulumi.aws.kms.inputs.GetKeyArgs 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.60.0-alpha.1731982519
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.kms.inputs;

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


public final class GetKeyArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetKeyArgs Empty = new GetKeyArgs();

    /**
     * List of grant tokens
     * 
     */
    @Import(name="grantTokens")
    private @Nullable Output> grantTokens;

    /**
     * @return List of grant tokens
     * 
     */
    public Optional>> grantTokens() {
        return Optional.ofNullable(this.grantTokens);
    }

    /**
     * Key identifier which can be one of the following format:
     * * Key ID. E.g: `1234abcd-12ab-34cd-56ef-1234567890ab`
     * * Key ARN. E.g.: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
     * * Alias name. E.g.: `alias/my-key`
     * * Alias ARN: E.g.: `arn:aws:kms:us-east-1:111122223333:alias/my-key`
     * 
     */
    @Import(name="keyId", required=true)
    private Output keyId;

    /**
     * @return Key identifier which can be one of the following format:
     * * Key ID. E.g: `1234abcd-12ab-34cd-56ef-1234567890ab`
     * * Key ARN. E.g.: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
     * * Alias name. E.g.: `alias/my-key`
     * * Alias ARN: E.g.: `arn:aws:kms:us-east-1:111122223333:alias/my-key`
     * 
     */
    public Output keyId() {
        return this.keyId;
    }

    private GetKeyArgs() {}

    private GetKeyArgs(GetKeyArgs $) {
        this.grantTokens = $.grantTokens;
        this.keyId = $.keyId;
    }

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

    public static final class Builder {
        private GetKeyArgs $;

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

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

        /**
         * @param grantTokens List of grant tokens
         * 
         * @return builder
         * 
         */
        public Builder grantTokens(@Nullable Output> grantTokens) {
            $.grantTokens = grantTokens;
            return this;
        }

        /**
         * @param grantTokens List of grant tokens
         * 
         * @return builder
         * 
         */
        public Builder grantTokens(List grantTokens) {
            return grantTokens(Output.of(grantTokens));
        }

        /**
         * @param grantTokens List of grant tokens
         * 
         * @return builder
         * 
         */
        public Builder grantTokens(String... grantTokens) {
            return grantTokens(List.of(grantTokens));
        }

        /**
         * @param keyId Key identifier which can be one of the following format:
         * * Key ID. E.g: `1234abcd-12ab-34cd-56ef-1234567890ab`
         * * Key ARN. E.g.: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
         * * Alias name. E.g.: `alias/my-key`
         * * Alias ARN: E.g.: `arn:aws:kms:us-east-1:111122223333:alias/my-key`
         * 
         * @return builder
         * 
         */
        public Builder keyId(Output keyId) {
            $.keyId = keyId;
            return this;
        }

        /**
         * @param keyId Key identifier which can be one of the following format:
         * * Key ID. E.g: `1234abcd-12ab-34cd-56ef-1234567890ab`
         * * Key ARN. E.g.: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
         * * Alias name. E.g.: `alias/my-key`
         * * Alias ARN: E.g.: `arn:aws:kms:us-east-1:111122223333:alias/my-key`
         * 
         * @return builder
         * 
         */
        public Builder keyId(String keyId) {
            return keyId(Output.of(keyId));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy