All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.providerhub.kotlin.ProviderRegistrationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.providerhub.kotlin

import com.pulumi.azurenative.providerhub.ProviderRegistrationArgs.builder
import com.pulumi.azurenative.providerhub.kotlin.inputs.ProviderRegistrationPropertiesArgs
import com.pulumi.azurenative.providerhub.kotlin.inputs.ProviderRegistrationPropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * Azure REST API version: 2021-09-01-preview. Prior API version in Azure Native 1.x: 2020-11-20.
 * ## Example Usage
 * ### ProviderRegistrations_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var providerRegistration = new AzureNative.ProviderHub.ProviderRegistration("providerRegistration", new()
 *     {
 *         Properties = new AzureNative.ProviderHub.Inputs.ProviderRegistrationPropertiesArgs
 *         {
 *             Capabilities = new[]
 *             {
 *                 new AzureNative.ProviderHub.Inputs.ResourceProviderCapabilitiesArgs
 *                 {
 *                     Effect = AzureNative.ProviderHub.ResourceProviderCapabilitiesEffect.Allow,
 *                     QuotaId = "CSP_2015-05-01",
 *                 },
 *                 new AzureNative.ProviderHub.Inputs.ResourceProviderCapabilitiesArgs
 *                 {
 *                     Effect = AzureNative.ProviderHub.ResourceProviderCapabilitiesEffect.Allow,
 *                     QuotaId = "CSP_MG_2017-12-01",
 *                 },
 *             },
 *             Management = new AzureNative.ProviderHub.Inputs.ResourceProviderManifestPropertiesManagementArgs
 *             {
 *                 IncidentContactEmail = "[email protected]",
 *                 IncidentRoutingService = "Contoso Resource Provider",
 *                 IncidentRoutingTeam = "Contoso Triage",
 *                 ServiceTreeInfos = new[]
 *                 {
 *                     new AzureNative.ProviderHub.Inputs.ServiceTreeInfoArgs
 *                     {
 *                         ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69",
 *                         Readiness = AzureNative.ProviderHub.Readiness.InDevelopment,
 *                         ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69",
 *                     },
 *                 },
 *             },
 *             ProviderType = AzureNative.ProviderHub.ResourceProviderType.Internal,
 *             ProviderVersion = "2.0",
 *         },
 *         ProviderNamespace = "Microsoft.Contoso",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	providerhub "github.com/pulumi/pulumi-azure-native-sdk/providerhub/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := providerhub.NewProviderRegistration(ctx, "providerRegistration", &providerhub.ProviderRegistrationArgs{
 * 			Properties: &providerhub.ProviderRegistrationPropertiesArgs{
 * 				Capabilities: providerhub.ResourceProviderCapabilitiesArray{
 * 					&providerhub.ResourceProviderCapabilitiesArgs{
 * 						Effect:  pulumi.String(providerhub.ResourceProviderCapabilitiesEffectAllow),
 * 						QuotaId: pulumi.String("CSP_2015-05-01"),
 * 					},
 * 					&providerhub.ResourceProviderCapabilitiesArgs{
 * 						Effect:  pulumi.String(providerhub.ResourceProviderCapabilitiesEffectAllow),
 * 						QuotaId: pulumi.String("CSP_MG_2017-12-01"),
 * 					},
 * 				},
 * 				Management: &providerhub.ResourceProviderManifestPropertiesManagementArgs{
 * 					IncidentContactEmail:   pulumi.String("[email protected]"),
 * 					IncidentRoutingService: pulumi.String("Contoso Resource Provider"),
 * 					IncidentRoutingTeam:    pulumi.String("Contoso Triage"),
 * 					ServiceTreeInfos: providerhub.ServiceTreeInfoArray{
 * 						&providerhub.ServiceTreeInfoArgs{
 * 							ComponentId: pulumi.String("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69"),
 * 							Readiness:   pulumi.String(providerhub.ReadinessInDevelopment),
 * 							ServiceId:   pulumi.String("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69"),
 * 						},
 * 					},
 * 				},
 * 				ProviderType:    pulumi.String(providerhub.ResourceProviderTypeInternal),
 * 				ProviderVersion: pulumi.String("2.0"),
 * 			},
 * 			ProviderNamespace: pulumi.String("Microsoft.Contoso"),
 * 		})
 * 		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.azurenative.providerhub.ProviderRegistration;
 * import com.pulumi.azurenative.providerhub.ProviderRegistrationArgs;
 * import com.pulumi.azurenative.providerhub.inputs.ProviderRegistrationPropertiesArgs;
 * import com.pulumi.azurenative.providerhub.inputs.ResourceProviderManifestPropertiesManagementArgs;
 * 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 providerRegistration = new ProviderRegistration("providerRegistration", ProviderRegistrationArgs.builder()
 *             .properties(ProviderRegistrationPropertiesArgs.builder()
 *                 .capabilities(
 *                     ResourceProviderCapabilitiesArgs.builder()
 *                         .effect("Allow")
 *                         .quotaId("CSP_2015-05-01")
 *                         .build(),
 *                     ResourceProviderCapabilitiesArgs.builder()
 *                         .effect("Allow")
 *                         .quotaId("CSP_MG_2017-12-01")
 *                         .build())
 *                 .management(ResourceProviderManifestPropertiesManagementArgs.builder()
 *                     .incidentContactEmail("[email protected]")
 *                     .incidentRoutingService("Contoso Resource Provider")
 *                     .incidentRoutingTeam("Contoso Triage")
 *                     .serviceTreeInfos(ServiceTreeInfoArgs.builder()
 *                         .componentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69")
 *                         .readiness("InDevelopment")
 *                         .serviceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69")
 *                         .build())
 *                     .build())
 *                 .providerType("Internal")
 *                 .providerVersion("2.0")
 *                 .build())
 *             .providerNamespace("Microsoft.Contoso")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:providerhub:ProviderRegistration myresource1 /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}
 * ```
 * @property properties
 * @property providerNamespace The name of the resource provider hosted within ProviderHub.
 */
public data class ProviderRegistrationArgs(
    public val properties: Output? = null,
    public val providerNamespace: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.providerhub.ProviderRegistrationArgs =
        com.pulumi.azurenative.providerhub.ProviderRegistrationArgs.builder()
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .providerNamespace(providerNamespace?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProviderRegistrationArgs].
 */
@PulumiTagMarker
public class ProviderRegistrationArgsBuilder internal constructor() {
    private var properties: Output? = null

    private var providerNamespace: Output? = null

    /**
     * @param value
     */
    @JvmName("vcwcoenifwlotynh")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource provider hosted within ProviderHub.
     */
    @JvmName("hafnkttyrkfxorwv")
    public suspend fun providerNamespace(`value`: Output) {
        this.providerNamespace = value
    }

    /**
     * @param value
     */
    @JvmName("yarvityilhywopqp")
    public suspend fun properties(`value`: ProviderRegistrationPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument
     */
    @JvmName("vnbbykdxmuviwurp")
    public suspend fun properties(argument: suspend ProviderRegistrationPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = ProviderRegistrationPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource provider hosted within ProviderHub.
     */
    @JvmName("ervnsxkwctjjgswa")
    public suspend fun providerNamespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.providerNamespace = mapped
    }

    internal fun build(): ProviderRegistrationArgs = ProviderRegistrationArgs(
        properties = properties,
        providerNamespace = providerNamespace,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy