azure-native.apimanagement.Product
Explore with Pulumi AI
Product details. Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
Other available API versions: 2016-07-07, 2016-10-10, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
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",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"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
})
}
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());
}
}
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")
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",
});
resources:
product:
type: azure-native:apimanagement:Product
properties:
displayName: Test Template ProductName 4
productId: testproduct
resourceGroupName: rg1
serviceName: apimService1
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 string
- The unique name of the resource.
- args ProductArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ProductArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProductArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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:
- Display
Name string - Product name.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - 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 string
- Product description. May include HTML formatting tags.
- Product
Id string - Product identifier. Must be unique in the current API Management service instance.
- State
Pulumi.
Azure Native. Api Management. Product State - 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 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 string - Product name.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - 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 string
- Product description. May include HTML formatting tags.
- Product
Id string - Product identifier. Must be unique in the current API Management service instance.
- State
Product
State Enum - 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 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 String - Product name.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- approval
Required 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.
- product
Id String - Product identifier. Must be unique in the current API Management service instance.
- state
Product
State - 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 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.
- subscriptions
Limit 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.
- display
Name string - Product name.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- service
Name string - The name of the API Management service.
- approval
Required 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.
- product
Id string - Product identifier. Must be unique in the current API Management service instance.
- state
Product
State - 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 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.
- subscriptions
Limit 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 str - Product name.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- service_
name 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 str - Product identifier. Must be unique in the current API Management service instance.
- state
Product
State - 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.
- display
Name String - Product name.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- approval
Required 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.
- product
Id String - Product identifier. Must be unique in the current API Management service instance.
- state
"not
Published" | "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.
- subscription
Required 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.
- subscriptions
Limit 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:
Supporting Types
ProductState, ProductStateArgs
- Not
Published - notPublished
- Published
- published
- Product
State Not Published - notPublished
- Product
State Published - published
- Not
Published - notPublished
- Published
- published
- Not
Published - notPublished
- Published
- published
- NOT_PUBLISHED
- notPublished
- PUBLISHED
- published
- "not
Published" - 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0