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

com.pulumi.azurenative.sql.ManagedDatabaseArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.sql;

import com.pulumi.azurenative.sql.enums.CatalogCollationType;
import com.pulumi.azurenative.sql.enums.ManagedDatabaseCreateMode;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ManagedDatabaseArgs Empty = new ManagedDatabaseArgs();

    /**
     * Whether to auto complete restore of this managed database.
     * 
     */
    @Import(name="autoCompleteRestore")
    private @Nullable Output autoCompleteRestore;

    /**
     * @return Whether to auto complete restore of this managed database.
     * 
     */
    public Optional> autoCompleteRestore() {
        return Optional.ofNullable(this.autoCompleteRestore);
    }

    /**
     * Collation of the metadata catalog.
     * 
     */
    @Import(name="catalogCollation")
    private @Nullable Output> catalogCollation;

    /**
     * @return Collation of the metadata catalog.
     * 
     */
    public Optional>> catalogCollation() {
        return Optional.ofNullable(this.catalogCollation);
    }

    /**
     * Collation of the managed database.
     * 
     */
    @Import(name="collation")
    private @Nullable Output collation;

    /**
     * @return Collation of the managed database.
     * 
     */
    public Optional> collation() {
        return Optional.ofNullable(this.collation);
    }

    /**
     * Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
     * 
     */
    @Import(name="createMode")
    private @Nullable Output> createMode;

    /**
     * @return Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
     * 
     */
    public Optional>> createMode() {
        return Optional.ofNullable(this.createMode);
    }

    /**
     * The name of the database.
     * 
     */
    @Import(name="databaseName")
    private @Nullable Output databaseName;

    /**
     * @return The name of the database.
     * 
     */
    public Optional> databaseName() {
        return Optional.ofNullable(this.databaseName);
    }

    /**
     * Last backup file name for restore of this managed database.
     * 
     */
    @Import(name="lastBackupName")
    private @Nullable Output lastBackupName;

    /**
     * @return Last backup file name for restore of this managed database.
     * 
     */
    public Optional> lastBackupName() {
        return Optional.ofNullable(this.lastBackupName);
    }

    /**
     * Resource location.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the Long Term Retention backup to be used for restore of this managed database.
     * 
     */
    @Import(name="longTermRetentionBackupResourceId")
    private @Nullable Output longTermRetentionBackupResourceId;

    /**
     * @return The name of the Long Term Retention backup to be used for restore of this managed database.
     * 
     */
    public Optional> longTermRetentionBackupResourceId() {
        return Optional.ofNullable(this.longTermRetentionBackupResourceId);
    }

    /**
     * The name of the managed instance.
     * 
     */
    @Import(name="managedInstanceName", required=true)
    private Output managedInstanceName;

    /**
     * @return The name of the managed instance.
     * 
     */
    public Output managedInstanceName() {
        return this.managedInstanceName;
    }

    /**
     * The resource identifier of the recoverable database associated with create operation of this database.
     * 
     */
    @Import(name="recoverableDatabaseId")
    private @Nullable Output recoverableDatabaseId;

    /**
     * @return The resource identifier of the recoverable database associated with create operation of this database.
     * 
     */
    public Optional> recoverableDatabaseId() {
        return Optional.ofNullable(this.recoverableDatabaseId);
    }

    /**
     * The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The restorable dropped database resource id to restore when creating this database.
     * 
     */
    @Import(name="restorableDroppedDatabaseId")
    private @Nullable Output restorableDroppedDatabaseId;

    /**
     * @return The restorable dropped database resource id to restore when creating this database.
     * 
     */
    public Optional> restorableDroppedDatabaseId() {
        return Optional.ofNullable(this.restorableDroppedDatabaseId);
    }

    /**
     * Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
     * 
     */
    @Import(name="restorePointInTime")
    private @Nullable Output restorePointInTime;

    /**
     * @return Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
     * 
     */
    public Optional> restorePointInTime() {
        return Optional.ofNullable(this.restorePointInTime);
    }

    /**
     * The resource identifier of the source database associated with create operation of this database.
     * 
     */
    @Import(name="sourceDatabaseId")
    private @Nullable Output sourceDatabaseId;

    /**
     * @return The resource identifier of the source database associated with create operation of this database.
     * 
     */
    public Optional> sourceDatabaseId() {
        return Optional.ofNullable(this.sourceDatabaseId);
    }

    /**
     * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
     * 
     */
    @Import(name="storageContainerSasToken")
    private @Nullable Output storageContainerSasToken;

    /**
     * @return Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
     * 
     */
    public Optional> storageContainerSasToken() {
        return Optional.ofNullable(this.storageContainerSasToken);
    }

    /**
     * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
     * 
     */
    @Import(name="storageContainerUri")
    private @Nullable Output storageContainerUri;

    /**
     * @return Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
     * 
     */
    public Optional> storageContainerUri() {
        return Optional.ofNullable(this.storageContainerUri);
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private ManagedDatabaseArgs() {}

    private ManagedDatabaseArgs(ManagedDatabaseArgs $) {
        this.autoCompleteRestore = $.autoCompleteRestore;
        this.catalogCollation = $.catalogCollation;
        this.collation = $.collation;
        this.createMode = $.createMode;
        this.databaseName = $.databaseName;
        this.lastBackupName = $.lastBackupName;
        this.location = $.location;
        this.longTermRetentionBackupResourceId = $.longTermRetentionBackupResourceId;
        this.managedInstanceName = $.managedInstanceName;
        this.recoverableDatabaseId = $.recoverableDatabaseId;
        this.resourceGroupName = $.resourceGroupName;
        this.restorableDroppedDatabaseId = $.restorableDroppedDatabaseId;
        this.restorePointInTime = $.restorePointInTime;
        this.sourceDatabaseId = $.sourceDatabaseId;
        this.storageContainerSasToken = $.storageContainerSasToken;
        this.storageContainerUri = $.storageContainerUri;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private ManagedDatabaseArgs $;

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

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

        /**
         * @param autoCompleteRestore Whether to auto complete restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder autoCompleteRestore(@Nullable Output autoCompleteRestore) {
            $.autoCompleteRestore = autoCompleteRestore;
            return this;
        }

        /**
         * @param autoCompleteRestore Whether to auto complete restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder autoCompleteRestore(Boolean autoCompleteRestore) {
            return autoCompleteRestore(Output.of(autoCompleteRestore));
        }

        /**
         * @param catalogCollation Collation of the metadata catalog.
         * 
         * @return builder
         * 
         */
        public Builder catalogCollation(@Nullable Output> catalogCollation) {
            $.catalogCollation = catalogCollation;
            return this;
        }

        /**
         * @param catalogCollation Collation of the metadata catalog.
         * 
         * @return builder
         * 
         */
        public Builder catalogCollation(Either catalogCollation) {
            return catalogCollation(Output.of(catalogCollation));
        }

        /**
         * @param catalogCollation Collation of the metadata catalog.
         * 
         * @return builder
         * 
         */
        public Builder catalogCollation(String catalogCollation) {
            return catalogCollation(Either.ofLeft(catalogCollation));
        }

        /**
         * @param catalogCollation Collation of the metadata catalog.
         * 
         * @return builder
         * 
         */
        public Builder catalogCollation(CatalogCollationType catalogCollation) {
            return catalogCollation(Either.ofRight(catalogCollation));
        }

        /**
         * @param collation Collation of the managed database.
         * 
         * @return builder
         * 
         */
        public Builder collation(@Nullable Output collation) {
            $.collation = collation;
            return this;
        }

        /**
         * @param collation Collation of the managed database.
         * 
         * @return builder
         * 
         */
        public Builder collation(String collation) {
            return collation(Output.of(collation));
        }

        /**
         * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
         * 
         * @return builder
         * 
         */
        public Builder createMode(@Nullable Output> createMode) {
            $.createMode = createMode;
            return this;
        }

        /**
         * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
         * 
         * @return builder
         * 
         */
        public Builder createMode(Either createMode) {
            return createMode(Output.of(createMode));
        }

        /**
         * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
         * 
         * @return builder
         * 
         */
        public Builder createMode(String createMode) {
            return createMode(Either.ofLeft(createMode));
        }

        /**
         * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
         * 
         * @return builder
         * 
         */
        public Builder createMode(ManagedDatabaseCreateMode createMode) {
            return createMode(Either.ofRight(createMode));
        }

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(@Nullable Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param lastBackupName Last backup file name for restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder lastBackupName(@Nullable Output lastBackupName) {
            $.lastBackupName = lastBackupName;
            return this;
        }

        /**
         * @param lastBackupName Last backup file name for restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder lastBackupName(String lastBackupName) {
            return lastBackupName(Output.of(lastBackupName));
        }

        /**
         * @param location Resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder longTermRetentionBackupResourceId(@Nullable Output longTermRetentionBackupResourceId) {
            $.longTermRetentionBackupResourceId = longTermRetentionBackupResourceId;
            return this;
        }

        /**
         * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database.
         * 
         * @return builder
         * 
         */
        public Builder longTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) {
            return longTermRetentionBackupResourceId(Output.of(longTermRetentionBackupResourceId));
        }

        /**
         * @param managedInstanceName The name of the managed instance.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(Output managedInstanceName) {
            $.managedInstanceName = managedInstanceName;
            return this;
        }

        /**
         * @param managedInstanceName The name of the managed instance.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(String managedInstanceName) {
            return managedInstanceName(Output.of(managedInstanceName));
        }

        /**
         * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database.
         * 
         * @return builder
         * 
         */
        public Builder recoverableDatabaseId(@Nullable Output recoverableDatabaseId) {
            $.recoverableDatabaseId = recoverableDatabaseId;
            return this;
        }

        /**
         * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database.
         * 
         * @return builder
         * 
         */
        public Builder recoverableDatabaseId(String recoverableDatabaseId) {
            return recoverableDatabaseId(Output.of(recoverableDatabaseId));
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database.
         * 
         * @return builder
         * 
         */
        public Builder restorableDroppedDatabaseId(@Nullable Output restorableDroppedDatabaseId) {
            $.restorableDroppedDatabaseId = restorableDroppedDatabaseId;
            return this;
        }

        /**
         * @param restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database.
         * 
         * @return builder
         * 
         */
        public Builder restorableDroppedDatabaseId(String restorableDroppedDatabaseId) {
            return restorableDroppedDatabaseId(Output.of(restorableDroppedDatabaseId));
        }

        /**
         * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(@Nullable Output restorePointInTime) {
            $.restorePointInTime = restorePointInTime;
            return this;
        }

        /**
         * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
         * 
         * @return builder
         * 
         */
        public Builder restorePointInTime(String restorePointInTime) {
            return restorePointInTime(Output.of(restorePointInTime));
        }

        /**
         * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseId(@Nullable Output sourceDatabaseId) {
            $.sourceDatabaseId = sourceDatabaseId;
            return this;
        }

        /**
         * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database.
         * 
         * @return builder
         * 
         */
        public Builder sourceDatabaseId(String sourceDatabaseId) {
            return sourceDatabaseId(Output.of(sourceDatabaseId));
        }

        /**
         * @param storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerSasToken(@Nullable Output storageContainerSasToken) {
            $.storageContainerSasToken = storageContainerSasToken;
            return this;
        }

        /**
         * @param storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerSasToken(String storageContainerSasToken) {
            return storageContainerSasToken(Output.of(storageContainerSasToken));
        }

        /**
         * @param storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerUri(@Nullable Output storageContainerUri) {
            $.storageContainerUri = storageContainerUri;
            return this;
        }

        /**
         * @param storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerUri(String storageContainerUri) {
            return storageContainerUri(Output.of(storageContainerUri));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public ManagedDatabaseArgs build() {
            if ($.managedInstanceName == null) {
                throw new MissingRequiredPropertyException("ManagedDatabaseArgs", "managedInstanceName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ManagedDatabaseArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy