From 668f6aaf5979cf75b71336f7ad886486cb6ffb83 Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Fri, 20 May 2022 15:31:03 +0530
Subject: [PATCH 01/13] Support PK and Id encryption. Bump up policy format
version.
---
Microsoft.Azure.Cosmos/src/PartitionKey.cs | 23 ++++++++++
.../Settings/ClientEncryptionPolicy.cs | 21 +++++----
.../Resource/Settings/ContainerProperties.cs | 2 +-
.../CosmosContainerTests.cs | 44 ++++++++++++++++++-
.../Fluent/ContainerSettingsTests.cs | 2 +-
5 files changed, 81 insertions(+), 11 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKey.cs b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
index 86e0bbae58..5ee01b6bd0 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKey.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
@@ -38,6 +38,11 @@ namespace Microsoft.Azure.Cosmos
///
public static readonly string SystemKeyPath = Documents.PartitionKey.SystemKeyPath;
+ ///
+ /// The raw partition key value.
+ ///
+ public object RawPartitionKeyValue { get; }
+
///
/// Gets the value provided at initialization.
///
@@ -57,10 +62,12 @@ public PartitionKey(string partitionKeyValue)
if (partitionKeyValue == null)
{
this.InternalKey = PartitionKey.NullPartitionKeyInternal;
+ this.RawPartitionKeyValue = null;
}
else
{
this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
+ this.RawPartitionKeyValue = partitionKeyValue;
}
this.IsNone = false;
}
@@ -73,6 +80,7 @@ public PartitionKey(bool partitionKeyValue)
{
this.InternalKey = partitionKeyValue ? TruePartitionKeyInternal : FalsePartitionKeyInternal;
this.IsNone = false;
+ this.RawPartitionKeyValue = partitionKeyValue;
}
///
@@ -83,6 +91,18 @@ public PartitionKey(double partitionKeyValue)
{
this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
this.IsNone = false;
+ this.RawPartitionKeyValue = partitionKeyValue;
+ }
+
+ ///
+ /// Creates a new partition key value.
+ ///
+ /// The value to use as partition key.
+ public PartitionKey(long partitionKeyValue)
+ {
+ this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
+ this.IsNone = false;
+ this.RawPartitionKeyValue = partitionKeyValue;
}
///
@@ -93,6 +113,7 @@ internal PartitionKey(object value)
{
this.InternalKey = new Documents.PartitionKey(value).InternalKey;
this.IsNone = false;
+ this.RawPartitionKeyValue = value;
}
///
@@ -103,6 +124,7 @@ internal PartitionKey(PartitionKeyInternal partitionKeyInternal)
{
this.InternalKey = partitionKeyInternal;
this.IsNone = false;
+ this.RawPartitionKeyValue = partitionKeyInternal;
}
///
@@ -114,6 +136,7 @@ private PartitionKey(PartitionKeyInternal partitionKeyInternal, bool isNone = fa
{
this.InternalKey = partitionKeyInternal;
this.IsNone = isNone;
+ this.RawPartitionKeyValue = partitionKeyInternal;
}
///
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index ab3dcc5e74..44005626c6 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -24,7 +24,7 @@ public ClientEncryptionPolicy(IEnumerable included
{
ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths);
this.IncludedPaths = includedPaths;
- this.PolicyFormatVersion = 1;
+ this.PolicyFormatVersion = 2;
}
[JsonConstructor]
@@ -55,22 +55,22 @@ public IEnumerable IncludedPaths
internal IDictionary AdditionalProperties { get; private set; }
///
- /// Ensures that partition key paths are not specified in the client encryption policy for encryption.
+ /// Ensures that partition key paths specified in the client encryption policy for encryption are encrypted using Deterministic encryption algorithm.
///
/// Tokens corresponding to validated partition key.
- internal void ValidatePartitionKeyPathsAreNotEncrypted(IReadOnlyList> partitionKeyPathTokens)
+ internal void ValidatePartitionKeyPathsIfEncrypted(IReadOnlyList> partitionKeyPathTokens)
{
Debug.Assert(partitionKeyPathTokens != null);
- IEnumerable propertiesToEncrypt = this.IncludedPaths.Select(p => p.Path.Substring(1));
+
foreach (IReadOnlyList tokensInPath in partitionKeyPathTokens)
{
Debug.Assert(tokensInPath != null);
if (tokensInPath.Count > 0)
{
string topLevelToken = tokensInPath.First();
- if (propertiesToEncrypt.Contains(topLevelToken))
+ if (string.Equals(this.IncludedPaths.Where(p => p.Path.Substring(1).Equals(topLevelToken)).Select(et => et.EncryptionType).FirstOrDefault(), "Randomized"))
{
- throw new ArgumentException($"Paths which are part of the partition key may not be included in the {nameof(ClientEncryptionPolicy)}.", nameof(ContainerProperties.ClientEncryptionPolicy));
+ throw new ArgumentException($"Path: /{topLevelToken} which is part of the partition key has to be encrypted with Deterministic type Encryption.");
}
}
}
@@ -104,8 +104,7 @@ private static void ValidateClientEncryptionIncludedPath(ClientEncryptionInclude
}
if (clientEncryptionIncludedPath.Path[0] != '/'
- || clientEncryptionIncludedPath.Path.LastIndexOf('/') != 0
- || string.Equals(clientEncryptionIncludedPath.Path.Substring(1), "id"))
+ || clientEncryptionIncludedPath.Path.LastIndexOf('/') != 0)
{
throw new ArgumentException($"Invalid path '{clientEncryptionIncludedPath.Path ?? string.Empty}'.");
}
@@ -120,6 +119,12 @@ private static void ValidateClientEncryptionIncludedPath(ClientEncryptionInclude
throw new ArgumentNullException(nameof(clientEncryptionIncludedPath.EncryptionType));
}
+ if (string.Equals(clientEncryptionIncludedPath.Path.Substring(1), "id") &&
+ string.Equals(clientEncryptionIncludedPath.EncryptionType, "Randomized"))
+ {
+ throw new ArgumentException($"Only Deterministic encryption type is supported for path: {clientEncryptionIncludedPath.Path}. ");
+ }
+
if (!string.Equals(clientEncryptionIncludedPath.EncryptionType, "Deterministic") &&
!string.Equals(clientEncryptionIncludedPath.EncryptionType, "Randomized"))
{
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs
index 80280573c2..fb1eb0a165 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs
@@ -703,7 +703,7 @@ internal void ValidateRequiredProperties()
if (this.ClientEncryptionPolicy != null)
{
- this.ClientEncryptionPolicy.ValidatePartitionKeyPathsAreNotEncrypted(this.PartitionKeyPathTokens);
+ this.ClientEncryptionPolicy.ValidatePartitionKeyPathsIfEncrypted(this.PartitionKeyPathTokens);
}
}
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
index 71e8ee5970..a2fccc4d24 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
@@ -1514,6 +1514,48 @@ public async Task ClientEncryptionPolicyFailureTest()
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
EncryptionType = "Randomized"
},
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/path1",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
+ };
+
+ ContainerProperties setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey)
+ };
+
+ await this.cosmosDatabase.CreateContainerAsync(setting);
+ Assert.Fail("Creating container should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key has to be encrypted with Deterministic type Encryption."));
+ }
+
+ try
+ {
+ Collection pathsToEncryptWithPartitionKey = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = partitionKeyPath,
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Deterministic"
+ },
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/id",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
};
ContainerProperties setting = new ContainerProperties()
@@ -1528,7 +1570,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("Paths which are part of the partition key may not be included in the ClientEncryptionPolicy."));
+ Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type supported for path: /id. "));
}
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
index d038032f93..9451deb488 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
@@ -137,7 +137,7 @@ public async Task ContainerContractTest()
Assert.AreEqual(4, spatialPath.SpatialTypes.Count); // All SpatialTypes are returned
Assert.AreEqual(1, responseProperties.ClientEncryptionPolicy.IncludedPaths.Count());
- Assert.IsTrue(responseProperties.ClientEncryptionPolicy.PolicyFormatVersion <= 1);
+ Assert.IsTrue(responseProperties.ClientEncryptionPolicy.PolicyFormatVersion <= 2);
ClientEncryptionIncludedPath clientEncryptionIncludedPath = responseProperties.ClientEncryptionPolicy.IncludedPaths.First();
Assert.IsTrue(this.VerifyClientEncryptionIncludedPath(clientEncryptionIncludedPath1, clientEncryptionIncludedPath));
}
From c7b7e20b5eb3d5dfb20b24b57a1e3020a031a222 Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Mon, 23 May 2022 12:26:09 +0530
Subject: [PATCH 02/13] Update DotNetSDKAPI.json
---
.../Contracts/DotNetSDKAPI.json | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
index 56ea78e37e..95f3785d20 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
@@ -5447,6 +5447,18 @@
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Null;IsInitOnly:True;IsStatic:True;"
},
+ "System.Object get_RawPartitionKeyValue()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "System.Object get_RawPartitionKeyValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Object RawPartitionKeyValue": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "System.Object RawPartitionKeyValue;CanRead:True;CanWrite:False;System.Object get_RawPartitionKeyValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.String SystemKeyName": {
"Type": "Field",
"Attributes": [],
@@ -5472,6 +5484,11 @@
"Attributes": [],
"MethodInfo": "[Void .ctor(Double), Void .ctor(Double)]"
},
+ "Void .ctor(Int64)": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(Int64), Void .ctor(Int64)]"
+ },
"Void .ctor(System.String)": {
"Type": "Constructor",
"Attributes": [],
From fff06039a864daf885bbb11da71c19dea94ed8bd Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Mon, 23 May 2022 14:01:54 +0530
Subject: [PATCH 03/13] Update CosmosContainerTests.cs
---
.../CosmosContainerTests.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
index a2fccc4d24..fec7e14d7d 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
@@ -1570,7 +1570,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type supported for path: /id. "));
+ Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type is supported for path: /id."));
}
}
From e2ba40704d1f27ce109b6809f92117a5cb84a00d Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Tue, 24 May 2022 11:40:34 +0530
Subject: [PATCH 04/13] fixes as per review comments. Added float pk
constructor.
---
Microsoft.Azure.Cosmos/src/PartitionKey.cs | 11 ++
.../Settings/ClientEncryptionPolicy.cs | 44 +++--
.../CosmosContainerTests.cs | 161 +++++++++++++++---
.../Contracts/DotNetSDKAPI.json | 9 +-
4 files changed, 192 insertions(+), 33 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKey.cs b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
index 5ee01b6bd0..16554c1ba2 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKey.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
@@ -94,6 +94,17 @@ public PartitionKey(double partitionKeyValue)
this.RawPartitionKeyValue = partitionKeyValue;
}
+ ///
+ /// Creates a new partition key value.
+ ///
+ /// The value to use as partition key.
+ public PartitionKey(float partitionKeyValue)
+ {
+ this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
+ this.IsNone = false;
+ this.RawPartitionKeyValue = partitionKeyValue;
+ }
+
///
/// Creates a new partition key value.
///
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index 44005626c6..89f35772d6 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -8,6 +8,7 @@ namespace Microsoft.Azure.Cosmos
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+ using Microsoft.Azure.Documents;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -20,11 +21,12 @@ public sealed class ClientEncryptionPolicy
/// Initializes a new instance of the class.
///
/// List of paths to include in the policy definition.
- public ClientEncryptionPolicy(IEnumerable includedPaths)
+ /// Version of the client encryption policy definition. Default version is 1.
+ public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion = 1)
{
- ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths);
+ ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths, policyFormatVersion);
this.IncludedPaths = includedPaths;
- this.PolicyFormatVersion = 2;
+ this.PolicyFormatVersion = policyFormatVersion;
}
[JsonConstructor]
@@ -68,20 +70,33 @@ internal void ValidatePartitionKeyPathsIfEncrypted(IReadOnlyList 0)
{
string topLevelToken = tokensInPath.First();
- if (string.Equals(this.IncludedPaths.Where(p => p.Path.Substring(1).Equals(topLevelToken)).Select(et => et.EncryptionType).FirstOrDefault(), "Randomized"))
+
+ // paths in included paths start with "/". Get the ClientEncryptionIncludedPath and validate.
+ IEnumerable encryptedPartitionKeyPath = this.IncludedPaths.Where(p => p.Path.Substring(1).Equals(topLevelToken));
+
+ if (encryptedPartitionKeyPath.Any())
{
- throw new ArgumentException($"Path: /{topLevelToken} which is part of the partition key has to be encrypted with Deterministic type Encryption.");
+ if (this.PolicyFormatVersion < 2)
+ {
+ throw new ArgumentException($"Path: /{topLevelToken} which is part of the partition key cannot be encrypted with PolicyFormatVersion: {this.PolicyFormatVersion}. Please use PolicyFormatVersion: 2. ");
+ }
+
+ // for the ClientEncryptionIncludedPath found check the encryption type.
+ if (string.Equals(encryptedPartitionKeyPath.Select(et => et.EncryptionType).FirstOrDefault(), "Randomized"))
+ {
+ throw new ArgumentException($"Path: /{topLevelToken} which is part of the partition key has to be encrypted with Deterministic type Encryption.");
+ }
}
}
}
}
- private static void ValidateIncludedPaths(IEnumerable clientEncryptionIncludedPath)
+ private static void ValidateIncludedPaths(IEnumerable clientEncryptionIncludedPath, int policyFormatVersion)
{
List includedPathsList = new List();
foreach (ClientEncryptionIncludedPath path in clientEncryptionIncludedPath)
{
- ClientEncryptionPolicy.ValidateClientEncryptionIncludedPath(path);
+ ClientEncryptionPolicy.ValidateClientEncryptionIncludedPath(path, policyFormatVersion);
if (includedPathsList.Contains(path.Path))
{
throw new ArgumentException("Duplicate Path found.", nameof(clientEncryptionIncludedPath));
@@ -91,7 +106,7 @@ private static void ValidateIncludedPaths(IEnumerable { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
- ClientEncryptionPolicy = new ClientEncryptionPolicy(paths)
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(paths, 2)
};
ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
@@ -1391,8 +1398,64 @@ public async Task ClientEncryptionPolicyTest()
Container container = containerResponse;
ContainerProperties responseSettings = containerResponse;
- Assert.AreEqual(2, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
+ Assert.AreEqual(3, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
ClientEncryptionIncludedPath includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
+ Assert.AreEqual(partitionKeyPath, includedPath.Path);
+ Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(1);
+ Assert.AreEqual("/id", includedPath.Path);
+ Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(2);
+ Assert.AreEqual("/path2", includedPath.Path);
+ Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ ContainerResponse readResponse = await container.ReadContainerAsync();
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+
+ // version 1 test.
+ containerName = Guid.NewGuid().ToString();
+ partitionKeyPath = "/users";
+ paths = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/path1",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/path2",
+ ClientEncryptionKeyId = "dekId2",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Deterministic"
+ }
+ };
+
+ setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(paths)
+ };
+
+ containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ container = containerResponse;
+ responseSettings = containerResponse;
+
+ Assert.AreEqual(2, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
Assert.AreEqual("/path1", includedPath.Path);
Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
@@ -1404,7 +1467,7 @@ public async Task ClientEncryptionPolicyTest()
Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
Assert.AreEqual("Deterministic", includedPath.EncryptionType);
- ContainerResponse readResponse = await container.ReadContainerAsync();
+ readResponse = await container.ReadContainerAsync();
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
@@ -1464,7 +1527,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("EncryptionAlgorithm should be 'AEAD_AES_256_CBC_HMAC_SHA256'."));
+ Assert.IsTrue(ex.Message.Contains("EncryptionAlgorithm should be 'AEAD_AES_256_CBC_HMAC_SHA256'."), ex.Message);
}
try
@@ -1478,15 +1541,16 @@ public async Task ClientEncryptionPolicyFailureTest()
};
Collection pathsList = new Collection()
- {
- new ClientEncryptionIncludedPath()
- {
- Path = "/path1",
- ClientEncryptionKeyId = "dekId1",
- EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
- EncryptionType = "Randomized"
- },
- };
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/path1",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
+ };
+
pathsList.Add(path1);
ContainerProperties setting = new ContainerProperties()
@@ -1500,7 +1564,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("Duplicate Path found."));
+ Assert.IsTrue(ex.Message.Contains("Duplicate Path found."), ex.Message);
}
try
@@ -1519,7 +1583,7 @@ public async Task ClientEncryptionPolicyFailureTest()
Path = "/path1",
ClientEncryptionKeyId = "dekId1",
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
- EncryptionType = "Randomized"
+ EncryptionType = "Deterministic"
},
};
@@ -1527,7 +1591,7 @@ public async Task ClientEncryptionPolicyFailureTest()
{
Id = containerName,
PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
- ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey)
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey, 2)
};
await this.cosmosDatabase.CreateContainerAsync(setting);
@@ -1535,7 +1599,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key has to be encrypted with Deterministic type Encryption."));
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key has to be encrypted with Deterministic type Encryption."), ex.Message);
}
try
@@ -1558,6 +1622,63 @@ public async Task ClientEncryptionPolicyFailureTest()
},
};
+ ContainerProperties setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey, 2)
+ };
+
+ await this.cosmosDatabase.CreateContainerAsync(setting);
+ Assert.Fail("Creating container should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type is supported for path: /id."), ex.Message);
+ }
+
+ // failure due to policy format version 1. for Pk and Id
+ try
+ {
+ Collection pathsToEncryptWithPartitionKey = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = partitionKeyPath,
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Deterministic"
+ },
+ };
+
+ ContainerProperties setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey)
+ };
+
+ await this.cosmosDatabase.CreateContainerAsync(setting);
+ Assert.Fail("Creating container should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key cannot be encrypted with PolicyFormatVersion: 1. Please use PolicyFormatVersion: 2."), ex.Message);
+ }
+
+ try
+ {
+ Collection pathsToEncryptWithPartitionKey = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/id",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Deterministic"
+ },
+ };
+
ContainerProperties setting = new ContainerProperties()
{
Id = containerName,
@@ -1570,7 +1691,7 @@ public async Task ClientEncryptionPolicyFailureTest()
}
catch (ArgumentException ex)
{
- Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type is supported for path: /id."));
+ Assert.IsTrue(ex.Message.Contains("Path: /id cannot be encrypted with PolicyFormatVersion: 1. Please use PolicyFormatVersion: 2."), ex.Message);
}
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
index 95f3785d20..060caf59d2 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
@@ -996,10 +996,10 @@
],
"MethodInfo": "System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath] IncludedPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath] get_IncludedPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath])": {
+ "Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath], Int32)": {
"Type": "Constructor",
"Attributes": [],
- "MethodInfo": "[Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath]), Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath])]"
+ "MethodInfo": "[Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath], Int32), Void .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.Azure.Cosmos.ClientEncryptionIncludedPath], Int32)]"
}
},
"NestedTypes": {}
@@ -5489,6 +5489,11 @@
"Attributes": [],
"MethodInfo": "[Void .ctor(Int64), Void .ctor(Int64)]"
},
+ "Void .ctor(Single)": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(Single), Void .ctor(Single)]"
+ },
"Void .ctor(System.String)": {
"Type": "Constructor",
"Attributes": [],
From 097956643e07cc030be65f7a74cf8189e896156d Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Tue, 24 May 2022 11:42:15 +0530
Subject: [PATCH 05/13] Update ClientEncryptionPolicy.cs
---
.../src/Resource/Settings/ClientEncryptionPolicy.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index 89f35772d6..9e8177fc1f 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -21,7 +21,7 @@ public sealed class ClientEncryptionPolicy
/// Initializes a new instance of the class.
///
/// List of paths to include in the policy definition.
- /// Version of the client encryption policy definition. Default version is 1.
+ /// Version of the client encryption policy definition. Current supported versions are 1 and 2. Default version is 1.
public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion = 1)
{
ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths, policyFormatVersion);
From 7bc993e1a5faa168c3fe960ab636f4bff14a65cb Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Tue, 24 May 2022 11:59:23 +0530
Subject: [PATCH 06/13] fixed exception message.
---
.../src/Resource/Settings/ClientEncryptionPolicy.cs | 2 +-
.../CosmosContainerTests.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index 9e8177fc1f..e6c4b92d9f 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -99,7 +99,7 @@ private static void ValidateIncludedPaths(IEnumerable
Date: Tue, 24 May 2022 12:00:27 +0530
Subject: [PATCH 07/13] Update ClientEncryptionPolicy.cs
---
.../src/Resource/Settings/ClientEncryptionPolicy.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index e6c4b92d9f..25e78bc593 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -8,7 +8,6 @@ namespace Microsoft.Azure.Cosmos
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
- using Microsoft.Azure.Documents;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -91,7 +90,9 @@ internal void ValidatePartitionKeyPathsIfEncrypted(IReadOnlyList clientEncryptionIncludedPath, int policyFormatVersion)
+ private static void ValidateIncludedPaths(
+ IEnumerable clientEncryptionIncludedPath,
+ int policyFormatVersion)
{
List includedPathsList = new List();
foreach (ClientEncryptionIncludedPath path in clientEncryptionIncludedPath)
@@ -106,7 +107,9 @@ private static void ValidateIncludedPaths(IEnumerable
Date: Tue, 24 May 2022 13:58:19 +0530
Subject: [PATCH 08/13] fixes, policy format in client encryption policy
definition.
---
.../ClientEncryptionPolicyDefinition.cs | 7 +-
.../src/Fluent/Settings/ContainerBuilder.cs | 6 +-
.../Settings/ClientEncryptionPolicy.cs | 2 +-
.../Fluent/ContainerSettingsTests.cs | 124 +++++++++++++++++-
.../Contracts/DotNetSDKAPI.json | 4 +-
5 files changed, 130 insertions(+), 13 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
index 7b103f74b5..b9c789a54d 100644
--- a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
+++ b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
@@ -15,13 +15,16 @@ public sealed class ClientEncryptionPolicyDefinition
private readonly Collection clientEncryptionIncludedPaths = new Collection();
private readonly ContainerBuilder parent;
private readonly Action attachCallback;
+ private readonly int policyFormatVersion;
internal ClientEncryptionPolicyDefinition(
ContainerBuilder parent,
- Action attachCallback)
+ Action attachCallback,
+ int policyFormatVersion = 1)
{
this.parent = parent;
this.attachCallback = attachCallback;
+ this.policyFormatVersion = (policyFormatVersion > 2 || policyFormatVersion < 1) ? throw new ArgumentException($"Supported versions of client encryption policy are 1 and 2. ") : policyFormatVersion;
}
///
@@ -41,7 +44,7 @@ public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionInclude
/// An instance of the parent.
public ContainerBuilder Attach()
{
- this.attachCallback(new ClientEncryptionPolicy(this.clientEncryptionIncludedPaths));
+ this.attachCallback(new ClientEncryptionPolicy(this.clientEncryptionIncludedPaths, this.policyFormatVersion));
return this.parent;
}
}
diff --git a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerBuilder.cs b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerBuilder.cs
index 53b2e1205d..567396646f 100644
--- a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerBuilder.cs
+++ b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerBuilder.cs
@@ -90,12 +90,14 @@ ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention)
///
/// Defines the ClientEncryptionPolicy for Azure Cosmos container
///
+ /// Version of the client encryption policy definition. Current supported versions are 1 and 2. Default version is 1.
/// An instance of .
- public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy()
+ public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion = 1)
{
return new ClientEncryptionPolicyDefinition(
this,
- (clientEncryptionPolicy) => this.AddClientEncryptionPolicy(clientEncryptionPolicy));
+ (clientEncryptionPolicy) => this.AddClientEncryptionPolicy(clientEncryptionPolicy),
+ policyFormatVersion);
}
///
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index 25e78bc593..f1c3bfd855 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -25,7 +25,7 @@ public ClientEncryptionPolicy(IEnumerable included
{
ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths, policyFormatVersion);
this.IncludedPaths = includedPaths;
- this.PolicyFormatVersion = policyFormatVersion;
+ this.PolicyFormatVersion = (policyFormatVersion > 2 || policyFormatVersion < 1) ? throw new ArgumentException($"Supported versions of client encryption policy are 1 and 2. ") : policyFormatVersion;
}
[JsonConstructor]
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
index 9451deb488..354eb5b3b5 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
@@ -601,26 +601,27 @@ public async Task WithClientEncryptionPolicyTest()
await TestCommon.CreateClientEncryptionKey("dekId1", databaseInlineCore);
await TestCommon.CreateClientEncryptionKey("dekId2", databaseInlineCore);
+ // version 2
string containerName = Guid.NewGuid().ToString();
string partitionKeyPath = "/users";
ClientEncryptionIncludedPath path1 = new ClientEncryptionIncludedPath()
{
- Path = "/path1",
+ Path = partitionKeyPath,
ClientEncryptionKeyId = "dekId1",
- EncryptionType = "Randomized",
+ EncryptionType = "Deterministic",
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256"
};
ClientEncryptionIncludedPath path2 = new ClientEncryptionIncludedPath()
{
- Path = "/path2",
+ Path = "/id",
ClientEncryptionKeyId = "dekId2",
- EncryptionType = "Randomized",
+ EncryptionType = "Deterministic",
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
};
-
+
ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
- .WithClientEncryptionPolicy()
+ .WithClientEncryptionPolicy(2)
.WithIncludedPath(path1)
.WithIncludedPath(path2)
.Attach()
@@ -641,6 +642,47 @@ public async Task WithClientEncryptionPolicyTest()
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+ // version 1
+ containerName = Guid.NewGuid().ToString();
+ partitionKeyPath = "/users";
+ path1 = new ClientEncryptionIncludedPath()
+ {
+ Path = "/path1",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionType = "Randomized",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256"
+ };
+
+ path2 = new ClientEncryptionIncludedPath()
+ {
+ Path = "/path2",
+ ClientEncryptionKeyId = "dekId2",
+ EncryptionType = "Randomized",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ };
+
+ containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
+ .WithClientEncryptionPolicy()
+ .WithIncludedPath(path1)
+ .WithIncludedPath(path2)
+ .Attach()
+ .CreateAsync();
+
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ container = containerResponse;
+ responseSettings = containerResponse;
+
+ Assert.IsNotNull(responseSettings.ClientEncryptionPolicy);
+ Assert.AreEqual(2, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
+ clientEncryptionIncludedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.First();
+ Assert.IsTrue(this.VerifyClientEncryptionIncludedPath(path1, clientEncryptionIncludedPath));
+ clientEncryptionIncludedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.Last();
+ Assert.IsTrue(this.VerifyClientEncryptionIncludedPath(path2, clientEncryptionIncludedPath));
+
+ readResponse = await container.ReadContainerAsync();
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+
// update CEP and replace container
readResponse.Resource.ClientEncryptionPolicy = null;
try
@@ -737,6 +779,76 @@ public async Task WithClientEncryptionPolicyFailureTest()
{
Assert.IsTrue(ex.Message.Contains("EncryptionAlgorithm should be 'AEAD_AES_256_CBC_HMAC_SHA256'. "));
}
+
+ // invalid policy version for partition key encryption
+ path1.EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256";
+ path1.Path = partitionKeyPath;
+ try
+ {
+ ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
+ .WithClientEncryptionPolicy()
+ .WithIncludedPath(path1)
+ .Attach()
+ .CreateAsync();
+
+ Assert.Fail("CreateCollection with invalid ClientEncryptionPolicy should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key cannot be encrypted with PolicyFormatVersion: 1. Please use PolicyFormatVersion: 2."), ex.Message);
+ }
+
+ // invalid policy version for id encryption
+ path1.Path = "/id";
+ try
+ {
+ ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
+ .WithClientEncryptionPolicy()
+ .WithIncludedPath(path1)
+ .Attach()
+ .CreateAsync();
+
+ Assert.Fail("CreateCollection with invalid ClientEncryptionPolicy should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /id cannot be encrypted with PolicyFormatVersion: 1. Please use PolicyFormatVersion: 2."), ex.Message);
+ }
+
+ // invalid encryption type for id encryption
+ path1.EncryptionType = "Randomized";
+ path1.Path = partitionKeyPath;
+ try
+ {
+ ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
+ .WithClientEncryptionPolicy(2)
+ .WithIncludedPath(path1)
+ .Attach()
+ .CreateAsync();
+
+ Assert.Fail("CreateCollection with invalid ClientEncryptionPolicy should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key has to be encrypted with Deterministic type Encryption."), ex.Message);
+ }
+
+ // invalid encryption type for id encryption
+ path1.Path = "/id";
+ try
+ {
+ ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
+ .WithClientEncryptionPolicy(2)
+ .WithIncludedPath(path1)
+ .Attach()
+ .CreateAsync();
+
+ Assert.Fail("CreateCollection with invalid ClientEncryptionPolicy should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type is supported for path: /id."), ex.Message);
+ }
}
private bool VerifyClientEncryptionIncludedPath(ClientEncryptionIncludedPath expected, ClientEncryptionIncludedPath actual)
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
index 060caf59d2..74384c86ca 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
@@ -4176,10 +4176,10 @@
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.ContainerProperties Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy()": {
+ "Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(Int32)": {
"Type": "Method",
"Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(Int32);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Microsoft.Azure.Cosmos.Fluent.ConflictResolutionDefinition WithConflictResolution()": {
"Type": "Method",
From 493d315590f21ca15479c6932bcca90f58dadb0b Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Tue, 24 May 2022 18:14:49 +0530
Subject: [PATCH 09/13] get raw partition key values from partition key list.
---
Microsoft.Azure.Cosmos/src/PartitionKey.cs | 14 +-
.../src/PartitionKeyBuilder.cs | 2 +-
.../CosmosContainerTests.cs | 128 ++++++++++++++++++
3 files changed, 142 insertions(+), 2 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKey.cs b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
index 16554c1ba2..76a54e913a 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKey.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
@@ -39,7 +39,7 @@ namespace Microsoft.Azure.Cosmos
public static readonly string SystemKeyPath = Documents.PartitionKey.SystemKeyPath;
///
- /// The raw partition key value.
+ /// The raw partition key value. This is used by Cosmos DB client side encryption SDK to encrypt partition key values.
///
public object RawPartitionKeyValue { get; }
@@ -138,6 +138,18 @@ internal PartitionKey(PartitionKeyInternal partitionKeyInternal)
this.RawPartitionKeyValue = partitionKeyInternal;
}
+ ///
+ /// Creates a new partition key value.
+ ///
+ /// The value to use as partition key.
+ /// Raw partition key values.
+ internal PartitionKey(PartitionKeyInternal partitionKeyInternal, object rawPartitionKeyValue)
+ {
+ this.InternalKey = partitionKeyInternal;
+ this.IsNone = false;
+ this.RawPartitionKeyValue = rawPartitionKeyValue;
+ }
+
///
/// Creates a new partition key value.
///
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
index 6154921a86..b25b1ffba6 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
@@ -123,7 +123,7 @@ public PartitionKey Build()
}
partitionKeyInternal = new Documents.PartitionKey(valueArray).InternalKey;
- return new PartitionKey(partitionKeyInternal);
+ return new PartitionKey(partitionKeyInternal, valueArray);
}
}
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
index f2e581d212..58a3fef7c9 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
@@ -1421,6 +1421,45 @@ public async Task ClientEncryptionPolicyTest()
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+
+ // with Partition Key paths/ hierarchical partition keys.
+ containerName = Guid.NewGuid().ToString();
+ setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKeyPaths = new List { partitionKeyPath, "/path2" },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(paths, 2)
+ };
+
+
+ containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ container = containerResponse;
+ responseSettings = containerResponse;
+
+ Assert.AreEqual(3, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
+ Assert.AreEqual(partitionKeyPath, includedPath.Path);
+ Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(1);
+ Assert.AreEqual("/id", includedPath.Path);
+ Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(2);
+ Assert.AreEqual("/path2", includedPath.Path);
+ Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ readResponse = await container.ReadContainerAsync();
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+
// version 1 test.
containerName = Guid.NewGuid().ToString();
partitionKeyPath = "/users";
@@ -1471,6 +1510,37 @@ public async Task ClientEncryptionPolicyTest()
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+ // with Partition Key paths/ hierarchical partition keys.
+ containerName = Guid.NewGuid().ToString();
+ setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKeyPaths = new List { partitionKeyPath, "/users2" },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(paths)
+ };
+
+ containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ container = containerResponse;
+ responseSettings = containerResponse;
+
+ Assert.AreEqual(2, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
+ Assert.AreEqual("/path1", includedPath.Path);
+ Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Randomized", includedPath.EncryptionType);
+
+ includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(1);
+ Assert.AreEqual("/path2", includedPath.Path);
+ Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
+ Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
+ Assert.AreEqual("Deterministic", includedPath.EncryptionType);
+
+ readResponse = await container.ReadContainerAsync();
+ Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+
// replace without updating CEP should be successful
readResponse.Resource.IndexingPolicy = new Cosmos.IndexingPolicy()
{
@@ -1693,6 +1763,64 @@ public async Task ClientEncryptionPolicyFailureTest()
{
Assert.IsTrue(ex.Message.Contains("Path: /id cannot be encrypted with PolicyFormatVersion: 1. Please use PolicyFormatVersion: 2."), ex.Message);
}
+
+ // hierarchical partition keys
+ try
+ {
+ Collection pathsToEncryptWithPartitionKey = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = "/id",
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
+ };
+
+ ContainerProperties setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKeyPaths = new Collection { "/path1", "/id" },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey, 2)
+ };
+
+ await this.cosmosDatabase.CreateContainerAsync(setting);
+ Assert.Fail("Creating container should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Only Deterministic encryption type is supported for path: /id."), ex.Message);
+ }
+
+ // hierarchical partition keys
+ try
+ {
+ Collection pathsToEncryptWithPartitionKey = new Collection()
+ {
+ new ClientEncryptionIncludedPath()
+ {
+ Path = partitionKeyPath,
+ ClientEncryptionKeyId = "dekId1",
+ EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ EncryptionType = "Randomized"
+ },
+ };
+
+ ContainerProperties setting = new ContainerProperties()
+ {
+ Id = containerName,
+ PartitionKeyPaths = new Collection { partitionKeyPath, "/path1" },
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(pathsToEncryptWithPartitionKey, 2)
+ };
+
+ await this.cosmosDatabase.CreateContainerAsync(setting);
+ Assert.Fail("Creating container should have failed.");
+ }
+ catch (ArgumentException ex)
+ {
+ Assert.IsTrue(ex.Message.Contains("Path: /users which is part of the partition key has to be encrypted with Deterministic type Encryption."), ex.Message);
+ }
}
private void ValidateCreateContainerResponseContract(ContainerResponse containerResponse)
From d035b0727496365e224c8217edbb92d5089b01be Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Wed, 25 May 2022 13:54:08 +0530
Subject: [PATCH 10/13] Update CosmosContainerTests.cs
---
.../CosmosContainerTests.cs | 74 +------------------
1 file changed, 2 insertions(+), 72 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
index 58a3fef7c9..a69542d43a 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
@@ -1419,46 +1419,7 @@ public async Task ClientEncryptionPolicyTest()
ContainerResponse readResponse = await container.ReadContainerAsync();
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
-
-
- // with Partition Key paths/ hierarchical partition keys.
- containerName = Guid.NewGuid().ToString();
- setting = new ContainerProperties()
- {
- Id = containerName,
- PartitionKeyPaths = new List { partitionKeyPath, "/path2" },
- ClientEncryptionPolicy = new ClientEncryptionPolicy(paths, 2)
- };
-
-
- containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
- Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- container = containerResponse;
- responseSettings = containerResponse;
-
- Assert.AreEqual(3, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
- includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
- Assert.AreEqual(partitionKeyPath, includedPath.Path);
- Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
- Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
- Assert.AreEqual("Deterministic", includedPath.EncryptionType);
-
- includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(1);
- Assert.AreEqual("/id", includedPath.Path);
- Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
- Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
- Assert.AreEqual("Deterministic", includedPath.EncryptionType);
-
- includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(2);
- Assert.AreEqual("/path2", includedPath.Path);
- Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
- Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
- Assert.AreEqual("Deterministic", includedPath.EncryptionType);
-
- readResponse = await container.ReadContainerAsync();
- Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
// version 1 test.
containerName = Guid.NewGuid().ToString();
@@ -1508,38 +1469,7 @@ public async Task ClientEncryptionPolicyTest()
readResponse = await container.ReadContainerAsync();
Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
-
- // with Partition Key paths/ hierarchical partition keys.
- containerName = Guid.NewGuid().ToString();
- setting = new ContainerProperties()
- {
- Id = containerName,
- PartitionKeyPaths = new List { partitionKeyPath, "/users2" },
- ClientEncryptionPolicy = new ClientEncryptionPolicy(paths)
- };
-
- containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
- Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- container = containerResponse;
- responseSettings = containerResponse;
-
- Assert.AreEqual(2, responseSettings.ClientEncryptionPolicy.IncludedPaths.Count());
- includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(0);
- Assert.AreEqual("/path1", includedPath.Path);
- Assert.AreEqual("dekId1", includedPath.ClientEncryptionKeyId);
- Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
- Assert.AreEqual("Randomized", includedPath.EncryptionType);
-
- includedPath = responseSettings.ClientEncryptionPolicy.IncludedPaths.ElementAt(1);
- Assert.AreEqual("/path2", includedPath.Path);
- Assert.AreEqual("dekId2", includedPath.ClientEncryptionKeyId);
- Assert.AreEqual("AEAD_AES_256_CBC_HMAC_SHA256", includedPath.EncryptionAlgorithm);
- Assert.AreEqual("Deterministic", includedPath.EncryptionType);
-
- readResponse = await container.ReadContainerAsync();
- Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode);
- Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
+ Assert.IsNotNull(readResponse.Resource.ClientEncryptionPolicy);
// replace without updating CEP should be successful
readResponse.Resource.IndexingPolicy = new Cosmos.IndexingPolicy()
From 89feca4121e64d2dbeca421f322ae5112e453e4f Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Wed, 25 May 2022 18:51:12 +0530
Subject: [PATCH 11/13] Fixes as per review request.
---
Microsoft.Azure.Cosmos/src/PartitionKey.cs | 46 ---
.../src/PartitionKeyBuilder.cs | 2 +-
.../Contracts/DotNetPreviewSDKAPI.json | 330 +-----------------
.../Contracts/DotNetSDKAPI.json | 283 ++++++++++++++-
4 files changed, 266 insertions(+), 395 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKey.cs b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
index 76a54e913a..86e0bbae58 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKey.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKey.cs
@@ -38,11 +38,6 @@ namespace Microsoft.Azure.Cosmos
///
public static readonly string SystemKeyPath = Documents.PartitionKey.SystemKeyPath;
- ///
- /// The raw partition key value. This is used by Cosmos DB client side encryption SDK to encrypt partition key values.
- ///
- public object RawPartitionKeyValue { get; }
-
///
/// Gets the value provided at initialization.
///
@@ -62,12 +57,10 @@ public PartitionKey(string partitionKeyValue)
if (partitionKeyValue == null)
{
this.InternalKey = PartitionKey.NullPartitionKeyInternal;
- this.RawPartitionKeyValue = null;
}
else
{
this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
- this.RawPartitionKeyValue = partitionKeyValue;
}
this.IsNone = false;
}
@@ -80,7 +73,6 @@ public PartitionKey(bool partitionKeyValue)
{
this.InternalKey = partitionKeyValue ? TruePartitionKeyInternal : FalsePartitionKeyInternal;
this.IsNone = false;
- this.RawPartitionKeyValue = partitionKeyValue;
}
///
@@ -91,29 +83,6 @@ public PartitionKey(double partitionKeyValue)
{
this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
this.IsNone = false;
- this.RawPartitionKeyValue = partitionKeyValue;
- }
-
- ///
- /// Creates a new partition key value.
- ///
- /// The value to use as partition key.
- public PartitionKey(float partitionKeyValue)
- {
- this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
- this.IsNone = false;
- this.RawPartitionKeyValue = partitionKeyValue;
- }
-
- ///
- /// Creates a new partition key value.
- ///
- /// The value to use as partition key.
- public PartitionKey(long partitionKeyValue)
- {
- this.InternalKey = new Documents.PartitionKey(partitionKeyValue).InternalKey;
- this.IsNone = false;
- this.RawPartitionKeyValue = partitionKeyValue;
}
///
@@ -124,7 +93,6 @@ internal PartitionKey(object value)
{
this.InternalKey = new Documents.PartitionKey(value).InternalKey;
this.IsNone = false;
- this.RawPartitionKeyValue = value;
}
///
@@ -135,19 +103,6 @@ internal PartitionKey(PartitionKeyInternal partitionKeyInternal)
{
this.InternalKey = partitionKeyInternal;
this.IsNone = false;
- this.RawPartitionKeyValue = partitionKeyInternal;
- }
-
- ///
- /// Creates a new partition key value.
- ///
- /// The value to use as partition key.
- /// Raw partition key values.
- internal PartitionKey(PartitionKeyInternal partitionKeyInternal, object rawPartitionKeyValue)
- {
- this.InternalKey = partitionKeyInternal;
- this.IsNone = false;
- this.RawPartitionKeyValue = rawPartitionKeyValue;
}
///
@@ -159,7 +114,6 @@ private PartitionKey(PartitionKeyInternal partitionKeyInternal, bool isNone = fa
{
this.InternalKey = partitionKeyInternal;
this.IsNone = isNone;
- this.RawPartitionKeyValue = partitionKeyInternal;
}
///
diff --git a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
index b25b1ffba6..6154921a86 100644
--- a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
+++ b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs
@@ -123,7 +123,7 @@ public PartitionKey Build()
}
partitionKeyInternal = new Documents.PartitionKey(valueArray).InternalKey;
- return new PartitionKey(partitionKeyInternal, valueArray);
+ return new PartitionKey(partitionKeyInternal);
}
}
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
index 235568ce3a..ecfebbdf9f 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
@@ -1,333 +1,5 @@
{
- "Subclasses": {
- "Microsoft.Azure.Cosmos.ChangeFeedMode;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "System.TimeSpan FullFidelityNoRetention": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan FullFidelityNoRetention;CanRead:True;CanWrite:False;System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan FullFidelityRetention[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "System.TimeSpan FullFidelityRetention;CanRead:True;CanWrite:True;System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan get_FullFidelityNoRetention()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan get_FullFidelityRetention()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- },
- "Void set_FullFidelityRetention(System.TimeSpan)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.Container;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.ContainerProperties;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]"
- },
- "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness;CanRead:True;CanWrite:True;System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- },
- "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder;Microsoft.Azure.Cosmos.Fluent.ContainerDefinition`1[[Microsoft.Azure.Cosmos.Fluent.ContainerBuilder, ]];IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.ItemRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.Linq.CosmosLinqExtensions;System.Object;IsAbstract:True;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "ExtensionAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.PartitionKey Build()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {
- "Microsoft.Azure.Cosmos.ItemRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
- "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- }
- },
- "Members": {},
- "NestedTypes": {}
- }
- },
+ "Subclasses": {},
"Members": {},
"NestedTypes": {}
}
\ No newline at end of file
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
index 74384c86ca..64a14e7cc6 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
@@ -304,6 +304,16 @@
"Microsoft.Azure.Cosmos.ChangeFeedMode;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
+ "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Microsoft.Azure.Cosmos.ChangeFeedMode get_Incremental()": {
"Type": "Method",
"Attributes": [],
@@ -317,6 +327,44 @@
},
"NestedTypes": {}
},
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "System.TimeSpan FullFidelityNoRetention": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan FullFidelityNoRetention;CanRead:True;CanWrite:False;System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan FullFidelityRetention[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "System.TimeSpan FullFidelityRetention;CanRead:True;CanWrite:True;System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan get_FullFidelityNoRetention()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan get_FullFidelityRetention()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
+ },
+ "Void set_FullFidelityRetention(System.TimeSpan)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
"Microsoft.Azure.Cosmos.ChangeFeedProcessor;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -1559,6 +1607,11 @@
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] CreateItemStreamAsync(System.IO.Stream, Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.ItemRequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteContainerStreamAsync(Microsoft.Azure.Cosmos.ContainerRequestOptions, System.Threading.CancellationToken)": {
"Type": "Method",
"Attributes": [],
@@ -1619,6 +1672,11 @@
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ThroughputResponse] ReplaceThroughputAsync(Microsoft.Azure.Cosmos.ThroughputProperties, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Threading.Tasks.Task`1[System.Collections.Generic.IReadOnlyList`1[Microsoft.Azure.Cosmos.FeedRange]] GetFeedRangesAsync(System.Threading.CancellationToken)": {
"Type": "Method",
"Attributes": [],
@@ -2104,6 +2162,18 @@
"Microsoft.Azure.Cosmos.ContainerProperties;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Microsoft.Azure.Cosmos.ClientEncryptionPolicy ClientEncryptionPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
"Type": "Property",
"Attributes": [
@@ -2164,6 +2234,18 @@
],
"MethodInfo": "Microsoft.Azure.Cosmos.UniqueKeyPolicy UniqueKeyPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.UniqueKeyPolicy get_UniqueKeyPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_UniqueKeyPolicy(Microsoft.Azure.Cosmos.UniqueKeyPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Nullable`1[Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion] get_PartitionKeyDefinitionVersion()": {
"Type": "Method",
"Attributes": [],
@@ -2291,6 +2373,11 @@
"Attributes": [],
"MethodInfo": "[Void .ctor(), Void .ctor()]"
},
+ "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]"
+ },
"Void .ctor(System.String, System.String)": {
"Type": "Constructor",
"Attributes": [],
@@ -2303,6 +2390,11 @@
],
"MethodInfo": "Void set_AnalyticalStoreTimeToLiveInSeconds(System.Nullable`1[System.Int32]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_ClientEncryptionPolicy(Microsoft.Azure.Cosmos.ClientEncryptionPolicy)": {
"Type": "Method",
"Attributes": [],
@@ -2345,6 +2437,11 @@
"Attributes": [],
"MethodInfo": "Void set_PartitionKeyPath(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_TimeToLivePropertyPath(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -3847,6 +3944,36 @@
},
"NestedTypes": {}
},
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness;CanRead:True;CanWrite:True;System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
+ },
+ "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
"Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -4110,6 +4237,17 @@
},
"NestedTypes": {}
},
+ "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
"Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -4176,6 +4314,11 @@
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.ContainerProperties Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(Int32)": {
"Type": "Method",
"Attributes": [],
@@ -4949,6 +5092,18 @@
}
},
"Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Collections.Generic.IEnumerable`1[System.String] get_PostTriggers()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5029,6 +5184,13 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_EnableContentResponseOnWrite(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5200,6 +5362,13 @@
],
"MethodInfo": "Microsoft.Azure.Cosmos.FeedIterator`1[T] ToFeedIterator[T](System.Linq.IQueryable`1[T]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
+ "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "ExtensionAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
+ },
"Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5447,18 +5616,6 @@
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Null;IsInitOnly:True;IsStatic:True;"
},
- "System.Object get_RawPartitionKeyValue()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "System.Object get_RawPartitionKeyValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Object RawPartitionKeyValue": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "System.Object RawPartitionKeyValue;CanRead:True;CanWrite:False;System.Object get_RawPartitionKeyValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.String SystemKeyName": {
"Type": "Field",
"Attributes": [],
@@ -5484,20 +5641,51 @@
"Attributes": [],
"MethodInfo": "[Void .ctor(Double), Void .ctor(Double)]"
},
- "Void .ctor(Int64)": {
+ "Void .ctor(System.String)": {
"Type": "Constructor",
"Attributes": [],
- "MethodInfo": "[Void .ctor(Int64), Void .ctor(Int64)]"
+ "MethodInfo": "[Void .ctor(System.String), Void .ctor(System.String)]"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.PartitionKey Build()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void .ctor(Single)": {
- "Type": "Constructor",
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": {
+ "Type": "Method",
"Attributes": [],
- "MethodInfo": "[Void .ctor(Single), Void .ctor(Single)]"
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void .ctor(System.String)": {
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
"Type": "Constructor",
"Attributes": [],
- "MethodInfo": "[Void .ctor(System.String), Void .ctor(System.String)]"
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
}
},
"NestedTypes": {}
@@ -6014,6 +6202,18 @@
"Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": {
"Type": "Property",
"Attributes": [],
@@ -6142,6 +6342,13 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -6822,6 +7029,18 @@
}
},
"Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Collections.Generic.IEnumerable`1[System.String] get_PostTriggers()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -6902,6 +7121,13 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_EnableContentResponseOnWrite(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -6973,6 +7199,18 @@
"Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": {
"Type": "Property",
"Attributes": [],
@@ -7101,6 +7339,13 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
"Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
From cba1c4dac05cd7df432f3e9734ad47659bfdbe62 Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Wed, 25 May 2022 18:57:37 +0530
Subject: [PATCH 12/13] fixed contracts.
---
.../Contracts/DotNetPreviewSDKAPI.json | 330 +++++++++++++++++-
.../Contracts/DotNetSDKAPI.json | 267 --------------
2 files changed, 329 insertions(+), 268 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
index ecfebbdf9f..235568ce3a 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json
@@ -1,5 +1,333 @@
{
- "Subclasses": {},
+ "Subclasses": {
+ "Microsoft.Azure.Cosmos.ChangeFeedMode;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "System.TimeSpan FullFidelityNoRetention": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan FullFidelityNoRetention;CanRead:True;CanWrite:False;System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan FullFidelityRetention[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "System.TimeSpan FullFidelityRetention;CanRead:True;CanWrite:True;System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan get_FullFidelityNoRetention()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.TimeSpan get_FullFidelityRetention()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
+ },
+ "Void set_FullFidelityRetention(System.TimeSpan)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.Container;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.ContainerProperties;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": {
+ "Type": "Property",
+ "Attributes": [
+ "JsonIgnoreAttribute"
+ ],
+ "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]"
+ },
+ "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness;CanRead:True;CanWrite:True;System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
+ },
+ "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder;Microsoft.Azure.Cosmos.Fluent.ContainerDefinition`1[[Microsoft.Azure.Cosmos.Fluent.ContainerBuilder, ]];IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.ItemRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.Linq.CosmosLinqExtensions;System.Object;IsAbstract:True;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "ExtensionAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.PartitionKey Build()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": {
+ "Type": "Method",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void .ctor()": {
+ "Type": "Constructor",
+ "Attributes": [],
+ "MethodInfo": "[Void .ctor(), Void .ctor()]"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {
+ "Microsoft.Azure.Cosmos.ItemRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ },
+ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
+ "Subclasses": {},
+ "Members": {
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
+ "Type": "Property",
+ "Attributes": [],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ },
+ "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
+ "Type": "Method",
+ "Attributes": [
+ "CompilerGeneratedAttribute"
+ ],
+ "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
+ }
+ },
+ "NestedTypes": {}
+ }
+ },
+ "Members": {},
+ "NestedTypes": {}
+ }
+ },
"Members": {},
"NestedTypes": {}
}
\ No newline at end of file
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
index 64a14e7cc6..91c3c459c0 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json
@@ -304,16 +304,6 @@
"Microsoft.Azure.Cosmos.ChangeFeedMode;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
- "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Microsoft.Azure.Cosmos.ChangeFeedMode get_Incremental()": {
"Type": "Method",
"Attributes": [],
@@ -327,44 +317,6 @@
},
"NestedTypes": {}
},
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "System.TimeSpan FullFidelityNoRetention": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan FullFidelityNoRetention;CanRead:True;CanWrite:False;System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan FullFidelityRetention[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "System.TimeSpan FullFidelityRetention;CanRead:True;CanWrite:True;System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan get_FullFidelityNoRetention()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan get_FullFidelityNoRetention();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.TimeSpan get_FullFidelityRetention()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.TimeSpan get_FullFidelityRetention();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- },
- "Void set_FullFidelityRetention(System.TimeSpan)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_FullFidelityRetention(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
"Microsoft.Azure.Cosmos.ChangeFeedProcessor;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -1607,11 +1559,6 @@
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] CreateItemStreamAsync(System.IO.Stream, Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.ItemRequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteAllItemsByPartitionKeyStreamAsync(Microsoft.Azure.Cosmos.PartitionKey, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ResponseMessage] DeleteContainerStreamAsync(Microsoft.Azure.Cosmos.ContainerRequestOptions, System.Threading.CancellationToken)": {
"Type": "Method",
"Attributes": [],
@@ -1672,11 +1619,6 @@
"Attributes": [],
"MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.ThroughputResponse] ReplaceThroughputAsync(Microsoft.Azure.Cosmos.ThroughputProperties, Microsoft.Azure.Cosmos.RequestOptions, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`1[System.String]] GetPartitionKeyRangesAsync(Microsoft.Azure.Cosmos.FeedRange, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Threading.Tasks.Task`1[System.Collections.Generic.IReadOnlyList`1[Microsoft.Azure.Cosmos.FeedRange]] GetFeedRangesAsync(System.Threading.CancellationToken)": {
"Type": "Method",
"Attributes": [],
@@ -2162,18 +2104,6 @@
"Microsoft.Azure.Cosmos.ContainerProperties;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy ChangeFeedPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Microsoft.Azure.Cosmos.ClientEncryptionPolicy ClientEncryptionPolicy[Newtonsoft.Json.JsonIgnoreAttribute()]": {
"Type": "Property",
"Attributes": [
@@ -2234,18 +2164,6 @@
],
"MethodInfo": "Microsoft.Azure.Cosmos.UniqueKeyPolicy UniqueKeyPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.UniqueKeyPolicy get_UniqueKeyPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_UniqueKeyPolicy(Microsoft.Azure.Cosmos.UniqueKeyPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": {
- "Type": "Property",
- "Attributes": [
- "JsonIgnoreAttribute"
- ],
- "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Nullable`1[Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion] get_PartitionKeyDefinitionVersion()": {
"Type": "Method",
"Attributes": [],
@@ -2373,11 +2291,6 @@
"Attributes": [],
"MethodInfo": "[Void .ctor(), Void .ctor()]"
},
- "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]"
- },
"Void .ctor(System.String, System.String)": {
"Type": "Constructor",
"Attributes": [],
@@ -2390,11 +2303,6 @@
],
"MethodInfo": "Void set_AnalyticalStoreTimeToLiveInSeconds(System.Nullable`1[System.Int32]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_ClientEncryptionPolicy(Microsoft.Azure.Cosmos.ClientEncryptionPolicy)": {
"Type": "Method",
"Attributes": [],
@@ -2437,11 +2345,6 @@
"Attributes": [],
"MethodInfo": "Void set_PartitionKeyPath(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_TimeToLivePropertyPath(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -3944,36 +3847,6 @@
},
"NestedTypes": {}
},
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "System.Nullable`1[System.TimeSpan] MaxIntegratedCacheStaleness;CanRead:True;CanWrite:True;System.Nullable`1[System.TimeSpan] get_MaxIntegratedCacheStaleness();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- },
- "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_MaxIntegratedCacheStaleness(System.Nullable`1[System.TimeSpan]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
"Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -4237,17 +4110,6 @@
},
"NestedTypes": {}
},
- "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder Attach();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- }
- },
- "NestedTypes": {}
- },
"Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
@@ -4314,11 +4176,6 @@
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.ContainerProperties Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition WithChangeFeedPolicy(System.TimeSpan);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Microsoft.Azure.Cosmos.Fluent.ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(Int32)": {
"Type": "Method",
"Attributes": [],
@@ -5092,18 +4949,6 @@
}
},
"Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Collections.Generic.IEnumerable`1[System.String] get_PostTriggers()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5184,13 +5029,6 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_EnableContentResponseOnWrite(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5362,13 +5200,6 @@
],
"MethodInfo": "Microsoft.Azure.Cosmos.FeedIterator`1[T] ToFeedIterator[T](System.Linq.IQueryable`1[T]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
- "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "ExtensionAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T], System.Collections.Generic.IDictionary`2[System.Object,System.String]);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
- },
"Microsoft.Azure.Cosmos.QueryDefinition ToQueryDefinition[T](System.Linq.IQueryable`1[T])[System.Runtime.CompilerServices.ExtensionAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -5649,47 +5480,6 @@
},
"NestedTypes": {}
},
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
- "Subclasses": {},
- "Members": {
- "Microsoft.Azure.Cosmos.PartitionKey Build()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": {
- "Type": "Method",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Void .ctor()": {
- "Type": "Constructor",
- "Attributes": [],
- "MethodInfo": "[Void .ctor(), Void .ctor()]"
- }
- },
- "NestedTypes": {}
- },
"Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion;System.Enum;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:True;IsClass:False;IsValueType:True;IsNested:False;IsGenericType:False;IsSerializable:True": {
"Subclasses": {},
"Members": {
@@ -6202,18 +5992,6 @@
"Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": {
"Type": "Property",
"Attributes": [],
@@ -6342,13 +6120,6 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -7029,18 +6800,6 @@
}
},
"Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Collections.Generic.IEnumerable`1[System.String] get_PostTriggers()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -7121,13 +6880,6 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_EnableContentResponseOnWrite(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
@@ -7199,18 +6951,6 @@
"Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": {
- "Type": "Property",
- "Attributes": [],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
- "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions get_DedicatedGatewayRequestOptions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": {
"Type": "Property",
"Attributes": [],
@@ -7339,13 +7079,6 @@
"Attributes": [],
"MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
- "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
- "Type": "Method",
- "Attributes": [
- "CompilerGeneratedAttribute"
- ],
- "MethodInfo": "Void set_DedicatedGatewayRequestOptions(Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
- },
"Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
From d2c6849d190f55e7daf41c71b0cadf2f06afbda3 Mon Sep 17 00:00:00 2001
From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Date: Thu, 26 May 2022 15:38:15 +0530
Subject: [PATCH 13/13] Fixes as per review comments.
---
.../ClientEncryptionPolicyDefinition.cs | 33 ++++++++++++++
.../Settings/ClientEncryptionPolicy.cs | 43 ++++++++++++++++---
.../CosmosContainerTests.cs | 2 +-
.../Fluent/ContainerSettingsTests.cs | 2 +-
4 files changed, 73 insertions(+), 7 deletions(-)
diff --git a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
index b9c789a54d..024f2b05ea 100644
--- a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
+++ b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ClientEncryptionPolicyDefinition.cs
@@ -9,7 +9,40 @@ namespace Microsoft.Azure.Cosmos.Fluent
///
/// fluent definition.
+ /// The should be initialized with
+ /// policyFormatVersion 2 and "Deterministic" encryption type, if "id" property or properties which are part of partition key need to be encrypted.
+ /// All partition key property values included as part of have to be JSON strings.
///
+ ///
+ /// This example shows how to create a using .
+ ///
+ ///
+ ///
+ ///
public sealed class ClientEncryptionPolicyDefinition
{
private readonly Collection clientEncryptionIncludedPaths = new Collection();
diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
index f1c3bfd855..6be228d73b 100644
--- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
+++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ClientEncryptionPolicy.cs
@@ -12,8 +12,41 @@ namespace Microsoft.Azure.Cosmos
using Newtonsoft.Json.Linq;
///
- /// Client encryption policy.
+ /// The should be initialized with
+ /// policyFormatVersion 2 and "Deterministic" encryption type, if "id" property or properties which are part of partition key need to be encrypted.
+ /// All partition key property values have to be JSON strings.
///
+ ///
+ /// This example shows how to create a .
+ ///
+ /// paths = new Collection()
+ /// {
+ /// new ClientEncryptionIncludedPath()
+ /// {
+ /// Path = partitionKeyPath,
+ /// ClientEncryptionKeyId = "key1",
+ /// EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ /// EncryptionType = "Deterministic"
+ /// },
+ /// new ClientEncryptionIncludedPath()
+ /// {
+ /// Path = "/id",
+ /// ClientEncryptionKeyId = "key2",
+ /// EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
+ /// EncryptionType = "Deterministic"
+ /// },
+ /// };
+ ///
+ /// ContainerProperties setting = new ContainerProperties()
+ /// {
+ /// Id = containerName,
+ /// PartitionKeyPath = partitionKeyPath,
+ /// ClientEncryptionPolicy = new ClientEncryptionPolicy(includedPaths:paths, policyFormatVersion:2)
+ /// };
+ /// ]]>
+ ///
+ ///
public sealed class ClientEncryptionPolicy
{
///
@@ -23,9 +56,9 @@ public sealed class ClientEncryptionPolicy
/// Version of the client encryption policy definition. Current supported versions are 1 and 2. Default version is 1.
public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion = 1)
{
+ this.PolicyFormatVersion = (policyFormatVersion > 2 || policyFormatVersion < 1) ? throw new ArgumentException($"Supported versions of client encryption policy are 1 and 2. ") : policyFormatVersion;
ClientEncryptionPolicy.ValidateIncludedPaths(includedPaths, policyFormatVersion);
this.IncludedPaths = includedPaths;
- this.PolicyFormatVersion = (policyFormatVersion > 2 || policyFormatVersion < 1) ? throw new ArgumentException($"Supported versions of client encryption policy are 1 and 2. ") : policyFormatVersion;
}
[JsonConstructor]
@@ -34,7 +67,7 @@ private ClientEncryptionPolicy()
}
///
- /// Paths of the item that need encryption along with path-specific settings.
+ /// Paths of the item that need encryption along with path-specific settings.
///
[JsonProperty(PropertyName = "includedPaths")]
public IEnumerable IncludedPaths
@@ -81,7 +114,7 @@ internal void ValidatePartitionKeyPathsIfEncrypted(IReadOnlyList et.EncryptionType).FirstOrDefault(), "Randomized"))
+ if (encryptedPartitionKeyPath.Select(et => et.EncryptionType).FirstOrDefault() != "Deterministic")
{
throw new ArgumentException($"Path: /{topLevelToken} which is part of the partition key has to be encrypted with Deterministic type Encryption.");
}
@@ -144,7 +177,7 @@ private static void ValidateClientEncryptionIncludedPath(
throw new ArgumentException($"Path: {clientEncryptionIncludedPath.Path} cannot be encrypted with PolicyFormatVersion: {policyFormatVersion}. Please use PolicyFormatVersion: 2. ");
}
- if (string.Equals(clientEncryptionIncludedPath.EncryptionType, "Randomized"))
+ if (clientEncryptionIncludedPath.EncryptionType != "Deterministic")
{
throw new ArgumentException($"Only Deterministic encryption type is supported for path: {clientEncryptionIncludedPath.Path}. ");
}
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
index a69542d43a..a17de1087c 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs
@@ -1390,7 +1390,7 @@ public async Task ClientEncryptionPolicyTest()
{
Id = containerName,
PartitionKey = new Documents.PartitionKeyDefinition() { Paths = new Collection { partitionKeyPath }, Kind = Documents.PartitionKind.Hash },
- ClientEncryptionPolicy = new ClientEncryptionPolicy(paths, 2)
+ ClientEncryptionPolicy = new ClientEncryptionPolicy(includedPaths:paths,policyFormatVersion:2)
};
ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerIfNotExistsAsync(setting);
diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
index 354eb5b3b5..ca8aaadec1 100644
--- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
+++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
@@ -621,7 +621,7 @@ public async Task WithClientEncryptionPolicyTest()
};
ContainerResponse containerResponse = await this.database.DefineContainer(containerName, partitionKeyPath)
- .WithClientEncryptionPolicy(2)
+ .WithClientEncryptionPolicy(policyFormatVersion:2)
.WithIncludedPath(path1)
.WithIncludedPath(path2)
.Attach()