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

com.pulumi.aws.dynamodb.inputs.TableGlobalSecondaryIndexArgs 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.dynamodb.inputs;

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


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

    public static final TableGlobalSecondaryIndexArgs Empty = new TableGlobalSecondaryIndexArgs();

    /**
     * Name of the hash key in the index; must be defined as an attribute in the resource.
     * 
     */
    @Import(name="hashKey", required=true)
    private Output hashKey;

    /**
     * @return Name of the hash key in the index; must be defined as an attribute in the resource.
     * 
     */
    public Output hashKey() {
        return this.hashKey;
    }

    /**
     * Name of the index.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Name of the index.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Only required with `INCLUDE` as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.
     * 
     */
    @Import(name="nonKeyAttributes")
    private @Nullable Output> nonKeyAttributes;

    /**
     * @return Only required with `INCLUDE` as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.
     * 
     */
    public Optional>> nonKeyAttributes() {
        return Optional.ofNullable(this.nonKeyAttributes);
    }

    /**
     * One of `ALL`, `INCLUDE` or `KEYS_ONLY` where `ALL` projects every attribute into the index, `KEYS_ONLY` projects  into the index only the table and index hash_key and sort_key attributes ,  `INCLUDE` projects into the index all of the attributes that are defined in `non_key_attributes` in addition to the attributes that that`KEYS_ONLY` project.
     * 
     */
    @Import(name="projectionType", required=true)
    private Output projectionType;

    /**
     * @return One of `ALL`, `INCLUDE` or `KEYS_ONLY` where `ALL` projects every attribute into the index, `KEYS_ONLY` projects  into the index only the table and index hash_key and sort_key attributes ,  `INCLUDE` projects into the index all of the attributes that are defined in `non_key_attributes` in addition to the attributes that that`KEYS_ONLY` project.
     * 
     */
    public Output projectionType() {
        return this.projectionType;
    }

    /**
     * Name of the range key; must be defined
     * 
     */
    @Import(name="rangeKey")
    private @Nullable Output rangeKey;

    /**
     * @return Name of the range key; must be defined
     * 
     */
    public Optional> rangeKey() {
        return Optional.ofNullable(this.rangeKey);
    }

    /**
     * Number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
     * 
     */
    @Import(name="readCapacity")
    private @Nullable Output readCapacity;

    /**
     * @return Number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
     * 
     */
    public Optional> readCapacity() {
        return Optional.ofNullable(this.readCapacity);
    }

    /**
     * Number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
     * 
     */
    @Import(name="writeCapacity")
    private @Nullable Output writeCapacity;

    /**
     * @return Number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
     * 
     */
    public Optional> writeCapacity() {
        return Optional.ofNullable(this.writeCapacity);
    }

    private TableGlobalSecondaryIndexArgs() {}

    private TableGlobalSecondaryIndexArgs(TableGlobalSecondaryIndexArgs $) {
        this.hashKey = $.hashKey;
        this.name = $.name;
        this.nonKeyAttributes = $.nonKeyAttributes;
        this.projectionType = $.projectionType;
        this.rangeKey = $.rangeKey;
        this.readCapacity = $.readCapacity;
        this.writeCapacity = $.writeCapacity;
    }

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

    public static final class Builder {
        private TableGlobalSecondaryIndexArgs $;

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

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

        /**
         * @param hashKey Name of the hash key in the index; must be defined as an attribute in the resource.
         * 
         * @return builder
         * 
         */
        public Builder hashKey(Output hashKey) {
            $.hashKey = hashKey;
            return this;
        }

        /**
         * @param hashKey Name of the hash key in the index; must be defined as an attribute in the resource.
         * 
         * @return builder
         * 
         */
        public Builder hashKey(String hashKey) {
            return hashKey(Output.of(hashKey));
        }

        /**
         * @param name Name of the index.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the index.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param nonKeyAttributes Only required with `INCLUDE` as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.
         * 
         * @return builder
         * 
         */
        public Builder nonKeyAttributes(@Nullable Output> nonKeyAttributes) {
            $.nonKeyAttributes = nonKeyAttributes;
            return this;
        }

        /**
         * @param nonKeyAttributes Only required with `INCLUDE` as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.
         * 
         * @return builder
         * 
         */
        public Builder nonKeyAttributes(List nonKeyAttributes) {
            return nonKeyAttributes(Output.of(nonKeyAttributes));
        }

        /**
         * @param nonKeyAttributes Only required with `INCLUDE` as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.
         * 
         * @return builder
         * 
         */
        public Builder nonKeyAttributes(String... nonKeyAttributes) {
            return nonKeyAttributes(List.of(nonKeyAttributes));
        }

        /**
         * @param projectionType One of `ALL`, `INCLUDE` or `KEYS_ONLY` where `ALL` projects every attribute into the index, `KEYS_ONLY` projects  into the index only the table and index hash_key and sort_key attributes ,  `INCLUDE` projects into the index all of the attributes that are defined in `non_key_attributes` in addition to the attributes that that`KEYS_ONLY` project.
         * 
         * @return builder
         * 
         */
        public Builder projectionType(Output projectionType) {
            $.projectionType = projectionType;
            return this;
        }

        /**
         * @param projectionType One of `ALL`, `INCLUDE` or `KEYS_ONLY` where `ALL` projects every attribute into the index, `KEYS_ONLY` projects  into the index only the table and index hash_key and sort_key attributes ,  `INCLUDE` projects into the index all of the attributes that are defined in `non_key_attributes` in addition to the attributes that that`KEYS_ONLY` project.
         * 
         * @return builder
         * 
         */
        public Builder projectionType(String projectionType) {
            return projectionType(Output.of(projectionType));
        }

        /**
         * @param rangeKey Name of the range key; must be defined
         * 
         * @return builder
         * 
         */
        public Builder rangeKey(@Nullable Output rangeKey) {
            $.rangeKey = rangeKey;
            return this;
        }

        /**
         * @param rangeKey Name of the range key; must be defined
         * 
         * @return builder
         * 
         */
        public Builder rangeKey(String rangeKey) {
            return rangeKey(Output.of(rangeKey));
        }

        /**
         * @param readCapacity Number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
         * 
         * @return builder
         * 
         */
        public Builder readCapacity(@Nullable Output readCapacity) {
            $.readCapacity = readCapacity;
            return this;
        }

        /**
         * @param readCapacity Number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
         * 
         * @return builder
         * 
         */
        public Builder readCapacity(Integer readCapacity) {
            return readCapacity(Output.of(readCapacity));
        }

        /**
         * @param writeCapacity Number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
         * 
         * @return builder
         * 
         */
        public Builder writeCapacity(@Nullable Output writeCapacity) {
            $.writeCapacity = writeCapacity;
            return this;
        }

        /**
         * @param writeCapacity Number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
         * 
         * @return builder
         * 
         */
        public Builder writeCapacity(Integer writeCapacity) {
            return writeCapacity(Output.of(writeCapacity));
        }

        public TableGlobalSecondaryIndexArgs build() {
            if ($.hashKey == null) {
                throw new MissingRequiredPropertyException("TableGlobalSecondaryIndexArgs", "hashKey");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("TableGlobalSecondaryIndexArgs", "name");
            }
            if ($.projectionType == null) {
                throw new MissingRequiredPropertyException("TableGlobalSecondaryIndexArgs", "projectionType");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy