Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"dir": "azure-resourcemanager-cosmos",
"source": "specification/cosmos-db/resource-manager/readme.md",
"package": "com.azure.resourcemanager.cosmos",
"args": "--tag=package-2023-03"
"args": "--tag=package-2023-04"
},
"dns": {
"dir": "azure-resourcemanager-dns",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

## 2.27.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes
### Other Changes

### Bugs Fixed
#### Dependency Updates

### Other Changes
- Updated `api-version` to `2023-04-15`.

## 2.26.0 (2023-04-21)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,31 @@ public RestorableDatabaseAccountGetResultInner withDeletionTime(OffsetDateTime d
return this;
}

/**
* Get the oldestRestorableTime property: The least recent time at which the database account can be restored to
* (ISO-8601 format).
*
* @return the oldestRestorableTime value.
*/
public OffsetDateTime oldestRestorableTime() {
return this.innerProperties() == null ? null : this.innerProperties().oldestRestorableTime();
}

/**
* Set the oldestRestorableTime property: The least recent time at which the database account can be restored to
* (ISO-8601 format).
*
* @param oldestRestorableTime the oldestRestorableTime value to set.
* @return the RestorableDatabaseAccountGetResultInner object itself.
*/
public RestorableDatabaseAccountGetResultInner withOldestRestorableTime(OffsetDateTime oldestRestorableTime) {
if (this.innerProperties() == null) {
this.innerProperties = new RestorableDatabaseAccountProperties();
}
this.innerProperties().withOldestRestorableTime(oldestRestorableTime);
return this;
}

/**
* Get the apiType property: The API type of the restorable database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public final class RestorableDatabaseAccountProperties {
@JsonProperty(value = "deletionTime")
private OffsetDateTime deletionTime;

/*
* The least recent time at which the database account can be restored to (ISO-8601 format).
*/
@JsonProperty(value = "oldestRestorableTime")
private OffsetDateTime oldestRestorableTime;

/*
* The API type of the restorable database account.
*/
Expand Down Expand Up @@ -110,6 +116,28 @@ public RestorableDatabaseAccountProperties withDeletionTime(OffsetDateTime delet
return this;
}

/**
* Get the oldestRestorableTime property: The least recent time at which the database account can be restored to
* (ISO-8601 format).
*
* @return the oldestRestorableTime value.
*/
public OffsetDateTime oldestRestorableTime() {
return this.oldestRestorableTime;
}

/**
* Set the oldestRestorableTime property: The least recent time at which the database account can be restored to
* (ISO-8601 format).
*
* @param oldestRestorableTime the oldestRestorableTime value to set.
* @return the RestorableDatabaseAccountProperties object itself.
*/
public RestorableDatabaseAccountProperties withOldestRestorableTime(OffsetDateTime oldestRestorableTime) {
this.oldestRestorableTime = oldestRestorableTime;
return this;
}

/**
* Get the apiType property: The API type of the restorable database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public ServicesClient getServices() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2023-03-15";
this.apiVersion = "2023-04-15";
this.databaseAccounts = new DatabaseAccountsClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.databases = new DatabasesClientImpl(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package com.azure.resourcemanager.cosmos.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

Expand All @@ -13,10 +14,36 @@
@JsonTypeName("Continuous")
@Fluent
public final class ContinuousModeBackupPolicy extends BackupPolicy {
/*
* Configuration values for continuous mode backup
*/
@JsonProperty(value = "continuousModeProperties")
private ContinuousModeProperties continuousModeProperties;

/** Creates an instance of ContinuousModeBackupPolicy class. */
public ContinuousModeBackupPolicy() {
}

/**
* Get the continuousModeProperties property: Configuration values for continuous mode backup.
*
* @return the continuousModeProperties value.
*/
public ContinuousModeProperties continuousModeProperties() {
return this.continuousModeProperties;
}

/**
* Set the continuousModeProperties property: Configuration values for continuous mode backup.
*
* @param continuousModeProperties the continuousModeProperties value to set.
* @return the ContinuousModeBackupPolicy object itself.
*/
public ContinuousModeBackupPolicy withContinuousModeProperties(ContinuousModeProperties continuousModeProperties) {
this.continuousModeProperties = continuousModeProperties;
return this;
}

