1. Packages
  2. Azure Native
  3. API Docs
  4. apimanagement
  5. Product
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.apimanagement.Product

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Product details.

Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-08-01.

Other available API versions: 2021-04-01-preview, 2021-08-01, 2021-12-01-preview, 2022-04-01-preview, 2022-08-01, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]. See the version guide for details.

Example Usage

ApiManagementCreateProduct

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var product = new AzureNative.ApiManagement.Product("product", new()
    {
        DisplayName = "Test Template ProductName 4",
        ProductId = "testproduct",
        ResourceGroupName = "rg1",
        ServiceName = "apimService1",
    });

});
Copy
package main

import (
	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apimanagement.NewProduct(ctx, "product", &apimanagement.ProductArgs{
			DisplayName:       pulumi.String("Test Template ProductName 4"),
			ProductId:         pulumi.String("testproduct"),
			ResourceGroupName: pulumi.String("rg1"),
			ServiceName:       pulumi.String("apimService1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.Product;
import com.pulumi.azurenative.apimanagement.ProductArgs;
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) {
        var product = new Product("product", ProductArgs.builder()
            .displayName("Test Template ProductName 4")
            .productId("testproduct")
            .resourceGroupName("rg1")
            .serviceName("apimService1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const product = new azure_native.apimanagement.Product("product", {
    displayName: "Test Template ProductName 4",
    productId: "testproduct",
    resourceGroupName: "rg1",
    serviceName: "apimService1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

product = azure_native.apimanagement.Product("product",
    display_name="Test Template ProductName 4",
    product_id="testproduct",
    resource_group_name="rg1",
    service_name="apimService1")
Copy
resources:
  product:
    type: azure-native:apimanagement:Product
    properties:
      displayName: Test Template ProductName 4
      productId: testproduct
      resourceGroupName: rg1
      serviceName: apimService1
Copy

Create Product Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Product(name: string, args: ProductArgs, opts?: CustomResourceOptions);
@overload
def Product(resource_name: str,
            args: ProductArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Product(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            service_name: Optional[str] = None,
            approval_required: Optional[bool] = None,
            description: Optional[str] = None,
            product_id: Optional[str] = None,
            state: Optional[ProductState] = None,
            subscription_required: Optional[bool] = None,
            subscriptions_limit: Optional[int] = None,
            terms: Optional[str] = None)
func NewProduct(ctx *Context, name string, args ProductArgs, opts ...ResourceOption) (*Product, error)
public Product(string name, ProductArgs args, CustomResourceOptions? opts = null)
public Product(String name, ProductArgs args)
public Product(String name, ProductArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:Product
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProductArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProductArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProductArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProductArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProductArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var productResource = new AzureNative.ApiManagement.Product("productResource", new()
{
    DisplayName = "string",
    ResourceGroupName = "string",
    ServiceName = "string",
    ApprovalRequired = false,
    Description = "string",
    ProductId = "string",
    State = AzureNative.ApiManagement.ProductState.NotPublished,
    SubscriptionRequired = false,
    SubscriptionsLimit = 0,
    Terms = "string",
});
Copy
example, err := apimanagement.NewProduct(ctx, "productResource", &apimanagement.ProductArgs{
	DisplayName:          pulumi.String("string"),
	ResourceGroupName:    pulumi.String("string"),
	ServiceName:          pulumi.String("string"),
	ApprovalRequired:     pulumi.Bool(false),
	Description:          pulumi.String("string"),
	ProductId:            pulumi.String("string"),
	State:                apimanagement.ProductStateNotPublished,
	SubscriptionRequired: pulumi.Bool(false),
	SubscriptionsLimit:   pulumi.Int(0),
	Terms:                pulumi.String("string"),
})
Copy
var productResource = new Product("productResource", ProductArgs.builder()
    .displayName("string")
    .resourceGroupName("string")
    .serviceName("string")
    .approvalRequired(false)
    .description("string")
    .productId("string")
    .state("notPublished")
    .subscriptionRequired(false)
    .subscriptionsLimit(0)
    .terms("string")
    .build());
Copy
product_resource = azure_native.apimanagement.Product("productResource",
    display_name="string",
    resource_group_name="string",
    service_name="string",
    approval_required=False,
    description="string",
    product_id="string",
    state=azure_native.apimanagement.ProductState.NOT_PUBLISHED,
    subscription_required=False,
    subscriptions_limit=0,
    terms="string")
Copy
const productResource = new azure_native.apimanagement.Product("productResource", {
    displayName: "string",
    resourceGroupName: "string",
    serviceName: "string",
    approvalRequired: false,
    description: "string",
    productId: "string",
    state: azure_native.apimanagement.ProductState.NotPublished,
    subscriptionRequired: false,
    subscriptionsLimit: 0,
    terms: "string",
});
Copy
type: azure-native:apimanagement:Product
properties:
    approvalRequired: false
    description: string
    displayName: string
    productId: string
    resourceGroupName: string
    serviceName: string
    state: notPublished
    subscriptionRequired: false
    subscriptionsLimit: 0
    terms: string
Copy

Product Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Product resource accepts the following input properties:

DisplayName This property is required. string
Product name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
ApprovalRequired bool
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
Description string
Product description. May include HTML formatting tags.
ProductId Changes to this property will trigger replacement. string
Product identifier. Must be unique in the current API Management service instance.
State Pulumi.AzureNative.ApiManagement.ProductState
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
SubscriptionRequired bool
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
SubscriptionsLimit int
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
Terms string
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
DisplayName This property is required. string
Product name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
ApprovalRequired bool
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
Description string
Product description. May include HTML formatting tags.
ProductId Changes to this property will trigger replacement. string
Product identifier. Must be unique in the current API Management service instance.
State ProductStateEnum
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
SubscriptionRequired bool
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
SubscriptionsLimit int
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
Terms string
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
displayName This property is required. String
Product name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
approvalRequired Boolean
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
description String
Product description. May include HTML formatting tags.
productId Changes to this property will trigger replacement. String
Product identifier. Must be unique in the current API Management service instance.
state ProductState
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
subscriptionRequired Boolean
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
subscriptionsLimit Integer
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
terms String
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
displayName This property is required. string
Product name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
approvalRequired boolean
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
description string
Product description. May include HTML formatting tags.
productId Changes to this property will trigger replacement. string
Product identifier. Must be unique in the current API Management service instance.
state ProductState
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
subscriptionRequired boolean
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
subscriptionsLimit number
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
terms string
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
display_name This property is required. str
Product name.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the API Management service.
approval_required bool
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
description str
Product description. May include HTML formatting tags.
product_id Changes to this property will trigger replacement. str
Product identifier. Must be unique in the current API Management service instance.
state ProductState
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
subscription_required bool
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
subscriptions_limit int
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
terms str
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
displayName This property is required. String
Product name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
approvalRequired Boolean
whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
description String
Product description. May include HTML formatting tags.
productId Changes to this property will trigger replacement. String
Product identifier. Must be unique in the current API Management service instance.
state "notPublished" | "published"
whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.
subscriptionRequired Boolean
Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
subscriptionsLimit Number
Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
terms String
Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.

Outputs

All input properties are implicitly available as output properties. Additionally, the Product resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

ProductState
, ProductStateArgs

NotPublished
notPublished
Published
published
ProductStateNotPublished
notPublished
ProductStatePublished
published
NotPublished
notPublished
Published
published
NotPublished
notPublished
Published
published
NOT_PUBLISHED
notPublished
PUBLISHED
published
"notPublished"
notPublished
"published"
published

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:apimanagement:Product testproduct /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi