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.azure.netapp.kotlin.SnapshotArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.netapp.kotlin
import com.pulumi.azure.netapp.SnapshotArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a NetApp Snapshot.
* ## NetApp Snapshot 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 exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
* name: "example-virtualnetwork",
* addressSpaces: ["10.0.0.0/16"],
* location: example.location,
* resourceGroupName: example.name,
* });
* const exampleSubnet = new azure.network.Subnet("example", {
* name: "example-subnet",
* resourceGroupName: example.name,
* virtualNetworkName: exampleVirtualNetwork.name,
* addressPrefixes: ["10.0.2.0/24"],
* delegations: [{
* name: "netapp",
* serviceDelegation: {
* name: "Microsoft.Netapp/volumes",
* actions: [
* "Microsoft.Network/networkinterfaces/*",
* "Microsoft.Network/virtualNetworks/subnets/join/action",
* ],
* },
* }],
* });
* const exampleAccount = new azure.netapp.Account("example", {
* name: "example-netappaccount",
* location: example.location,
* resourceGroupName: example.name,
* });
* const examplePool = new azure.netapp.Pool("example", {
* name: "example-netapppool",
* accountName: exampleAccount.name,
* location: example.location,
* resourceGroupName: example.name,
* serviceLevel: "Premium",
* sizeInTb: 4,
* });
* const exampleVolume = new azure.netapp.Volume("example", {
* name: "example-netappvolume",
* location: example.location,
* resourceGroupName: example.name,
* accountName: exampleAccount.name,
* poolName: examplePool.name,
* volumePath: "my-unique-file-path",
* serviceLevel: "Premium",
* subnetId: exampleSubnet.id,
* storageQuotaInGb: 100,
* });
* const exampleSnapshot = new azure.netapp.Snapshot("example", {
* name: "example-netappsnapshot",
* accountName: exampleAccount.name,
* poolName: examplePool.name,
* volumeName: exampleVolume.name,
* location: example.location,
* resourceGroupName: example.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_virtual_network = azure.network.VirtualNetwork("example",
* name="example-virtualnetwork",
* address_spaces=["10.0.0.0/16"],
* location=example.location,
* resource_group_name=example.name)
* example_subnet = azure.network.Subnet("example",
* name="example-subnet",
* resource_group_name=example.name,
* virtual_network_name=example_virtual_network.name,
* address_prefixes=["10.0.2.0/24"],
* delegations=[{
* "name": "netapp",
* "service_delegation": {
* "name": "Microsoft.Netapp/volumes",
* "actions": [
* "Microsoft.Network/networkinterfaces/*",
* "Microsoft.Network/virtualNetworks/subnets/join/action",
* ],
* },
* }])
* example_account = azure.netapp.Account("example",
* name="example-netappaccount",
* location=example.location,
* resource_group_name=example.name)
* example_pool = azure.netapp.Pool("example",
* name="example-netapppool",
* account_name=example_account.name,
* location=example.location,
* resource_group_name=example.name,
* service_level="Premium",
* size_in_tb=4)
* example_volume = azure.netapp.Volume("example",
* name="example-netappvolume",
* location=example.location,
* resource_group_name=example.name,
* account_name=example_account.name,
* pool_name=example_pool.name,
* volume_path="my-unique-file-path",
* service_level="Premium",
* subnet_id=example_subnet.id,
* storage_quota_in_gb=100)
* example_snapshot = azure.netapp.Snapshot("example",
* name="example-netappsnapshot",
* account_name=example_account.name,
* pool_name=example_pool.name,
* volume_name=example_volume.name,
* location=example.location,
* resource_group_name=example.name)
* ```
* ```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 exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
* {
* Name = "example-virtualnetwork",
* AddressSpaces = new[]
* {
* "10.0.0.0/16",
* },
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var exampleSubnet = new Azure.Network.Subnet("example", new()
* {
* Name = "example-subnet",
* ResourceGroupName = example.Name,
* VirtualNetworkName = exampleVirtualNetwork.Name,
* AddressPrefixes = new[]
* {
* "10.0.2.0/24",
* },
* Delegations = new[]
* {
* new Azure.Network.Inputs.SubnetDelegationArgs
* {
* Name = "netapp",
* ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
* {
* Name = "Microsoft.Netapp/volumes",
* Actions = new[]
* {
* "Microsoft.Network/networkinterfaces/*",
* "Microsoft.Network/virtualNetworks/subnets/join/action",
* },
* },
* },
* },
* });
* var exampleAccount = new Azure.NetApp.Account("example", new()
* {
* Name = "example-netappaccount",
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var examplePool = new Azure.NetApp.Pool("example", new()
* {
* Name = "example-netapppool",
* AccountName = exampleAccount.Name,
* Location = example.Location,
* ResourceGroupName = example.Name,
* ServiceLevel = "Premium",
* SizeInTb = 4,
* });
* var exampleVolume = new Azure.NetApp.Volume("example", new()
* {
* Name = "example-netappvolume",
* Location = example.Location,
* ResourceGroupName = example.Name,
* AccountName = exampleAccount.Name,
* PoolName = examplePool.Name,
* VolumePath = "my-unique-file-path",
* ServiceLevel = "Premium",
* SubnetId = exampleSubnet.Id,
* StorageQuotaInGb = 100,
* });
* var exampleSnapshot = new Azure.NetApp.Snapshot("example", new()
* {
* Name = "example-netappsnapshot",
* AccountName = exampleAccount.Name,
* PoolName = examplePool.Name,
* VolumeName = exampleVolume.Name,
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/netapp"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "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
* }
* exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
* Name: pulumi.String("example-virtualnetwork"),
* AddressSpaces: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
* Name: pulumi.String("example-subnet"),
* ResourceGroupName: example.Name,
* VirtualNetworkName: exampleVirtualNetwork.Name,
* AddressPrefixes: pulumi.StringArray{
* pulumi.String("10.0.2.0/24"),
* },
* Delegations: network.SubnetDelegationArray{
* &network.SubnetDelegationArgs{
* Name: pulumi.String("netapp"),
* ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
* Name: pulumi.String("Microsoft.Netapp/volumes"),
* Actions: pulumi.StringArray{
* pulumi.String("Microsoft.Network/networkinterfaces/*"),
* pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* exampleAccount, err := netapp.NewAccount(ctx, "example", &netapp.AccountArgs{
* Name: pulumi.String("example-netappaccount"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* examplePool, err := netapp.NewPool(ctx, "example", &netapp.PoolArgs{
* Name: pulumi.String("example-netapppool"),
* AccountName: exampleAccount.Name,
* Location: example.Location,
* ResourceGroupName: example.Name,
* ServiceLevel: pulumi.String("Premium"),
* SizeInTb: pulumi.Int(4),
* })
* if err != nil {
* return err
* }
* exampleVolume, err := netapp.NewVolume(ctx, "example", &netapp.VolumeArgs{
* Name: pulumi.String("example-netappvolume"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* AccountName: exampleAccount.Name,
* PoolName: examplePool.Name,
* VolumePath: pulumi.String("my-unique-file-path"),
* ServiceLevel: pulumi.String("Premium"),
* SubnetId: exampleSubnet.ID(),
* StorageQuotaInGb: pulumi.Int(100),
* })
* if err != nil {
* return err
* }
* _, err = netapp.NewSnapshot(ctx, "example", &netapp.SnapshotArgs{
* Name: pulumi.String("example-netappsnapshot"),
* AccountName: exampleAccount.Name,
* PoolName: examplePool.Name,
* VolumeName: exampleVolume.Name,
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* 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.network.VirtualNetwork;
* import com.pulumi.azure.network.VirtualNetworkArgs;
* import com.pulumi.azure.network.Subnet;
* import com.pulumi.azure.network.SubnetArgs;
* import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
* import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
* import com.pulumi.azure.netapp.Account;
* import com.pulumi.azure.netapp.AccountArgs;
* import com.pulumi.azure.netapp.Pool;
* import com.pulumi.azure.netapp.PoolArgs;
* import com.pulumi.azure.netapp.Volume;
* import com.pulumi.azure.netapp.VolumeArgs;
* import com.pulumi.azure.netapp.Snapshot;
* import com.pulumi.azure.netapp.SnapshotArgs;
* 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 exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
* .name("example-virtualnetwork")
* .addressSpaces("10.0.0.0/16")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
* .name("example-subnet")
* .resourceGroupName(example.name())
* .virtualNetworkName(exampleVirtualNetwork.name())
* .addressPrefixes("10.0.2.0/24")
* .delegations(SubnetDelegationArgs.builder()
* .name("netapp")
* .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
* .name("Microsoft.Netapp/volumes")
* .actions(
* "Microsoft.Network/networkinterfaces/*",
* "Microsoft.Network/virtualNetworks/subnets/join/action")
* .build())
* .build())
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("example-netappaccount")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var examplePool = new Pool("examplePool", PoolArgs.builder()
* .name("example-netapppool")
* .accountName(exampleAccount.name())
* .location(example.location())
* .resourceGroupName(example.name())
* .serviceLevel("Premium")
* .sizeInTb("4")
* .build());
* var exampleVolume = new Volume("exampleVolume", VolumeArgs.builder()
* .name("example-netappvolume")
* .location(example.location())
* .resourceGroupName(example.name())
* .accountName(exampleAccount.name())
* .poolName(examplePool.name())
* .volumePath("my-unique-file-path")
* .serviceLevel("Premium")
* .subnetId(exampleSubnet.id())
* .storageQuotaInGb("100")
* .build());
* var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
* .name("example-netappsnapshot")
* .accountName(exampleAccount.name())
* .poolName(examplePool.name())
* .volumeName(exampleVolume.name())
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleVirtualNetwork:
* type: azure:network:VirtualNetwork
* name: example
* properties:
* name: example-virtualnetwork
* addressSpaces:
* - 10.0.0.0/16
* location: ${example.location}
* resourceGroupName: ${example.name}
* exampleSubnet:
* type: azure:network:Subnet
* name: example
* properties:
* name: example-subnet
* resourceGroupName: ${example.name}
* virtualNetworkName: ${exampleVirtualNetwork.name}
* addressPrefixes:
* - 10.0.2.0/24
* delegations:
* - name: netapp
* serviceDelegation:
* name: Microsoft.Netapp/volumes
* actions:
* - Microsoft.Network/networkinterfaces/*
* - Microsoft.Network/virtualNetworks/subnets/join/action
* exampleAccount:
* type: azure:netapp:Account
* name: example
* properties:
* name: example-netappaccount
* location: ${example.location}
* resourceGroupName: ${example.name}
* examplePool:
* type: azure:netapp:Pool
* name: example
* properties:
* name: example-netapppool
* accountName: ${exampleAccount.name}
* location: ${example.location}
* resourceGroupName: ${example.name}
* serviceLevel: Premium
* sizeInTb: '4'
* exampleVolume:
* type: azure:netapp:Volume
* name: example
* properties:
* name: example-netappvolume
* location: ${example.location}
* resourceGroupName: ${example.name}
* accountName: ${exampleAccount.name}
* poolName: ${examplePool.name}
* volumePath: my-unique-file-path
* serviceLevel: Premium
* subnetId: ${exampleSubnet.id}
* storageQuotaInGb: '100'
* exampleSnapshot:
* type: azure:netapp:Snapshot
* name: example
* properties:
* name: example-netappsnapshot
* accountName: ${exampleAccount.name}
* poolName: ${examplePool.name}
* volumeName: ${exampleVolume.name}
* location: ${example.location}
* resourceGroupName: ${example.name}
* ```
*
* ## Import
* NetApp Snapshot can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:netapp/snapshot:Snapshot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1
* ```
* @property accountName The name of the NetApp account in which the NetApp Pool should be created. Changing this forces a new resource to be created.
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property name The name of the NetApp Snapshot. Changing this forces a new resource to be created.
* @property poolName The name of the NetApp pool in which the NetApp Volume should be created. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group where the NetApp Snapshot should be created. Changing this forces a new resource to be created.
* @property volumeName The name of the NetApp volume in which the NetApp Snapshot should be created. Changing this forces a new resource to be created.
* */*/*/*/*/*/
*/
public data class SnapshotArgs(
public val accountName: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val poolName: Output? = null,
public val resourceGroupName: Output? = null,
public val volumeName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.netapp.SnapshotArgs =
com.pulumi.azure.netapp.SnapshotArgs.builder()
.accountName(accountName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.poolName(poolName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.volumeName(volumeName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SnapshotArgs].
*/
@PulumiTagMarker
public class SnapshotArgsBuilder internal constructor() {
private var accountName: Output? = null
private var location: Output? = null
private var name: Output? = null
private var poolName: Output? = null
private var resourceGroupName: Output? = null
private var volumeName: Output? = null
/**
* @param value The name of the NetApp account in which the NetApp Pool should be created. Changing this forces a new resource to be created.
*/
@JvmName("iudyqjqvetdueyrt")
public suspend fun accountName(`value`: Output) {
this.accountName = value
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("bimsewkkmrojbqfh")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the NetApp Snapshot. Changing this forces a new resource to be created.
*/
@JvmName("gqmxkesauhouwarl")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the NetApp pool in which the NetApp Volume should be created. Changing this forces a new resource to be created.
*/
@JvmName("velcpravmmttbpio")
public suspend fun poolName(`value`: Output) {
this.poolName = value
}
/**
* @param value The name of the resource group where the NetApp Snapshot should be created. Changing this forces a new resource to be created.
*/
@JvmName("lfbauiscxowqdfbd")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the NetApp volume in which the NetApp Snapshot should be created. Changing this forces a new resource to be created.
*/
@JvmName("vtabgtrrtxwgupwa")
public suspend fun volumeName(`value`: Output) {
this.volumeName = value
}
/**
* @param value The name of the NetApp account in which the NetApp Pool should be created. Changing this forces a new resource to be created.
*/
@JvmName("fpxxfxdqimddtvqb")
public suspend fun accountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountName = mapped
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("kshvfqyjntcawgwl")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the NetApp Snapshot. Changing this forces a new resource to be created.
*/
@JvmName("ofimiworwefsrrgj")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the NetApp pool in which the NetApp Volume should be created. Changing this forces a new resource to be created.
*/
@JvmName("ylmdpddstcrgjdeb")
public suspend fun poolName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.poolName = mapped
}
/**
* @param value The name of the resource group where the NetApp Snapshot should be created. Changing this forces a new resource to be created.
*/
@JvmName("qejoyduolotvaucg")
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 NetApp volume in which the NetApp Snapshot should be created. Changing this forces a new resource to be created.
*/
@JvmName("ujnjsilnfkpptbdb")
public suspend fun volumeName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.volumeName = mapped
}
internal fun build(): SnapshotArgs = SnapshotArgs(
accountName = accountName,
location = location,
name = name,
poolName = poolName,
resourceGroupName = resourceGroupName,
volumeName = volumeName,
)
}