1. Packages
  2. Azure Native
  3. API Docs
  4. apimanagement
  5. WorkspaceProduct
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi

azure-native.apimanagement.WorkspaceProduct

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi

    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:

    DisplayName string
    Product name.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    WorkspaceId string
    Workspace identifier. Must be unique in the current API Management service instance.
    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 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 string
    Product name.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    WorkspaceId string
    Workspace identifier. Must be unique in the current API Management service instance.
    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 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 String
    Product name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    workspaceId String
    Workspace identifier. Must be unique in the current API Management service instance.
    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 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 string
    Product name.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    serviceName string
    The name of the API Management service.
    workspaceId string
    Workspace identifier. Must be unique in the current API Management service instance.
    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 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 str
    Product name.
    resource_group_name str
    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 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 String
    Product name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    workspaceId String
    Workspace identifier. Must be unique in the current API Management service instance.
    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 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 WorkspaceProduct resource produces the following output properties:

    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"
    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"
    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"
    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"
    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"
    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: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
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi