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

com.pulumi.aws.appsync.ApiKeyArgs Maven / Gradle / Ivy

// *** 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.appsync;

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


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

    public static final ApiKeyArgs Empty = new ApiKeyArgs();

    /**
     * ID of the associated AppSync API
     * 
     */
    @Import(name="apiId", required=true)
    private Output apiId;

    /**
     * @return ID of the associated AppSync API
     * 
     */
    public Output apiId() {
        return this.apiId;
    }

    /**
     * API key description. Defaults to "Managed by Pulumi".
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return API key description. Defaults to "Managed by Pulumi".
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation.
     * 
     */
    @Import(name="expires")
    private @Nullable Output expires;

    /**
     * @return RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation.
     * 
     */
    public Optional> expires() {
        return Optional.ofNullable(this.expires);
    }

    private ApiKeyArgs() {}

    private ApiKeyArgs(ApiKeyArgs $) {
        this.apiId = $.apiId;
        this.description = $.description;
        this.expires = $.expires;
    }

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

    public static final class Builder {
        private ApiKeyArgs $;

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

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

        /**
         * @param apiId ID of the associated AppSync API
         * 
         * @return builder
         * 
         */
        public Builder apiId(Output apiId) {
            $.apiId = apiId;
            return this;
        }

        /**
         * @param apiId ID of the associated AppSync API
         * 
         * @return builder
         * 
         */
        public Builder apiId(String apiId) {
            return apiId(Output.of(apiId));
        }

        /**
         * @param description API key description. Defaults to "Managed by Pulumi".
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description API key description. Defaults to "Managed by Pulumi".
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param expires RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation.
         * 
         * @return builder
         * 
         */
        public Builder expires(@Nullable Output expires) {
            $.expires = expires;
            return this;
        }

        /**
         * @param expires RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation.
         * 
         * @return builder
         * 
         */
        public Builder expires(String expires) {
            return expires(Output.of(expires));
        }

        public ApiKeyArgs build() {
            if ($.apiId == null) {
                throw new MissingRequiredPropertyException("ApiKeyArgs", "apiId");
            }
            $.description = Codegen.stringProp("description").output().arg($.description).def("Managed by Pulumi").getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy