Class DatabaseAccountCreateUpdateProperties
- java.lang.Object
-
- com.azure.resourcemanager.cosmos.fluent.models.DatabaseAccountCreateUpdateProperties
-
public final class DatabaseAccountCreateUpdateProperties extends Object
Properties to create and update Azure Cosmos DB database accounts.
-
-
Constructor Summary
Constructors Constructor Description DatabaseAccountCreateUpdateProperties()Creates an instance of DatabaseAccountCreateUpdateProperties class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyticalStorageConfigurationanalyticalStorageConfiguration()Get the analyticalStorageConfiguration property: Analytical storage specific properties.ApiPropertiesapiProperties()Get the apiProperties property: API specific properties.BackupPolicybackupPolicy()Get the backupPolicy property: The object representing the policy for taking backups on an account.List<Capability>capabilities()Get the capabilities property: List of Cosmos DB capabilities for the account.Capacitycapacity()Get the capacity property: The object that represents all properties related to capacity enforcement on an account.ConnectorOfferconnectorOffer()Get the connectorOffer property: The cassandra connector offer type for the Cosmos DB database C* account.ConsistencyPolicyconsistencyPolicy()Get the consistencyPolicy property: The consistency policy for the Cosmos DB account.List<CorsPolicy>cors()Get the cors property: The CORS policy for the Cosmos DB database account.CreateModecreateMode()Get the createMode property: Enum to indicate the mode of account creation.StringdatabaseAccountOfferType()Get the databaseAccountOfferType property: The offer type for the database.StringdefaultIdentity()Get the defaultIdentity property: The default identity for accessing key vault used in features like customer managed keys.BooleandisableKeyBasedMetadataWriteAccess()Get the disableKeyBasedMetadataWriteAccess property: Disable write operations on metadata resources (databases, containers, throughput) via account keys.BooleandisableLocalAuth()Get the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.BooleanenableAnalyticalStorage()Get the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.BooleanenableAutomaticFailover()Get the enableAutomaticFailover property: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage.BooleanenableCassandraConnector()Get the enableCassandraConnector property: Enables the cassandra connector on the Cosmos DB C* account.BooleanenableFreeTier()Get the enableFreeTier property: Flag to indicate whether Free Tier is enabled.BooleanenableMultipleWriteLocations()Get the enableMultipleWriteLocations property: Enables the account to write in multiple locations.List<IpAddressOrRange>ipRules()Get the ipRules property: List of IpRules.BooleanisVirtualNetworkFilterEnabled()Get the isVirtualNetworkFilterEnabled property: Flag to indicate whether to enable/disable Virtual Network ACL rules.StringkeyVaultKeyUri()Get the keyVaultKeyUri property: The URI of the key vault.List<Location>locations()Get the locations property: An array that contains the georeplication locations enabled for the Cosmos DB account.NetworkAclBypassnetworkAclBypass()Get the networkAclBypass property: Indicates what services are allowed to bypass firewall checks.List<String>networkAclBypassResourceIds()Get the networkAclBypassResourceIds property: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.PublicNetworkAccesspublicNetworkAccess()Get the publicNetworkAccess property: Whether requests from Public Network are allowed.RestoreParametersrestoreParameters()Get the restoreParameters property: Parameters to indicate the information about the restore.voidvalidate()Validates the instance.List<VirtualNetworkRule>virtualNetworkRules()Get the virtualNetworkRules property: List of Virtual Network ACL rules configured for the Cosmos DB account.DatabaseAccountCreateUpdatePropertieswithAnalyticalStorageConfiguration(AnalyticalStorageConfiguration analyticalStorageConfiguration)Set the analyticalStorageConfiguration property: Analytical storage specific properties.DatabaseAccountCreateUpdatePropertieswithApiProperties(ApiProperties apiProperties)Set the apiProperties property: API specific properties.DatabaseAccountCreateUpdatePropertieswithBackupPolicy(BackupPolicy backupPolicy)Set the backupPolicy property: The object representing the policy for taking backups on an account.DatabaseAccountCreateUpdatePropertieswithCapabilities(List<Capability> capabilities)Set the capabilities property: List of Cosmos DB capabilities for the account.DatabaseAccountCreateUpdatePropertieswithCapacity(Capacity capacity)Set the capacity property: The object that represents all properties related to capacity enforcement on an account.DatabaseAccountCreateUpdatePropertieswithConnectorOffer(ConnectorOffer connectorOffer)Set the connectorOffer property: The cassandra connector offer type for the Cosmos DB database C* account.DatabaseAccountCreateUpdatePropertieswithConsistencyPolicy(ConsistencyPolicy consistencyPolicy)Set the consistencyPolicy property: The consistency policy for the Cosmos DB account.DatabaseAccountCreateUpdatePropertieswithCors(List<CorsPolicy> cors)Set the cors property: The CORS policy for the Cosmos DB database account.DatabaseAccountCreateUpdatePropertieswithCreateMode(CreateMode createMode)Set the createMode property: Enum to indicate the mode of account creation.DatabaseAccountCreateUpdatePropertieswithDatabaseAccountOfferType(String databaseAccountOfferType)Set the databaseAccountOfferType property: The offer type for the database.DatabaseAccountCreateUpdatePropertieswithDefaultIdentity(String defaultIdentity)Set the defaultIdentity property: The default identity for accessing key vault used in features like customer managed keys.DatabaseAccountCreateUpdatePropertieswithDisableKeyBasedMetadataWriteAccess(Boolean disableKeyBasedMetadataWriteAccess)Set the disableKeyBasedMetadataWriteAccess property: Disable write operations on metadata resources (databases, containers, throughput) via account keys.DatabaseAccountCreateUpdatePropertieswithDisableLocalAuth(Boolean disableLocalAuth)Set the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.DatabaseAccountCreateUpdatePropertieswithEnableAnalyticalStorage(Boolean enableAnalyticalStorage)Set the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.DatabaseAccountCreateUpdatePropertieswithEnableAutomaticFailover(Boolean enableAutomaticFailover)Set the enableAutomaticFailover property: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage.DatabaseAccountCreateUpdatePropertieswithEnableCassandraConnector(Boolean enableCassandraConnector)Set the enableCassandraConnector property: Enables the cassandra connector on the Cosmos DB C* account.DatabaseAccountCreateUpdatePropertieswithEnableFreeTier(Boolean enableFreeTier)Set the enableFreeTier property: Flag to indicate whether Free Tier is enabled.DatabaseAccountCreateUpdatePropertieswithEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations)Set the enableMultipleWriteLocations property: Enables the account to write in multiple locations.DatabaseAccountCreateUpdatePropertieswithIpRules(List<IpAddressOrRange> ipRules)Set the ipRules property: List of IpRules.DatabaseAccountCreateUpdatePropertieswithIsVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled)Set the isVirtualNetworkFilterEnabled property: Flag to indicate whether to enable/disable Virtual Network ACL rules.DatabaseAccountCreateUpdatePropertieswithKeyVaultKeyUri(String keyVaultKeyUri)Set the keyVaultKeyUri property: The URI of the key vault.DatabaseAccountCreateUpdatePropertieswithLocations(List<Location> locations)Set the locations property: An array that contains the georeplication locations enabled for the Cosmos DB account.DatabaseAccountCreateUpdatePropertieswithNetworkAclBypass(NetworkAclBypass networkAclBypass)Set the networkAclBypass property: Indicates what services are allowed to bypass firewall checks.DatabaseAccountCreateUpdatePropertieswithNetworkAclBypassResourceIds(List<String> networkAclBypassResourceIds)Set the networkAclBypassResourceIds property: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.DatabaseAccountCreateUpdatePropertieswithPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)Set the publicNetworkAccess property: Whether requests from Public Network are allowed.DatabaseAccountCreateUpdatePropertieswithRestoreParameters(RestoreParameters restoreParameters)Set the restoreParameters property: Parameters to indicate the information about the restore.DatabaseAccountCreateUpdatePropertieswithVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules)Set the virtualNetworkRules property: List of Virtual Network ACL rules configured for the Cosmos DB account.
-
-
-
Method Detail
-
consistencyPolicy
public ConsistencyPolicy consistencyPolicy()
Get the consistencyPolicy property: The consistency policy for the Cosmos DB account.- Returns:
- the consistencyPolicy value.
-
withConsistencyPolicy
public DatabaseAccountCreateUpdateProperties withConsistencyPolicy(ConsistencyPolicy consistencyPolicy)
Set the consistencyPolicy property: The consistency policy for the Cosmos DB account.- Parameters:
consistencyPolicy- the consistencyPolicy value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
locations
public List<Location> locations()
Get the locations property: An array that contains the georeplication locations enabled for the Cosmos DB account.- Returns:
- the locations value.
-
withLocations
public DatabaseAccountCreateUpdateProperties withLocations(List<Location> locations)
Set the locations property: An array that contains the georeplication locations enabled for the Cosmos DB account.- Parameters:
locations- the locations value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
databaseAccountOfferType
public String databaseAccountOfferType()
Get the databaseAccountOfferType property: The offer type for the database.- Returns:
- the databaseAccountOfferType value.
-
withDatabaseAccountOfferType
public DatabaseAccountCreateUpdateProperties withDatabaseAccountOfferType(String databaseAccountOfferType)
Set the databaseAccountOfferType property: The offer type for the database.- Parameters:
databaseAccountOfferType- the databaseAccountOfferType value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
ipRules
public List<IpAddressOrRange> ipRules()
Get the ipRules property: List of IpRules.- Returns:
- the ipRules value.
-
withIpRules
public DatabaseAccountCreateUpdateProperties withIpRules(List<IpAddressOrRange> ipRules)
Set the ipRules property: List of IpRules.- Parameters:
ipRules- the ipRules value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
isVirtualNetworkFilterEnabled
public Boolean isVirtualNetworkFilterEnabled()
Get the isVirtualNetworkFilterEnabled property: Flag to indicate whether to enable/disable Virtual Network ACL rules.- Returns:
- the isVirtualNetworkFilterEnabled value.
-
withIsVirtualNetworkFilterEnabled
public DatabaseAccountCreateUpdateProperties withIsVirtualNetworkFilterEnabled(Boolean isVirtualNetworkFilterEnabled)
Set the isVirtualNetworkFilterEnabled property: Flag to indicate whether to enable/disable Virtual Network ACL rules.- Parameters:
isVirtualNetworkFilterEnabled- the isVirtualNetworkFilterEnabled value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
enableAutomaticFailover
public Boolean enableAutomaticFailover()
Get the enableAutomaticFailover property: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.- Returns:
- the enableAutomaticFailover value.
-
withEnableAutomaticFailover
public DatabaseAccountCreateUpdateProperties withEnableAutomaticFailover(Boolean enableAutomaticFailover)
Set the enableAutomaticFailover property: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.- Parameters:
enableAutomaticFailover- the enableAutomaticFailover value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
capabilities
public List<Capability> capabilities()
Get the capabilities property: List of Cosmos DB capabilities for the account.- Returns:
- the capabilities value.
-
withCapabilities
public DatabaseAccountCreateUpdateProperties withCapabilities(List<Capability> capabilities)
Set the capabilities property: List of Cosmos DB capabilities for the account.- Parameters:
capabilities- the capabilities value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
virtualNetworkRules
public List<VirtualNetworkRule> virtualNetworkRules()
Get the virtualNetworkRules property: List of Virtual Network ACL rules configured for the Cosmos DB account.- Returns:
- the virtualNetworkRules value.
-
withVirtualNetworkRules
public DatabaseAccountCreateUpdateProperties withVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules)
Set the virtualNetworkRules property: List of Virtual Network ACL rules configured for the Cosmos DB account.- Parameters:
virtualNetworkRules- the virtualNetworkRules value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
enableMultipleWriteLocations
public Boolean enableMultipleWriteLocations()
Get the enableMultipleWriteLocations property: Enables the account to write in multiple locations.- Returns:
- the enableMultipleWriteLocations value.
-
withEnableMultipleWriteLocations
public DatabaseAccountCreateUpdateProperties withEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations)
Set the enableMultipleWriteLocations property: Enables the account to write in multiple locations.- Parameters:
enableMultipleWriteLocations- the enableMultipleWriteLocations value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
enableCassandraConnector
public Boolean enableCassandraConnector()
Get the enableCassandraConnector property: Enables the cassandra connector on the Cosmos DB C* account.- Returns:
- the enableCassandraConnector value.
-
withEnableCassandraConnector
public DatabaseAccountCreateUpdateProperties withEnableCassandraConnector(Boolean enableCassandraConnector)
Set the enableCassandraConnector property: Enables the cassandra connector on the Cosmos DB C* account.- Parameters:
enableCassandraConnector- the enableCassandraConnector value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
connectorOffer
public ConnectorOffer connectorOffer()
Get the connectorOffer property: The cassandra connector offer type for the Cosmos DB database C* account.- Returns:
- the connectorOffer value.
-
withConnectorOffer
public DatabaseAccountCreateUpdateProperties withConnectorOffer(ConnectorOffer connectorOffer)
Set the connectorOffer property: The cassandra connector offer type for the Cosmos DB database C* account.- Parameters:
connectorOffer- the connectorOffer value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
disableKeyBasedMetadataWriteAccess
public Boolean disableKeyBasedMetadataWriteAccess()
Get the disableKeyBasedMetadataWriteAccess property: Disable write operations on metadata resources (databases, containers, throughput) via account keys.- Returns:
- the disableKeyBasedMetadataWriteAccess value.
-
withDisableKeyBasedMetadataWriteAccess
public DatabaseAccountCreateUpdateProperties withDisableKeyBasedMetadataWriteAccess(Boolean disableKeyBasedMetadataWriteAccess)
Set the disableKeyBasedMetadataWriteAccess property: Disable write operations on metadata resources (databases, containers, throughput) via account keys.- Parameters:
disableKeyBasedMetadataWriteAccess- the disableKeyBasedMetadataWriteAccess value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
keyVaultKeyUri
public String keyVaultKeyUri()
Get the keyVaultKeyUri property: The URI of the key vault.- Returns:
- the keyVaultKeyUri value.
-
withKeyVaultKeyUri
public DatabaseAccountCreateUpdateProperties withKeyVaultKeyUri(String keyVaultKeyUri)
Set the keyVaultKeyUri property: The URI of the key vault.- Parameters:
keyVaultKeyUri- the keyVaultKeyUri value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
defaultIdentity
public String defaultIdentity()
Get the defaultIdentity property: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.- Returns:
- the defaultIdentity value.
-
withDefaultIdentity
public DatabaseAccountCreateUpdateProperties withDefaultIdentity(String defaultIdentity)
Set the defaultIdentity property: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.- Parameters:
defaultIdentity- the defaultIdentity value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
publicNetworkAccess
public PublicNetworkAccess publicNetworkAccess()
Get the publicNetworkAccess property: Whether requests from Public Network are allowed.- Returns:
- the publicNetworkAccess value.
-
withPublicNetworkAccess
public DatabaseAccountCreateUpdateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)
Set the publicNetworkAccess property: Whether requests from Public Network are allowed.- Parameters:
publicNetworkAccess- the publicNetworkAccess value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
enableFreeTier
public Boolean enableFreeTier()
Get the enableFreeTier property: Flag to indicate whether Free Tier is enabled.- Returns:
- the enableFreeTier value.
-
withEnableFreeTier
public DatabaseAccountCreateUpdateProperties withEnableFreeTier(Boolean enableFreeTier)
Set the enableFreeTier property: Flag to indicate whether Free Tier is enabled.- Parameters:
enableFreeTier- the enableFreeTier value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
apiProperties
public ApiProperties apiProperties()
Get the apiProperties property: API specific properties. Currently, supported only for MongoDB API.- Returns:
- the apiProperties value.
-
withApiProperties
public DatabaseAccountCreateUpdateProperties withApiProperties(ApiProperties apiProperties)
Set the apiProperties property: API specific properties. Currently, supported only for MongoDB API.- Parameters:
apiProperties- the apiProperties value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
enableAnalyticalStorage
public Boolean enableAnalyticalStorage()
Get the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.- Returns:
- the enableAnalyticalStorage value.
-
withEnableAnalyticalStorage
public DatabaseAccountCreateUpdateProperties withEnableAnalyticalStorage(Boolean enableAnalyticalStorage)
Set the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.- Parameters:
enableAnalyticalStorage- the enableAnalyticalStorage value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
analyticalStorageConfiguration
public AnalyticalStorageConfiguration analyticalStorageConfiguration()
Get the analyticalStorageConfiguration property: Analytical storage specific properties.- Returns:
- the analyticalStorageConfiguration value.
-
withAnalyticalStorageConfiguration
public DatabaseAccountCreateUpdateProperties withAnalyticalStorageConfiguration(AnalyticalStorageConfiguration analyticalStorageConfiguration)
Set the analyticalStorageConfiguration property: Analytical storage specific properties.- Parameters:
analyticalStorageConfiguration- the analyticalStorageConfiguration value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
createMode
public CreateMode createMode()
Get the createMode property: Enum to indicate the mode of account creation.- Returns:
- the createMode value.
-
withCreateMode
public DatabaseAccountCreateUpdateProperties withCreateMode(CreateMode createMode)
Set the createMode property: Enum to indicate the mode of account creation.- Parameters:
createMode- the createMode value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
backupPolicy
public BackupPolicy backupPolicy()
Get the backupPolicy property: The object representing the policy for taking backups on an account.- Returns:
- the backupPolicy value.
-
withBackupPolicy
public DatabaseAccountCreateUpdateProperties withBackupPolicy(BackupPolicy backupPolicy)
Set the backupPolicy property: The object representing the policy for taking backups on an account.- Parameters:
backupPolicy- the backupPolicy value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
cors
public List<CorsPolicy> cors()
Get the cors property: The CORS policy for the Cosmos DB database account.- Returns:
- the cors value.
-
withCors
public DatabaseAccountCreateUpdateProperties withCors(List<CorsPolicy> cors)
Set the cors property: The CORS policy for the Cosmos DB database account.- Parameters:
cors- the cors value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
networkAclBypass
public NetworkAclBypass networkAclBypass()
Get the networkAclBypass property: Indicates what services are allowed to bypass firewall checks.- Returns:
- the networkAclBypass value.
-
withNetworkAclBypass
public DatabaseAccountCreateUpdateProperties withNetworkAclBypass(NetworkAclBypass networkAclBypass)
Set the networkAclBypass property: Indicates what services are allowed to bypass firewall checks.- Parameters:
networkAclBypass- the networkAclBypass value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
networkAclBypassResourceIds
public List<String> networkAclBypassResourceIds()
Get the networkAclBypassResourceIds property: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.- Returns:
- the networkAclBypassResourceIds value.
-
withNetworkAclBypassResourceIds
public DatabaseAccountCreateUpdateProperties withNetworkAclBypassResourceIds(List<String> networkAclBypassResourceIds)
Set the networkAclBypassResourceIds property: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.- Parameters:
networkAclBypassResourceIds- the networkAclBypassResourceIds value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
disableLocalAuth
public Boolean disableLocalAuth()
Get the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.- Returns:
- the disableLocalAuth value.
-
withDisableLocalAuth
public DatabaseAccountCreateUpdateProperties withDisableLocalAuth(Boolean disableLocalAuth)
Set the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.- Parameters:
disableLocalAuth- the disableLocalAuth value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
restoreParameters
public RestoreParameters restoreParameters()
Get the restoreParameters property: Parameters to indicate the information about the restore.- Returns:
- the restoreParameters value.
-
withRestoreParameters
public DatabaseAccountCreateUpdateProperties withRestoreParameters(RestoreParameters restoreParameters)
Set the restoreParameters property: Parameters to indicate the information about the restore.- Parameters:
restoreParameters- the restoreParameters value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
capacity
public Capacity capacity()
Get the capacity property: The object that represents all properties related to capacity enforcement on an account.- Returns:
- the capacity value.
-
withCapacity
public DatabaseAccountCreateUpdateProperties withCapacity(Capacity capacity)
Set the capacity property: The object that represents all properties related to capacity enforcement on an account.- Parameters:
capacity- the capacity value to set.- Returns:
- the DatabaseAccountCreateUpdateProperties object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-