Skip to content

Commit b0bacfb

Browse files
committed
Fixed tags
1 parent 8c8858a commit b0bacfb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

articles/cosmos-db/how-to-time-to-live.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ await client.GetDatabase("database").CreateContainerAsync(new ContainerPropertie
7070
});
7171
```
7272

73-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
73+
### <a id="java4-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
7474

7575
```java
7676
CosmosAsyncContainer container;
@@ -81,7 +81,7 @@ containerProperties.setDefaultTimeToLiveInSeconds(-1);
8181
container = database.createContainerIfNotExists(containerProperties, 400).block().getContainer();
8282
```
8383

84-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
84+
### <a id="java3-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
8585

8686
```java
8787
CosmosContainer container;
@@ -136,23 +136,23 @@ async function createcontainerWithTTL(db: Database, containerDefinition: Contain
136136
}
137137
```
138138

139-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
139+
### <a id="java4-enable-defaultexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
140140

141141
```java
142142
CosmosAsyncContainer container;
143143

144-
// Create a new container with TTL enabled and without any expiration value
144+
// Create a new container with TTL enabled with default expiration value
145145
CosmosContainerProperties containerProperties = new CosmosContainerProperties("myContainer", "/myPartitionKey");
146146
containerProperties.setDefaultTimeToLiveInSeconds(90 * 60 * 60 * 24);
147147
container = database.createContainerIfNotExists(containerProperties, 400).block().getContainer();
148148
```
149149

150-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
150+
### <a id="java3-enable-defaultexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
151151

152152
```java
153153
CosmosContainer container;
154154

155-
// Create a new container with TTL enabled and without any expiration value
155+
// Create a new container with TTL enabled with default expiration value
156156
CosmosContainerProperties containerProperties = new CosmosContainerProperties("myContainer", "/myPartitionKey");
157157
containerProperties.defaultTimeToLive(90 * 60 * 60 * 24);
158158
container = database.createContainerIfNotExists(containerProperties, 400).block().container();
@@ -235,7 +235,7 @@ const itemDefinition = {
235235
};
236236
```
237237

238-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
238+
### <a id="java4-enable-itemexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
239239

240240
```java
241241
// Include a property that serializes to "ttl" in JSON
@@ -270,7 +270,7 @@ SalesOrder salesOrder = new SalesOrder(
270270

271271
```
272272

273-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
273+
### <a id="java3-enable-itemexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
274274

275275
```java
276276
// Include a property that serializes to "ttl" in JSON
@@ -334,7 +334,7 @@ itemResponse.Resource.ttl = 60 * 30 * 30; // update time to live
334334
await client.GetContainer("database", "container").ReplaceItemAsync(itemResponse.Resource, "SO05");
335335
```
336336

337-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
337+
### <a id="java4-enable-modifyitemexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
338338

339339
```java
340340
// This examples leverages the Sales Order class above.
@@ -347,7 +347,7 @@ CosmosAsyncItemResponse<SalesOrder> itemResponse = container.readItem("SO05", ne
347347
}).block();
348348
```
349349

350-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
350+
### <a id="java3-enable-modifyitemexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
351351

352352
```java
353353
// This examples leverages the Sales Order class above.
@@ -395,7 +395,7 @@ itemResponse.Resource.ttl = null; // inherit the default TTL of the container
395395
await client.GetContainer("database", "container").ReplaceItemAsync(itemResponse.Resource, "SO05");
396396
```
397397

398-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
398+
### <a id="java4-enable-itemdefaultexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
399399

400400
```java
401401
// This examples leverages the Sales Order class above.
@@ -408,7 +408,7 @@ CosmosAsyncItemResponse<SalesOrder> itemResponse = container.readItem("SO05", ne
408408
}).block();
409409
```
410410

411-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
411+
### <a id="java3-enable-itemdefaultexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
412412

413413
```java
414414
// This examples leverages the Sales Order class above.
@@ -450,7 +450,7 @@ containerResponse.Resource.DefaultTimeToLive = null;
450450
await client.GetContainer("database", "container").ReplaceContainerAsync(containerResponse.Resource);
451451
```
452452

453-
### <a id="java-enable-noexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
453+
### <a id="java4-enable-disableexpiry"></a>Java SDK V4 (Maven com.azure::azure-cosmos)
454454

455455
```java
456456
CosmosContainerProperties containerProperties = new CosmosContainerProperties("myContainer", "/myPartitionKey");
@@ -460,7 +460,7 @@ containerProperties.setDefaultTimeToLiveInSeconds(null);
460460
container.replace(containerProperties).block();
461461
```
462462

463-
### <a id="java-enable-noexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
463+
### <a id="java3-enable-disableexpiry"></a>Java SDK V3 (Maven com.microsoft.azure::azure-cosmos)
464464

465465
```java
466466
CosmosContainer container;

0 commit comments

Comments
 (0)