ProtectionIntentArgs

data class ProtectionIntentArgs(val eTag: Output<String>? = null, val fabricName: Output<String>? = null, val intentObjectName: Output<String>? = null, val location: Output<String>? = null, val properties: Output<Any>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vaultName: Output<String>? = null) : ConvertibleToJava<ProtectionIntentArgs>

Base class for backup ProtectionIntent. Uses Azure REST API version 2024-10-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01. Other available API versions: 2023-02-01, 2023-04-01, 2023-06-01, 2023-08-01, 2024-01-01, 2024-02-01, 2024-04-01, 2024-04-30-preview, 2024-07-30-preview, 2024-11-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native recoveryservices [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or Update Azure Vm Protection Intent

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var protectionIntent = new AzureNative.RecoveryServices.ProtectionIntent("protectionIntent", new()
{
FabricName = "Azure",
IntentObjectName = "vm;iaasvmcontainerv2;chamsrgtest;chamscandel",
Properties = new AzureNative.RecoveryServices.Inputs.AzureResourceProtectionIntentArgs
{
PolicyId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/vaults/myVault/backupPolicies/myPolicy",
ProtectionIntentItemType = "AzureResourceItem",
SourceResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel",
},
ResourceGroupName = "myRG",
VaultName = "myVault",
});
});
package main
import (
recoveryservices "github.com/pulumi/pulumi-azure-native-sdk/recoveryservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := recoveryservices.NewProtectionIntent(ctx, "protectionIntent", &recoveryservices.ProtectionIntentArgs{
FabricName: pulumi.String("Azure"),
IntentObjectName: pulumi.String("vm;iaasvmcontainerv2;chamsrgtest;chamscandel"),
Properties: &recoveryservices.AzureResourceProtectionIntentArgs{
PolicyId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/vaults/myVault/backupPolicies/myPolicy"),
ProtectionIntentItemType: pulumi.String("AzureResourceItem"),
SourceResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel"),
},
ResourceGroupName: pulumi.String("myRG"),
VaultName: pulumi.String("myVault"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.recoveryservices.ProtectionIntent;
import com.pulumi.azurenative.recoveryservices.ProtectionIntentArgs;
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 protectionIntent = new ProtectionIntent("protectionIntent", ProtectionIntentArgs.builder()
.fabricName("Azure")
.intentObjectName("vm;iaasvmcontainerv2;chamsrgtest;chamscandel")
.properties(AzureRecoveryServiceVaultProtectionIntentArgs.builder()
.policyId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/vaults/myVault/backupPolicies/myPolicy")
.protectionIntentItemType("AzureResourceItem")
.sourceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel")
.build())
.resourceGroupName("myRG")
.vaultName("myVault")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:recoveryservices:ProtectionIntent vm;iaasvmcontainerv2;chamsrgtest;chamscandel /Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}

Constructors

Link copied to clipboard
constructor(eTag: Output<String>? = null, fabricName: Output<String>? = null, intentObjectName: Output<String>? = null, location: Output<String>? = null, properties: Output<Any>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vaultName: Output<String>? = null)

Properties

Link copied to clipboard
val eTag: Output<String>? = null

Optional ETag.

Link copied to clipboard
val fabricName: Output<String>? = null

Fabric name associated with the backup item.

Link copied to clipboard
val intentObjectName: Output<String>? = null

Intent object name.

Link copied to clipboard
val location: Output<String>? = null

Resource location.

Link copied to clipboard
val properties: Output<Any>? = null

ProtectionIntentResource properties

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group where the recovery services vault is present.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val vaultName: Output<String>? = null

The name of the recovery services vault.

Functions

Link copied to clipboard
open override fun toJava(): ProtectionIntentArgs