![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.apimanagement.kotlin.ProductGroupArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.apimanagement.kotlin
import com.pulumi.azure.apimanagement.ProductGroupArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an API Management Product Assignment to a Group.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.apimanagement.getService({
* name: "example-api",
* resourceGroupName: "example-resources",
* });
* const exampleGetProduct = Promise.all([example, example]).then(([example, example1]) => azure.apimanagement.getProduct({
* productId: "my-product",
* apiManagementName: example.name,
* resourceGroupName: example1.resourceGroupName,
* }));
* const exampleGetGroup = Promise.all([example, example]).then(([example, example1]) => azure.apimanagement.getGroup({
* name: "my-group",
* apiManagementName: example.name,
* resourceGroupName: example1.resourceGroupName,
* }));
* const exampleProductGroup = new azure.apimanagement.ProductGroup("example", {
* productId: exampleGetProduct.then(exampleGetProduct => exampleGetProduct.productId),
* groupName: exampleGetGroup.then(exampleGetGroup => exampleGetGroup.name),
* apiManagementName: example.then(example => example.name),
* resourceGroupName: example.then(example => example.resourceGroupName),
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.apimanagement.get_service(name="example-api",
* resource_group_name="example-resources")
* example_get_product = azure.apimanagement.get_product(product_id="my-product",
* api_management_name=example.name,
* resource_group_name=example.resource_group_name)
* example_get_group = azure.apimanagement.get_group(name="my-group",
* api_management_name=example.name,
* resource_group_name=example.resource_group_name)
* example_product_group = azure.apimanagement.ProductGroup("example",
* product_id=example_get_product.product_id,
* group_name=example_get_group.name,
* api_management_name=example.name,
* resource_group_name=example.resource_group_name)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.ApiManagement.GetService.Invoke(new()
* {
* Name = "example-api",
* ResourceGroupName = "example-resources",
* });
* var exampleGetProduct = Azure.ApiManagement.GetProduct.Invoke(new()
* {
* ProductId = "my-product",
* ApiManagementName = example.Apply(getServiceResult => getServiceResult.Name),
* ResourceGroupName = example.Apply(getServiceResult => getServiceResult.ResourceGroupName),
* });
* var exampleGetGroup = Azure.ApiManagement.GetGroup.Invoke(new()
* {
* Name = "my-group",
* ApiManagementName = example.Apply(getServiceResult => getServiceResult.Name),
* ResourceGroupName = example.Apply(getServiceResult => getServiceResult.ResourceGroupName),
* });
* var exampleProductGroup = new Azure.ApiManagement.ProductGroup("example", new()
* {
* ProductId = exampleGetProduct.Apply(getProductResult => getProductResult.ProductId),
* GroupName = exampleGetGroup.Apply(getGroupResult => getGroupResult.Name),
* ApiManagementName = example.Apply(getServiceResult => getServiceResult.Name),
* ResourceGroupName = example.Apply(getServiceResult => getServiceResult.ResourceGroupName),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
* Name: "example-api",
* ResourceGroupName: "example-resources",
* }, nil)
* if err != nil {
* return err
* }
* exampleGetProduct, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
* ProductId: "my-product",
* ApiManagementName: example.Name,
* ResourceGroupName: example.ResourceGroupName,
* }, nil)
* if err != nil {
* return err
* }
* exampleGetGroup, err := apimanagement.LookupGroup(ctx, &apimanagement.LookupGroupArgs{
* Name: "my-group",
* ApiManagementName: example.Name,
* ResourceGroupName: example.ResourceGroupName,
* }, nil)
* if err != nil {
* return err
* }
* _, err = apimanagement.NewProductGroup(ctx, "example", &apimanagement.ProductGroupArgs{
* ProductId: pulumi.String(exampleGetProduct.ProductId),
* GroupName: pulumi.String(exampleGetGroup.Name),
* ApiManagementName: pulumi.String(example.Name),
* ResourceGroupName: pulumi.String(example.ResourceGroupName),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.apimanagement.ApimanagementFunctions;
* import com.pulumi.azure.apimanagement.inputs.GetServiceArgs;
* import com.pulumi.azure.apimanagement.inputs.GetProductArgs;
* import com.pulumi.azure.apimanagement.inputs.GetGroupArgs;
* import com.pulumi.azure.apimanagement.ProductGroup;
* import com.pulumi.azure.apimanagement.ProductGroupArgs;
* 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) {
* final var example = ApimanagementFunctions.getService(GetServiceArgs.builder()
* .name("example-api")
* .resourceGroupName("example-resources")
* .build());
* final var exampleGetProduct = ApimanagementFunctions.getProduct(GetProductArgs.builder()
* .productId("my-product")
* .apiManagementName(example.applyValue(getServiceResult -> getServiceResult.name()))
* .resourceGroupName(example.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
* .build());
* final var exampleGetGroup = ApimanagementFunctions.getGroup(GetGroupArgs.builder()
* .name("my-group")
* .apiManagementName(example.applyValue(getServiceResult -> getServiceResult.name()))
* .resourceGroupName(example.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
* .build());
* var exampleProductGroup = new ProductGroup("exampleProductGroup", ProductGroupArgs.builder()
* .productId(exampleGetProduct.applyValue(getProductResult -> getProductResult.productId()))
* .groupName(exampleGetGroup.applyValue(getGroupResult -> getGroupResult.name()))
* .apiManagementName(example.applyValue(getServiceResult -> getServiceResult.name()))
* .resourceGroupName(example.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleProductGroup:
* type: azure:apimanagement:ProductGroup
* name: example
* properties:
* productId: ${exampleGetProduct.productId}
* groupName: ${exampleGetGroup.name}
* apiManagementName: ${example.name}
* resourceGroupName: ${example.resourceGroupName}
* variables:
* example:
* fn::invoke:
* Function: azure:apimanagement:getService
* Arguments:
* name: example-api
* resourceGroupName: example-resources
* exampleGetProduct:
* fn::invoke:
* Function: azure:apimanagement:getProduct
* Arguments:
* productId: my-product
* apiManagementName: ${example.name}
* resourceGroupName: ${example.resourceGroupName}
* exampleGetGroup:
* fn::invoke:
* Function: azure:apimanagement:getGroup
* Arguments:
* name: my-group
* apiManagementName: ${example.name}
* resourceGroupName: ${example.resourceGroupName}
* ```
*
* ## Import
* API Management Product Groups can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:apimanagement/productGroup:ProductGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/exampleId/groups/groupId
* ```
* @property apiManagementName The name of the API Management Service. Changing this forces a new resource to be created.
* @property groupName The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
* @property productId The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
public data class ProductGroupArgs(
public val apiManagementName: Output? = null,
public val groupName: Output? = null,
public val productId: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.apimanagement.ProductGroupArgs =
com.pulumi.azure.apimanagement.ProductGroupArgs.builder()
.apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
.groupName(groupName?.applyValue({ args0 -> args0 }))
.productId(productId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ProductGroupArgs].
*/
@PulumiTagMarker
public class ProductGroupArgsBuilder internal constructor() {
private var apiManagementName: Output? = null
private var groupName: Output? = null
private var productId: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value The name of the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("tavqfuxuifcdvhud")
public suspend fun apiManagementName(`value`: Output) {
this.apiManagementName = value
}
/**
* @param value The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("qpxeejfutycitkds")
public suspend fun groupName(`value`: Output) {
this.groupName = value
}
/**
* @param value The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("vscotvvyuclaanvw")
public suspend fun productId(`value`: Output) {
this.productId = value
}
/**
* @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("rylnksqrbgfhhbgt")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("qhgtynrsummxvmqs")
public suspend fun apiManagementName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiManagementName = mapped
}
/**
* @param value The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("bcutisqawhgkdmgl")
public suspend fun groupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.groupName = mapped
}
/**
* @param value The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
*/
@JvmName("enaqjdoicmdmwryr")
public suspend fun productId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.productId = mapped
}
/**
* @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("nvcntyjpopcmvgwm")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): ProductGroupArgs = ProductGroupArgs(
apiManagementName = apiManagementName,
groupName = groupName,
productId = productId,
resourceGroupName = resourceGroupName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy