// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.apimanagement;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.apimanagement.ProductTagArgs;
import com.pulumi.azure.apimanagement.inputs.ProductTagState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * Manages an API Management Product tag
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.apimanagement.Service;
 * import com.pulumi.azure.apimanagement.ServiceArgs;
 * import com.pulumi.azure.apimanagement.Product;
 * import com.pulumi.azure.apimanagement.ProductArgs;
 * import com.pulumi.azure.apimanagement.Tag;
 * import com.pulumi.azure.apimanagement.TagArgs;
 * import com.pulumi.azure.apimanagement.ProductTag;
 * import com.pulumi.azure.apimanagement.ProductTagArgs;
 * 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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleService = new Service(&#34;exampleService&#34;, ServiceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .publisherName(&#34;My Company&#34;)
 *             .publisherEmail(&#34;company@terraform.io&#34;)
 *             .skuName(&#34;Developer_1&#34;)
 *             .build());
 * 
 *         var exampleProduct = new Product(&#34;exampleProduct&#34;, ProductArgs.builder()        
 *             .productId(&#34;test-product&#34;)
 *             .apiManagementName(exampleService.name())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .displayName(&#34;Test Product&#34;)
 *             .subscriptionRequired(true)
 *             .approvalRequired(true)
 *             .published(true)
 *             .build());
 * 
 *         var exampleTag = new Tag(&#34;exampleTag&#34;, TagArgs.builder()        
 *             .apiManagementId(exampleService.id())
 *             .build());
 * 
 *         var exampleProductTag = new ProductTag(&#34;exampleProductTag&#34;, ProductTagArgs.builder()        
 *             .apiManagementProductId(exampleProduct.productId())
 *             .apiManagementName(exampleService.name())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * API Management Products can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:apimanagement/productTag:ProductTag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/products/myproduct/tags/mytag
 * ```
 * 
 */
@ResourceType(type="azure:apimanagement/productTag:ProductTag")
public class ProductTag extends com.pulumi.resources.CustomResource {
    /**
     * The name of the API Management Service. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="apiManagementName", refs={String.class}, tree="[0]")
    private Output<String> apiManagementName;

    /**
     * @return The name of the API Management Service. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> apiManagementName() {
        return this.apiManagementName;
    }
    /**
     * The name of the API Management product. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="apiManagementProductId", refs={String.class}, tree="[0]")
    private Output<String> apiManagementProductId;

    /**
     * @return The name of the API Management product. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> apiManagementProductId() {
        return this.apiManagementProductId;
    }
    /**
     * The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ProductTag(String name) {
        this(name, ProductTagArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ProductTag(String name, ProductTagArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public ProductTag(String name, ProductTagArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:apimanagement/productTag:ProductTag", name, args == null ? ProductTagArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private ProductTag(String name, Output<String> id, @Nullable ProductTagState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:apimanagement/productTag:ProductTag", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static ProductTag get(String name, Output<String> id, @Nullable ProductTagState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ProductTag(name, id, state, options);
    }
}
