Class ProductApi
Manages an API Management API Assignment to a Product.
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 exampleApi = Output.Tuple(exampleService, exampleService).Apply(values =>
{
var exampleService = values.Item1;
var exampleService1 = values.Item2;
return Output.Create(Azure.ApiManagement.GetApi.InvokeAsync(new Azure.ApiManagement.GetApiArgs
{
Name = "search-api",
ApiManagementName = exampleService.Name,
ResourceGroupName = exampleService1.ResourceGroupName,
Revision = "2",
}));
});
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 exampleProductApi = new Azure.ApiManagement.ProductApi("exampleProductApi", new Azure.ApiManagement.ProductApiArgs
{
ApiName = exampleApi.Apply(exampleApi => exampleApi.Name),
ProductId = exampleProduct.Apply(exampleProduct => exampleProduct.ProductId),
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 ProductApi : CustomResource
Constructors
View SourceProductApi(String, ProductApiArgs, CustomResourceOptions)
Create a ProductApi resource with the given unique name, arguments, and options.
Declaration
public ProductApi(string name, ProductApiArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ProductApiArgs | 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> |
ApiName
The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
Declaration
public Output<string> ApiName { 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>, ProductApiState, CustomResourceOptions)
Get an existing ProductApi resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ProductApi Get(string name, Input<string> id, ProductApiState 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. |
| ProductApiState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ProductApi |