We recommend using Azure Native.
azure.apimanagement.getProduct
Explore with Pulumi AI
Use this data source to access information about an existing API Management Product.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ApiManagement.GetProduct.Invoke(new()
{
ProductId = "my-product",
ApiManagementName = "example-apim",
ResourceGroupName = "search-service",
});
return new Dictionary<string, object?>
{
["productTerms"] = example.Apply(getProductResult => getProductResult.Terms),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
ProductId: "my-product",
ApiManagementName: "example-apim",
ResourceGroupName: "search-service",
}, nil)
if err != nil {
return err
}
ctx.Export("productTerms", example.Terms)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetProductArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = ApimanagementFunctions.getProduct(GetProductArgs.builder()
.productId("my-product")
.apiManagementName("example-apim")
.resourceGroupName("search-service")
.build());
ctx.export("productTerms", example.applyValue(getProductResult -> getProductResult.terms()));
}
}
import pulumi
import pulumi_azure as azure
example = azure.apimanagement.get_product(product_id="my-product",
api_management_name="example-apim",
resource_group_name="search-service")
pulumi.export("productTerms", example.terms)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.apimanagement.getProduct({
productId: "my-product",
apiManagementName: "example-apim",
resourceGroupName: "search-service",
});
export const productTerms = example.then(example => example.terms);
variables:
example:
fn::invoke:
Function: azure:apimanagement:getProduct
Arguments:
productId: my-product
apiManagementName: example-apim
resourceGroupName: search-service
outputs:
productTerms: ${example.terms}
Using getProduct
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getProduct(args: GetProductArgs, opts?: InvokeOptions): Promise<GetProductResult>
function getProductOutput(args: GetProductOutputArgs, opts?: InvokeOptions): Output<GetProductResult>
def get_product(api_management_name: Optional[str] = None,
product_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProductResult
def get_product_output(api_management_name: Optional[pulumi.Input[str]] = None,
product_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProductResult]
func LookupProduct(ctx *Context, args *LookupProductArgs, opts ...InvokeOption) (*LookupProductResult, error)
func LookupProductOutput(ctx *Context, args *LookupProductOutputArgs, opts ...InvokeOption) LookupProductResultOutput
> Note: This function is named LookupProduct
in the Go SDK.
public static class GetProduct
{
public static Task<GetProductResult> InvokeAsync(GetProductArgs args, InvokeOptions? opts = null)
public static Output<GetProductResult> Invoke(GetProductInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProductResult> getProduct(GetProductArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:apimanagement/getProduct:getProduct
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Management stringName The Name of the API Management Service in which this Product exists.
- Product
Id string The Identifier for the API Management Product.
- Resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- Api
Management stringName The Name of the API Management Service in which this Product exists.
- Product
Id string The Identifier for the API Management Product.
- Resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- api
Management StringName The Name of the API Management Service in which this Product exists.
- product
Id String The Identifier for the API Management Product.
- resource
Group StringName The Name of the Resource Group in which the API Management Service exists.
- api
Management stringName The Name of the API Management Service in which this Product exists.
- product
Id string The Identifier for the API Management Product.
- resource
Group stringName The Name of the Resource Group in which the API Management Service exists.
- api_
management_ strname The Name of the API Management Service in which this Product exists.
- product_
id str The Identifier for the API Management Product.
- resource_
group_ strname The Name of the Resource Group in which the API Management Service exists.
- api
Management StringName The Name of the API Management Service in which this Product exists.
- product
Id String The Identifier for the API Management Product.
- resource
Group StringName The Name of the Resource Group in which the API Management Service exists.
getProduct Result
The following output properties are available:
- Api
Management stringName - Approval
Required bool Do subscribers need to be approved prior to being able to use the Product?
- Description string
The description of this Product, which may include HTML formatting tags.
- Display
Name string The Display Name for this API Management Product.
- Id string
The provider-assigned unique ID for this managed resource.
- Product
Id string - Published bool
Is this Product Published?
- Resource
Group stringName - Subscription
Required bool Is a Subscription required to access API's included in this Product?
- Subscriptions
Limit int The number of subscriptions a user can have to this Product at the same time.
- Terms string
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
- Api
Management stringName - Approval
Required bool Do subscribers need to be approved prior to being able to use the Product?
- Description string
The description of this Product, which may include HTML formatting tags.
- Display
Name string The Display Name for this API Management Product.
- Id string
The provider-assigned unique ID for this managed resource.
- Product
Id string - Published bool
Is this Product Published?
- Resource
Group stringName - Subscription
Required bool Is a Subscription required to access API's included in this Product?
- Subscriptions
Limit int The number of subscriptions a user can have to this Product at the same time.
- Terms string
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
- api
Management StringName - approval
Required Boolean Do subscribers need to be approved prior to being able to use the Product?
- description String
The description of this Product, which may include HTML formatting tags.
- display
Name String The Display Name for this API Management Product.
- id String
The provider-assigned unique ID for this managed resource.
- product
Id String - published Boolean
Is this Product Published?
- resource
Group StringName - subscription
Required Boolean Is a Subscription required to access API's included in this Product?
- subscriptions
Limit Integer The number of subscriptions a user can have to this Product at the same time.
- terms String
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
- api
Management stringName - approval
Required boolean Do subscribers need to be approved prior to being able to use the Product?
- description string
The description of this Product, which may include HTML formatting tags.
- display
Name string The Display Name for this API Management Product.
- id string
The provider-assigned unique ID for this managed resource.
- product
Id string - published boolean
Is this Product Published?
- resource
Group stringName - subscription
Required boolean Is a Subscription required to access API's included in this Product?
- subscriptions
Limit number The number of subscriptions a user can have to this Product at the same time.
- terms string
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
- api_
management_ strname - approval_
required bool Do subscribers need to be approved prior to being able to use the Product?
- description str
The description of this Product, which may include HTML formatting tags.
- display_
name str The Display Name for this API Management Product.
- id str
The provider-assigned unique ID for this managed resource.
- product_
id str - published bool
Is this Product Published?
- resource_
group_ strname - subscription_
required bool Is a Subscription required to access API's included in this Product?
- subscriptions_
limit int The number of subscriptions a user can have to this Product at the same time.
- terms str
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
- api
Management StringName - approval
Required Boolean Do subscribers need to be approved prior to being able to use the Product?
- description String
The description of this Product, which may include HTML formatting tags.
- display
Name String The Display Name for this API Management Product.
- id String
The provider-assigned unique ID for this managed resource.
- product
Id String - published Boolean
Is this Product Published?
- resource
Group StringName - subscription
Required Boolean Is a Subscription required to access API's included in this Product?
- subscriptions
Limit Number The number of subscriptions a user can have to this Product at the same time.
- terms String
Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.