All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.saas.kotlin.SaasSubscriptionLevelArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.saas.kotlin
import com.pulumi.azurenative.saas.SaasSubscriptionLevelArgs.builder
import com.pulumi.azurenative.saas.kotlin.inputs.SaasCreationPropertiesArgs
import com.pulumi.azurenative.saas.kotlin.inputs.SaasCreationPropertiesArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* SaaS REST API resource definition.
* Azure REST API version: 2018-03-01-beta. Prior API version in Azure Native 1.x: 2018-03-01-beta.
* ## Example Usage
* ### Create subscription level SaaS resource
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var saasSubscriptionLevel = new AzureNative.SaaS.SaasSubscriptionLevel("saasSubscriptionLevel", new()
* {
* Location = "global",
* Name = "MyContosoSubscription",
* Properties = new AzureNative.SaaS.Inputs.SaasCreationPropertiesArgs
* {
* OfferId = "contosoOffer",
* PaymentChannelMetadata =
* {
* { "AzureSubscriptionId", "155af98a-3205-47e7-883b-a2ab9db9f88d" },
* },
* PaymentChannelType = AzureNative.SaaS.PaymentChannelType.SubscriptionDelegated,
* PublisherId = "microsoft-contoso",
* SaasResourceName = "MyContosoSubscription",
* SkuId = "free",
* TermId = "hjdtn7tfnxcy",
* },
* ResourceGroupName = "my-saas-rg",
* ResourceName = "MyContosoSubscription",
* });
* });
* ```
* ```go
* package main
* import (
* saas "github.com/pulumi/pulumi-azure-native-sdk/saas/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := saas.NewSaasSubscriptionLevel(ctx, "saasSubscriptionLevel", &saas.SaasSubscriptionLevelArgs{
* Location: pulumi.String("global"),
* Name: pulumi.String("MyContosoSubscription"),
* Properties: &saas.SaasCreationPropertiesArgs{
* OfferId: pulumi.String("contosoOffer"),
* PaymentChannelMetadata: pulumi.StringMap{
* "AzureSubscriptionId": pulumi.String("155af98a-3205-47e7-883b-a2ab9db9f88d"),
* },
* PaymentChannelType: pulumi.String(saas.PaymentChannelTypeSubscriptionDelegated),
* PublisherId: pulumi.String("microsoft-contoso"),
* SaasResourceName: pulumi.String("MyContosoSubscription"),
* SkuId: pulumi.String("free"),
* TermId: pulumi.String("hjdtn7tfnxcy"),
* },
* ResourceGroupName: pulumi.String("my-saas-rg"),
* ResourceName: pulumi.String("MyContosoSubscription"),
* })
* 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.saas.SaasSubscriptionLevel;
* import com.pulumi.azurenative.saas.SaasSubscriptionLevelArgs;
* import com.pulumi.azurenative.saas.inputs.SaasCreationPropertiesArgs;
* 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 saasSubscriptionLevel = new SaasSubscriptionLevel("saasSubscriptionLevel", SaasSubscriptionLevelArgs.builder()
* .location("global")
* .name("MyContosoSubscription")
* .properties(SaasCreationPropertiesArgs.builder()
* .offerId("contosoOffer")
* .paymentChannelMetadata(Map.of("AzureSubscriptionId", "155af98a-3205-47e7-883b-a2ab9db9f88d"))
* .paymentChannelType("SubscriptionDelegated")
* .publisherId("microsoft-contoso")
* .saasResourceName("MyContosoSubscription")
* .skuId("free")
* .termId("hjdtn7tfnxcy")
* .build())
* .resourceGroupName("my-saas-rg")
* .resourceName("MyContosoSubscription")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:saas:SaasSubscriptionLevel MyContosoSubscription /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SaaS/resources/{resourceName}
* ```
* @property location Resource location. Only value allowed for SaaS is 'global'
* @property name The resource name
* @property properties Properties of the SaaS resource that are relevant for creation.
* @property resourceGroupName The name of the resource group.
* @property resourceName The name of the resource.
* @property tags the resource tags.
*/
public data class SaasSubscriptionLevelArgs(
public val location: Output? = null,
public val name: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val resourceName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.saas.SaasSubscriptionLevelArgs =
com.pulumi.azurenative.saas.SaasSubscriptionLevelArgs.builder()
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.resourceName(resourceName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [SaasSubscriptionLevelArgs].
*/
@PulumiTagMarker
public class SaasSubscriptionLevelArgsBuilder internal constructor() {
private var location: Output? = null
private var name: Output? = null
private var properties: Output? = null
private var resourceGroupName: Output? = null
private var resourceName: Output? = null
private var tags: Output>? = null
/**
* @param value Resource location. Only value allowed for SaaS is 'global'
*/
@JvmName("joutfcnfpbqvklkn")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The resource name
*/
@JvmName("gdvnobvwnwtfnhks")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Properties of the SaaS resource that are relevant for creation.
*/
@JvmName("ywpbsecrqkmgxwxv")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("jjgbplddlsfawiwg")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the resource.
*/
@JvmName("tjoavmxprjievgdu")
public suspend fun resourceName(`value`: Output) {
this.resourceName = value
}
/**
* @param value the resource tags.
*/
@JvmName("hqfsscvbemcqkogl")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Resource location. Only value allowed for SaaS is 'global'
*/
@JvmName("rvdivqsynymkjcem")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The resource name
*/
@JvmName("dfrkeaslxwqpqcxu")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Properties of the SaaS resource that are relevant for creation.
*/
@JvmName("yicsxsavaixdshpk")
public suspend fun properties(`value`: SaasCreationPropertiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param argument Properties of the SaaS resource that are relevant for creation.
*/
@JvmName("cgqwpehdbtvclmxv")
public suspend fun properties(argument: suspend SaasCreationPropertiesArgsBuilder.() -> Unit) {
val toBeMapped = SaasCreationPropertiesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.properties = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("lmjqujrrbroqtvva")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the resource.
*/
@JvmName("eactgppfrhegfwjr")
public suspend fun resourceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceName = mapped
}
/**
* @param value the resource tags.
*/
@JvmName("bvualbxstwntelpf")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values the resource tags.
*/
@JvmName("ptxcsdvbwupvprku")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): SaasSubscriptionLevelArgs = SaasSubscriptionLevelArgs(
location = location,
name = name,
properties = properties,
resourceGroupName = resourceGroupName,
resourceName = resourceName,
tags = tags,
)
}