Target

Model that represents a Target resource. API Version: 2021-09-15-preview.

Example Usage

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

using System.Collections.Generic;
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 =
{
{ "identities", new[]
{
{
{ "subject", "CN=example.subject" },
{ "type", "CertificateSubjectIssuer" },
},
} },
},
ResourceGroupName = "exampleRG",
TargetName = "Microsoft-Agent",
});
});
package main
import (
chaos "github.com/pulumi/pulumi-azure-native/sdk/go/azure/chaos"
"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{
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/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-Agent

Properties

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

Location of the target resource.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val properties: Output<Any>

The properties of the target resource.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The system metadata of the target resource.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>