Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.postgresql.DatabaseArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing postgresql cloud resources.
// *** 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.postgresql;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class DatabaseArgs extends com.pulumi.resources.ResourceArgs {
public static final DatabaseArgs Empty = new DatabaseArgs();
/**
* If `false` then no one can connect to this
* database. The default is `true`, allowing connections (except as restricted by
* other mechanisms, such as `GRANT` or `REVOKE CONNECT`).
*
*/
@Import(name="allowConnections")
private @Nullable Output allowConnections;
/**
* @return If `false` then no one can connect to this
* database. The default is `true`, allowing connections (except as restricted by
* other mechanisms, such as `GRANT` or `REVOKE CONNECT`).
*
*/
public Optional> allowConnections() {
return Optional.ofNullable(this.allowConnections);
}
/**
* If `true`, the change of the database
* `owner` will also include a reassignment of the ownership of preexisting
* objects like tables or sequences from the previous owner to the new one.
* If set to `false` (the default), then the previous database `owner` will still
* hold the ownership of the objects in that database. To alter existing objects in
* the database, you must be a direct or indirect member of the specified role, or
* the username in the provider must be superuser.
*
*/
@Import(name="alterObjectOwnership")
private @Nullable Output alterObjectOwnership;
/**
* @return If `true`, the change of the database
* `owner` will also include a reassignment of the ownership of preexisting
* objects like tables or sequences from the previous owner to the new one.
* If set to `false` (the default), then the previous database `owner` will still
* hold the ownership of the objects in that database. To alter existing objects in
* the database, you must be a direct or indirect member of the specified role, or
* the username in the provider must be superuser.
*
*/
public Optional> alterObjectOwnership() {
return Optional.ofNullable(this.alterObjectOwnership);
}
/**
* How many concurrent connections can be
* established to this database. `-1` (the default) means no limit.
*
*/
@Import(name="connectionLimit")
private @Nullable Output connectionLimit;
/**
* @return How many concurrent connections can be
* established to this database. `-1` (the default) means no limit.
*
*/
public Optional> connectionLimit() {
return Optional.ofNullable(this.connectionLimit);
}
/**
* Character set encoding to use in the new database
*
*/
@Import(name="encoding")
private @Nullable Output encoding;
/**
* @return Character set encoding to use in the new database
*
*/
public Optional> encoding() {
return Optional.ofNullable(this.encoding);
}
/**
* If `true`, then this database can be cloned by any
* user with `CREATEDB` privileges; if `false` (the default), then only
* superusers or the owner of the database can clone it.
*
*/
@Import(name="isTemplate")
private @Nullable Output isTemplate;
/**
* @return If `true`, then this database can be cloned by any
* user with `CREATEDB` privileges; if `false` (the default), then only
* superusers or the owner of the database can clone it.
*
*/
public Optional> isTemplate() {
return Optional.ofNullable(this.isTemplate);
}
/**
* Collation order (LC_COLLATE) to use in the new database
*
*/
@Import(name="lcCollate")
private @Nullable Output lcCollate;
/**
* @return Collation order (LC_COLLATE) to use in the new database
*
*/
public Optional> lcCollate() {
return Optional.ofNullable(this.lcCollate);
}
/**
* Character classification (LC_CTYPE) to use in the new database
*
*/
@Import(name="lcCtype")
private @Nullable Output lcCtype;
/**
* @return Character classification (LC_CTYPE) to use in the new database
*
*/
public Optional> lcCtype() {
return Optional.ofNullable(this.lcCtype);
}
/**
* The name of the database. Must be unique on the PostgreSQL
* server instance where it is configured.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the database. Must be unique on the PostgreSQL
* server instance where it is configured.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* The role name of the user who will own the database, or
* `DEFAULT` to use the default (namely, the user executing the command). To
* create a database owned by another role or to change the owner of an existing
* database, you must be a direct or indirect member of the specified role, or
* the username in the provider is a superuser.
*
*/
@Import(name="owner")
private @Nullable Output owner;
/**
* @return The role name of the user who will own the database, or
* `DEFAULT` to use the default (namely, the user executing the command). To
* create a database owned by another role or to change the owner of an existing
* database, you must be a direct or indirect member of the specified role, or
* the username in the provider is a superuser.
*
*/
public Optional> owner() {
return Optional.ofNullable(this.owner);
}
/**
* The name of the tablespace that will be
* associated with the database, or `DEFAULT` to use the template database's
* tablespace. This tablespace will be the default tablespace used for objects
* created in this database.
*
*/
@Import(name="tablespaceName")
private @Nullable Output tablespaceName;
/**
* @return The name of the tablespace that will be
* associated with the database, or `DEFAULT` to use the template database's
* tablespace. This tablespace will be the default tablespace used for objects
* created in this database.
*
*/
public Optional> tablespaceName() {
return Optional.ofNullable(this.tablespaceName);
}
/**
* The name of the template from which to create the new database
*
*/
@Import(name="template")
private @Nullable Output template;
/**
* @return The name of the template from which to create the new database
*
*/
public Optional> template() {
return Optional.ofNullable(this.template);
}
private DatabaseArgs() {}
private DatabaseArgs(DatabaseArgs $) {
this.allowConnections = $.allowConnections;
this.alterObjectOwnership = $.alterObjectOwnership;
this.connectionLimit = $.connectionLimit;
this.encoding = $.encoding;
this.isTemplate = $.isTemplate;
this.lcCollate = $.lcCollate;
this.lcCtype = $.lcCtype;
this.name = $.name;
this.owner = $.owner;
this.tablespaceName = $.tablespaceName;
this.template = $.template;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DatabaseArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DatabaseArgs $;
public Builder() {
$ = new DatabaseArgs();
}
public Builder(DatabaseArgs defaults) {
$ = new DatabaseArgs(Objects.requireNonNull(defaults));
}
/**
* @param allowConnections If `false` then no one can connect to this
* database. The default is `true`, allowing connections (except as restricted by
* other mechanisms, such as `GRANT` or `REVOKE CONNECT`).
*
* @return builder
*
*/
public Builder allowConnections(@Nullable Output allowConnections) {
$.allowConnections = allowConnections;
return this;
}
/**
* @param allowConnections If `false` then no one can connect to this
* database. The default is `true`, allowing connections (except as restricted by
* other mechanisms, such as `GRANT` or `REVOKE CONNECT`).
*
* @return builder
*
*/
public Builder allowConnections(Boolean allowConnections) {
return allowConnections(Output.of(allowConnections));
}
/**
* @param alterObjectOwnership If `true`, the change of the database
* `owner` will also include a reassignment of the ownership of preexisting
* objects like tables or sequences from the previous owner to the new one.
* If set to `false` (the default), then the previous database `owner` will still
* hold the ownership of the objects in that database. To alter existing objects in
* the database, you must be a direct or indirect member of the specified role, or
* the username in the provider must be superuser.
*
* @return builder
*
*/
public Builder alterObjectOwnership(@Nullable Output alterObjectOwnership) {
$.alterObjectOwnership = alterObjectOwnership;
return this;
}
/**
* @param alterObjectOwnership If `true`, the change of the database
* `owner` will also include a reassignment of the ownership of preexisting
* objects like tables or sequences from the previous owner to the new one.
* If set to `false` (the default), then the previous database `owner` will still
* hold the ownership of the objects in that database. To alter existing objects in
* the database, you must be a direct or indirect member of the specified role, or
* the username in the provider must be superuser.
*
* @return builder
*
*/
public Builder alterObjectOwnership(Boolean alterObjectOwnership) {
return alterObjectOwnership(Output.of(alterObjectOwnership));
}
/**
* @param connectionLimit How many concurrent connections can be
* established to this database. `-1` (the default) means no limit.
*
* @return builder
*
*/
public Builder connectionLimit(@Nullable Output connectionLimit) {
$.connectionLimit = connectionLimit;
return this;
}
/**
* @param connectionLimit How many concurrent connections can be
* established to this database. `-1` (the default) means no limit.
*
* @return builder
*
*/
public Builder connectionLimit(Integer connectionLimit) {
return connectionLimit(Output.of(connectionLimit));
}
/**
* @param encoding Character set encoding to use in the new database
*
* @return builder
*
*/
public Builder encoding(@Nullable Output encoding) {
$.encoding = encoding;
return this;
}
/**
* @param encoding Character set encoding to use in the new database
*
* @return builder
*
*/
public Builder encoding(String encoding) {
return encoding(Output.of(encoding));
}
/**
* @param isTemplate If `true`, then this database can be cloned by any
* user with `CREATEDB` privileges; if `false` (the default), then only
* superusers or the owner of the database can clone it.
*
* @return builder
*
*/
public Builder isTemplate(@Nullable Output isTemplate) {
$.isTemplate = isTemplate;
return this;
}
/**
* @param isTemplate If `true`, then this database can be cloned by any
* user with `CREATEDB` privileges; if `false` (the default), then only
* superusers or the owner of the database can clone it.
*
* @return builder
*
*/
public Builder isTemplate(Boolean isTemplate) {
return isTemplate(Output.of(isTemplate));
}
/**
* @param lcCollate Collation order (LC_COLLATE) to use in the new database
*
* @return builder
*
*/
public Builder lcCollate(@Nullable Output lcCollate) {
$.lcCollate = lcCollate;
return this;
}
/**
* @param lcCollate Collation order (LC_COLLATE) to use in the new database
*
* @return builder
*
*/
public Builder lcCollate(String lcCollate) {
return lcCollate(Output.of(lcCollate));
}
/**
* @param lcCtype Character classification (LC_CTYPE) to use in the new database
*
* @return builder
*
*/
public Builder lcCtype(@Nullable Output lcCtype) {
$.lcCtype = lcCtype;
return this;
}
/**
* @param lcCtype Character classification (LC_CTYPE) to use in the new database
*
* @return builder
*
*/
public Builder lcCtype(String lcCtype) {
return lcCtype(Output.of(lcCtype));
}
/**
* @param name The name of the database. Must be unique on the PostgreSQL
* server instance where it is configured.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the database. Must be unique on the PostgreSQL
* server instance where it is configured.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param owner The role name of the user who will own the database, or
* `DEFAULT` to use the default (namely, the user executing the command). To
* create a database owned by another role or to change the owner of an existing
* database, you must be a direct or indirect member of the specified role, or
* the username in the provider is a superuser.
*
* @return builder
*
*/
public Builder owner(@Nullable Output owner) {
$.owner = owner;
return this;
}
/**
* @param owner The role name of the user who will own the database, or
* `DEFAULT` to use the default (namely, the user executing the command). To
* create a database owned by another role or to change the owner of an existing
* database, you must be a direct or indirect member of the specified role, or
* the username in the provider is a superuser.
*
* @return builder
*
*/
public Builder owner(String owner) {
return owner(Output.of(owner));
}
/**
* @param tablespaceName The name of the tablespace that will be
* associated with the database, or `DEFAULT` to use the template database's
* tablespace. This tablespace will be the default tablespace used for objects
* created in this database.
*
* @return builder
*
*/
public Builder tablespaceName(@Nullable Output tablespaceName) {
$.tablespaceName = tablespaceName;
return this;
}
/**
* @param tablespaceName The name of the tablespace that will be
* associated with the database, or `DEFAULT` to use the template database's
* tablespace. This tablespace will be the default tablespace used for objects
* created in this database.
*
* @return builder
*
*/
public Builder tablespaceName(String tablespaceName) {
return tablespaceName(Output.of(tablespaceName));
}
/**
* @param template The name of the template from which to create the new database
*
* @return builder
*
*/
public Builder template(@Nullable Output template) {
$.template = template;
return this;
}
/**
* @param template The name of the template from which to create the new database
*
* @return builder
*
*/
public Builder template(String template) {
return template(Output.of(template));
}
public DatabaseArgs build() {
return $;
}
}
}