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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.compute.kotlin
import com.pulumi.azurenative.compute.SnapshotArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.DataAccessAuthMode
import com.pulumi.azurenative.compute.kotlin.enums.HyperVGeneration
import com.pulumi.azurenative.compute.kotlin.enums.NetworkAccessPolicy
import com.pulumi.azurenative.compute.kotlin.enums.OperatingSystemTypes
import com.pulumi.azurenative.compute.kotlin.enums.PublicNetworkAccess
import com.pulumi.azurenative.compute.kotlin.inputs.CopyCompletionErrorArgs
import com.pulumi.azurenative.compute.kotlin.inputs.CopyCompletionErrorArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.CreationDataArgs
import com.pulumi.azurenative.compute.kotlin.inputs.CreationDataArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.DiskSecurityProfileArgs
import com.pulumi.azurenative.compute.kotlin.inputs.DiskSecurityProfileArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.EncryptionArgs
import com.pulumi.azurenative.compute.kotlin.inputs.EncryptionArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.EncryptionSettingsCollectionArgs
import com.pulumi.azurenative.compute.kotlin.inputs.EncryptionSettingsCollectionArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.compute.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.PurchasePlanArgs
import com.pulumi.azurenative.compute.kotlin.inputs.PurchasePlanArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.SnapshotSkuArgs
import com.pulumi.azurenative.compute.kotlin.inputs.SnapshotSkuArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.SupportedCapabilitiesArgs
import com.pulumi.azurenative.compute.kotlin.inputs.SupportedCapabilitiesArgsBuilder
import com.pulumi.core.Either
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.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Snapshot resource.
* Azure REST API version: 2022-07-02. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2016-04-30-preview, 2017-03-30, 2018-06-01, 2023-01-02, 2023-04-02, 2023-10-02, 2024-03-02.
* ## Example Usage
* ### Create a snapshot by importing an unmanaged blob from a different subscription.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var snapshot = new AzureNative.Compute.Snapshot("snapshot", new()
* {
* CreationData = new AzureNative.Compute.Inputs.CreationDataArgs
* {
* CreateOption = AzureNative.Compute.DiskCreateOption.Import,
* SourceUri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
* StorageAccountId = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
* },
* Location = "West US",
* ResourceGroupName = "myResourceGroup",
* SnapshotName = "mySnapshot1",
* });
* });
* ```
* ```go
* package main
* import (
* compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewSnapshot(ctx, "snapshot", &compute.SnapshotArgs{
* CreationData: &compute.CreationDataArgs{
* CreateOption: pulumi.String(compute.DiskCreateOptionImport),
* SourceUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
* StorageAccountId: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
* },
* Location: pulumi.String("West US"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* SnapshotName: pulumi.String("mySnapshot1"),
* })
* 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.compute.Snapshot;
* import com.pulumi.azurenative.compute.SnapshotArgs;
* import com.pulumi.azurenative.compute.inputs.CreationDataArgs;
* 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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
* .creationData(CreationDataArgs.builder()
* .createOption("Import")
* .sourceUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")
* .storageAccountId("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount")
* .build())
* .location("West US")
* .resourceGroupName("myResourceGroup")
* .snapshotName("mySnapshot1")
* .build());
* }
* }
* ```
* ### Create a snapshot by importing an unmanaged blob from the same subscription.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var snapshot = new AzureNative.Compute.Snapshot("snapshot", new()
* {
* CreationData = new AzureNative.Compute.Inputs.CreationDataArgs
* {
* CreateOption = AzureNative.Compute.DiskCreateOption.Import,
* SourceUri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
* },
* Location = "West US",
* ResourceGroupName = "myResourceGroup",
* SnapshotName = "mySnapshot1",
* });
* });
* ```
* ```go
* package main
* import (
* compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewSnapshot(ctx, "snapshot", &compute.SnapshotArgs{
* CreationData: &compute.CreationDataArgs{
* CreateOption: pulumi.String(compute.DiskCreateOptionImport),
* SourceUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
* },
* Location: pulumi.String("West US"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* SnapshotName: pulumi.String("mySnapshot1"),
* })
* 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.compute.Snapshot;
* import com.pulumi.azurenative.compute.SnapshotArgs;
* import com.pulumi.azurenative.compute.inputs.CreationDataArgs;
* 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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
* .creationData(CreationDataArgs.builder()
* .createOption("Import")
* .sourceUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")
* .build())
* .location("West US")
* .resourceGroupName("myResourceGroup")
* .snapshotName("mySnapshot1")
* .build());
* }
* }
* ```
* ### Create a snapshot from an existing snapshot in the same or a different subscription in a different region.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var snapshot = new AzureNative.Compute.Snapshot("snapshot", new()
* {
* CreationData = new AzureNative.Compute.Inputs.CreationDataArgs
* {
* CreateOption = AzureNative.Compute.DiskCreateOption.CopyStart,
* SourceResourceId = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
* },
* Location = "West US",
* ResourceGroupName = "myResourceGroup",
* SnapshotName = "mySnapshot2",
* });
* });
* ```
* ```go
* package main
* import (
* compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewSnapshot(ctx, "snapshot", &compute.SnapshotArgs{
* CreationData: &compute.CreationDataArgs{
* CreateOption: pulumi.String(compute.DiskCreateOptionCopyStart),
* SourceResourceId: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
* },
* Location: pulumi.String("West US"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* SnapshotName: pulumi.String("mySnapshot2"),
* })
* 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.compute.Snapshot;
* import com.pulumi.azurenative.compute.SnapshotArgs;
* import com.pulumi.azurenative.compute.inputs.CreationDataArgs;
* 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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
* .creationData(CreationDataArgs.builder()
* .createOption("CopyStart")
* .sourceResourceId("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1")
* .build())
* .location("West US")
* .resourceGroupName("myResourceGroup")
* .snapshotName("mySnapshot2")
* .build());
* }
* }
* ```
* ### Create a snapshot from an existing snapshot in the same or a different subscription.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var snapshot = new AzureNative.Compute.Snapshot("snapshot", new()
* {
* CreationData = new AzureNative.Compute.Inputs.CreationDataArgs
* {
* CreateOption = AzureNative.Compute.DiskCreateOption.Copy,
* SourceResourceId = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
* },
* Location = "West US",
* ResourceGroupName = "myResourceGroup",
* SnapshotName = "mySnapshot2",
* });
* });
* ```
* ```go
* package main
* import (
* compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewSnapshot(ctx, "snapshot", &compute.SnapshotArgs{
* CreationData: &compute.CreationDataArgs{
* CreateOption: pulumi.String(compute.DiskCreateOptionCopy),
* SourceResourceId: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
* },
* Location: pulumi.String("West US"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* SnapshotName: pulumi.String("mySnapshot2"),
* })
* 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.compute.Snapshot;
* import com.pulumi.azurenative.compute.SnapshotArgs;
* import com.pulumi.azurenative.compute.inputs.CreationDataArgs;
* 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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
* .creationData(CreationDataArgs.builder()
* .createOption("Copy")
* .sourceResourceId("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1")
* .build())
* .location("West US")
* .resourceGroupName("myResourceGroup")
* .snapshotName("mySnapshot2")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:compute:Snapshot mySnapshot2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}
* ```
* @property completionPercent Percentage complete for the background copy when a resource is created via the CopyStart operation.
* @property copyCompletionError Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
* @property creationData Disk source information. CreationData information cannot be changed after the disk has been created.
* @property dataAccessAuthMode Additional authentication requirements when exporting or uploading to a disk or snapshot.
* @property diskAccessId ARM id of the DiskAccess resource for using private endpoints on disks.
* @property diskSizeGB If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
* @property encryption Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
* @property encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
* @property extendedLocation The extended location where the snapshot will be created. Extended location cannot be changed.
* @property hyperVGeneration The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
* @property incremental Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
* @property location Resource location
* @property networkAccessPolicy Policy for accessing the disk via network.
* @property osType The Operating System type.
* @property publicNetworkAccess Policy for controlling export on the disk.
* @property purchasePlan Purchase plan information for the image from which the source disk for the snapshot was originally created.
* @property resourceGroupName The name of the resource group.
* @property securityProfile Contains the security related information for the resource.
* @property sku The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
* @property snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters.
* @property supportedCapabilities List of supported capabilities for the image from which the source disk from the snapshot was originally created.
* @property supportsHibernation Indicates the OS on a snapshot supports hibernation.
* @property tags Resource tags
*/
public data class SnapshotArgs(
public val completionPercent: Output? = null,
public val copyCompletionError: Output? = null,
public val creationData: Output? = null,
public val dataAccessAuthMode: Output>? = null,
public val diskAccessId: Output? = null,
public val diskSizeGB: Output? = null,
public val encryption: Output? = null,
public val encryptionSettingsCollection: Output? = null,
public val extendedLocation: Output? = null,
public val hyperVGeneration: Output>? = null,
public val incremental: Output? = null,
public val location: Output? = null,
public val networkAccessPolicy: Output>? = null,
public val osType: Output? = null,
public val publicNetworkAccess: Output>? = null,
public val purchasePlan: Output? = null,
public val resourceGroupName: Output? = null,
public val securityProfile: Output? = null,
public val sku: Output? = null,
public val snapshotName: Output? = null,
public val supportedCapabilities: Output? = null,
public val supportsHibernation: Output? = null,
public val tags: Output