/** {@inheritDoc} */
@Override
public ContinuousModeBackupPolicy withMigrationState(BackupPolicyMigrationState migrationState) {
Expand All @@ -32,5 +59,8 @@ public ContinuousModeBackupPolicy withMigrationState(BackupPolicyMigrationState
@Override
public void validate() {
super.validate();
if (continuousModeProperties() != null) {
continuousModeProperties().validate();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.cosmos.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Configuration values for periodic mode backup. */
@Fluent
public final class ContinuousModeProperties {
/*
* Enum to indicate type of Continuous backup mode
*/
@JsonProperty(value = "tier")
private ContinuousTier tier;

/** Creates an instance of ContinuousModeProperties class. */
public ContinuousModeProperties() {
}

/**
* Get the tier property: Enum to indicate type of Continuous backup mode.
*
* @return the tier value.
*/
public ContinuousTier tier() {
return this.tier;
}

/**
* Set the tier property: Enum to indicate type of Continuous backup mode.
*
* @param tier the tier value to set.
* @return the ContinuousModeProperties object itself.
*/
public ContinuousModeProperties withTier(ContinuousTier tier) {
this.tier = tier;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.cosmos.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Enum to indicate type of Continuous backup tier. */
public final class ContinuousTier extends ExpandableStringEnum<ContinuousTier> {
/** Static value Continuous7Days for ContinuousTier. */
public static final ContinuousTier CONTINUOUS7DAYS = fromString("Continuous7Days");

/** Static value Continuous30Days for ContinuousTier. */
public static final ContinuousTier CONTINUOUS30DAYS = fromString("Continuous30Days");

/**
* Creates a new instance of ContinuousTier value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Deprecated
public ContinuousTier() {
}

/**
* Creates or finds a ContinuousTier from its string representation.
*
* @param name a name to look for.
* @return the corresponding ContinuousTier.
*/
@JsonCreator
public static ContinuousTier fromString(String name) {
return fromString(name, ContinuousTier.class);
}

/**
* Gets known ContinuousTier values.
*
* @return known ContinuousTier values.
*/
public static Collection<ContinuousTier> values() {
return values(ContinuousTier.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public final class PublicNetworkAccess extends ExpandableStringEnum<PublicNetwor
/** Static value Disabled for PublicNetworkAccess. */
public static final PublicNetworkAccess DISABLED = fromString("Disabled");

/** Static value SecuredByPerimeter for PublicNetworkAccess. */
public static final PublicNetworkAccess SECURED_BY_PERIMETER = fromString("SecuredByPerimeter");

/**
* Creates a new instance of PublicNetworkAccess value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ public class ThroughputSettingsResource {
@JsonProperty(value = "offerReplacePending", access = JsonProperty.Access.WRITE_ONLY)
private String offerReplacePending;

/*
* The offer throughput value to instantly scale up without triggering splits
*/
@JsonProperty(value = "instantMaximumThroughput", access = JsonProperty.Access.WRITE_ONLY)
private String instantMaximumThroughput;

/*
* The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified
*/
@JsonProperty(value = "softAllowedMaximumThroughput", access = JsonProperty.Access.WRITE_ONLY)
private String softAllowedMaximumThroughput;

/** Creates an instance of ThroughputSettingsResource class. */
public ThroughputSettingsResource() {
}
Expand Down Expand Up @@ -104,6 +116,26 @@ public String offerReplacePending() {
return this.offerReplacePending;
}

/**
* Get the instantMaximumThroughput property: The offer throughput value to instantly scale up without triggering
* splits.
*
* @return the instantMaximumThroughput value.
*/
public String instantMaximumThroughput() {
return this.instantMaximumThroughput;
}

/**
* Get the softAllowedMaximumThroughput property: The maximum throughput value or the maximum maxThroughput value
* (for autoscale) that can be specified.
*
* @return the softAllowedMaximumThroughput value.
*/
public String softAllowedMaximumThroughput() {
return this.softAllowedMaximumThroughput;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.azure.resourcemanager.test.ResourceManagerTestBase;
import com.azure.resourcemanager.test.utils.TestDelayProvider;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.time.temporal.ChronoUnit;
Expand Down Expand Up @@ -228,6 +229,7 @@ public void canCreateCosmosDbCassandraAccount() {
}

@Test
@Disabled("EnableCassandraConnector is not supported for the target subscription.")
public void canUpdateCosmosDbCassandraConnector() {
final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22);

Expand Down
Loading