com.pulumi.mongodbatlas.inputs.GetGlobalClusterConfigManagedNamespace 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.mongodbatlas.inputs;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
public final class GetGlobalClusterConfigManagedNamespace extends com.pulumi.resources.InvokeArgs {
public static final GetGlobalClusterConfigManagedNamespace Empty = new GetGlobalClusterConfigManagedNamespace();
/**
* (Required) The name of the collection associated with the managed namespace.
*
*/
@Import(name="collection", required=true)
private String collection;
/**
* @return (Required) The name of the collection associated with the managed namespace.
*
*/
public String collection() {
return this.collection;
}
/**
* (Required) The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.
*
*/
@Import(name="customShardKey", required=true)
private String customShardKey;
/**
* @return (Required) The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.
*
*/
public String customShardKey() {
return this.customShardKey;
}
/**
* (Required) The name of the database containing the collection.
*
*/
@Import(name="db", required=true)
private String db;
/**
* @return (Required) The name of the database containing the collection.
*
*/
public String db() {
return this.db;
}
/**
* Specifies whether the custom shard key for the collection is [hashed](https://docs.mongodb.com/manual/reference/method/sh.shardCollection/#hashed-shard-keys). If omitted, defaults to `false`. If `false`, Atlas uses [ranged sharding](https://docs.mongodb.com/manual/core/ranged-sharding/). This is only available for Atlas clusters with MongoDB v4.4 and later.
*
*/
@Import(name="isCustomShardKeyHashed", required=true)
private Boolean isCustomShardKeyHashed;
/**
* @return Specifies whether the custom shard key for the collection is [hashed](https://docs.mongodb.com/manual/reference/method/sh.shardCollection/#hashed-shard-keys). If omitted, defaults to `false`. If `false`, Atlas uses [ranged sharding](https://docs.mongodb.com/manual/core/ranged-sharding/). This is only available for Atlas clusters with MongoDB v4.4 and later.
*
*/
public Boolean isCustomShardKeyHashed() {
return this.isCustomShardKeyHashed;
}
/**
* Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using [hashed shard keys](https://docs.mongodb.com/manual/core/hashed-sharding/#std-label-sharding-hashed).
*
*/
@Import(name="isShardKeyUnique", required=true)
private Boolean isShardKeyUnique;
/**
* @return Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using [hashed shard keys](https://docs.mongodb.com/manual/core/hashed-sharding/#std-label-sharding-hashed).
*
*/
public Boolean isShardKeyUnique() {
return this.isShardKeyUnique;
}
private GetGlobalClusterConfigManagedNamespace() {}
private GetGlobalClusterConfigManagedNamespace(GetGlobalClusterConfigManagedNamespace $) {
this.collection = $.collection;
this.customShardKey = $.customShardKey;
this.db = $.db;
this.isCustomShardKeyHashed = $.isCustomShardKeyHashed;
this.isShardKeyUnique = $.isShardKeyUnique;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetGlobalClusterConfigManagedNamespace defaults) {
return new Builder(defaults);
}
public static final class Builder {
private GetGlobalClusterConfigManagedNamespace $;
public Builder() {
$ = new GetGlobalClusterConfigManagedNamespace();
}
public Builder(GetGlobalClusterConfigManagedNamespace defaults) {
$ = new GetGlobalClusterConfigManagedNamespace(Objects.requireNonNull(defaults));
}
/**
* @param collection (Required) The name of the collection associated with the managed namespace.
*
* @return builder
*
*/
public Builder collection(String collection) {
$.collection = collection;
return this;
}
/**
* @param customShardKey (Required) The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.
*
* @return builder
*
*/
public Builder customShardKey(String customShardKey) {
$.customShardKey = customShardKey;
return this;
}
/**
* @param db (Required) The name of the database containing the collection.
*
* @return builder
*
*/
public Builder db(String db) {
$.db = db;
return this;
}
/**
* @param isCustomShardKeyHashed Specifies whether the custom shard key for the collection is [hashed](https://docs.mongodb.com/manual/reference/method/sh.shardCollection/#hashed-shard-keys). If omitted, defaults to `false`. If `false`, Atlas uses [ranged sharding](https://docs.mongodb.com/manual/core/ranged-sharding/). This is only available for Atlas clusters with MongoDB v4.4 and later.
*
* @return builder
*
*/
public Builder isCustomShardKeyHashed(Boolean isCustomShardKeyHashed) {
$.isCustomShardKeyHashed = isCustomShardKeyHashed;
return this;
}
/**
* @param isShardKeyUnique Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using [hashed shard keys](https://docs.mongodb.com/manual/core/hashed-sharding/#std-label-sharding-hashed).
*
* @return builder
*
*/
public Builder isShardKeyUnique(Boolean isShardKeyUnique) {
$.isShardKeyUnique = isShardKeyUnique;
return this;
}
public GetGlobalClusterConfigManagedNamespace build() {
if ($.collection == null) {
throw new MissingRequiredPropertyException("GetGlobalClusterConfigManagedNamespace", "collection");
}
if ($.customShardKey == null) {
throw new MissingRequiredPropertyException("GetGlobalClusterConfigManagedNamespace", "customShardKey");
}
if ($.db == null) {
throw new MissingRequiredPropertyException("GetGlobalClusterConfigManagedNamespace", "db");
}
if ($.isCustomShardKeyHashed == null) {
throw new MissingRequiredPropertyException("GetGlobalClusterConfigManagedNamespace", "isCustomShardKeyHashed");
}
if ($.isShardKeyUnique == null) {
throw new MissingRequiredPropertyException("GetGlobalClusterConfigManagedNamespace", "isShardKeyUnique");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy