PlacementPolicyArgs

data class PlacementPolicyArgs(val clusterName: Output<String>? = null, val displayName: Output<String>? = null, val placementPolicyName: Output<String>? = null, val privateCloudName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val state: Output<Either<String, PlacementPolicyState>>? = null, val type: Output<Either<String, PlacementPolicyType>>? = null) : ConvertibleToJava<PlacementPolicyArgs>

A vSphere Distributed Resource Scheduler (DRS) placement policy Uses Azure REST API version 2023-09-01. In version 2.x of the Azure Native provider, it used API version 2022-05-01. Other available API versions: 2022-05-01, 2023-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native avs [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

PlacementPolicies_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var placementPolicy = new AzureNative.AVS.PlacementPolicy("placementPolicy", new()
{
ClusterName = "cluster1",
PlacementPolicyName = "policy1",
PrivateCloudName = "cloud1",
ResourceGroupName = "group1",
Type = AzureNative.AVS.PlacementPolicyType.VmHost,
});
});
package main
import (
avs "github.com/pulumi/pulumi-azure-native-sdk/avs/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := avs.NewPlacementPolicy(ctx, "placementPolicy", &avs.PlacementPolicyArgs{
ClusterName: pulumi.String("cluster1"),
PlacementPolicyName: pulumi.String("policy1"),
PrivateCloudName: pulumi.String("cloud1"),
ResourceGroupName: pulumi.String("group1"),
Type: pulumi.String(avs.PlacementPolicyTypeVmHost),
})
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.avs.PlacementPolicy;
import com.pulumi.azurenative.avs.PlacementPolicyArgs;
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 placementPolicy = new PlacementPolicy("placementPolicy", PlacementPolicyArgs.builder()
.clusterName("cluster1")
.placementPolicyName("policy1")
.privateCloudName("cloud1")
.resourceGroupName("group1")
.type("VmHost")
.build());
}
}

Import

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

$ pulumi import azure-native:avs:PlacementPolicy policy1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}

Constructors

Link copied to clipboard
constructor(clusterName: Output<String>? = null, displayName: Output<String>? = null, placementPolicyName: Output<String>? = null, privateCloudName: Output<String>? = null, resourceGroupName: Output<String>? = null, state: Output<Either<String, PlacementPolicyState>>? = null, type: Output<Either<String, PlacementPolicyType>>? = null)

Properties

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

Name of the cluster

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

Display name of the placement policy

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

Name of the placement policy.

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

Name of the private cloud

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

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val state: Output<Either<String, PlacementPolicyState>>? = null

Whether the placement policy is enabled or disabled

Link copied to clipboard
val type: Output<Either<String, PlacementPolicyType>>? = null

Placement Policy type

Functions

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