
com.pulumi.azure.marketplace.kotlin.Agreement.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.marketplace.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Agreement].
*/
@PulumiTagMarker
public class AgreementResourceBuilder internal constructor() {
public var name: String? = null
public var args: AgreementArgs = AgreementArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AgreementArgsBuilder.() -> Unit) {
val builder = AgreementArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Agreement {
val builtJavaResource = com.pulumi.azure.marketplace.Agreement(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Agreement(builtJavaResource)
}
}
/**
* Allows accepting the Legal Terms for a Marketplace Image.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const barracuda = new azure.marketplace.Agreement("barracuda", {
* publisher: "barracudanetworks",
* offer: "waf",
* plan: "hourly",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* barracuda = azure.marketplace.Agreement("barracuda",
* publisher="barracudanetworks",
* offer="waf",
* plan="hourly")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var barracuda = new Azure.Marketplace.Agreement("barracuda", new()
* {
* Publisher = "barracudanetworks",
* Offer = "waf",
* Plan = "hourly",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/marketplace"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := marketplace.NewAgreement(ctx, "barracuda", &marketplace.AgreementArgs{
* Publisher: pulumi.String("barracudanetworks"),
* Offer: pulumi.String("waf"),
* Plan: pulumi.String("hourly"),
* })
* 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.marketplace.Agreement;
* import com.pulumi.azure.marketplace.AgreementArgs;
* 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 barracuda = new Agreement("barracuda", AgreementArgs.builder()
* .publisher("barracudanetworks")
* .offer("waf")
* .plan("hourly")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* barracuda:
* type: azure:marketplace:Agreement
* properties:
* publisher: barracudanetworks
* offer: waf
* plan: hourly
* ```
*
* ## Import
* Marketplace Agreement can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:marketplace/agreement:Agreement example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/agreements/publisher1/offers/offer1/plans/plan1
* ```
*/
public class Agreement internal constructor(
override val javaResource: com.pulumi.azure.marketplace.Agreement,
) : KotlinCustomResource(javaResource, AgreementMapper) {
public val licenseTextLink: Output
get() = javaResource.licenseTextLink().applyValue({ args0 -> args0 })
/**
* The Offer of the Marketplace Image. Changing this forces a new resource to be created.
*/
public val offer: Output
get() = javaResource.offer().applyValue({ args0 -> args0 })
/**
* The Plan of the Marketplace Image. Changing this forces a new resource to be created.
*/
public val plan: Output
get() = javaResource.plan().applyValue({ args0 -> args0 })
public val privacyPolicyLink: Output
get() = javaResource.privacyPolicyLink().applyValue({ args0 -> args0 })
/**
* The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
*/
public val publisher: Output
get() = javaResource.publisher().applyValue({ args0 -> args0 })
}
public object AgreementMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.marketplace.Agreement::class == javaResource::class
override fun map(javaResource: Resource): Agreement = Agreement(
javaResource as
com.pulumi.azure.marketplace.Agreement,
)
}
/**
* @see [Agreement].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Agreement].
*/
public suspend fun agreement(name: String, block: suspend AgreementResourceBuilder.() -> Unit): Agreement {
val builder = AgreementResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Agreement].
* @param name The _unique_ name of the resulting resource.
*/
public fun agreement(name: String): Agreement {
val builder = AgreementResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy