Datastore Args
data class DatastoreArgs(val datastoreName: Output<String>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val inventoryItemId: Output<String>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val moRefId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vCenterId: Output<String>? = null) : ConvertibleToJava<DatastoreArgs>
Define the datastore. API Version: 2020-10-01-preview.
Example Usage
CreateDatastore
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var datastore = new AzureNative.ConnectedVMwarevSphere.Datastore("datastore", new()
{
DatastoreName = "HRDatastore",
ExtendedLocation = new AzureNative.ConnectedVMwarevSphere.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso",
Type = "customLocation",
},
Location = "East US",
MoRefId = "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
ResourceGroupName = "testrg",
VCenterId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter",
});
});
Content copied to clipboard
package main
import (
connectedvmwarevsphere "github.com/pulumi/pulumi-azure-native-sdk/connectedvmwarevsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := connectedvmwarevsphere.NewDatastore(ctx, "datastore", &connectedvmwarevsphere.DatastoreArgs{
DatastoreName: pulumi.String("HRDatastore"),
ExtendedLocation: &connectedvmwarevsphere.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
Type: pulumi.String("customLocation"),
},
Location: pulumi.String("East US"),
MoRefId: pulumi.String("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
ResourceGroupName: pulumi.String("testrg"),
VCenterId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.connectedvmwarevsphere.Datastore;
import com.pulumi.azurenative.connectedvmwarevsphere.DatastoreArgs;
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 datastore = new Datastore("datastore", DatastoreArgs.builder()
.datastoreName("HRDatastore")
.extendedLocation(Map.ofEntries(
Map.entry("name", "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
Map.entry("type", "customLocation")
))
.location("East US")
.moRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
.resourceGroupName("testrg")
.vCenterId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:connectedvmwarevsphere:Datastore HRDatastore /subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(datastoreName: Output<String>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, inventoryItemId: Output<String>? = null, kind: Output<String>? = null, location: Output<String>? = null, moRefId: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vCenterId: Output<String>? = null)