Class DatabaseAccountUpdateParameters

java.lang.Object
com.azure.resourcemanager.cosmos.models.DatabaseAccountUpdateParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<DatabaseAccountUpdateParameters>

public final class DatabaseAccountUpdateParameters extends Object implements com.azure.json.JsonSerializable<DatabaseAccountUpdateParameters>
Parameters for patching Azure Cosmos DB database account properties.
  • Constructor Details

    • DatabaseAccountUpdateParameters

      public DatabaseAccountUpdateParameters()
      Creates an instance of DatabaseAccountUpdateParameters class.
  • Method Details

    • tags

      public Map<String,String> tags()
      Get the tags property: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
      Returns:
      the tags value.
    • withTags

      Set the tags property: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
      Parameters:
      tags - the tags value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • location

      public String location()
      Get the location property: The location of the resource group to which the resource belongs.
      Returns:
      the location value.
    • withLocation

      public DatabaseAccountUpdateParameters withLocation(String location)
      Set the location property: The location of the resource group to which the resource belongs.
      Parameters:
      location - the location value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • identity

      public ManagedServiceIdentity identity()
      Get the identity property: Identity for the resource.
      Returns:
      the identity value.
    • withIdentity

      Set the identity property: Identity for the resource.
      Parameters:
      identity - the identity value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • consistencyPolicy

      public ConsistencyPolicy consistencyPolicy()
      Get the consistencyPolicy property: The consistency policy for the Cosmos DB account.
      Returns:
      the consistencyPolicy value.
    • withConsistencyPolicy

      public DatabaseAccountUpdateParameters withConsistencyPolicy(ConsistencyPolicy consistencyPolicy)
      Set the consistencyPolicy property: The consistency policy for the Cosmos DB account.
      Parameters:
      consistencyPolicy - the consistencyPolicy value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • ipRules

      public List<IpAddressOrRange> ipRules()
      Get the ipRules property: List of IpRules.
      Returns:
      the ipRules value.
    • withIpRules

      public DatabaseAccountUpdateParameters withIpRules(List<IpAddressOrRange> ipRules)
      Set the ipRules property: List of IpRules.
      Parameters:
      ipRules - the ipRules value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • enableMultipleWriteLocations

      public Boolean enableMultipleWriteLocations()
      Get the enableMultipleWriteLocations property: Enables the account to write in multiple locations.
      Returns:
      the enableMultipleWriteLocations value.
    • withEnableMultipleWriteLocations

      public DatabaseAccountUpdateParameters withEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations)
      Set the enableMultipleWriteLocations property: Enables the account to write in multiple locations.
      Parameters:
      enableMultipleWriteLocations - the enableMultipleWriteLocations value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • keyVaultKeyUri

      public String keyVaultKeyUri()
      Get the keyVaultKeyUri property: The URI of the key vault.
      Returns:
      the keyVaultKeyUri value.
    • withKeyVaultKeyUri

      public DatabaseAccountUpdateParameters withKeyVaultKeyUri(String keyVaultKeyUri)
      Set the keyVaultKeyUri property: The URI of the key vault.
      Parameters:
      keyVaultKeyUri - the keyVaultKeyUri value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • publicNetworkAccess

      public PublicNetworkAccess publicNetworkAccess()
      Get the publicNetworkAccess property: Whether requests from Public Network are allowed.
      Returns:
      the publicNetworkAccess value.
    • withPublicNetworkAccess

      public DatabaseAccountUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)
      Set the publicNetworkAccess property: Whether requests from Public Network are allowed.
      Parameters:
      publicNetworkAccess - the publicNetworkAccess value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • enableFreeTier

      public Boolean enableFreeTier()
      Get the enableFreeTier property: Flag to indicate whether Free Tier is enabled.
      Returns:
      the enableFreeTier value.
    • withEnableFreeTier

      public DatabaseAccountUpdateParameters withEnableFreeTier(Boolean enableFreeTier)
      Set the enableFreeTier property: Flag to indicate whether Free Tier is enabled.
      Parameters:
      enableFreeTier - the enableFreeTier value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • enableAnalyticalStorage

      public Boolean enableAnalyticalStorage()
      Get the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.
      Returns:
      the enableAnalyticalStorage value.
    • withEnableAnalyticalStorage

      public DatabaseAccountUpdateParameters withEnableAnalyticalStorage(Boolean enableAnalyticalStorage)
      Set the enableAnalyticalStorage property: Flag to indicate whether to enable storage analytics.
      Parameters:
      enableAnalyticalStorage - the enableAnalyticalStorage value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • analyticalStorageConfiguration

      public AnalyticalStorageConfiguration analyticalStorageConfiguration()
      Get the analyticalStorageConfiguration property: Analytical storage specific properties.
      Returns:
      the analyticalStorageConfiguration value.
    • withAnalyticalStorageConfiguration

      public DatabaseAccountUpdateParameters withAnalyticalStorageConfiguration(AnalyticalStorageConfiguration analyticalStorageConfiguration)
      Set the analyticalStorageConfiguration property: Analytical storage specific properties.
      Parameters:
      analyticalStorageConfiguration - the analyticalStorageConfiguration value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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

      Set the cors property: The CORS policy for the Cosmos DB database account.
      Parameters:
      cors - the cors value to set.
      Returns:
      the DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters 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 DatabaseAccountUpdateParameters object itself.
    • keysMetadata

      public DatabaseAccountKeysMetadata keysMetadata()
      Get the keysMetadata property: This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account.
      Returns:
      the keysMetadata value.
    • enablePartitionMerge

      public Boolean enablePartitionMerge()
      Get the enablePartitionMerge property: Flag to indicate enabling/disabling of Partition Merge feature on the account.
      Returns:
      the enablePartitionMerge value.
    • withEnablePartitionMerge

      public DatabaseAccountUpdateParameters withEnablePartitionMerge(Boolean enablePartitionMerge)
      Set the enablePartitionMerge property: Flag to indicate enabling/disabling of Partition Merge feature on the account.
      Parameters:
      enablePartitionMerge - the enablePartitionMerge value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • minimalTlsVersion

      public MinimalTlsVersion minimalTlsVersion()
      Get the minimalTlsVersion property: Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
      Returns:
      the minimalTlsVersion value.
    • withMinimalTlsVersion

      public DatabaseAccountUpdateParameters withMinimalTlsVersion(MinimalTlsVersion minimalTlsVersion)
      Set the minimalTlsVersion property: Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
      Parameters:
      minimalTlsVersion - the minimalTlsVersion value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • enableBurstCapacity

      public Boolean enableBurstCapacity()
      Get the enableBurstCapacity property: Flag to indicate enabling/disabling of Burst Capacity feature on the account.
      Returns:
      the enableBurstCapacity value.
    • withEnableBurstCapacity

      public DatabaseAccountUpdateParameters withEnableBurstCapacity(Boolean enableBurstCapacity)
      Set the enableBurstCapacity property: Flag to indicate enabling/disabling of Burst Capacity feature on the account.
      Parameters:
      enableBurstCapacity - the enableBurstCapacity value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • customerManagedKeyStatus

      public String customerManagedKeyStatus()
      Get the customerManagedKeyStatus property: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance.
      Returns:
      the customerManagedKeyStatus value.
    • withCustomerManagedKeyStatus

      public DatabaseAccountUpdateParameters withCustomerManagedKeyStatus(String customerManagedKeyStatus)
      Set the customerManagedKeyStatus property: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance.
      Parameters:
      customerManagedKeyStatus - the customerManagedKeyStatus value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • enablePerRegionPerPartitionAutoscale

      public Boolean enablePerRegionPerPartitionAutoscale()
      Get the enablePerRegionPerPartitionAutoscale property: Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account.
      Returns:
      the enablePerRegionPerPartitionAutoscale value.
    • withEnablePerRegionPerPartitionAutoscale

      public DatabaseAccountUpdateParameters withEnablePerRegionPerPartitionAutoscale(Boolean enablePerRegionPerPartitionAutoscale)
      Set the enablePerRegionPerPartitionAutoscale property: Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account.
      Parameters:
      enablePerRegionPerPartitionAutoscale - the enablePerRegionPerPartitionAutoscale value to set.
      Returns:
      the DatabaseAccountUpdateParameters object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DatabaseAccountUpdateParameters>
      Throws:
      IOException
    • fromJson

      public static DatabaseAccountUpdateParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DatabaseAccountUpdateParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DatabaseAccountUpdateParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the DatabaseAccountUpdateParameters.