Define azure batch pool certificate in CloudPool with c#

Green, Jim 55 Reputation points
2024-11-01T21:45:56.56+00:00

I'm following the instructions in https://zcusa.951200.xyz/en-us/azure/batch/automatic-certificate-rotation#create-a-batch-pool-with-a-user-assigned-managed-identity to change from defining certificates in CloudPool.CertificateReferences to CloudPool.Extensions[].Settings.

The example shows:

"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/042998e4-36dc-4b7d-8ce3-a7a2c4877d33/resourceGroups/ACR/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumaforpools": {}
}
}

The Identity property of CloudPool is BatchPoolIdentity but the constructors of BatchPoolIdentity (in Microsoft.Azure.Batch) are protected. How do I create this instance? The assist answer suggests the static method UserAssigned() but I don't see that. Do I need another package/using?

Thanks.

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
348 questions
{count} votes

Accepted answer
  1. Prrudram-MSFT 27,251 Reputation points
    2024-11-04T15:23:23.51+00:00

    Hello @Green, Jim

    I have seen a couple of more issues with similar behavior for different customers, and realized that this issue arises because batch currently does not support pool creation with managed identities using the data plane (Microsoft.Azure.Batch). Could you please switch to our control plane SDK (Azure.ResourceManager.Batch)?

    I found a similar query on GitHub that might be a helpful reference: [QUERY] How do I add BatchPoolIdentity to my CloudPool so that my nodes can have UserDefinedManagedIdentity? · Issue #37937 · Azure/azure-sdk-for-net.

    Hope that helps! Please feel free to tag me for any questions.

    If I have answered your question, please accept this as answer as a token of appreciation.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.