TargetArgs

data class TargetArgs(val location: Output<String>? = null, val parentProviderNamespace: Output<String>? = null, val parentResourceName: Output<String>? = null, val parentResourceType: Output<String>? = null, val properties: Output<Any>? = null, val resourceGroupName: Output<String>? = null, val targetName: Output<String>? = null) : ConvertibleToJava<TargetArgs>

Model that represents a Target resource. Uses Azure REST API version 2024-03-22-preview. In version 2.x of the Azure Native provider, it used API version 2023-04-15-preview. Other available API versions: 2023-04-15-preview, 2023-09-01-preview, 2023-10-27-preview, 2023-11-01, 2024-01-01, 2024-11-01-preview, 2025-01-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native chaos [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create/update a Target that extends a virtual machine resource.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var target = new AzureNative.Chaos.Target("target", new()
{
ParentProviderNamespace = "Microsoft.Compute",
ParentResourceName = "exampleVM",
ParentResourceType = "virtualMachines",
Properties = new Dictionary<string, object?>
{
["identities"] = new[]
{
new Dictionary<string, object?>
{
["subject"] = "CN=example.subject",
["type"] = "CertificateSubjectIssuer",
},
},
},
ResourceGroupName = "exampleRG",
TargetName = "Microsoft-Agent",
});
});
package main
import (
chaos "github.com/pulumi/pulumi-azure-native-sdk/chaos/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := chaos.NewTarget(ctx, "target", &chaos.TargetArgs{
ParentProviderNamespace: pulumi.String("Microsoft.Compute"),
ParentResourceName: pulumi.String("exampleVM"),
ParentResourceType: pulumi.String("virtualMachines"),
Properties: pulumi.Any(map[string]interface{}{
"identities": []map[string]interface{}{
map[string]interface{}{
"subject": "CN=example.subject",
"type": "CertificateSubjectIssuer",
},
},
}),
ResourceGroupName: pulumi.String("exampleRG"),
TargetName: pulumi.String("Microsoft-Agent"),
})
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.chaos.Target;
import com.pulumi.azurenative.chaos.TargetArgs;
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 target = new Target("target", TargetArgs.builder()
.parentProviderNamespace("Microsoft.Compute")
.parentResourceName("exampleVM")
.parentResourceType("virtualMachines")
.properties(Map.of("identities", Map.ofEntries(
Map.entry("subject", "CN=example.subject"),
Map.entry("type", "CertificateSubjectIssuer")
)))
.resourceGroupName("exampleRG")
.targetName("Microsoft-Agent")
.build());
}
}

Import

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

$ pulumi import azure-native:chaos:Target Microsoft-Agent /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}

Constructors

Link copied to clipboard
constructor(location: Output<String>? = null, parentProviderNamespace: Output<String>? = null, parentResourceName: Output<String>? = null, parentResourceType: Output<String>? = null, properties: Output<Any>? = null, resourceGroupName: Output<String>? = null, targetName: Output<String>? = null)

Properties

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

Location of the target resource.

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

String that represents a resource provider namespace.

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

String that represents a resource name.

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

String that represents a resource type.

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

The properties of the target resource.

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

String that represents an Azure resource group.

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

String that represents a Target resource name.

Functions

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