sparse-intern-71089
10/09/2020, 10:48 AMtall-librarian-49374
10/09/2020, 11:51 AMtall-librarian-49374
10/09/2020, 1:32 PMtall-librarian-49374
10/09/2020, 1:34 PMmysterious-australia-14256
10/09/2020, 3:59 PMinternal class AzureWorkflowModel
{
[System.Text.Json.Serialization.JsonPropertyName("$schema")]
public string schema { get; set; } = "<https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#>";
public object actions { get; set; } = new object();
public object parameters { get; set; } = new object();
public object triggers { get; set; } = new object();
public string contentVersion { get; set; } = "1.0.0.0";
public object outputs { get; set; } = new object();
}
and then doing a bit of ugly conversion to get it to a JsonElement
var laDefinition = JsonSerializer.Serialize(new AzureWorkflowModel());
var laDefinitionJsonElement = JsonSerializer.Deserialize<System.Text.Json.JsonElement>(laDefinition);
the above then allows me to correctly access the $schema property
System.Console.WriteLine(laDefinitionJsonElement.GetProperty("$schema").ToString());
But passing it in to the following code results in the error reported above
return new Pulumi.AzureNextGen.Logic.Latest.Workflow(myName, new Pulumi.AzureNextGen.Logic.Latest.WorkflowArgs
{
WorkflowName = myName,
Location = myLocation,
ResourceGroupName = myResourceGroupName,
laDefinition = laDefinitionJsonElement
});