https://pulumi.com logo
#dotnet
Title
a

ancient-solstice-53934

06/01/2023, 12:19 PM
Hi, I am working on Azure API Management using Pulumi.AzureNative.ApiManagement How can I get 'Product' type from below var productResult = GetProduct.InvokeAsync(new GetProductArgs { ProductId = ApimSettings.ApiManagementProductName, ResourceGroupName = ApimSettings.ApiManagementResourceGroup, ServiceName = ApimSettings.ApiManagementInstanceName }).GetAwaiter().GetResult(); productResult is of type 'GetProductResult' and we need 'Product' type out of it.
e

echoing-dinner-19531

06/01/2023, 3:59 PM
You might want to use
Product.Get(name, id)
instead of the invoke, that will return an actual Product value.
a

ancient-solstice-53934

06/01/2023, 5:45 PM
Yes Fraser, I want to use Product.Get() but I don't have name of Product as it is not visible on Portal
e

echoing-dinner-19531

06/01/2023, 7:40 PM
That's just the name for pulumi to track it by, it can be anything it doesn't have to be the same as the actual resource name (in fact in most cases it isn't)
2 Views