azure-native.apimanagement.WorkspaceProduct
Explore with Pulumi AI
Product details. Azure REST API version: 2022-09-01-preview.
Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview.
Example Usage
ApiManagementCreateWorkspaceProduct
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceProduct = new AzureNative.ApiManagement.WorkspaceProduct("workspaceProduct", new()
{
DisplayName = "Test Template ProductName 4",
ProductId = "testproduct",
ResourceGroupName = "rg1",
ServiceName = "apimService1",
WorkspaceId = "wks1",
});
});
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.NewWorkspaceProduct(ctx, "workspaceProduct", &apimanagement.WorkspaceProductArgs{
DisplayName: pulumi.String("Test Template ProductName 4"),
ProductId: pulumi.String("testproduct"),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
WorkspaceId: pulumi.String("wks1"),
})
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.WorkspaceProduct;
import com.pulumi.azurenative.apimanagement.WorkspaceProductArgs;
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 workspaceProduct = new WorkspaceProduct("workspaceProduct", WorkspaceProductArgs.builder()
.displayName("Test Template ProductName 4")
.productId("testproduct")
.resourceGroupName("rg1")
.serviceName("apimService1")
.workspaceId("wks1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
workspace_product = azure_native.apimanagement.WorkspaceProduct("workspaceProduct",
display_name="Test Template ProductName 4",
product_id="testproduct",
resource_group_name="rg1",
service_name="apimService1",
workspace_id="wks1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const workspaceProduct = new azure_native.apimanagement.WorkspaceProduct("workspaceProduct", {
displayName: "Test Template ProductName 4",
productId: "testproduct",
resourceGroupName: "rg1",
serviceName: "apimService1",
workspaceId: "wks1",
});
resources:
workspaceProduct:
type: azure-native:apimanagement:WorkspaceProduct
properties:
displayName: Test Template ProductName 4
productId: testproduct
resourceGroupName: rg1
serviceName: apimService1
workspaceId: wks1
Create WorkspaceProduct Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceProduct(name: string, args: WorkspaceProductArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceProduct(resource_name: str,
args: WorkspaceProductArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceProduct(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
service_name: Optional[str] = None,
workspace_id: 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 NewWorkspaceProduct(ctx *Context, name string, args WorkspaceProductArgs, opts ...ResourceOption) (*WorkspaceProduct, error)
public WorkspaceProduct(string name, WorkspaceProductArgs args, CustomResourceOptions? opts = null)
public WorkspaceProduct(String name, WorkspaceProductArgs args)
public WorkspaceProduct(String name, WorkspaceProductArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:WorkspaceProduct
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 WorkspaceProductArgs
- 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 WorkspaceProductArgs
- 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 WorkspaceProductArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceProductArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceProductArgs
- 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 workspaceProductResource = new AzureNative.ApiManagement.WorkspaceProduct("workspaceProductResource", new()
{
DisplayName = "string",
ResourceGroupName = "string",
ServiceName = "string",
WorkspaceId = "string",
ApprovalRequired = false,
Description = "string",
ProductId = "string",
State = AzureNative.ApiManagement.ProductState.NotPublished,
SubscriptionRequired = false,
SubscriptionsLimit = 0,
Terms = "string",
});
example, err := apimanagement.NewWorkspaceProduct(ctx, "workspaceProductResource", &apimanagement.WorkspaceProductArgs{
DisplayName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServiceName: pulumi.String("string"),
WorkspaceId: 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 workspaceProductResource = new WorkspaceProduct("workspaceProductResource", WorkspaceProductArgs.builder()
.displayName("string")
.resourceGroupName("string")
.serviceName("string")
.workspaceId("string")
.approvalRequired(false)
.description("string")
.productId("string")
.state("notPublished")
.subscriptionRequired(false)
.subscriptionsLimit(0)
.terms("string")
.build());
workspace_product_resource = azure_native.apimanagement.WorkspaceProduct("workspaceProductResource",
display_name="string",
resource_group_name="string",
service_name="string",
workspace_id="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 workspaceProductResource = new azure_native.apimanagement.WorkspaceProduct("workspaceProductResource", {
displayName: "string",
resourceGroupName: "string",
serviceName: "string",
workspaceId: "string",
approvalRequired: false,
description: "string",
productId: "string",
state: azure_native.apimanagement.ProductState.NotPublished,
subscriptionRequired: false,
subscriptionsLimit: 0,
terms: "string",
});
type: azure-native:apimanagement:WorkspaceProduct
properties:
approvalRequired: false
description: string
displayName: string
productId: string
resourceGroupName: string
serviceName: string
state: notPublished
subscriptionRequired: false
subscriptionsLimit: 0
terms: string
workspaceId: string
WorkspaceProduct 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 WorkspaceProduct 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.
- Workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- 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.
- Workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- 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.
- workspace
Id String - Workspace identifier. Must be unique in the current API Management service instance.
- 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.
- workspace
Id string - Workspace identifier. Must be unique in the current API Management service instance.
- 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.
- workspace_
id str - Workspace identifier. Must be unique in the current API Management service instance.
- 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.
- workspace
Id String - Workspace identifier. Must be unique in the current API Management service instance.
- 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 WorkspaceProduct 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:WorkspaceProduct testproduct /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/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