ProtectionIntent

class ProtectionIntent : KotlinCustomResource

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, 2025-01-01, 2025-02-01, 2025-02-28-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/v3"
"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(AzureResourceProtectionIntentArgs.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}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

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

Optional ETag.

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

Resource location.

Link copied to clipboard
val name: Output<String>

Resource name associated with the resource.

Link copied to clipboard
val properties: Output<Any>

ProtectionIntentResource properties

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val type: Output<String>

Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...

Link copied to clipboard
val urn: Output<String>