com.pulumi.azure.datashare.kotlin.ShareArgs.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.datashare.kotlin
import com.pulumi.azure.datashare.ShareArgs.builder
import com.pulumi.azure.datashare.kotlin.inputs.ShareSnapshotScheduleArgs
import com.pulumi.azure.datashare.kotlin.inputs.ShareSnapshotScheduleArgsBuilder
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
/**
* Manages a Data Share.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAccount = new azure.datashare.Account("example", {
* name: "example-dsa",
* location: example.location,
* resourceGroupName: example.name,
* identity: {
* type: "SystemAssigned",
* },
* tags: {
* foo: "bar",
* },
* });
* const exampleShare = new azure.datashare.Share("example", {
* name: "example_dss",
* accountId: exampleAccount.id,
* kind: "CopyBased",
* description: "example desc",
* terms: "example terms",
* snapshotSchedule: {
* name: "example-ss",
* recurrence: "Day",
* startTime: "2020-04-17T04:47:52.9614956Z",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_account = azure.datashare.Account("example",
* name="example-dsa",
* location=example.location,
* resource_group_name=example.name,
* identity=azure.datashare.AccountIdentityArgs(
* type="SystemAssigned",
* ),
* tags={
* "foo": "bar",
* })
* example_share = azure.datashare.Share("example",
* name="example_dss",
* account_id=example_account.id,
* kind="CopyBased",
* description="example desc",
* terms="example terms",
* snapshot_schedule=azure.datashare.ShareSnapshotScheduleArgs(
* name="example-ss",
* recurrence="Day",
* start_time="2020-04-17T04:47:52.9614956Z",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAccount = new Azure.DataShare.Account("example", new()
* {
* Name = "example-dsa",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Identity = new Azure.DataShare.Inputs.AccountIdentityArgs
* {
* Type = "SystemAssigned",
* },
* Tags =
* {
* { "foo", "bar" },
* },
* });
* var exampleShare = new Azure.DataShare.Share("example", new()
* {
* Name = "example_dss",
* AccountId = exampleAccount.Id,
* Kind = "CopyBased",
* Description = "example desc",
* Terms = "example terms",
* SnapshotSchedule = new Azure.DataShare.Inputs.ShareSnapshotScheduleArgs
* {
* Name = "example-ss",
* Recurrence = "Day",
* StartTime = "2020-04-17T04:47:52.9614956Z",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datashare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAccount, err := datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
* Name: pulumi.String("example-dsa"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Identity: &datashare.AccountIdentityArgs{
* Type: pulumi.String("SystemAssigned"),
* },
* Tags: pulumi.StringMap{
* "foo": pulumi.String("bar"),
* },
* })
* if err != nil {
* return err
* }
* _, err = datashare.NewShare(ctx, "example", &datashare.ShareArgs{
* Name: pulumi.String("example_dss"),
* AccountId: exampleAccount.ID(),
* Kind: pulumi.String("CopyBased"),
* Description: pulumi.String("example desc"),
* Terms: pulumi.String("example terms"),
* SnapshotSchedule: &datashare.ShareSnapshotScheduleArgs{
* Name: pulumi.String("example-ss"),
* Recurrence: pulumi.String("Day"),
* StartTime: pulumi.String("2020-04-17T04:47:52.9614956Z"),
* },
* })
* 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.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.datashare.Account;
* import com.pulumi.azure.datashare.AccountArgs;
* import com.pulumi.azure.datashare.inputs.AccountIdentityArgs;
* import com.pulumi.azure.datashare.Share;
* import com.pulumi.azure.datashare.ShareArgs;
* import com.pulumi.azure.datashare.inputs.ShareSnapshotScheduleArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("example-dsa")
* .location(example.location())
* .resourceGroupName(example.name())
* .identity(AccountIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .tags(Map.of("foo", "bar"))
* .build());
* var exampleShare = new Share("exampleShare", ShareArgs.builder()
* .name("example_dss")
* .accountId(exampleAccount.id())
* .kind("CopyBased")
* .description("example desc")
* .terms("example terms")
* .snapshotSchedule(ShareSnapshotScheduleArgs.builder()
* .name("example-ss")
* .recurrence("Day")
* .startTime("2020-04-17T04:47:52.9614956Z")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:datashare:Account
* name: example
* properties:
* name: example-dsa
* location: ${example.location}
* resourceGroupName: ${example.name}
* identity:
* type: SystemAssigned
* tags:
* foo: bar
* exampleShare:
* type: azure:datashare:Share
* name: example
* properties:
* name: example_dss
* accountId: ${exampleAccount.id}
* kind: CopyBased
* description: example desc
* terms: example terms
* snapshotSchedule:
* name: example-ss
* recurrence: Day
* startTime: 2020-04-17T04:47:52.9614956Z
* ```
*
* ## Import
* Data Shares can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:datashare/share:Share example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1
* ```
* @property accountId The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
* @property description The Data Share's description.
* @property kind The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
* @property name The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
* @property snapshotSchedule A `snapshot_schedule` block as defined below.
* @property terms The terms of the Data Share.
*/
public data class ShareArgs(
public val accountId: Output? = null,
public val description: Output? = null,
public val kind: Output? = null,
public val name: Output? = null,
public val snapshotSchedule: Output? = null,
public val terms: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.datashare.ShareArgs =
com.pulumi.azure.datashare.ShareArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.kind(kind?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.snapshotSchedule(snapshotSchedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.terms(terms?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ShareArgs].
*/
@PulumiTagMarker
public class ShareArgsBuilder internal constructor() {
private var accountId: Output? = null
private var description: Output? = null
private var kind: Output? = null
private var name: Output? = null
private var snapshotSchedule: Output? = null
private var terms: Output? = null
/**
* @param value The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
*/
@JvmName("setxiakcijuhhvcv")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The Data Share's description.
*/
@JvmName("oyxojaadtxwaxoem")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
*/
@JvmName("ayywywtuxikpqagm")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
*/
@JvmName("xhgysduxrtsrkxgu")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A `snapshot_schedule` block as defined below.
*/
@JvmName("lgswtpqwxigkurwp")
public suspend fun snapshotSchedule(`value`: Output) {
this.snapshotSchedule = value
}
/**
* @param value The terms of the Data Share.
*/
@JvmName("xtnvpsvjpgvwxrbk")
public suspend fun terms(`value`: Output) {
this.terms = value
}
/**
* @param value The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
*/
@JvmName("ajmavifjydneuofe")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The Data Share's description.
*/
@JvmName("nncjebioadrdgdqt")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
*/
@JvmName("cagawmnqnwkoctfk")
public suspend fun kind(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
*/
@JvmName("leblritmuqukvdee")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A `snapshot_schedule` block as defined below.
*/
@JvmName("xwwjrrrbyniaxnnv")
public suspend fun snapshotSchedule(`value`: ShareSnapshotScheduleArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.snapshotSchedule = mapped
}
/**
* @param argument A `snapshot_schedule` block as defined below.
*/
@JvmName("htiygbvdcaogxnrr")
public suspend
fun snapshotSchedule(argument: suspend ShareSnapshotScheduleArgsBuilder.() -> Unit) {
val toBeMapped = ShareSnapshotScheduleArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.snapshotSchedule = mapped
}
/**
* @param value The terms of the Data Share.
*/
@JvmName("hvrssovkvhokakkw")
public suspend fun terms(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.terms = mapped
}
internal fun build(): ShareArgs = ShareArgs(
accountId = accountId,
description = description,
kind = kind,
name = name,
snapshotSchedule = snapshotSchedule,
terms = terms,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy