@bharath nunepalli Welcome to Microsoft Q&A Forums and thank you for your interest in Azure products.
The easiest way would be to use an Azure Function Activity in your ADF pipeline
Here is a code snippet you could use in the Azure function for updating the container throughput. You can get the CosmosDB SDK here
public static class Function1
{
private static Database database = null;
[FunctionName("Function1")]
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log)
{
log.LogInformation("C# HTTP trigger function for scaling a Cosmos Container.");
var databaseId = "samples";
var containerId = "container-samples";
var endpoint = "<Your endPoint Here>";
var authKey = "<Your authKey Here>";
using (CosmosClient client = new CosmosClient(endpoint, authKey))
{
database = await client.CreateDatabaseIfNotExistsAsync(databaseId);
Container container = database.GetContainer(containerId);
ContainerProperties containerProperties = await container.ReadContainerAsync();
int? throughputResponse = await container.ReadThroughputAsync();
// Change performance (reserved throughput) of CosmosContainer to 500 RU/s
await container.ReplaceThroughputAsync(500);
}
return new OkObjectResult("Scaling successful");
}
}
Do let us know if you have any further questions.
----------
If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.