Class ProductGroup
Manages an API Management Product Assignment to a Group.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleService = Output.Create(Azure.ApiManagement.GetService.InvokeAsync(new Azure.ApiManagement.GetServiceArgs
{
Name = "example-api",
ResourceGroupName = "example-resources",
}));
var exampleProduct = Output.Tuple(exampleService, exampleService).Apply(values =>
{
var exampleService = values.Item1;
var exampleService1 = values.Item2;
return Output.Create(Azure.ApiManagement.GetProduct.InvokeAsync(new Azure.ApiManagement.GetProductArgs
{
ProductId = "my-product",
ApiManagementName = exampleService.Name,
ResourceGroupName = exampleService1.ResourceGroupName,
}));
});
var exampleGroup = Output.Tuple(exampleService, exampleService).Apply(values =>
{
var exampleService = values.Item1;
var exampleService1 = values.Item2;
return Output.Create(Azure.ApiManagement.GetGroup.InvokeAsync(new Azure.ApiManagement.GetGroupArgs
{
Name = "my-group",
ApiManagementName = exampleService.Name,
ResourceGroupName = exampleService1.ResourceGroupName,
}));
});
var exampleProductGroup = new Azure.ApiManagement.ProductGroup("exampleProductGroup", new Azure.ApiManagement.ProductGroupArgs
{
ProductId = exampleProduct.Apply(exampleProduct => exampleProduct.ProductId),
GroupName = exampleGroup.Apply(exampleGroup => exampleGroup.Name),
ApiManagementName = exampleService.Apply(exampleService => exampleService.Name),
ResourceGroupName = exampleService.Apply(exampleService => exampleService.ResourceGroupName),
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ApiManagement
Assembly: Pulumi.Azure.dll
Syntax
public class ProductGroup : CustomResource
Constructors
View SourceProductGroup(String, ProductGroupArgs, CustomResourceOptions)
Create a ProductGroup resource with the given unique name, arguments, and options.
Declaration
public ProductGroup(string name, ProductGroupArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ProductGroupArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApiManagementName
The name of the API Management Service. Changing this forces a new resource to be created.
Declaration
public Output<string> ApiManagementName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
GroupName
The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
Declaration
public Output<string> GroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProductId
The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
Declaration
public Output<string> ProductId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ProductGroupState, CustomResourceOptions)
Get an existing ProductGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ProductGroup Get(string name, Input<string> id, ProductGroupState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ProductGroupState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ProductGroup |